diff options
| author | Guiu Rocafort <neandertalspeople@gmail.com> | 2014-03-05 17:55:31 +0000 |
|---|---|---|
| committer | Guiu Rocafort <neandertalspeople@gmail.com> | 2014-03-05 17:55:31 +0000 |
| commit | 2f732d93349881b4c8d4a0f9ee93ef5c9dd422dc (patch) | |
| tree | 8998af65af0544ce2a92d71b82027607483a0ea3 /src/extension | |
| parent | translations from spanish to english done, it might need a little review, but... (diff) | |
| parent | Change tooltip to one more explicit to make cusp nodes (diff) | |
| download | inkscape-2f732d93349881b4c8d4a0f9ee93ef5c9dd422dc.tar.gz inkscape-2f732d93349881b4c8d4a0f9ee93ef5c9dd422dc.zip | |
completed merging
(bzr r11950.5.2)
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/internal/javafx-out.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/odf.cpp | 19 | ||||
| -rw-r--r-- | src/extension/internal/odf.h | 9 |
3 files changed, 12 insertions, 20 deletions
diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp index 035a6f0aa..e51e8d539 100644 --- a/src/extension/internal/javafx-out.cpp +++ b/src/extension/internal/javafx-out.cpp @@ -396,12 +396,14 @@ bool JavaFXOutput::doStyle(SPStyle *style) } else if (fill.isPaintserver()){ if (fill.value.href && fill.value.href->getURI() ){ - String uri = fill.value.href->getURI()->toString(); + gchar *str = fill.value.href->getURI()->toString(); + String uri = (str ? str : ""); /* trim the anchor '#' from the front */ if (uri.size() > 0 && uri[0]=='#') { uri = uri.substr(1); } out(" fill: %s()\n", sanatize(uri).c_str()); + g_free(str); } } 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(); |
