[Libreoffice-commits] core.git: svtools/source
Stephan Bergmann
sbergman at redhat.com
Wed Sep 13 06:39:55 UTC 2017
svtools/source/svrtf/svparser.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 8e0fb74dc01927b60d8b868548ef8fe1d7a80ce3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 13 08:35:35 2017 +0200
Revert "svtools: HTML import: don't put lone surrogates in OUString"
This reverts commit fc670f637d4271246691904fd649358ce2e7be59, which is no longer
needed after 08e78607ec6bc820c52ab3df1a5d3738e049b90d "Make reading UTF-8
strict". The bug doc fdo67610-1.doc (aka
<https://bugs.documentfoundation.org/attachment.cgi?id=83417>) now opens fine
without hitting the assert in OUString::toUtf8.
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index cef258f04dd2..541aa5276c2d 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -423,8 +423,7 @@ sal_uInt32 SvParser<T>::GetNextChar()
while( 0 == nChars && !bErr );
}
- // Note: ImplConvertUtf8ToUnicode() may produce a surrogate!
- if (!rtl::isUnicodeCodePoint(c) || rtl::isHighSurrogate(c) || rtl::isLowSurrogate(c))
+ if ( ! rtl::isUnicodeCodePoint( c ) )
c = '?' ;
if( bErr )
More information about the Libreoffice-commits
mailing list