summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a42b52833ab0..ef5e0868d1ef 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1120,7 +1120,19 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
if (m_aStates.top().nInternalState == RTFInternalState::HEX && m_aStates.top().eDestination != Destination::LEVELNUMBERS)
{
if (!bSkipped)
- m_aHexBuffer.append(ch);
+ {
+ // note: apparently \'0d\'0a is interpreted as 2 breaks, not 1
+ if (m_aStates.top().eDestination != Destination::DOCCOMM
+ && (ch == '\r' || ch == '\n'))
+ {
+ checkUnicode(/*bUnicode =*/ false, /*bHex =*/ true);
+ dispatchSymbol(RTF_PAR);
+ }
+ else
+ {
+ m_aHexBuffer.append(ch);
+ }
+ }
return RTFError::OK;
}