summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-22 09:05:30 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-22 09:10:54 +0200
commit7b08304b55cf2284a3c583426c60baef618ba206 (patch)
tree028ab69c566b8351321e2dabe62bc52c0983ba5d /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parent16c2b60fc10b5fdfd36df64f8fca50b95d81871b (diff)
tdf#92061 RTF import: fix missing body text after footnote
A missing seek in the \footnote handler could result in a situation that the missed text contained a "{" but not its matching "}", which resulted in the parser terminating earlier than the end of the document. Change-Id: I6df476b2d6397dfa918111b33854dc2f95fbe81d
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 31e62ee5ae8a..9b16e5a06695 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1682,11 +1682,13 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
// Check if this is an endnote.
OStringBuffer aBuf;
char ch;
+ sal_Size nCurrent = Strm().Tell();
for (int i = 0; i < 7; ++i)
{
Strm().ReadChar(ch);
aBuf.append(ch);
}
+ Strm().Seek(nCurrent);
OString aKeyword = aBuf.makeStringAndClear();
if (aKeyword.equals("\\ftnalt"))
nId = NS_ooxml::LN_endnote;