fdo#54361: Chart background in XLSX is transparent instead of white.

Change-Id: I116e7e8c9046009cfcadc04b5367a6fe25f88d96
This commit is contained in:
Muthu Subramanian
2014-10-10 18:59:46 +05:30
parent d8a23406a5
commit aad90e18cd

View File

@@ -623,7 +623,8 @@ class FillFormatter : public DetailFormatterBase
public:
explicit FillFormatter(
ObjectFormatterData& rData,
const AutoFormatEntry* pAutoFormatEntry );
const AutoFormatEntry* pAutoFormatEntry,
const ObjectType eObjType );
/** Converts area formatting to the passed property set. */
void convertFormatting(
@@ -678,7 +679,8 @@ public:
explicit ObjectTypeFormatter(
ObjectFormatterData& rData,
const ObjectTypeFormatEntry& rEntry,
const ChartSpaceModel& rChartSpace );
const ChartSpaceModel& rChartSpace,
const ObjectType eObjType );
/** Sets frame formatting properties to the passed property set. */
void convertFrameFormatting(
@@ -854,13 +856,14 @@ void LineFormatter::convertFormatting( ShapePropertyMap& rPropMap, const ModelRe
aLineProps.pushToPropMap( rPropMap, mrData.mrFilter.getGraphicHelper(), getPhColor( nSeriesIdx ) );
}
FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry* pAutoFormatEntry ) :
FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry* pAutoFormatEntry, const ObjectType eObjType ) :
DetailFormatterBase( rData, pAutoFormatEntry )
{
if( pAutoFormatEntry )
{
mxAutoFill.reset( new FillProperties );
mxAutoFill->moFillType = XML_noFill;
if( eObjType != OBJECTTYPE_CHARTSPACE )
mxAutoFill->moFillType = XML_noFill;
if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) )
*mxAutoFill = *pFillProps;
@@ -937,9 +940,9 @@ void TextFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Te
convertFormatting( rPropSet, lclGetTextProperties( rxTextProp ) );
}
ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData& rData, const ObjectTypeFormatEntry& rEntry, const ChartSpaceModel& rChartSpace ) :
ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData& rData, const ObjectTypeFormatEntry& rEntry, const ChartSpaceModel& rChartSpace, const ObjectType eObjType ) :
maLineFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoLines, rChartSpace.mnStyle ) ),
maFillFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoFills, rChartSpace.mnStyle ) ),
maFillFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoFills, rChartSpace.mnStyle ), eObjType ),
maEffectFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoEffects, rChartSpace.mnStyle ) ),
maTextFormatter( rData, lclGetAutoTextEntry( rEntry.mpAutoTexts, rChartSpace.mnStyle ), rChartSpace.mxTextProp ),
mrModelObjHelper( rData.maModelObjHelper ),
@@ -990,7 +993,7 @@ ObjectFormatterData::ObjectFormatterData( const XmlFilterBase& rFilter, const Re
{
const ObjectTypeFormatEntry* pEntryEnd = STATIC_ARRAY_END( spObjTypeFormatEntries );
for( const ObjectTypeFormatEntry* pEntry = spObjTypeFormatEntries; pEntry != pEntryEnd; ++pEntry )
maTypeFormatters[ pEntry->meObjType ].reset( new ObjectTypeFormatter( *this, *pEntry, rChartSpace ) );
maTypeFormatters[ pEntry->meObjType ].reset( new ObjectTypeFormatter( *this, *pEntry, rChartSpace, pEntry->meObjType ) );
try
{