[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - writerfilter/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Mon Dec 26 15:03:29 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 b005f91d1da11c0a781c5752b69a464fe4640da0
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.
(cherry picked from commit e71d6df4137515f928d87375e404459cf9f310be)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index aef9966..3a3469e 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2064,7 +2064,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 8a20cc2b399ae0aaf89d97a9a3265f86d47bde06
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Tue Dec 27 00:00:18 2011 +0100
fdo#43380: fix crash in DomainMapper_Impl::SetFieldFFData
(cherry picked from commit e4e77861c6a42d040230f4b1ca22ad5e8c3d52a2)
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4bd3f18..d36fda0 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3095,10 +3095,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