[Libreoffice-commits] .: 2 commits - writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Mon Dec 26 14:59:45 PST 2011


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    9 ++++++---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx    |    3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit e71d6df4137515f928d87375e404459cf9f310be
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Tue Dec 27 00:00:33 2011 +0100

    Related: fdo#43380 fix parsing of the \cf RTF token
    
    Send the real color value to dmapper, not the index, which is
    meaningless outside the tokenizer.

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4c9f8a3..de1195b 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2057,7 +2057,8 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
         case RTF_CF:
             {
                 // NS_sprm::LN_CIco won't work, that would be an index in a static table
-                m_aStates.top().aCharacterAttributes->push_back(make_pair(NS_ooxml::LN_CT_Color_val, pIntValue));
+                RTFValue::Pointer_t pValue(new RTFValue(getColorTable(nParam)));
+                m_aStates.top().aCharacterAttributes->push_back(make_pair(NS_ooxml::LN_CT_Color_val, pValue));
             }
             break;
         case RTF_S:
commit e4e77861c6a42d040230f4b1ca22ad5e8c3d52a2
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Tue Dec 27 00:00:18 2011 +0100

    fdo#43380: fix crash in DomainMapper_Impl::SetFieldFFData

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index abb97e6..8352cdd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3097,10 +3097,13 @@ void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler)
     dmapper_logger->startElement("setFieldFFData");
 #endif
 
-    FieldContextPtr pContext = m_aFieldStack.top();
-    if (pContext.get())
+    if (m_aFieldStack.size())
     {
-        pContext->setFFDataHandler(pFFDataHandler);
+        FieldContextPtr pContext = m_aFieldStack.top();
+        if (pContext.get())
+        {
+            pContext->setFFDataHandler(pFFDataHandler);
+        }
     }
 
 #ifdef DEBUG_DOMAINMAPPER


More information about the Libreoffice-commits mailing list