summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-10-14 14:52:23 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2011-10-14 14:53:06 +0200
commitee2e2a1f5255797f4b4f4c127cf7e82fc44fb541 (patch)
treee1d6bfacfd5001ce8aca01665d80e72e8e69f699 /writerfilter
parent93e971ac54e94ad58b4199e5d635133e738c28a1 (diff)
fdo#41080: fix crash while importing footnotes in RTF tables
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 1f222d5e07d6..b737a77d3155 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));