summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-10 08:59:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-03-09 10:01:02 +0000
commit23498672666312dcda769567f818853ce7810a2e (patch)
tree2c7030a57bfcba5ad3c9091f1b359cd5f3d40d50 /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parent6f718d779a99e86dc43444338d48c89cf64e7f9e (diff)
tdf#87034 RTF import: fix multiple superscripts after footnote ...
... in the same paragraph. The intention was to avoid replaying the supertext buffer and using its contents as a custom footnote mark at the same time. However, it's enough to check if the buffer is empty to do so, and that avoids the mis-import of the bugdoc as well. Change-Id: I1e3b0c7f0c6d8eb8250d8b1d0d7d196039c40e79 (cherry picked from commit 93faf178195ca974747849879266783884ae27c5) Reviewed-on: https://gerrit.libreoffice.org/22815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 92ba692fa9d0..4c4c080f069d 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -240,7 +240,6 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x
m_nBackupTopLevelCurrentCellX(0),
m_aTableBufferStack(1), // create top-level buffer already
m_aSuperBuffer(),
- m_bHasFootnote(false),
m_pSuperstream(nullptr),
m_nStreamType(0),
m_nHeaderFooterPositions(),
@@ -1701,7 +1700,6 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
if (aKeyword.equals("\\ftnalt"))
nId = NS_ooxml::LN_endnote;
- m_bHasFootnote = true;
if (m_aStates.top().pCurrentBuffer == &m_aSuperBuffer)
m_aStates.top().pCurrentBuffer = nullptr;
bool bCustomMark = false;
@@ -6091,10 +6089,8 @@ RTFError RTFDocumentImpl::popState()
{
OSL_ASSERT(!m_aStates.empty() && m_aStates.top().pCurrentBuffer == nullptr);
- if (!m_bHasFootnote)
+ if (!m_aSuperBuffer.empty())
replayBuffer(m_aSuperBuffer, nullptr, nullptr);
-
- m_bHasFootnote = false;
}
return RTFError::OK;