[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at suse.cz
Sun Feb 3 06:46:01 PST 2013


 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3b147851a5b1d73e77223e6101bd381d40fd97bb
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Sun Feb 3 15:45:28 2013 +0100

    fix failing testcase
    
    Change-Id: I191f7bb6286998222877db863e45b24e0e7618b8

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index bc15702..9e2ce72 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -945,10 +945,10 @@ void RTFDocumentImpl::singleChar(sal_uInt8 nValue, bool bRunProps)
 
 void RTFDocumentImpl::text(OUString& rString)
 {
-    if (rString.getLength() == 1)
+    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.
-        char ch = rString.getStr()[0];
+        sal_Unicode ch = rString.getStr()[0];
         if (ch == 0x0d || ch == 0x0a)
             return;
     }


More information about the Libreoffice-commits mailing list