From 71ccd61a06d3f744f261fe523d97c13fbf61df84 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 28 Apr 2017 17:57:11 +0200 Subject: loplugin:salunicodeliteral: forms Change-Id: If5bc83be6bd633c84811160e3e504bbee31f4d9d --- forms/source/xforms/convert.cxx | 12 ++++++------ forms/source/xforms/datatypes.cxx | 2 +- forms/source/xforms/model_ui.cxx | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'forms/source/xforms') diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 7acec4786005..50a57ff53fce 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -328,14 +328,14 @@ OUString Convert::collapseWhitespace( const OUString& _rString ) for( sal_Int32 i = 0; i < nLength; i++ ) { sal_Unicode c = pStr[i]; - if( c == sal_Unicode(0x08) || - c == sal_Unicode(0x0A) || - c == sal_Unicode(0x0D) || - c == sal_Unicode(0x20) ) + if( c == u'\x0008' || + c == u'\x000A' || + c == u'\x000D' || + c == u' ' ) { if( ! bStrip ) { - aBuffer.append( sal_Unicode(0x20) ); + aBuffer.append( u' ' ); bStrip = true; } } @@ -345,7 +345,7 @@ OUString Convert::collapseWhitespace( const OUString& _rString ) aBuffer.append( c ); } } - if( aBuffer[ aBuffer.getLength() - 1 ] == sal_Unicode( 0x20 ) ) + if( aBuffer[ aBuffer.getLength() - 1 ] == u' ' ) aBuffer.setLength( aBuffer.getLength() - 1 ); return aBuffer.makeStringAndClear(); } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 6eb1478a552a..2c1c6d2029b4 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -409,7 +409,7 @@ namespace xforms rtl_math_ConversionStatus eStatus; sal_Int32 nEnd; double f = ::rtl::math::stringToDouble( - rValue, '.', sal_Unicode(0), &eStatus, &nEnd ); + rValue, '.', u'\0', &eStatus, &nEnd ); // error checking... bool bReturn = false; diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index e5a899340836..b487f8680667 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -262,10 +262,10 @@ static bool lcl_isWhitespace( const OUString& rString ) for( sal_Int32 i = 0; bWhitespace && ( i < nLength ); i++ ) { sal_Unicode c = pStr[i]; - bWhitespace = ( c == sal_Unicode(0x09) || - c == sal_Unicode(0x0A) || - c == sal_Unicode(0x0D) || - c == sal_Unicode(0x20) ); + bWhitespace = ( c == u'\x0009' || + c == u'\x000A' || + c == u'\x000D' || + c == u' ' ); } return bWhitespace; } -- cgit