diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-06-10 08:49:13 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:51:33 +0200 |
commit | 045e8bbdb1f795ae60226969a8b33613f2fb1a77 (patch) | |
tree | 5df28befe58e285cffa137f8d709354f6aca0b46 /writerfilter | |
parent | aee15a604da7f96f6baf408b8c7a00b05ff5c3df (diff) |
rtf: skip binary data also in skip-group mode
Since there might be arbitrary rtf markup inside, we rather
shouldn't act upon.
Reviewed-on: https://gerrit.libreoffice.org/16206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 63fbd90099098218994899ca7da3eb5e1656e4e7)
Change-Id: Ia782d89cb4ce8f34df64a3e0cba16de2db7b7ccf
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtftokenizer.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx index 1440854f50fd..7dc6392d2952 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -283,7 +283,13 @@ bool RTFTokenizer::lookupMathKeyword(RTFMathSymbol& rSymbol) RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nParam) { if (m_rImport.getDestination() == Destination::SKIP) + { + // skip binary data explicitely, to not trip over rtf markup + // control characters + if (rKeyword.equals("bin")) + Strm().SeekRel(nParam); return RTFError::OK; + } SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << ": keyword '\\" << rKeyword.getStr() << "' with param? " << (bParam ? 1 : 0) <<" param val: '" << (bParam ? nParam : 0) << "'"); RTFSymbol aSymbol; |