summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/shape.cxx')
-rw-r--r--oox/source/drawingml/shape.cxx13
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();