summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index c961c7dacdf0..37d037638b2e 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -944,6 +944,14 @@ void RTFDocumentImpl::singleChar(sal_uInt8 nValue, bool bRunProps)
void RTFDocumentImpl::text(OUString& rString)
{
+ if (rString.getLength() == 1 && m_aStates.top().nDestinationState != DESTINATION_DOCCOMM)
+ {
+ // No cheating! Tokenizer ignores bare \r and \n, their hex \'0d / \'0a form doesn't count, either.
+ sal_Unicode ch = rString.getStr()[0];
+ if (ch == 0x0d || ch == 0x0a)
+ return;
+ }
+
bool bRet = true;
switch (m_aStates.top().nDestinationState)
{