summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-12-20 14:23:33 +0200
committerNoel Grandin <noel@peralex.com>2014-01-07 09:43:37 +0200
commit82625bb98e256b83351328d3bf2a14e3dd244eef (patch)
tree9b661850ae5df9ea27fcac063cfe61862046c8d1 /xmloff
parent347af397cafa97cfa7d5027f83fff784ca04a397 (diff)
remove unnecessary sal_Unicode casts in OUStringBuffer::append calls
Convert code like: buf.append( static_cast<sal_Unicode>('!') ); to: buf.append( '!' ); Change-Id: Iacb03a61de65a895540940953b49620677b3d051
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx4
-rw-r--r--xmloff/source/core/RDFaExportHelper.cxx7
-rw-r--r--xmloff/source/forms/controlpropertyhdl.cxx2
-rw-r--r--xmloff/source/meta/xmlmetai.cxx2
-rw-r--r--xmloff/source/style/XMLClipPropertyHandler.cxx16
-rw-r--r--xmloff/source/style/xmlnumfe.cxx8
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx4
-rw-r--r--xmloff/source/text/txtprhdl.cxx2
9 files changed, 21 insertions, 26 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 26401f548e0b..4a46a0fec92e 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -532,7 +532,7 @@ OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
if( !rSequence[nIndex].isEmpty())
{
if( bPrecedeWithSpace )
- aResult.append( static_cast< sal_Unicode >( ' ' ));
+ aResult.append( ' ' );
aResult.append( rSequence[nIndex] );
bPrecedeWithSpace = true;
}
@@ -1113,7 +1113,7 @@ static OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Se
if(nIndex>=0)
{
if(bHasPredecessor)
- aBuf.append( static_cast< sal_Unicode >( ' ' ));
+ aBuf.append( ' ' );
aBuf.append( nIndex, 10 );
bHasPredecessor = true;
}
diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index db543753ced6..a2dd40013ee2 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -65,13 +65,8 @@ makeCURIE(SvXMLExport * i_pExport,
OSL_ENSURE(!Namespace.isEmpty(), "makeCURIE: no namespace");
if (Namespace.isEmpty()) throw uno::RuntimeException();
- OUStringBuffer buf;
- buf.append( i_pExport->EnsureNamespace(Namespace) );
- buf.append( static_cast<sal_Unicode>(':') );
// N.B.: empty LocalName is valid!
- buf.append( i_xURI->getLocalName() );
-
- return buf.makeStringAndClear();
+ return i_pExport->EnsureNamespace(Namespace) + ":" + i_xURI->getLocalName();
}
// #i112473# SvXMLExport::GetRelativeReference() not right for RDF on SaveAs
diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx
index 07255e7c1797..25a4b1c8c59c 100644
--- a/xmloff/source/forms/controlpropertyhdl.cxx
+++ b/xmloff/source/forms/controlpropertyhdl.cxx
@@ -148,7 +148,7 @@ namespace xmloff
bSuccess = SvXMLUnitConverter::convertEnum(aReturn, nType, OEnumMapper::getEnumMap(OEnumMapper::epFontEmphasis), XML_NONE);
if (bSuccess)
{
- aReturn.append( (sal_Unicode)' ' );
+ aReturn.append( ' ' );
aReturn.append( GetXMLToken(bBelow ? XML_BELOW : XML_ABOVE) );
_rStrExpValue = aReturn.makeStringAndClear();
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 6db245243dd8..e28fed2cf49a 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -243,7 +243,7 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
nBegin = i_rBuildId.indexOf( sBuildCompare, nEnd );
if ( nBegin != -1 )
{
- sBuffer.append( (sal_Unicode)'$' );
+ sBuffer.append( '$' );
sBuffer.append( i_rBuildId.copy(
nBegin + sBuildCompare.getLength() ) );
sBuildId = sBuffer.makeStringAndClear();
diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx
index 92f145fc69f7..32f7abe6a132 100644
--- a/xmloff/source/style/XMLClipPropertyHandler.cxx
+++ b/xmloff/source/style/XMLClipPropertyHandler.cxx
@@ -108,21 +108,21 @@ bool XMLClipPropertyHandler::exportXML( OUString& rStrExpValue, const uno::Any&
if( rValue >>= aCrop )
{
aOut.append( GetXMLToken(XML_RECT) );
- aOut.append( (sal_Unicode)'(' );
+ aOut.append( '(' );
rUnitConverter.convertMeasureToXML( aOut, aCrop.Top );
if( !m_bODF11 )
- aOut.append( (sal_Unicode)',' );
- aOut.append( (sal_Unicode)' ' );
+ aOut.append( ',' );
+ aOut.append( ' ' );
rUnitConverter.convertMeasureToXML( aOut, aCrop.Right );
if( !m_bODF11 )
- aOut.append( (sal_Unicode)',' );
- aOut.append( (sal_Unicode)' ' );
+ aOut.append( ',' );
+ aOut.append( ' ' );
rUnitConverter.convertMeasureToXML( aOut, aCrop.Bottom );
if( !m_bODF11 )
- aOut.append( (sal_Unicode)',' );
- aOut.append( (sal_Unicode)' ' );
+ aOut.append( ',' );
+ aOut.append( ' ' );
rUnitConverter.convertMeasureToXML( aOut, aCrop.Left );
- aOut.append( (sal_Unicode)')' );
+ aOut.append( ')' );
rStrExpValue = aOut.makeStringAndClear();
bRet = true;
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 6658a3eb3aab..e6084ac02c61 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -289,7 +289,7 @@ static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool b
aFmtName.append( nKey );
if (!bDefPart)
{
- aFmtName.append( (sal_Unicode)'P' );
+ aFmtName.append( 'P' );
aFmtName.append( nPart );
}
return aFmtName.makeStringAndClear();
@@ -706,11 +706,11 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
aCondStr.appendAscii( "value()" ); //! define constant
switch ( nOp )
{
- case NUMBERFORMAT_OP_EQ: aCondStr.append( (sal_Unicode) '=' ); break;
+ case NUMBERFORMAT_OP_EQ: aCondStr.append( '=' ); break;
case NUMBERFORMAT_OP_NE: aCondStr.appendAscii( "<>" ); break;
- case NUMBERFORMAT_OP_LT: aCondStr.append( (sal_Unicode) '<' ); break;
+ case NUMBERFORMAT_OP_LT: aCondStr.append( '<' ); break;
case NUMBERFORMAT_OP_LE: aCondStr.appendAscii( "<=" ); break;
- case NUMBERFORMAT_OP_GT: aCondStr.append( (sal_Unicode) '>' ); break;
+ case NUMBERFORMAT_OP_GT: aCondStr.append( '>' ); break;
case NUMBERFORMAT_OP_GE: aCondStr.appendAscii( ">=" ); break;
default:
OSL_FAIL("unknown operator");
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index 838020d99693..eea85b9e0006 100644
--- a/xmloff/source/text/XMLTextColumnsExport.cxx
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -167,7 +167,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
{
// style:rel-width
::sax::Converter::convertNumber( sValue, pColumns->Width );
- sValue.append( (sal_Unicode)'*' );
+ sValue.append( '*' );
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
sValue.makeStringAndClear() );
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 721e9b26f77b..8835667d46ee 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3082,9 +3082,9 @@ void XMLTextParagraphExport::_exportTextGraphic(
{
OUStringBuffer sRet( GetXMLToken(XML_ROTATE).getLength()+4 );
sRet.append( GetXMLToken(XML_ROTATE));
- sRet.append( (sal_Unicode)'(' );
+ sRet.append( '(' );
::sax::Converter::convertNumber( sRet, (sal_Int32)nVal );
- sRet.append( (sal_Unicode)')' );
+ sRet.append( ')' );
GetExport().AddAttribute( XML_NAMESPACE_SVG, XML_TRANSFORM,
sRet.makeStringAndClear() );
}
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index f6112e435bcb..eb6575d3f7cf 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -937,7 +937,7 @@ bool XMLTextEmphasizePropHdl_Impl::exportXML(
if( nType != 0 )
{
enum XMLTokenEnum ePos = bBelow ? XML_BELOW : XML_ABOVE;
- aOut.append( (sal_Unicode)' ' );
+ aOut.append( ' ' );
aOut.append( GetXMLToken(ePos) );
}
rStrExpValue = aOut.makeStringAndClear();