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 10:34:34 +0100
commit1141870c3c8f8e89370e3866045ffbd351fbba6a (patch)
treebdd2757c7c6548650c5b1012b6383cb19c9b25d6
parent5b5ea27cfdf614caca14af2b973063eef2cc77c3 (diff)
better way to set default for chart area fill style, related tdf#89451
(cherry picked from commit 32fe0c6adcff25a0df536127ca980413e1cabefd) Conflicts: oox/source/ppt/pptimport.cxx Change-Id: Iee7fea0f55cf54d43a349b6cc0ffa25995069e40
-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 761156fd56cc..7689a1693d4e 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 d7446a8f9d92..22b99310d490 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 {
@@ -884,6 +885,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 62d0dd58f7f5..dd2681d5de23 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 259e716393b4..aad4cc5bfcef 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -187,7 +187,7 @@ class PptGraphicHelper : public GraphicHelper
public:
explicit PptGraphicHelper( const PowerPointImport& rFilter );
virtual sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
- virtual drawing::FillStyle getDefaultChartAreaFillStyle() const;
+ virtual sal_Int32 getDefaultChartAreaFillStyle() const;
private:
const PowerPointImport& mrFilter;
};
@@ -203,9 +203,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