From 7e3aabae24c09340fd06cb69b0678158abb4a375 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 4 May 2015 12:57:06 +0200 Subject: Shorthands are not allowed as presentation attributes. (bzr r14107) --- src/style.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/style.cpp b/src/style.cpp index b65bff53f..8b41bbbd7 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -573,7 +573,15 @@ SPStyle::read( SPObject *object, Inkscape::XML::Node *repr ) { /* 3 Presentation attributes */ // std::cout << " MERGING PRESENTATION ATTRIBUTES" << std::endl; for(std::vector::size_type i = 0; i != _properties.size(); ++i) { - _properties[i]->readAttribute( repr ); + + // Shorthands are not allowed as presentation properites. + // Note: text-decoration is converted to a shorthand in CSS 3 but can still be + // read as a non-shorthand so it should not be in this list. + // We could add a flag to SPIBase to avoid string comparison. + if( _properties[i]->name.compare( "font" ) != 0 && + _properties[i]->name.compare( "marker" ) != 0 ) { + _properties[i]->readAttribute( repr ); + } } // for(SPPropMap::iterator i = _propmap.begin(); i != _propmap.end(); ++i ) { // (this->*(i->second)).readAttribute( repr ); -- cgit v1.2.3