diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-06 10:16:39 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-06 10:28:18 +0200 |
commit | 639571d52b1b7e4cf912803642ca245c5dd86839 (patch) | |
tree | 922062b01450f95debcc0075e16fbb217152d19e /include | |
parent | 31650d5b4255c484faec11d570cb98a80f0120cc (diff) |
2nd part of bnc#870233: import font color from color fragment for SmartArts
SmartArt import ignores some fragments during import if
drawing fragment exists, which seems to be not complete.
In this case font style is blank (white) in data (and drawing)
fragment and the real value is defined in the ignored color fragment.
So first make color fragment parsing work, then apply font
color of "node0" style on nodes of the SmartArt.
Actually, it's a workaround, because "node0" style label
is hardcoded, for a proper solution layout fragment should
be parsed too to get the right style label, but
it interferes with the drawing fragment by now.
Change-Id: I7db89176a07eee928563d42d3896fbd02190dfa8
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/drawingml/shape.hxx | 4 | ||||
-rw-r--r-- | include/oox/ppt/pptshapegroupcontext.hxx | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index fcb499940019..f8e1b7c8e8d7 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -176,6 +176,9 @@ public: const ::std::vector<OUString>& getExtDrawings() { return maExtDrawings; } void addExtDrawingRelId( const OUString &rRelId ) { maExtDrawings.push_back( rRelId ); } + // Set font color only for extdrawings. + void setFontRefColorForNodes(const Color& rColor) { maFontRefColorForNodes = rColor; } + const Color& getFontRefColorForNodes() const { return maFontRefColorForNodes; } void setLockedCanvas(bool bLockedCanvas); bool getLockedCanvas(); void setWps(bool bWps); @@ -267,6 +270,7 @@ protected: com::sun::star::awt::Size maSize; com::sun::star::awt::Point maPosition; ::std::vector<OUString> maExtDrawings; + Color maFontRefColorForNodes; private: enum FrameType diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx index f4e1d7a3e892..847d9b6479ee 100644 --- a/include/oox/ppt/pptshapegroupcontext.hxx +++ b/include/oox/ppt/pptshapegroupcontext.hxx @@ -21,6 +21,7 @@ #define INCLUDED_OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX #include <oox/drawingml/shapegroupcontext.hxx> +#include <oox/drawingml/color.hxx> #include <oox/ppt/slidepersist.hxx> namespace oox { namespace ppt { @@ -30,7 +31,9 @@ class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext SlidePersistPtr mpSlidePersistPtr; ShapeLocation meShapeLocation; oox::drawingml::ShapePtr pGraphicShape; + void importExtDrawings(); + void applyFontRefColor(oox::drawingml::ShapePtr pShape, const oox::drawingml::Color& rFontRefColor); public: PPTShapeGroupContext( |