summaryrefslogtreecommitdiffstats
path: root/sax/source/expatwrap/saxwriter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sax/source/expatwrap/saxwriter.cxx')
-rw-r--r--sax/source/expatwrap/saxwriter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 71d3fba62547..8303afa145d7 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -406,7 +406,7 @@ inline bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr,
OSL_ENSURE( nSurrogate != 0, "lone 2nd Unicode surrogate" );
nSurrogate = ( nSurrogate << 10 ) | ( c & 0x03ff );
- if( rtl::isUnicodeCodePoint(nSurrogate) && nSurrogate >= 0x00010000 )
+ if( rtl::isUnicodeScalarValue(nSurrogate) && nSurrogate >= 0x00010000 )
{
sal_Int8 aBytes[] = { sal_Int8(0xF0 | ((nSurrogate >> 18) & 0x0F)),
sal_Int8(0x80 | ((nSurrogate >> 12) & 0x3F)),
@@ -851,7 +851,7 @@ inline sal_Int32 calcXMLByteLength( const OUString& rStr,
{
// 2. surrogate: write as UTF-8 (if range is OK
nSurrogate = ( nSurrogate << 10 ) | ( c & 0x03ff );
- if( rtl::isUnicodeCodePoint(nSurrogate) && nSurrogate >= 0x00010000 )
+ if( rtl::isUnicodeScalarValue(nSurrogate) && nSurrogate >= 0x00010000 )
nOutputLength += 4;
nSurrogate = 0;
}