summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76a95a9)
raw | patch | inline | side by side (parent: 76a95a9)
author | pjrm <pjrm@users.sourceforge.net> | |
Mon, 6 Apr 2009 23:50:14 +0000 (23:50 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Mon, 6 Apr 2009 23:50:14 +0000 (23:50 +0000) |
src/xml/repr-io.cpp | patch | blob | history |
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index adeac9735dde19f67ec8009535f16f16e5642f97..a659ab61f5ac3f0cb1345ab6ea837e1c28afd86f 100644 (file)
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -528,7 +528,7 @@ sp_repr_svg_read_node (Document *xml_doc, xmlNodePtr node, const gchar *default_
}
-void
+static void
sp_repr_save_writer(Document *doc, Inkscape::IO::Writer *out,
gchar const *default_ns)
{
out->writeString( str );
}
- Node *repr = sp_repr_document_first_child(doc);
- for ( repr = sp_repr_document_first_child(doc) ;
- repr ; repr = sp_repr_next(repr) )
+ for (Node *repr = sp_repr_document_first_child(doc);
+ repr; repr = sp_repr_next(repr))
{
- if ( repr->type() == Inkscape::XML::ELEMENT_NODE ) {
+ Inkscape::XML::NodeType const node_type = repr->type();
+ if ( node_type == Inkscape::XML::ELEMENT_NODE ) {
sp_repr_write_stream_root_element(repr, *out, TRUE, default_ns, inlineattrs, indent);
- } else if ( repr->type() == Inkscape::XML::COMMENT_NODE ) {
- sp_repr_write_stream(repr, *out, 0, TRUE, GQuark(0), inlineattrs, indent);
- out->writeChar( '\n' );
} else {
sp_repr_write_stream(repr, *out, 0, TRUE, GQuark(0), inlineattrs, indent);
+ if ( node_type == Inkscape::XML::COMMENT_NODE ) {
+ out->writeChar('\n');
+ }
}
}
}