summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-11-28 19:57:58 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-11-30 14:26:53 +0100
commit81cd386facedfbb15be6dffc10351262abf733f3 (patch)
tree6e55d7bc03aad2932b7723fdc7696b162795731b /oox
parentef8e38266b13800518830917a71dde4d3ee8f7ef (diff)
bnc#904423: Text(box) is rendered white on white when it is not
The problem was that the background color defined by theme was not imported correctly, because the different fill style comes from different sources (master slide, theme, direct formatting) were applied on the shape in wrong order. To solve this we need to store master slide defined fill style in a different variable so theme style can be applied after master slide defined style but before direct formatting. Change-Id: I99ea981858b9fa391915570187c8ddfdf2be1f7a
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2d489028c50c..819c5607963e 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -96,6 +96,7 @@ Shape::Shape( const sal_Char* pServiceName, bool bDefaultHeight )
: mbIsChild( false )
, mpLinePropertiesPtr( new LineProperties )
, mpFillPropertiesPtr( new FillProperties )
+, mpShapeRefFillPropPtr( new FillProperties )
, mpGraphicPropertiesPtr( new GraphicProperties )
, mpCustomShapePropertiesPtr( new CustomShapeProperties )
, mp3DPropertiesPtr( new Shape3DProperties )
@@ -125,6 +126,7 @@ Shape::Shape( const ShapePtr& pSourceShape )
, mpTextBody(pSourceShape->mpTextBody)
, mpLinePropertiesPtr( pSourceShape->mpLinePropertiesPtr )
, mpFillPropertiesPtr( pSourceShape->mpFillPropertiesPtr )
+, mpShapeRefFillPropPtr( pSourceShape->mpShapeRefFillPropPtr )
, mpGraphicPropertiesPtr( pSourceShape->mpGraphicPropertiesPtr )
, mpCustomShapePropertiesPtr( pSourceShape->mpCustomShapePropertiesPtr )
, mpTablePropertiesPtr( pSourceShape->mpTablePropertiesPtr )
@@ -292,7 +294,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
mpTextBody.reset();
maShapeProperties = rReferencedShape.maShapeProperties;
mpLinePropertiesPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) );
- mpFillPropertiesPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) );
+ mpShapeRefFillPropPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) );
mpCustomShapePropertiesPtr = CustomShapePropertiesPtr( new CustomShapeProperties( *rReferencedShape.mpCustomShapePropertiesPtr.get() ) );
mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : NULL );
mpEffectPropertiesPtr = EffectPropertiesPtr( new EffectProperties( *rReferencedShape.mpEffectPropertiesPtr.get() ) );
@@ -575,6 +577,9 @@ Reference< XShape > Shape::createAndInsert(
// TODO: use ph color when applying effect properties
//sal_Int32 nEffectPhClr = -1;
+ // First apply reference shape's properties (shape on the master slide)
+ aFillProperties.assignUsed( *mpShapeRefFillPropPtr );
+
if( pTheme )
{
if( const ShapeStyleRef* pLineRef = getShapeStyleRef( XML_lnRef ) )