From d366c9b20ec86f3fe521812a0c22def3bfd1f05e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 14 Nov 2013 08:16:35 +0200 Subject: remove unnecessary sal_Unicode casts in various places Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec --- forms/source/component/DatabaseForm.cxx | 16 ++++++++-------- forms/source/xforms/convert.cxx | 8 ++++---- forms/source/xforms/datatypes.cxx | 12 ++++++------ forms/source/xforms/model_ui.cxx | 20 ++++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) (limited to 'forms') diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index dbb9235a2575..250d54ffd373 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -516,13 +516,13 @@ OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference 127 - if( (!isalnum(nCharCode) && nCharCode != (sal_Unicode)' ') || nCharCode > 127 ) + if( (!isalnum(nCharCode) && nCharCode != ' ') || nCharCode > 127 ) { switch( nCharCode ) { diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 4bdfe219c994..47e1a5711207 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -235,7 +235,7 @@ namespace { rtl_math_ConversionStatus eStatus; double f = rtl::math::stringToDouble( - rString, sal_Unicode('.'), sal_Unicode(','), &eStatus, NULL ); + rString, '.', ',', &eStatus, NULL ); return ( eStatus == rtl_math_ConversionStatus_Ok ) ? makeAny( f ) : Any(); } @@ -243,11 +243,11 @@ namespace void lcl_appendInt32ToBuffer( const sal_Int32 _nValue, OUStringBuffer& _rBuffer, sal_Int16 _nMinDigits ) { if ( ( _nMinDigits >= 4 ) && ( _nValue < 1000 ) ) - _rBuffer.append( (sal_Unicode)'0' ); + _rBuffer.append( '0' ); if ( ( _nMinDigits >= 3 ) && ( _nValue < 100 ) ) - _rBuffer.append( (sal_Unicode)'0' ); + _rBuffer.append( '0' ); if ( ( _nMinDigits >= 2 ) && ( _nValue < 10 ) ) - _rBuffer.append( (sal_Unicode)'0' ); + _rBuffer.append( '0' ); _rBuffer.append( _nValue ); } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index a4f522ef50b8..f2fdb793d40a 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -421,7 +421,7 @@ namespace xforms rtl_math_ConversionStatus eStatus; sal_Int32 nEnd; double f = ::rtl::math::stringToDouble( - rValue, sal_Unicode('.'), sal_Unicode(0), &eStatus, &nEnd ); + rValue, '.', sal_Unicode(0), &eStatus, &nEnd ); // error checking... bool bReturn = false; @@ -691,13 +691,13 @@ namespace xforms sal_Int32 nTotalDigits = 0; sal_Int32 nFractionDigits = 0; const sal_Unicode* pValue = rValue.getStr(); - for( ; pValue[n] != sal_Unicode('.') && n < nLength; n++ ) - if( pValue[n] >= sal_Unicode('0') - && pValue[n] <= sal_Unicode('9')) + for( ; pValue[n] != '.' && n < nLength; n++ ) + if( pValue[n] >= '0' + && pValue[n] <= '9') nTotalDigits++; for( ; n < nLength; n++ ) - if( pValue[n] >= sal_Unicode('0') - && pValue[n] <= sal_Unicode('9')) + if( pValue[n] >= '0' + && pValue[n] <= '9') nFractionDigits++; nTotalDigits += nFractionDigits; diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 281638e5a28e..5a1124e74989 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -152,9 +152,9 @@ static void lcl_OutPosition( OUStringBuffer& rBuffer, // output position (if necessary) if( nFound > 1 ) { - rBuffer.insert( 0, sal_Unicode(']') ); + rBuffer.insert( 0, ']' ); rBuffer.insert( 0, nPosition ); - rBuffer.insert( 0, sal_Unicode('[') ); + rBuffer.insert( 0, '[' ); } } @@ -165,7 +165,7 @@ static void lcl_OutName( OUStringBuffer& rBuffer, OUString sPrefix = xNode->getPrefix(); if( !sPrefix.isEmpty() ) { - rBuffer.insert( 0, sal_Unicode(':') ); + rBuffer.insert( 0, ':' ); rBuffer.insert( 0, sPrefix ); } } @@ -220,7 +220,7 @@ OUString Model::getDefaultBindingExpressionForNode( { // insert a '/' for every step except the first if( !aBuffer.isEmpty() ) - aBuffer.insert( 0, sal_Unicode('/') ); + aBuffer.insert( 0, '/' ); switch( xCurrent->getNodeType() ) { @@ -236,7 +236,7 @@ OUString Model::getDefaultBindingExpressionForNode( case NodeType_ATTRIBUTE_NODE: lcl_OutName( aBuffer, xCurrent ); - aBuffer.insert( 0, sal_Unicode('@') ); + aBuffer.insert( 0, '@' ); break; case NodeType_DOCUMENT_NODE: @@ -250,7 +250,7 @@ OUString Model::getDefaultBindingExpressionForNode( xCurrent.set( NULL ); aBuffer.makeStringAndClear(); // we'll remove the slash below - aBuffer.insert( 0, sal_Unicode('/') ); + aBuffer.insert( 0, '/' ); break; } } @@ -307,12 +307,12 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode, case NodeType_ATTRIBUTE_NODE: lcl_OutName( aBuffer, xNode ); - aBuffer.insert( 0, sal_Unicode('@') ); + aBuffer.insert( 0, '@' ); break; case NodeType_DOCUMENT_NODE: if( xNode == getDefaultInstance() ) - aBuffer.append( sal_Unicode('/') ); + aBuffer.append( '/' ); else lcl_OutInstance( aBuffer, xNode, this ); break; @@ -846,7 +846,7 @@ static OUString lcl_serializeForDisplay( const Reference& xNodes ) && !sLine.startsWith( "