summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-02-18 20:16:43 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-19 15:52:21 +0100
commit83da3926ce6e9f7321fd5d633fd2678beb6c8f37 (patch)
treecec55d7a7839ba7a9695452bee6954a409d8044a
parent378f8ffee21ce20b5bb44b81ce76b4ff834fc49d (diff)
implement fill based on style also for chart area, tdf#89451
Change-Id: I7b488e222cd44e75d1e0ff7f8e545e9399f418b5 (cherry picked from commit a51300bc9223b28fc5da6059e4fe1d2af62fb323)
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx5
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx10
2 files changed, 10 insertions, 5 deletions
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
index 232ce6e5b094..6f2b3ff419a3 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -84,10 +84,7 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern
PROP_FillStyle,
uno::makeAny(getFilter().getGraphicHelper().getDefaultChartAreaFillStyle()));
- if( mrModel.mxShapeProp.is() )
- {
- getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE );
- }
+ getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE );
// convert plot area (container of all chart type groups)
PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() );
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 53328b9dee83..661fd3281b5b 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -171,6 +171,14 @@ static const AutoFormatEntry spNoFormats[] =
AUTOFORMAT_END()
};
+static const AutoFormatEntry spChartSpaceFill[] =
+{
+ AUTOFORMAT_COLOR( 1, 32, THEMED_STYLE_SUBTLE, XML_bg1 ),
+ AUTOFORMAT_COLOR( 33, 40, THEMED_STYLE_SUBTLE, XML_lt1 ),
+ AUTOFORMAT_COLOR( 41, 48, THEMED_STYLE_SUBTLE, XML_dk1 ),
+ AUTOFORMAT_END()
+};
+
static const AutoFormatEntry spDataTableLines[] =
{
AUTOFORMAT_COLORMOD( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 ),
@@ -544,7 +552,7 @@ struct ObjectTypeFormatEntry
static const ObjectTypeFormatEntry spObjTypeFormatEntries[] =
{
// object type property info auto text auto line auto fill auto effect
- TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, &saCommonPropInfo, 0, spNoFormats, spNoFormats, 0 /* eq to Ch2 */ ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, &saCommonPropInfo, 0, spNoFormats, spChartSpaceFill, 0 /* eq to Ch2 */ ),
TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, &saCommonPropInfo, spChartTitleTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ),
TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, &saCommonPropInfo, spOtherTexts, spNoFormats, spNoFormats, 0 /* eq to Ch2 */ ),
TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, &saCommonPropInfo, 0, 0 /* eq to Ch2 */, spPlotArea2dFills, 0 /* eq to Ch2 */ ),