[Libreoffice-commits] core.git: filter/source svtools/source
Michael Stahl
mstahl at redhat.com
Tue Oct 11 15:29:23 UTC 2016
filter/source/msfilter/rtfutil.cxx | 3 +++
svtools/source/svrtf/rtfout.cxx | 3 +++
2 files changed, 6 insertions(+)
New commits:
commit 08bf088959c677e61cb118bf8d0bf092d3f21466
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Oct 11 17:22:36 2016 +0200
improve comment about non-BMP code points in RTF
Change-Id: If906fdea692ca4a4df4f7110f42b7360d8b845da
diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx
index 32e04fa..6b1dd95 100644
--- a/filter/source/msfilter/rtfutil.cxx
+++ b/filter/source/msfilter/rtfutil.cxx
@@ -45,6 +45,9 @@ OString OutHex(sal_uLong nHex, sal_uInt8 nLen)
// (it only talks about "Unicode character", but then explains how values of N
// greater than 32767 will be expressed as negative signed 16-bit numbers, so
// that smells like \uN is limited to BMP).
+// However the "Mathematics" section has an example that shows the code point
+// U+1D44E being encoded as UTF-16 surrogate pair "\u-10187?\u-9138?", so
+// sal_Unicode actually works fine here.
OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pSuccess, bool bUnicode)
{
if (pSuccess)
diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx
index f64c3c8..cb722db 100644
--- a/svtools/source/svrtf/rtfout.cxx
+++ b/svtools/source/svrtf/rtfout.cxx
@@ -54,6 +54,9 @@ SvStream& Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen )
// (it only talks about "Unicode character", but then explains how values of N
// greater than 32767 will be expressed as negative signed 16-bit numbers, so
// that smells like \uN is limited to BMP).
+// However the "Mathematics" section has an example that shows the code point
+// U+1D44E being encoded as UTF-16 surrogate pair "\u-10187?\u-9138?", so
+// sal_Unicode actually works fine here.
SvStream& Out_Char(SvStream& rStream, sal_Unicode c,
int *pUCMode, rtl_TextEncoding eDestEnc, bool bWriteHelpFile)
{
More information about the Libreoffice-commits
mailing list