diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-03 22:38:47 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-03 22:38:47 +0000 |
| commit | bd7a0a3d7793afd623480010cfc5ae6331b73087 (patch) | |
| tree | 8d8779f7a373b00cfeee8b75a461d3b471f5630d /src/extension | |
| parent | Remove massive list of inx and py files for extensions Makefile, use magic in... (diff) | |
| parent | Merge to trunk (diff) | |
| download | inkscape-bd7a0a3d7793afd623480010cfc5ae6331b73087.tar.gz inkscape-bd7a0a3d7793afd623480010cfc5ae6331b73087.zip | |
Remove dom/* code and replace two uses of dom/uri with uri.
(bzr r13107)
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/internal/odf.cpp | 19 | ||||
| -rw-r--r-- | src/extension/internal/odf.h | 9 |
2 files changed, 9 insertions, 19 deletions
diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index fcabcc4b2..52fabcf3c 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -77,12 +77,7 @@ #include "text-editing.h" #include "util/units.h" - -//# DOM-specific includes -#include "dom/dom.h" -#include "dom/util/ziptool.h" -//#include "dom/io/domstream.h" - +#include "uri.h" #include "inkscape-version.h" #include "document.h" @@ -90,6 +85,7 @@ #include "io/inkscapestream.h" #include "io/bufferstream.h" +#include <util/ziptool.h> #include <iomanip> namespace Inkscape { @@ -98,7 +94,6 @@ namespace Extension namespace Internal { //# Shorthand notation -typedef org::w3c::dom::DOMString DOMString; typedef Inkscape::IO::BufferOutputStream BufferOutputStream; typedef Inkscape::IO::OutputStreamWriter OutputStreamWriter; typedef Inkscape::IO::StringOutputStream StringOutputStream; @@ -1026,6 +1021,7 @@ static void gatherText(Inkscape::XML::Node *node, Glib::ustring &buf) } + /** * FIRST PASS. * Method descends into the repr tree, converting image, style, and gradient info @@ -1086,10 +1082,9 @@ void OdfOutput::preprocess(ZipFile &zf, Inkscape::XML::Node *node) imageTable[oldName] = newName; Glib::ustring comment = "old name was: "; comment.append(oldName); - URI oldUri(oldName); + Inkscape::URI oldUri(oldName.c_str()); //# if relative to the documentURI, get proper path - URI resUri = documentUri.resolve(oldUri); - DOMString pathName = resUri.getNativePath(); + std::string pathName = documentUri.getFullPath(oldUri.getFullPath("")); ZipEntry *ze = zf.addFile(pathName, comment); if (ze) { @@ -2105,9 +2100,7 @@ void OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gcha { reset(); - documentUri = URI(filename); - /* fixme: It looks like we really are using documentUri as a URI, so we ought to call - * g_filename_to_uri for the URI constructor. */ + documentUri = Inkscape::URI(filename); ZipFile zf; preprocess(zf, doc->rroot); diff --git a/src/extension/internal/odf.h b/src/extension/internal/odf.h index 6b915e347..f8712d5eb 100644 --- a/src/extension/internal/odf.h +++ b/src/extension/internal/odf.h @@ -23,18 +23,16 @@ #ifndef EXTENSION_INTERNAL_ODG_OUT_H #define EXTENSION_INTERNAL_ODG_OUT_H -#include <dom/dom.h> #include <io/stringstream.h> -#include <dom/uri.h> +#include <util/ziptool.h> #include "extension/implementation/implementation.h" #include <xml/repr.h> - #include <string> #include <map> -#include <dom/util/ziptool.h> +#include "uri.h" #include "sp-item.h" #include <glibmm/ustring.h> @@ -46,7 +44,6 @@ namespace Extension namespace Internal { -typedef org::w3c::dom::URI URI; typedef Inkscape::IO::Writer Writer; class StyleInfo @@ -279,7 +276,7 @@ public: private: - URI documentUri; + Inkscape::URI documentUri; void reset(); |
