Code

fix bug #377958: don't write inkscape:path-effect to plain svg
authorjohanengelen <johanengelen@users.sourceforge.net>
Wed, 26 Aug 2009 21:57:36 +0000 (21:57 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Wed, 26 Aug 2009 21:57:36 +0000 (21:57 +0000)
src/sp-lpe-item.cpp
src/sp-path.cpp

index a27344ebca69fd14c2672741ba90d8830c2d3b14..e4d278e34157df42bd7f0183b89e57da96430901 100644 (file)
@@ -283,11 +283,13 @@ sp_lpe_item_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::
 {
     SPLPEItem *lpeitem = (SPLPEItem *) object;
 
-    if ( sp_lpe_item_has_path_effect(lpeitem) ) {
-        std::string href = patheffectlist_write_svg(*lpeitem->path_effect_list);
-        repr->setAttribute("inkscape:path-effect", href.c_str());
-    } else {
-        repr->setAttribute("inkscape:path-effect", NULL);
+    if (flags & SP_OBJECT_WRITE_EXT) {
+        if ( sp_lpe_item_has_path_effect(lpeitem) ) {
+            std::string href = patheffectlist_write_svg(*lpeitem->path_effect_list);
+            repr->setAttribute("inkscape:path-effect", href.c_str());
+        } else {
+            repr->setAttribute("inkscape:path-effect", NULL);
+        }
     }
 
     if (((SPObjectClass *)(parent_class))->write) {
index 04ad386d9a0fb18cf63726c96d3d9b8397452abe..a2f0f3169203539a2e08cf16f2a1716389427e2c 100644 (file)
@@ -328,13 +328,15 @@ sp_path_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML:
         repr->setAttribute("d", NULL);
     }
 
-    SPPath *path = (SPPath *) object;
-    if ( path->original_curve != NULL ) {
-        gchar *str = sp_svg_write_path(path->original_curve->get_pathvector());
-        repr->setAttribute("inkscape:original-d", str);
-        g_free(str);
-    } else {
-        repr->setAttribute("inkscape:original-d", NULL);
+    if (flags & SP_OBJECT_WRITE_EXT) {
+        SPPath *path = (SPPath *) object;
+        if ( path->original_curve != NULL ) {
+            gchar *str = sp_svg_write_path(path->original_curve->get_pathvector());
+            repr->setAttribute("inkscape:original-d", str);
+            g_free(str);
+        } else {
+            repr->setAttribute("inkscape:original-d", NULL);
+        }
     }
 
     SP_PATH(shape)->connEndPair.writeRepr(repr);