diff options
| author | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-06-29 18:05:42 +0000 |
|---|---|---|
| committer | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-06-29 18:05:42 +0000 |
| commit | 8867de5daf309e4cdd3fce177b408618490be4f3 (patch) | |
| tree | 19a528d472e7a63f9cab97daa5c979d977db821b /src/ui/view/edit-widget.cpp | |
| parent | minor fix in Dutch translation of win32 installer (diff) | |
| download | inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.tar.gz inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.zip | |
This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options].
(bzr r9546.1.1)
Diffstat (limited to 'src/ui/view/edit-widget.cpp')
| -rw-r--r-- | src/ui/view/edit-widget.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 770a9bf87..2c325a5ee 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -1219,12 +1219,12 @@ EditWidget::shutdown() switch (response) { case Gtk::RESPONSE_YES: - sp_document_ref(doc); + doc->doRef(); sp_namedview_document_from_window(_desktop); if (sp_file_save_document(*this, doc)) { - sp_document_unref(doc); + doc->doUnref(); } else { // save dialog cancelled or save failed - sp_document_unref(doc); + doc->doUnref(); return TRUE; } break; @@ -1270,11 +1270,11 @@ EditWidget::shutdown() switch (response) { case Gtk::RESPONSE_YES: - sp_document_ref(doc); + doc->doRef(); if (sp_file_save_document(*this, doc)) { - sp_document_unref(doc); + doc->doUnref(); } else { // save dialog cancelled or save failed - sp_document_unref(doc); + doc->doUnref(); return TRUE; } break; @@ -1394,7 +1394,7 @@ EditWidget::updateScrollbars (double scale) Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) ); SPObject* root = doc->root; SPItem* item = SP_ITEM(root); - Geom::OptRect deskarea = Geom::unify(darea, sp_item_bbox_desktop(item)); + Geom::OptRect deskarea = Geom::unify(darea, item->getBboxDesktop()); /* Canvas region we always show unconditionally */ Geom::Rect carea( Geom::Point(deskarea->min()[Geom::X] * scale - 64, deskarea->max()[Geom::Y] * -scale - 64), |
