[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source

Petr Mladek pmladek at kemper.freedesktop.org
Mon May 14 08:19:13 PDT 2012


 oox/source/drawingml/shapestylecontext.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 716c789dfbd21020b7ac55c87790969752ca3fdc
Author: Muthu Subramanian <sumuthu at suse.com>
Date:   Wed Feb 29 18:52:19 2012 +0530

    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.
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/oox/source/drawingml/shapestylecontext.cxx b/oox/source/drawingml/shapestylecontext.cxx
index e0ba3dc..e639de9 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;


More information about the Libreoffice-commits mailing list