summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/qa/rtl/textenc/rtl_textcvt.cxx1
-rw-r--r--sal/textenc/tencinfo.cxx2
-rw-r--r--sw/qa/extras/rtfexport/rtfexport2.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
4 files changed, 9 insertions, 2 deletions
diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx
index 3c36852bebfc..0bae6b403088 100644
--- a/sal/qa/rtl/textenc/rtl_textcvt.cxx
+++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx
@@ -3088,6 +3088,7 @@ void Test::testWindows() {
bool reverse;
};
static Data const data[] = {
+ { 42, RTL_TEXTENCODING_SYMBOL, true },
{ 437, RTL_TEXTENCODING_IBM_437, true },
{ 708, RTL_TEXTENCODING_ISO_8859_6, false },
{ 737, RTL_TEXTENCODING_IBM_737, true },
diff --git a/sal/textenc/tencinfo.cxx b/sal/textenc/tencinfo.cxx
index a220d71a4330..94a0cdb1e270 100644
--- a/sal/textenc/tencinfo.cxx
+++ b/sal/textenc/tencinfo.cxx
@@ -826,6 +826,7 @@ rtl_getTextEncodingFromWindowsCodePage(sal_uInt32 nCodePage)
{
switch (nCodePage)
{
+ case 42: return RTL_TEXTENCODING_SYMBOL;
case 437: return RTL_TEXTENCODING_IBM_437;
case 708: return RTL_TEXTENCODING_ISO_8859_6;
case 737: return RTL_TEXTENCODING_IBM_737;
@@ -902,6 +903,7 @@ rtl_getWindowsCodePageFromTextEncoding(rtl_TextEncoding nEncoding)
{
switch (nEncoding)
{
+ case RTL_TEXTENCODING_SYMBOL: return 42;
case RTL_TEXTENCODING_IBM_437: return 437;
/* case RTL_TEXTENCODING_ISO_8859_6: return 708; */
case RTL_TEXTENCODING_IBM_737: return 737;
diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx
index 7b5d82da3f8e..fba38e6c72cb 100644
--- a/sw/qa/extras/rtfexport/rtfexport2.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport2.cxx
@@ -1507,7 +1507,7 @@ DECLARE_RTFEXPORT_TEST(testFdo85889mac, "fdo85889-mac.rtf")
DECLARE_RTFEXPORT_TEST(testFdo72031, "fdo72031.rtf")
{
- OUString aExpected(u"\u00C5");
+ OUString aExpected(u"\uF0C5");
CPPUNIT_ASSERT_EQUAL(aExpected, getRun(getParagraph(1), 1)->getString());
}
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5a177bb58ff2..e8483bb43f2f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3209,7 +3209,11 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool bHex)
}
if (bHex && !m_aHexBuffer.isEmpty())
{
- OUString aString = OStringToOUString(m_aHexBuffer.makeStringAndClear(), m_aStates.top().nCurrentEncoding);
+ OUString aString = OStringToOUString(
+ m_aHexBuffer.makeStringAndClear(),
+ ((m_aStates.top().eDestination == Destination::FONTENTRY
+ && m_aStates.top().nCurrentEncoding == RTL_TEXTENCODING_SYMBOL)
+ ? RTL_TEXTENCODING_MS_1252 : m_aStates.top().nCurrentEncoding));
text(aString);
}
}