Code

Set the xml:space attribute on <svg> once rather than on every <text>
authormiklosh <miklosh@users.sourceforge.net>
Tue, 24 Jul 2007 17:12:04 +0000 (17:12 +0000)
committermiklosh <miklosh@users.sourceforge.net>
Tue, 24 Jul 2007 17:12:04 +0000 (17:12 +0000)
src/extension/internal/pdfinput/svg-builder.cpp

index 7ca8eb0fef5b6a466f270a4bf6d10cacd4e50295..e7655e3dbb512a59191c786697b85d46b393ca0f 100644 (file)
@@ -74,6 +74,7 @@ SvgBuilder::SvgBuilder(SPDocument *document, XRef *xref) {
     _xref = xref;
     _xml_doc = sp_document_repr_doc(_doc);
     _container = _root = _doc->rroot;
+    _root->setAttribute("xml:space", "preserve");
     SvgBuilder();
 }
 
@@ -891,7 +892,6 @@ void SvgBuilder::_flushText() {
     }
 
     Inkscape::XML::Node *text_node = _xml_doc->createElement("svg:text");
-    text_node->setAttribute("xml:space", "preserve");
     // Set current text position
     sp_repr_set_svg_double(text_node, "x", first_glyph.transformed_position[0]);
     sp_repr_set_svg_double(text_node, "y", first_glyph.transformed_position[1]);