diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-28 19:57:58 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-12-01 08:39:34 +0100 |
commit | 4c0f2b6b931aa627ae63996e4d1bd1d3fa7d8b35 (patch) | |
tree | 4a1b4d5a9e6385c656eee6a71f0c7425a8b6b724 /oox | |
parent | 2bc3dec751921984978fd7335c9dbd39a583fc90 (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.
(cherry picked from commit 81cd386facedfbb15be6dffc10351262abf733f3)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Conflicts:
sd/qa/unit/import-tests.cxx
Change-Id: I99ea981858b9fa391915570187c8ddfdf2be1f7a
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 21a559795509..56f3dc0b7e1f 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -94,6 +94,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 ) @@ -123,6 +124,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 ) @@ -303,7 +305,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() ) ); @@ -582,6 +584,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 ) ) |