diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-12-16 05:41:25 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-12-16 05:41:25 +0000 |
| commit | 7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch) | |
| tree | a306139e829118a83516af02279c9eafd3440eaa /src/attribute-rel-util.cpp | |
| parent | Hershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff) | |
| parent | Translations.Spanish translation update by Lucas Vieites. (diff) | |
| download | inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip | |
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/attribute-rel-util.cpp')
| -rw-r--r-- | src/attribute-rel-util.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp index cf94c0c1e..38327b413 100644 --- a/src/attribute-rel-util.cpp +++ b/src/attribute-rel-util.cpp @@ -76,7 +76,14 @@ void sp_attribute_clean_recursive(Node *repr, unsigned int flags) { } for(Node *child=repr->firstChild() ; child ; child = child->next()) { - sp_attribute_clean_recursive( child, flags ); + + // Don't remove default css values if element is in <defs> or is a <symbol> + Glib::ustring element = child->name(); + unsigned int flags_temp = flags; + if( element.compare( "svg:defs" ) == 0 || element.compare( "svg:symbol" ) == 0 ) { + flags_temp &= ~(SP_ATTR_CLEAN_DEFAULT_WARN|SP_ATTR_CLEAN_DEFAULT_REMOVE); + } + sp_attribute_clean_recursive( child, flags_temp ); } } |
