From ed63bebaa2f70e04ea57a3a5baa9219cf9123d81 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 7 Apr 2017 22:29:15 +0200 Subject: tdf#106692 writerfilter: RTF import: fix \'0d in \leveltext It's not a newline but yet another one of those bizarre RTF-encodings. (regression from 10e733908038407791f9c14af2a86417cc4a653c) (cherry picked from commit 69b7204164945cfed385d58e64592ce1b17937d7) Reviewed-on: https://gerrit.libreoffice.org/36284 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit fd93d09a5b6226a8297b5dd995301d514ec7b8ca) Change-Id: I568050b031b95ac0b6ebfa1a0c39107e62f68bed --- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 9243e6da0f24..e1932c050847 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1116,8 +1116,10 @@ RTFError RTFDocumentImpl::resolveChars(char ch) if (!bSkipped) { // note: apparently \'0d\'0a is interpreted as 2 breaks, not 1 - if (m_aStates.top().eDestination != Destination::DOCCOMM - && (ch == '\r' || ch == '\n')) + if ((ch == '\r' || ch == '\n') + && m_aStates.top().eDestination != Destination::DOCCOMM + && m_aStates.top().eDestination != Destination::LEVELNUMBERS + && m_aStates.top().eDestination != Destination::LEVELTEXT) { checkUnicode(/*bUnicode =*/ false, /*bHex =*/ true); dispatchSymbol(RTF_PAR); -- cgit