summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 762dce1)
raw | patch | inline | side by side (parent: 762dce1)
author | mental <mental@users.sourceforge.net> | |
Mon, 26 Feb 2007 08:05:15 +0000 (08:05 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Mon, 26 Feb 2007 08:05:15 +0000 (08:05 +0000) |
src/extension/internal/svg.cpp | patch | blob | history | |
src/inkscape.cpp | patch | blob | history | |
src/sp-image.cpp | patch | blob | history | |
src/xml/repr.h | patch | blob | history |
index ab9c59830f99df36bf2cf958884af4ec25c25e5d..5539e03582f2e3a772c0c86833cc15b7bd29dab1 100644 (file)
Inkscape::IO::fixupHrefs( doc, save_path, spns );
- gboolean const s = sp_repr_save_file (sp_repr_document (repr), uri, SP_SVG_NS_URI);
+ gboolean const s = sp_repr_save_file (repr->document(), uri, SP_SVG_NS_URI);
if (s == FALSE) {
throw Inkscape::Extension::Output::save_failed();
}
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index ac2a64ed7f215fe7dcb57b29bd0fdee620c56800..0163842747a78e1006ab92a9acc3edf023545ead 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
file = Inkscape::IO::fopen_utf8name(c, "w");
}
if (file) {
- sp_repr_save_stream (sp_repr_document (repr), file, SP_SVG_NS_URI);
+ sp_repr_save_stream (repr->document(), file, SP_SVG_NS_URI);
savednames = g_slist_prepend (savednames, g_strdup (c));
fclose (file);
} else {
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index 06371f232e53705d0cdf12214a79eabb03b0ac05..5f8b157181bf3da3420d858641a9b6bd3894d3dc 100644 (file)
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
if (pixbuf != NULL) return pixbuf;
} else if (!g_path_is_absolute (filename)) {
/* try to load from relative pos */
- docbase = sp_repr_document_root (sp_repr_document (repr))->attribute("sodipodi:docbase");
+ docbase = sp_repr_document_root (repr->document()->attribute("sodipodi:docbase");
if (!docbase) docbase = ".";
fullname = g_build_filename(docbase, filename, NULL);
pixbuf = Inkscape::IO::pixbuf_new_from_file( fullname, NULL );
diff --git a/src/xml/repr.h b/src/xml/repr.h
index 1b2cad756fe4554a84f6f086ab29fb6c089ca109..1f7f68bf1e00619a7701389d8a0e34e0266651c2 100644 (file)
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
@@ -143,12 +143,6 @@ inline Inkscape::XML::Node *sp_repr_document_root(Inkscape::XML::Document const
return const_cast<Inkscape::XML::Node *>(doc->root());
}
-/// Returns the node's document.
-inline Inkscape::XML::Document *sp_repr_document(Inkscape::XML::Node const *repr) {
- if (!repr) return NULL;
- return const_cast<Inkscape::XML::Document *>(repr->document());
-}
-
/* Contents */
/// Sets the node's \a key attribute to \a value.
inline unsigned sp_repr_set_attr(Inkscape::XML::Node *repr, gchar const *key, gchar const *value,