From 9bffe44ca5eef802c58c1ccf8e41800f987d6697 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 3 Nov 2012 10:21:27 +0100 Subject: Don't remove default css values if element is in or is a . (bzr r11860) --- src/attribute-rel-util.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/attribute-rel-util.cpp') 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 or is a + 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 ); } } -- cgit v1.2.3