diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-06-10 08:49:13 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-06-16 07:25:07 +0000 |
commit | 63fbd90099098218994899ca7da3eb5e1656e4e7 (patch) | |
tree | 47271bb8d8956e528c10597cf6ff1b5ad2ea44fd /writerfilter/source/rtftok | |
parent | Repository.mk: libreofficekitgtk is conditional on ENABLE_GTK3 (diff) | |
download | core-63fbd90099098218994899ca7da3eb5e1656e4e7.tar.gz core-63fbd90099098218994899ca7da3eb5e1656e4e7.zip |
rtf: skip binary data also in skip-group mode
Since there might be arbitrary rtf markup inside, we rather
shouldn't act upon.
Change-Id: Ia782d89cb4ce8f34df64a3e0cba16de2db7b7ccf
Reviewed-on: https://gerrit.libreoffice.org/16206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'writerfilter/source/rtftok')
-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 416c6bbd053e..1a920c68efdc 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -282,7 +282,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; |