summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/filedialogimpl-gtkmm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/filedialogimpl-gtkmm.cpp')
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index fbfdc4a9b..855d5a223 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -6,6 +6,7 @@
* Joel Holdsworth
* Bruno Dilly
* Other dudes from The Inkscape Organization
+ * Abhishek Sharma
*
* Copyright (C) 2004-2007 Bob Jamison
* Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
@@ -123,9 +124,9 @@ findExpanderWidgets(Gtk::Container *parent,
bool SVGPreview::setDocument(SPDocument *doc)
{
if (document)
- sp_document_unref(document);
+ document->doUnref();
- sp_document_ref(doc);
+ doc->doRef();
document = doc;
//This should remove it from the box, and free resources
@@ -151,7 +152,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName)
* I don't know why passing false to keepalive is bad. But it
* prevents the display of an svg with a non-ascii filename
*/
- SPDocument *doc = sp_document_new (fileName.c_str(), true);
+ SPDocument *doc = SPDocument::createNewDoc (fileName.c_str(), true);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
@@ -159,7 +160,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName)
setDocument(doc);
- sp_document_unref(doc);
+ doc->doUnref();
return true;
}
@@ -172,7 +173,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer)
return false;
gint len = (gint)strlen(xmlBuffer);
- SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ SPDocument *doc = SPDocument::createNewDocFromMem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
@@ -180,7 +181,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer)
setDocument(doc);
- sp_document_unref(doc);
+ doc->doUnref();
Inkscape::GC::request_early_collection();