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/extension/internal/gdkpixbuf-input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension/internal/gdkpixbuf-input.cpp') diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index a1295406c..2e10dae58 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -54,7 +54,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) mime_type = "image/png"; } - doc = sp_document_new(NULL, TRUE, TRUE); + doc = SPDocument::createDoc(NULL, TRUE, TRUE); bool saved = sp_document_get_undo_sensitive(doc); sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document -- cgit v1.2.3 From 121815791be2d24cb745663520b111ee914fbc09 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Thu, 1 Jul 2010 15:36:56 +0530 Subject: C++fied SPDocument added (bzr r9546.1.2) --- src/extension/internal/gdkpixbuf-input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension/internal/gdkpixbuf-input.cpp') diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 2e10dae58..4983d7eff 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -54,7 +54,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) mime_type = "image/png"; } - doc = SPDocument::createDoc(NULL, TRUE, TRUE); + doc = SPDocument::createNewDoc(NULL, TRUE, TRUE); bool saved = sp_document_get_undo_sensitive(doc); sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document -- cgit v1.2.3 From d25a9a072143eafa4a9823b84e977c4b85d45efe Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Fri, 2 Jul 2010 18:05:42 +0530 Subject: New Class SPDocumentUndo created which takes care of c++fying some non SPDocument based methods (bzr r9546.1.3) --- src/extension/internal/gdkpixbuf-input.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/extension/internal/gdkpixbuf-input.cpp') diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 4983d7eff..69fdbcfd1 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -55,8 +55,8 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) } doc = SPDocument::createNewDoc(NULL, TRUE, TRUE); - bool saved = sp_document_get_undo_sensitive(doc); - sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document + bool saved = SPDocumentUndo::get_undo_sensitive(doc); + SPDocumentUndo::set_undo_sensitive(doc, false); // no need to undo in this temporary document double width = gdk_pixbuf_get_width(pb); double height = gdk_pixbuf_get_height(pb); @@ -103,7 +103,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) Inkscape::GC::release(image_node); fit_canvas_to_drawing(doc); // restore undo, as now this document may be shown to the user if a bitmap was opened - sp_document_set_undo_sensitive(doc, saved); + SPDocumentUndo::set_undo_sensitive(doc, saved); } else { printf("GdkPixbuf loader failed\n"); } -- cgit v1.2.3