summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/imageicon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/imageicon.cpp')
-rw-r--r--src/ui/widget/imageicon.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/widget/imageicon.cpp b/src/ui/widget/imageicon.cpp
index 71ba4428c..79cc8ca42 100644
--- a/src/ui/widget/imageicon.cpp
+++ b/src/ui/widget/imageicon.cpp
@@ -76,7 +76,7 @@ ImageIcon::ImageIcon(const ImageIcon &other)
ImageIcon::~ImageIcon()
{
if (document)
- sp_document_unref(document);
+ document->doUnref();
}
@@ -98,11 +98,11 @@ bool ImageIcon::showSvgDocument(const SPDocument *docArg)
{
if (document)
- sp_document_unref(document);
+ document->doUnref();
SPDocument *doc = (SPDocument *)docArg;
- sp_document_ref(doc);
+ doc->doRef();
document = doc;
//This should remove it from the box, and free resources
@@ -127,7 +127,7 @@ bool ImageIcon::showSvgFile(const Glib::ustring &theFileName)
fileName = Glib::filename_to_utf8(fileName);
- SPDocument *doc = sp_document_new (fileName.c_str(), 0);
+ SPDocument *doc = SPDocument::createDoc (fileName.c_str(), 0);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
@@ -135,7 +135,7 @@ bool ImageIcon::showSvgFile(const Glib::ustring &theFileName)
showSvgDocument(doc);
- sp_document_unref(doc);
+ doc->doUnref();
return true;
}
@@ -148,7 +148,7 @@ bool ImageIcon::showSvgFromMemory(const char *xmlBuffer)
return false;
gint len = (gint)strlen(xmlBuffer);
- SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ SPDocument *doc = SPDocument::createDocFromMem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
@@ -156,7 +156,7 @@ bool ImageIcon::showSvgFromMemory(const char *xmlBuffer)
showSvgDocument(doc);
- sp_document_unref(doc);
+ doc->doUnref();
return true;
}