diff options
| author | Jeff Schiller <codedread@gmail.com> | 2008-08-23 06:13:23 +0000 |
|---|---|---|
| committer | jeff_schiller <jeff_schiller@users.sourceforge.net> | 2008-08-23 06:13:23 +0000 |
| commit | 7dba27edc91ec41f0ab7fa30aab75c31e97a1947 (patch) | |
| tree | ff29af2d0b0b053f4464a94eff8978bbdcf13dfe /src/sp-text.cpp | |
| parent | Hopefully fix for the recently experienced crashes when building with -O2. I ... (diff) | |
| download | inkscape-7dba27edc91ec41f0ab7fa30aab75c31e97a1947.tar.gz inkscape-7dba27edc91ec41f0ab7fa30aab75c31e97a1947.zip | |
Support for title and desc elements when serializing as Plain SVG.
(bzr r6709)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 09b926e63..59ced44e5 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -44,6 +44,8 @@ #include "xml/quote.h" #include "xml/repr.h" #include "mod360.h" +#include "sp-title.h" +#include "sp-desc.h" #include "sp-textpath.h" #include "sp-tref.h" @@ -308,6 +310,7 @@ sp_text_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML repr = xml_doc->createElement("svg:text"); GSList *l = NULL; for (SPObject *child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) { + if (SP_IS_TITLE(child) || SP_IS_DESC(child)) continue; Inkscape::XML::Node *crepr = NULL; if (SP_IS_STRING(child)) { crepr = xml_doc->createTextNode(SP_STRING(child)->string.c_str()); @@ -323,6 +326,7 @@ sp_text_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML } } else { for (SPObject *child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) { + if (SP_IS_TITLE(child) || SP_IS_DESC(child)) continue; if (SP_IS_STRING(child)) { SP_OBJECT_REPR(child)->setContent(SP_STRING(child)->string.c_str()); } else { |
