[Libreoffice-commits] .: sw/qa sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Apr 24 04:04:59 PDT 2012
sw/qa/extras/rtfexport/data/fdo38176.rtf | 2 +-
sw/qa/extras/rtfexport/rtfexport.cxx | 2 +-
sw/source/filter/ww8/rtfexport.cxx | 11 +++++++++--
3 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit dfc7c67e464e57f5442365e193c56033af564d84
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Apr 24 13:05:12 2012 +0200
fdo#38176 fix RTF export of non-breaking hyphen and optional hyphen
diff --git a/sw/qa/extras/rtfexport/data/fdo38176.rtf b/sw/qa/extras/rtfexport/data/fdo38176.rtf
index c5126e4..baa4193 100644
--- a/sw/qa/extras/rtfexport/data/fdo38176.rtf
+++ b/sw/qa/extras/rtfexport/data/fdo38176.rtf
@@ -1,3 +1,3 @@
{\rtf1
-foo\~bar
+foo\~\_\-bar
\par}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 607a39a..5bab469 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -124,7 +124,7 @@ void RtfExportTest::testZoom()
void RtfExportTest::testFdo38176()
{
roundtrip("fdo38176.rtf");
- CPPUNIT_ASSERT_EQUAL(7, getLength());
+ CPPUNIT_ASSERT_EQUAL(9, getLength());
}
CPPUNIT_TEST_SUITE_REGISTRATION(RtfExportTest);
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 15eec5e..8101125 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -924,8 +924,15 @@ OString RtfExport::OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEn
}
if (pStr) {
aBuf.append(pStr);
- if (c != 0xa0)
- aBuf.append(' ');
+ switch (c)
+ {
+ case 0xa0:
+ case 0x1e:
+ case 0x1f:
+ break;
+ default:
+ aBuf.append(' ');
+ }
}
return aBuf.makeStringAndClear();
}
More information about the Libreoffice-commits
mailing list