summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-02-18 21:19:08 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-19 15:52:59 +0100
commit3d48f83ef03d3cd49703c00003133aa63aa3c97c (patch)
tree508f7d11c682b46f13a3602e4a13e95ab9a04273
parent83da3926ce6e9f7321fd5d633fd2678beb6c8f37 (diff)
better way to set default for chart area fill style, related tdf#89451
Change-Id: Iee7fea0f55cf54d43a349b6cc0ffa25995069e40 (cherry picked from commit 32fe0c6adcff25a0df536127ca980413e1cabefd)
-rw-r--r--include/oox/helper/graphichelper.hxx2
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx6
-rw-r--r--oox/source/helper/graphichelper.cxx4
-rw-r--r--oox/source/ppt/pptimport.cxx6
4 files changed, 12 insertions, 6 deletions
diff --git a/include/oox/helper/graphichelper.hxx b/include/oox/helper/graphichelper.hxx
index 5981445d3263..09a226ceec78 100644
--- a/include/oox/helper/graphichelper.hxx
+++ b/include/oox/helper/graphichelper.hxx
@@ -76,7 +76,7 @@ public:
/** Derived classes may implement to resolve a palette index to an RGB color. */
virtual sal_Int32 getPaletteColor( sal_Int32 nPaletteIdx ) const;
- virtual css::drawing::FillStyle getDefaultChartAreaFillStyle() const;
+ virtual sal_Int32 getDefaultChartAreaFillStyle() const;
// Device info and device dependent unit conversion -----------------------
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 661fd3281b5b..d27b18f3dbeb 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -32,6 +32,7 @@
#include "oox/drawingml/theme.hxx"
#include "oox/drawingml/chart/chartspacemodel.hxx"
#include "oox/helper/modelobjecthelper.hxx"
+#include <oox/helper/graphichelper.hxx>
namespace oox {
namespace drawingml {
@@ -907,6 +908,11 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) )
*mxAutoFill = *pFillProps;
+
+ if (eObjType == OBJECTTYPE_CHARTSPACE)
+ {
+ mxAutoFill->moFillType = rData.mrFilter.getGraphicHelper().getDefaultChartAreaFillStyle();
+ }
}
}
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index 5281da2ec006..e73080670529 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -158,9 +158,9 @@ sal_Int32 GraphicHelper::getPaletteColor( sal_Int32 /*nPaletteIdx*/ ) const
return API_RGB_TRANSPARENT;
}
-drawing::FillStyle GraphicHelper::getDefaultChartAreaFillStyle() const
+sal_Int32 GraphicHelper::getDefaultChartAreaFillStyle() const
{
- return drawing::FillStyle_SOLID;
+ return XML_solidFill;
}
// Device info and device dependent unit conversion ---------------------------
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index bb200f832534..4c9705550236 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -192,7 +192,7 @@ class PptGraphicHelper : public GraphicHelper
public:
explicit PptGraphicHelper( const PowerPointImport& rFilter );
virtual sal_Int32 getSchemeColor( sal_Int32 nToken ) const SAL_OVERRIDE;
- virtual drawing::FillStyle getDefaultChartAreaFillStyle() const SAL_OVERRIDE;
+ virtual sal_Int32 getDefaultChartAreaFillStyle() const SAL_OVERRIDE;
private:
const PowerPointImport& mrFilter;
};
@@ -208,9 +208,9 @@ sal_Int32 PptGraphicHelper::getSchemeColor( sal_Int32 nToken ) const
return mrFilter.getSchemeColor( nToken );
}
-drawing::FillStyle PptGraphicHelper::getDefaultChartAreaFillStyle() const
+sal_Int32 PptGraphicHelper::getDefaultChartAreaFillStyle() const
{
- return drawing::FillStyle_NONE;
+ return XML_noFill;
}
} // namespace