From 8867de5daf309e4cdd3fce177b408618490be4f3 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Tue, 29 Jun 2010 23:35:42 +0530 Subject: 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) --- src/ui/view/edit-widget.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ui/view/edit-widget.cpp') 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), -- cgit v1.2.3