summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2015-05-04 10:57:06 +0000
committertavmjong-free <tavmjong@free.fr>2015-05-04 10:57:06 +0000
commit7e3aabae24c09340fd06cb69b0678158abb4a375 (patch)
tree47c2672d2432961fa8ffad7f036b09556ea42c02 /src/style.cpp
parentcmake: shorter linker list (remove duplicates) (diff)
downloadinkscape-7e3aabae24c09340fd06cb69b0678158abb4a375.tar.gz
inkscape-7e3aabae24c09340fd06cb69b0678158abb4a375.zip
Shorthands are not allowed as presentation attributes.
(bzr r14107)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp10
1 files changed, 9 insertions, 1 deletions
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<SPIBase*>::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 );