diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-14 08:16:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:32 +0200 |
commit | d366c9b20ec86f3fe521812a0c22def3bfd1f05e (patch) | |
tree | 4bd09438c8cd8f0dbcd0881fc923d56a0a721fc5 /forms | |
parent | d2fa59e4025050c9b668ecff379d668f0db52639 (diff) |
remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 16 | ||||
-rw-r--r-- | forms/source/xforms/convert.cxx | 8 | ||||
-rw-r--r-- | forms/source/xforms/datatypes.cxx | 12 | ||||
-rw-r--r-- | forms/source/xforms/model_ui.cxx | 20 |
4 files changed, 28 insertions, 28 deletions
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<XContro Encode( aValue ); aResult.append(aName); - aResult.append(sal_Unicode('=')); + aResult.append('='); aResult.append(aValue); if (pSuccObj < aSuccObjList.end() - 1) { if ( _bURLEncoded ) - aResult.append(sal_Unicode('&')); + aResult.append('&'); else aResult.appendAscii("\r\n"); } @@ -602,7 +602,7 @@ namespace sal_Int32 nCurLen = _rOut.getLength(); _rOut.append( _nNumber ); while ( _rOut.getLength() - nCurLen < nDigits ) - _rOut.insert( nCurLen, (sal_Unicode)'0' ); + _rOut.insert( nCurLen, '0' ); } } @@ -794,9 +794,9 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc ::Date aDate( nInt32Val ); OUStringBuffer aBuffer; appendDigits( aDate.GetMonth(), 2, aBuffer ); - aBuffer.append( (sal_Unicode)'-' ); + aBuffer.append( '-' ); appendDigits( aDate.GetDay(), 2, aBuffer ); - aBuffer.append( (sal_Unicode)'-' ); + aBuffer.append( '-' ); appendDigits( aDate.GetYear(), 4, aBuffer ); aText = aBuffer.makeStringAndClear(); } @@ -817,9 +817,9 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc ::Time aTime(nInt32Val); OUStringBuffer aBuffer; appendDigits( aTime.GetHour(), 2, aBuffer ); - aBuffer.append( (sal_Unicode)'-' ); + aBuffer.append( '-' ); appendDigits( aTime.GetMin(), 2, aBuffer ); - aBuffer.append( (sal_Unicode)'-' ); + aBuffer.append( '-' ); appendDigits( aTime.GetSec(), 2, aBuffer ); aText = aBuffer.makeStringAndClear(); } @@ -971,7 +971,7 @@ void ODatabaseForm::Encode( OUString& rString ) const nCharCode = rString[nCurPos]; // Handle chars, which are not an alphanumeric character and character codes > 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<XNodeList>& xNodes ) && !sLine.startsWith( "<?xml" ) ) { aBuffer.append( sLine ); - aBuffer.append( sal_Unicode('\n') ); + aBuffer.append( '\n' ); } } sResult = aBuffer.makeStringAndClear(); @@ -929,7 +929,7 @@ OUString Model::getResultForExpression( { aExpression.evaluate( *aIter ); aBuffer.append( lcl_serializeForDisplay(aExpression.getXPath()) ); - aBuffer.append( sal_Unicode('\n') ); + aBuffer.append( '\n' ); } } return aBuffer.makeStringAndClear(); |