[Libreoffice-commits] core.git: writerfilter/source

Stephan Bergmann sbergman at redhat.com
Thu Aug 21 05:28:08 PDT 2014


 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0eabc890ccec6cf428d7e05ad994b24924596b81
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Aug 21 14:27:38 2014 +0200

    Avoid invalid downcasts
    
    Change-Id: I8550da2c6afb4e7de394879ef75312a0c9c2df25

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 1942b90..2f7f709 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -1987,7 +1987,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext
     // filter out a single token. Just hardwire the wrap token here till we
     // need a more generic solution.
     bool bIsWrap = Element == static_cast<sal_Int32>(NMSP_vmlWord | XML_wrap);
-    if ( bInNamespaces && ((static_cast<OOXMLFastContextHandlerShape*>(mpParent)->isShapeSent() && bIsWrap) || !bIsWrap) )
+    if ( bInNamespaces && ((bIsWrap && static_cast<OOXMLFastContextHandlerShape*>(mpParent)->isShapeSent()) || !bIsWrap) )
         xResult.set(OOXMLFactory::getInstance()->createFastChildContextFromStart(this, Element));
     else if (mxContext.is())
     {


More information about the Libreoffice-commits mailing list