[Libreoffice-commits] .: writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Fri Oct 14 05:53:12 PDT 2011


 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit ee2e2a1f5255797f4b4f4c127cf7e82fc44fb541
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Fri Oct 14 14:52:23 2011 +0200

    fdo#41080: fix crash while importing footnotes in RTF tables

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 1f222d5..b737a77 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1124,7 +1124,8 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
                     nId = NS_rtf::LN_endnote;
 
                 m_bHasFootnote = true;
-                m_pCurrentBuffer = 0;
+                if (m_pCurrentBuffer == &m_aSuperBuffer)
+                    m_pCurrentBuffer = 0;
                 bool bCustomMark = false;
                 OUString aCustomMark;
                 while (m_aSuperBuffer.size())
@@ -1816,7 +1817,8 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
             break;
         case RTF_SUPER:
             {
-                m_pCurrentBuffer = &m_aSuperBuffer;
+                if (!m_pCurrentBuffer)
+                    m_pCurrentBuffer = &m_aSuperBuffer;
                 OUString aValue(RTL_CONSTASCII_USTRINGPARAM("superscript"));
                 RTFValue::Pointer_t pValue(new RTFValue(aValue));
                 m_aStates.top().aCharacterSprms->push_back(make_pair(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue));


More information about the Libreoffice-commits mailing list