summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-10 08:59:01 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-10 08:59:21 +0100
commit93faf178195ca974747849879266783884ae27c5 (patch)
tree2678e080eb53b728c6f80d1504a9e16065de03ce /writerfilter/source
parent9e38d549b9099879ba98b9ad096347d5f9b6475a (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
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx1
2 files changed, 1 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 10db15357f39..bf41bbe37c49 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(),
@@ -1699,7 +1698,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;
@@ -6095,10 +6093,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;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 3aa75de95f5d..830eddd232cc 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -523,7 +523,6 @@ private:
/// Buffered superscript, till footnote is reached (or not).
RTFBuffer_t m_aSuperBuffer;
- bool m_bHasFootnote;
/// Superstream of this substream.
RTFDocumentImpl* m_pSuperstream;
/// Type of the stream: header, footer, footnote, etc.