diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-22 09:05:30 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:51:30 +0200 |
commit | 9ee8ab7387b5948570605849419cdf1d5f60af2e (patch) | |
tree | e37b44fd1b53d1c96f8194ed924f7c47cec90b99 /writerfilter | |
parent | e78290c8609d6c0ed358c4b66132f1ebbeba6011 (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.
(cherry picked from commit 7b08304b55cf2284a3c583426c60baef618ba206)
Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx
Change-Id: I6df476b2d6397dfa918111b33854dc2f95fbe81d
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index b351bef227b9..8a68e6d10090 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1683,11 +1683,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; |