diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
| commit | aadfea4113abc6863d7ab03d21b973802c41c503 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/ui/dialog/print.cpp | |
| parent | Pot and Dutch translation update (diff) | |
| parent | A simple layout document as to what, why and how is cppification. (diff) | |
| download | inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip | |
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/ui/dialog/print.cpp')
| -rw-r--r-- | src/ui/dialog/print.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index 2456e10da..a56cbfd9d 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -3,6 +3,7 @@ */ /* Authors: * Kees Cook <kees@outflux.net> + * Abhishek Sharma * * Copyright (C) 2007 Kees Cook * Released under GNU GPL. Read the file 'COPYING' for more information. @@ -46,8 +47,8 @@ static void draw_page( if (junk->_tab->as_bitmap()) { // Render as exported PNG - gdouble width = sp_document_width(junk->_doc); - gdouble height = sp_document_height(junk->_doc); + gdouble width = (junk->_doc)->getWidth(); + gdouble height = (junk->_doc)->getHeight(); gdouble dpi = junk->_tab->bitmap_dpi(); std::string tmp_png; std::string tmp_base = "inkscape-print-png-XXXXXX"; @@ -181,7 +182,7 @@ Print::Print(SPDocument *doc, SPItem *base) : _printop = gtk_print_operation_new (); // set up dialog title, based on document name - gchar *jobname = _doc->name ? _doc->name : _("SVG Document"); + gchar const *jobname = _doc->getName() ? _doc->getName() : _("SVG Document"); Glib::ustring title = _("Print"); title += " "; title += jobname; @@ -190,8 +191,8 @@ Print::Print(SPDocument *doc, SPItem *base) : // set up paper size to match the document size gtk_print_operation_set_unit (_printop, GTK_UNIT_POINTS); GtkPageSetup *page_setup = gtk_page_setup_new(); - gdouble doc_width = sp_document_width(_doc) * PT_PER_PX; - gdouble doc_height = sp_document_height(_doc) * PT_PER_PX; + gdouble doc_width = _doc->getWidth() * PT_PER_PX; + gdouble doc_height = _doc->getHeight() * PT_PER_PX; GtkPaperSize *paper_size; if (doc_width > doc_height) { gtk_page_setup_set_orientation (page_setup, GTK_PAGE_ORIENTATION_LANDSCAPE); |
