[PATCH] fdo#38176 fix RTF export of non-breaking space/hyphen/optional hyphen

Miklos Vajna vmiklos at suse.cz
Tue Apr 24 03:47:16 PDT 2012


(cherry-picked from commits ef7cc64 and dfc7c67)
---
 sw/source/filter/ww8/rtfexport.cxx |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 195cb8e..0904ac8 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -914,7 +914,15 @@ OString RtfExport::OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEn
     }
     if (pStr) {
         aBuf.append(pStr);
-        aBuf.append(' ');
+        switch (c)
+        {
+            case 0xa0:
+            case 0x1e:
+            case 0x1f:
+                break;
+            default:
+                aBuf.append(' ');
+        }
     }
     return aBuf.makeStringAndClear();
 }
-- 
1.7.7


--Nq2Wo0NMKNjxTN9z--


More information about the LibreOffice mailing list