Kaydet (Commit) 99a1f381 authored tarafından Noel Grandin's avatar Noel Grandin

remove unnecessary sal_Unicode casts in OOX module

Change-Id: I2b9f26cb500a9e56f5860bd1b483ed284b84f50d
üst d9648d35
......@@ -40,7 +40,7 @@ OUString lclRemoveFileName( const OUString& rPath )
OUString lclAppendFileName( const OUString& rPath, const OUString& rFileName )
{
return rPath.isEmpty() ? rFileName :
OUStringBuffer( rPath ).append( sal_Unicode( '/' ) ).append( rFileName ).makeStringAndClear();
OUStringBuffer( rPath ).append( '/' ).append( rFileName ).makeStringAndClear();
}
} // namespace
......
......@@ -55,7 +55,7 @@ static OUString lclGenerateApiString( const OUString& rString )
sal_Int32 nQuotePos = aRetString.getLength();
while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 )
aRetString = aRetString.replaceAt( nQuotePos, 1, "\"\"" );
return OUStringBuffer().append( sal_Unicode( '"' ) ).append( aRetString ).append( sal_Unicode( '"' ) ).makeStringAndClear();
return OUStringBuffer().append( '"' ).append( aRetString ).append( '"' ).makeStringAndClear();
}
static OUString lclGenerateApiArray( const Matrix< Any >& rMatrix )
......
......@@ -125,7 +125,7 @@ Reference< XFormattedString > TextConverter::appendFormattedString(
try
{
xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() );
xFmtStr->setString( bAddNewLine ? (rString + OUString( sal_Unicode( '\n' ) )) : rString );
xFmtStr->setString( bAddNewLine ? (rString + OUString( '\n' )) : rString );
orStringVec.push_back( xFmtStr );
}
catch( Exception& )
......
......@@ -209,7 +209,7 @@ void lclPushMarkerProperties( ShapePropertyMap& rPropMap,
sal_Int32 nWidth = lclGetArrowSize( rArrowProps.moArrowWidth.get( XML_med ) );
sal_Int32 nNameIndex = nWidth * 3 + nLength + 1;
aBuffer.append( sal_Unicode( ' ' ) ).append( nNameIndex );
aBuffer.append( ' ' ).append( nNameIndex );
OUString aMarkerName = aBuffer.makeStringAndClear();
bool bIsArrow = nArrowType == XML_arrow;
......
......@@ -533,7 +533,7 @@ void StringHelper::appendToken( OUStringBuffer& rStr, const OUString& rToken, sa
void StringHelper::appendIndex( OUStringBuffer& rStr, const OUString& rIdx )
{
rStr.append( sal_Unicode( '[' ) ).append( rIdx ).append( sal_Unicode( ']' ) );
rStr.append( '[' ).append( rIdx ).append( ']' );
}
void StringHelper::appendIndex( OUStringBuffer& rStr, sal_Int64 nIdx )
......@@ -1544,7 +1544,7 @@ void Output::newLine()
if( maLine.getLength() > 0 )
{
mxStrm->writeString( maIndent );
maLine.append( sal_Unicode( '\n' ) );
maLine.append( '\n' );
mxStrm->writeString( maLine.makeStringAndClear() );
mnCol = 0;
mnLastItem = 0;
......@@ -1554,7 +1554,7 @@ void Output::newLine()
void Output::emptyLine( size_t nCount )
{
for( size_t nIdx = 0; nIdx < nCount; ++nIdx )
mxStrm->writeString( OUString( sal_Unicode( '\n' ) ) );
mxStrm->writeString( OUString( '\n' ) );
}
void Output::incIndent()
......@@ -1933,7 +1933,7 @@ OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUS
aFileName = aFileName.replace( *pcChar, '_' );
// build full path
return rSysOutPath + OUString( sal_Unicode( '/' ) ) + aFileName;
return rSysOutPath + OUString( '/' ) + aFileName;
}
void StorageObjectBase::extractStream( StorageBase& rStrg, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
......@@ -2313,18 +2313,18 @@ OUString InputObjectBase::dumpGuid( const String& rName )
*mxStrm >> nData32;
StringHelper::appendHex( aBuffer, nData32, false );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
*mxStrm >> nData16;
StringHelper::appendHex( aBuffer, nData16, false );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
*mxStrm >> nData16;
StringHelper::appendHex( aBuffer, nData16, false );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
*mxStrm >> nData8;
StringHelper::appendHex( aBuffer, nData8, false );
*mxStrm >> nData8;
StringHelper::appendHex( aBuffer, nData8, false );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
for( int nIndex = 0; nIndex < 6; ++nIndex )
{
*mxStrm >> nData8;
......@@ -2470,7 +2470,7 @@ void XmlStreamObject::implDumpText( TextInputStream& rTextStrm )
{
while( (nPos < aElem.getLength()) && (aElem[ nPos ] >= 32) ) ++nPos;
if( nPos < aElem.getLength() )
aElem = OUStringBuffer( aElem.copy( 0, nPos ) ).append( sal_Unicode( ' ' ) ).append( aElem.copy( nPos ).trim() ).makeStringAndClear();
aElem = OUStringBuffer( aElem.copy( 0, nPos ) ).append( ' ' ).append( aElem.copy( nPos ).trim() ).makeStringAndClear();
++nPos;
}
......
......@@ -120,7 +120,7 @@ OUString StorageBase::getPath() const
{
OUStringBuffer aBuffer( maParentPath );
if( !aBuffer.isEmpty() )
aBuffer.append( sal_Unicode( '/' ) );
aBuffer.append( '/' );
aBuffer.append( maStorageName );
return aBuffer.makeStringAndClear();
}
......
......@@ -289,19 +289,19 @@ void OleHelper::exportGuid( BinaryOutputStream& rOStr, const SvGlobalName& rId )
OUString OleHelper::importGuid( BinaryInputStream& rInStrm )
{
OUStringBuffer aBuffer;
aBuffer.append( sal_Unicode( '{' ) );
aBuffer.append( '{' );
lclAppendHex( aBuffer, rInStrm.readuInt32() );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
lclAppendHex( aBuffer, rInStrm.readuInt16() );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
lclAppendHex( aBuffer, rInStrm.readuInt16() );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
lclAppendHex( aBuffer, rInStrm.readuInt8() );
lclAppendHex( aBuffer, rInStrm.readuInt8() );
aBuffer.append( sal_Unicode( '-' ) );
aBuffer.append( '-' );
for( int nIndex = 0; nIndex < 6; ++nIndex )
lclAppendHex( aBuffer, rInStrm.readuInt8() );
aBuffer.append( sal_Unicode( '}' ) );
aBuffer.append( '}' );
return aBuffer.makeStringAndClear();
}
......
......@@ -150,7 +150,7 @@ VbaDummyFormControl::VbaDummyFormControl( const OUString& rName )
{
mxSiteModel.reset( new VbaSiteModel );
mxSiteModel->importProperty( XML_Name, rName );
mxSiteModel->importProperty( XML_VariousPropertyBits, OUString( sal_Unicode( '0' ) ) );
mxSiteModel->importProperty( XML_VariousPropertyBits, OUString( '0' ) );
mxCtrlModel.reset( new AxLabelModel );
mxCtrlModel->setAwtModelMode();
......@@ -229,9 +229,9 @@ OUString VbaSiteModel::getSubStorageName() const
if( mnId >= 0 )
{
OUStringBuffer aBuffer;
aBuffer.append( sal_Unicode( 'i' ) );
aBuffer.append( 'i' );
if( mnId < 10 )
aBuffer.append( sal_Unicode( '0' ) );
aBuffer.append( '0' );
aBuffer.append( mnId );
return aBuffer.makeStringAndClear();
}
......
......@@ -317,7 +317,7 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const
// normal source code line
if( !mbExecutable )
aSourceCode.appendAscii( "Rem " );
aSourceCode.append( aCodeLine ).append( sal_Unicode( '\n' ) );
aSourceCode.append( aCodeLine ).append( '\n' );
}
}
}
......@@ -364,7 +364,7 @@ void VbaModule::createModule( const OUString& rVBASourceCode,
default:
aSourceCode.appendAscii( "VBAUnknown" );
}
aSourceCode.append( sal_Unicode( '\n' ) );
aSourceCode.append( '\n' );
if( mbExecutable )
{
aSourceCode.appendAscii( "Option VBASupport 1\n" );
......@@ -375,7 +375,7 @@ void VbaModule::createModule( const OUString& rVBASourceCode,
{
// add a subroutine named after the module itself
aSourceCode.appendAscii( "Sub " ).
append( maName.replace( ' ', '_' ) ).append( sal_Unicode( '\n' ) );
append( maName.replace( ' ', '_' ) ).append( '\n' );
}
// append passed VBA source code
......
......@@ -288,7 +288,7 @@ OUString ShapeBase::getShapeName() const
{
sal_Int32 nShapeIdx = mrDrawing.getLocalShapeIndex( getShapeId() );
if( nShapeIdx > 0 )
return OUStringBuffer( aBaseName ).append( sal_Unicode( ' ' ) ).append( nShapeIdx ).makeStringAndClear();
return OUStringBuffer( aBaseName ).append( ' ' ).append( nShapeIdx ).makeStringAndClear();
}
return OUString();
......
......@@ -167,7 +167,7 @@ void TextPortionContext::onEndElement()
meantime, the space character has to be added manually.
*/
if( mrTextBox.getPortionCount() == mnInitialPortions )
mrTextBox.appendPortion( maParagraph, maFont, OUString( sal_Unicode( ' ' ) ) );
mrTextBox.appendPortion( maParagraph, maFont, OUString( ' ' ) );
}
// ============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment