diff options
author | Armin Le Grand <alg@apache.org> | 2014-07-25 15:38:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 14:51:33 +0100 |
commit | 0347e5c77d281e4a25f79660aafb625691c4f883 (patch) | |
tree | 1878ccaa3f4fb7dcf878566ccc672912d11863dc /svgio/inc | |
parent | We're using the same rectangle for both calls, let's reuse it. (diff) | |
download | core-0347e5c77d281e4a25f79660aafb625691c4f883.tar.gz core-0347e5c77d281e4a25f79660aafb625691c4f883.zip |
Related: #i125293# Further corrections for CssStyle handling in SVG importer
(cherry picked from commit f00d6d2ea3e73e687edb1da4c32c0960eaf5010b)
Conflicts:
svgio/source/svgreader/svgnode.cxx
svgio/source/svgreader/svgstyleattributes.cxx
svgio/source/svgreader/svgstylenode.cxx
svgio/source/svgreader/svgsvgnode.cxx
Change-Id: I335b292fcdf1ebac925c9fd76ad624efb923447d
Diffstat (limited to 'svgio/inc')
-rw-r--r-- | svgio/inc/svgio/svgreader/svgnode.hxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/svgio/inc/svgio/svgreader/svgnode.hxx b/svgio/inc/svgio/svgreader/svgnode.hxx index cc88b264370e..6a5217ce4b21 100644 --- a/svgio/inc/svgio/svgreader/svgnode.hxx +++ b/svgio/inc/svgio/svgreader/svgnode.hxx @@ -108,13 +108,25 @@ namespace svgio /// Display value #i121656# Display maDisplay; - /// CSS styles + // CSS style vector chain, used in decompose phase and built up once per node. + // It contains the StyleHierarchy for the local node. INdependent from the + // node hierarchy itself which also needs to be used in style entry solving SvgStyleAttributeVector maCssStyleVector; + /// possibbe local CssStyle, e.g. style="fill:red; stroke:red;" + SvgStyleAttributes* mpLocalCssStyle; + + /// bitfield + // flag if maCssStyleVector is already computed (done only once) + bool mbCssStyleVectorBuilt : 1; + protected: /// helper to evtl. link to css style const SvgStyleAttributes* checkForCssStyle(const rtl::OUString& rClassStr, const SvgStyleAttributes& rOriginal) const; + /// helper for filling the CssStyle vector once dependent on mbCssStyleVectorBuilt + void fillCssStyleVector(const rtl::OUString& rClassStr); + public: SvgNode( SVGToken aType, @@ -122,6 +134,10 @@ namespace svgio SvgNode* pParent); virtual ~SvgNode(); + /// scan helper to read and interpret a local CssStyle to mpLocalCssStyle + void readLocalCssStyle(const rtl::OUString& aContent); + + /// style helpers void parseAttributes(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs); virtual const SvgStyleAttributes* getSvgStyleAttributes() const; virtual void parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent); |