summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-02-29 18:52:19 +0530
committerMuthu Subramanian <sumuthu@suse.com>2012-02-29 18:55:02 +0530
commit1a2a2a02bd03829d2d50fb5f1a2178280ed2e997 (patch)
treecf5b2a8d14677d356b2d751927d0170d380e1b84 /oox
parentcan use Zip for this (diff)
downloadcore-1a2a2a02bd03829d2d50fb5f1a2178280ed2e997.tar.gz
core-1a2a2a02bd03829d2d50fb5f1a2178280ed2e997.zip
n#746996: Wrong text color in smartArt.
Some fontRef elements don't seem to define color, but the spec. says it needs to be used along with choice of color. So, assuming tx1 when there are none defined.
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shapestylecontext.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/oox/source/drawingml/shapestylecontext.cxx b/oox/source/drawingml/shapestylecontext.cxx
index e0ba3dc7f4c0..e639de958e34 100644
--- a/oox/source/drawingml/shapestylecontext.cxx
+++ b/oox/source/drawingml/shapestylecontext.cxx
@@ -74,6 +74,11 @@ Reference< XFastContextHandler > ShapeStyleContext::createFastChildContext( sal_
sal_Int32 nToken = getBaseToken( aElementToken );
ShapeStyleRef& rStyleRef = mrShape.getShapeStyleRefs()[ nToken ];
rStyleRef.mnThemedIdx = (nToken == XML_fontRef) ? aAttribs.getToken( XML_idx, XML_none ) : aAttribs.getInteger( XML_idx, 0 );
+ // Set default Text Color. Some xml files don't seem
+ // to have color definitions inside fontRef - Use
+ // tx1 in such cases
+ if( nToken == XML_fontRef && !rStyleRef.maPhClr.isUsed() )
+ rStyleRef.maPhClr.setSchemeClr(XML_tx1);
xRet.set( new ColorContext( *this, rStyleRef.maPhClr ) );
}
break;