Kaydet (Commit) 32fe0c6a authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

better way to set default for chart area fill style, related tdf#89451

Change-Id: Iee7fea0f55cf54d43a349b6cc0ffa25995069e40
üst a51300bc
...@@ -76,7 +76,7 @@ public: ...@@ -76,7 +76,7 @@ public:
/** Derived classes may implement to resolve a palette index to an RGB color. */ /** Derived classes may implement to resolve a palette index to an RGB color. */
virtual sal_Int32 getPaletteColor( sal_Int32 nPaletteIdx ) const; 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 ----------------------- // Device info and device dependent unit conversion -----------------------
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "oox/drawingml/theme.hxx" #include "oox/drawingml/theme.hxx"
#include "drawingml/chart/chartspacemodel.hxx" #include "drawingml/chart/chartspacemodel.hxx"
#include "oox/helper/modelobjecthelper.hxx" #include "oox/helper/modelobjecthelper.hxx"
#include <oox/helper/graphichelper.hxx>
namespace oox { namespace oox {
namespace drawingml { namespace drawingml {
...@@ -877,6 +878,11 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry* ...@@ -877,6 +878,11 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() ) if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) ) if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) )
*mxAutoFill = *pFillProps; *mxAutoFill = *pFillProps;
if (eObjType == OBJECTTYPE_CHARTSPACE)
{
mxAutoFill->moFillType = rData.mrFilter.getGraphicHelper().getDefaultChartAreaFillStyle();
}
} }
} }
......
...@@ -157,9 +157,9 @@ sal_Int32 GraphicHelper::getPaletteColor( sal_Int32 /*nPaletteIdx*/ ) const ...@@ -157,9 +157,9 @@ sal_Int32 GraphicHelper::getPaletteColor( sal_Int32 /*nPaletteIdx*/ ) const
return API_RGB_TRANSPARENT; 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 --------------------------- // Device info and device dependent unit conversion ---------------------------
......
...@@ -193,7 +193,7 @@ class PptGraphicHelper : public GraphicHelper ...@@ -193,7 +193,7 @@ class PptGraphicHelper : public GraphicHelper
public: public:
explicit PptGraphicHelper( const PowerPointImport& rFilter ); explicit PptGraphicHelper( const PowerPointImport& rFilter );
virtual sal_Int32 getSchemeColor( sal_Int32 nToken ) const SAL_OVERRIDE; 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: private:
const PowerPointImport& mrFilter; const PowerPointImport& mrFilter;
}; };
...@@ -209,9 +209,9 @@ sal_Int32 PptGraphicHelper::getSchemeColor( sal_Int32 nToken ) const ...@@ -209,9 +209,9 @@ sal_Int32 PptGraphicHelper::getSchemeColor( sal_Int32 nToken ) const
return mrFilter.getSchemeColor( nToken ); return mrFilter.getSchemeColor( nToken );
} }
drawing::FillStyle PptGraphicHelper::getDefaultChartAreaFillStyle() const sal_Int32 PptGraphicHelper::getDefaultChartAreaFillStyle() const
{ {
return drawing::FillStyle_NONE; return XML_noFill;
} }
} // namespace } // namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment