diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-22 17:53:00 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-05 13:48:24 +0000 |
commit | 4679ba35ad02a720789a8d0c571fafe4122d91a2 (patch) | |
tree | a0ca93b6234391786abde251fc5d6a9199c7096b /oox | |
parent | a623b0df102aa4530cd46322f03806dfaf267f6e (diff) |
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.
(cherry picked from commit 89206c472ecf18bfde6824cea8004921cd404365)
Conflicts:
sd/qa/unit/import-tests.cxx
Conflicts:
sd/qa/unit/import-tests.cxx
Change-Id: I62a9cd2a9b4c19f5acffc334d5e8263fe24fc8fd
Reviewed-on: https://gerrit.libreoffice.org/13606
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
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 93e9789a70c7..ef0feb770dbb 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1027,11 +1027,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(); |