summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/gdkpixbuf-input.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-12 08:40:34 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-12 08:40:34 +0000
commitaadfea4113abc6863d7ab03d21b973802c41c503 (patch)
tree3f890c0c112433fd850d59558208addf1baa85da /src/extension/internal/gdkpixbuf-input.cpp
parentPot and Dutch translation update (diff)
parentA simple layout document as to what, why and how is cppification. (diff)
downloadinkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz
inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index ff272d28d..c3a30a2f0 100644
--- a/src/extension/internal/gdkpixbuf-input.cpp
+++ b/src/extension/internal/gdkpixbuf-input.cpp
@@ -55,9 +55,9 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
mime_type = "image/png";
}
- doc = sp_document_new(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
+ doc = SPDocument::createNewDoc(NULL, TRUE, TRUE);
+ bool saved = DocumentUndo::getUndoSensitive(doc);
+ DocumentUndo::setUndoSensitive(doc, false); // no need to undo in this temporary document
double width = gdk_pixbuf_get_width(pb);
double height = gdk_pixbuf_get_height(pb);
@@ -79,7 +79,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
}
// Create image node
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
+ Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *image_node = xml_doc->createElement("svg:image");
sp_repr_set_svg_double(image_node, "width", width);
sp_repr_set_svg_double(image_node, "height", height);
@@ -100,11 +100,11 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
g_object_unref(pb);
// Add it to the current layer
- SP_DOCUMENT_ROOT(doc)->appendChildRepr(image_node);
+ doc->getRoot()->appendChildRepr(image_node);
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);
+ DocumentUndo::setUndoSensitive(doc, saved);
} else {
printf("GdkPixbuf loader failed\n");
}