summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-02-26 08:05:15 +0000
committermental <mental@users.sourceforge.net>2007-02-26 08:05:15 +0000
commit2ba9cef957b7251d6f929ba9826c9c266839301a (patch)
tree6d49ec90596c92af6c23d4481692aa7d96928c9e /src
parentCheck for GGO_UNHINTED not being defined (diff)
downloadinkscape-2ba9cef957b7251d6f929ba9826c9c266839301a.tar.gz
inkscape-2ba9cef957b7251d6f929ba9826c9c266839301a.zip
get rid of sp_repr_document wrapper function
(bzr r2445)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/svg.cpp2
-rw-r--r--src/inkscape.cpp2
-rw-r--r--src/sp-image.cpp2
-rw-r--r--src/xml/repr.h6
4 files changed, 3 insertions, 9 deletions
diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp
index ab9c59830..5539e0358 100644
--- a/src/extension/internal/svg.cpp
+++ b/src/extension/internal/svg.cpp
@@ -214,7 +214,7 @@ Svg::save (Inkscape::Extension::Output *mod, SPDocument *doc, const gchar *uri)
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 ac2a64ed7..016384274 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -452,7 +452,7 @@ inkscape_crash_handler (int signum)
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 06371f232..5f8b15718 100644
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
@@ -1053,7 +1053,7 @@ sp_image_repr_read_image (Inkscape::XML::Node * repr)
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 1b2cad756..1f7f68bf1 100644
--- 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,