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:59:04 +0200
commit5e35382c435d2bfaacae35fb6f99be04bbbc1577 (patch)
tree600054ae55b115fae1e481cbdd96f93760df50b3 /include
parentd8e310afbc5c4b0ec280c36eded9ad24c5e972ec (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. (cherry picked from commit 639571d52b1b7e4cf912803642ca245c5dd86839) Conflicts: oox/source/drawingml/diagram/diagram.cxx oox/source/drawingml/diagram/diagramfragmenthandler.cxx Change-Id: I7db89176a07eee928563d42d3896fbd02190dfa8
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 9c8faa9c95db..dd0daa933dc1 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -171,6 +171,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();
const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &
@@ -246,6 +249,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(