diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-21 15:39:36 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-22 16:36:59 +0100 |
commit | 89206c472ecf18bfde6824cea8004921cd404365 (patch) | |
tree | fcea9dca04db68631d3028c79486b5ab6b147159 /oox | |
parent | bnc#822341: PPTX export of embedded text documents (diff) | |
download | core-89206c472ecf18bfde6824cea8004921cd404365.tar.gz core-89206c472ecf18bfde6824cea8004921cd404365.zip |
bnc#862510: PPTX import: Wrong text color inside shape
When theme index is 0, it means it's unset so we should not
apply that.
Change-Id: I62a9cd2a9b4c19f5acffc334d5e8263fe24fc8fd
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 9cffa093af6d..7fdfefd94dc3 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1042,11 +1042,14 @@ Reference< XShape > Shape::createAndInsert( TextCharacterProperties aCharStyleProperties; if( const ShapeStyleRef* pFontRef = getShapeStyleRef( XML_fontRef ) ) { - if( pTheme ) - if( const TextCharacterProperties* pCharProps = pTheme->getFontStyle( pFontRef->mnThemedIdx ) ) - aCharStyleProperties.assignUsed( *pCharProps ); - SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "use font color"); - aCharStyleProperties.maCharColor.assignIfUsed( pFontRef->maPhClr ); + if( pFontRef->mnThemedIdx != 0 ) + { + if( pTheme ) + if( const TextCharacterProperties* pCharProps = pTheme->getFontStyle( pFontRef->mnThemedIdx ) ) + aCharStyleProperties.assignUsed( *pCharProps ); + SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "use font color"); + aCharStyleProperties.maCharColor.assignIfUsed( pFontRef->maPhClr ); + } } Reference < XTextCursor > xAt = xText->createTextCursor(); |