diff options
author | Chr. Rossmanith <Chr.Rossmanith@gmx.de> | 2012-04-28 20:36:54 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-04-29 14:12:33 +0200 |
commit | 884a5ca1716704249bbd108519c64001258eb0fe (patch) | |
tree | 2ff4f2864a4f5a3b486106d39e771abd0b194a8f /filter | |
parent | 0bd553e8629104fbc37ac574017519b3f3752cb3 (diff) |
enable rendering of text without any attributes
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgreader.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index f6dc66844429..4e6f9f16b2f7 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -157,8 +157,24 @@ struct AnnotatingVisitor maParentStates.push_back(rInitialState); } - void operator()( const uno::Reference<xml::dom::XElement>& ) - {} + void operator()( const uno::Reference<xml::dom::XElement>& xElem) + { + const sal_Int32 nTagId(getTokenId(xElem->getTagName())); + if (nTagId != XML_TEXT) + return; + + maCurrState = maParentStates.back(); + maCurrState.maTransform.identity(); + maCurrState.maViewBox.reset(); + // set default font size here to ensure writing styles for text + if( !mbSeenText && XML_TEXT == nTagId ) + { + maCurrState.mnFontSize = 12.0; + mbSeenText = true; + } + // if necessary, serialize to automatic-style section + writeStyle(xElem,nTagId); + } void operator()( const uno::Reference<xml::dom::XElement>& xElem, const uno::Reference<xml::dom::XNamedNodeMap>& xAttributes ) |