summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-06-06 10:16:39 +0200
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-06-06 10:36:25 +0200
commitb54d8d2410617eec56507ba9419abbf2f356c7ff (patch)
tree5bc24bd5fd0566f2a5c58cbf3c7fde23a734f26b /include
parentc4b909bf03642b6eaa5e8c6c1157a15458c28b26 (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 (cherry picked from commit 639571d52b1b7e4cf912803642ca245c5dd86839)
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/shape.hxx4
-rw-r--r--include/oox/ppt/pptshapegroupcontext.hxx3
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(