diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
| commit | aadfea4113abc6863d7ab03d21b973802c41c503 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/extension/implementation | |
| parent | Pot and Dutch translation update (diff) | |
| parent | A simple layout document as to what, why and how is cppification. (diff) | |
| download | inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip | |
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/extension/implementation')
| -rw-r--r-- | src/extension/implementation/script.cpp | 6 | ||||
| -rw-r--r-- | src/extension/implementation/xslt.cpp | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 04c7c15a6..bc143fd14 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -6,6 +6,7 @@ * Bryce Harrington <bryce@osdl.org> * Ted Gould <ted@gould.cx> * Jon A. Cruz <jon@joncruz.org> + * Abhishek Sharma * * Copyright (C) 2002-2005,2007 Authors * @@ -532,9 +533,8 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, } // data_read if (mydoc != NULL) { - g_free(mydoc->base); - mydoc->base = NULL; - sp_document_change_uri_and_hrefs(mydoc, filenameArg); + mydoc->setBase(0); + mydoc->changeUriAndHrefs(filenameArg); } // make sure we don't leak file descriptors from g_file_open_tmp diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp index 2ab821e44..c929ba19a 100644 --- a/src/extension/implementation/xslt.cpp +++ b/src/extension/implementation/xslt.cpp @@ -4,6 +4,8 @@ /* * Authors: * Ted Gould <ted@gould.cx> + * Jon A. Cruz <jon@joncruz.org> + * Abhishek Sharma * * Copyright (C) 2006-2007 Authors * @@ -174,7 +176,7 @@ XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename) } g_free(s); - SPDocument * doc = sp_document_create(rdoc, filename, base, name, true); + SPDocument * doc = SPDocument::createDoc(rdoc, filename, base, name, true); g_free(base); g_free(name); @@ -189,8 +191,7 @@ XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const g_return_if_fail(doc != NULL); g_return_if_fail(filename != NULL); - Inkscape::XML::Node *repr = NULL; - repr = sp_document_repr_root (doc); + Inkscape::XML::Node *repr = doc->getReprRoot(); std::string tempfilename_out; int tempfd_out = 0; @@ -202,7 +203,7 @@ XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const } if (!sp_repr_save_rebased_file(repr->document(), tempfilename_out.c_str(), SP_SVG_NS_URI, - doc->base, filename)) { + doc->getBase(), filename)) { throw Inkscape::Extension::Output::save_failed(); } |
