diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-07 15:24:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-08 08:45:56 +0200 |
commit | 0e2a6e8ea20d74436b544104969a0fdca0003b59 (patch) | |
tree | 6ec960da7b28b9938b531820f8f6e35852adc5d6 /oox | |
parent | e3828e7bed641bf8475845045accec6131544f42 (diff) |
remove some unnecessary use of OUStringBuffer
Change-Id: Ia4e02589d2fe79a27b83200a0e7a528a2c806519
Reviewed-on: https://gerrit.libreoffice.org/38508
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/relations.cxx | 2 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/vmlexport.cxx | 2 | ||||
-rw-r--r-- | oox/source/helper/containerhelper.cxx | 2 | ||||
-rw-r--r-- | oox/source/ole/vbacontrol.cxx | 2 | ||||
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index c8d343847f0a..68a4256c0745 100644 --- a/oox/source/core/relations.cxx +++ b/oox/source/core/relations.cxx @@ -35,7 +35,7 @@ OUString lclRemoveFileName( const OUString& rPath ) OUString lclAppendFileName( const OUString& rPath, const OUString& rFileName ) { return rPath.isEmpty() ? rFileName : - OUStringBuffer( rPath ).append( '/' ).append( rFileName ).makeStringAndClear(); + rPath + OUStringLiteral1('/') + rFileName; } OUString createOfficeDocRelationTypeTransitional(const OUString& rType) diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 19f06ffcda85..b66dcf9e7301 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -458,7 +458,7 @@ namespace { OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal_Int32 nId, const OUString& rType, const OUString& rTarget, bool bExternal ) { - OUString sId = OUStringBuffer().append( "rId" ).append( nId ).makeStringAndClear(); + OUString sId = "rId" + OUString::number( nId ); Sequence< StringPair > aEntry( bExternal ? 3 : 2 ); aEntry[0].First = "Type"; diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index a4fca11906a8..36e9bf1a7c3d 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -2373,7 +2373,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( ' ' ).append( aElem.copy( nPos ).trim() ).makeStringAndClear(); + aElem = aElem.copy( 0, nPos ) + OUStringLiteral1(' ') + aElem.copy( nPos ).trim(); ++nPos; } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 25d70e8ee442..d893cc678cb8 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -786,7 +786,7 @@ void ChartExport::exportExternalData( const Reference< css::chart::XChartDocumen if( nSepPos > 0) { relationPath = relationPath.copy( nSepPos, ::std::max< sal_Int32 >( externalDataPath.getLength(), 0 ) - nSepPos ); - relationPath = OUStringBuffer( ".." ).append( relationPath ).makeStringAndClear(); + relationPath = ".." + relationPath; } } FSHelperPtr pFS = GetFS(); diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 623beaaa88ec..ff121025acd3 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -873,7 +873,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& OString VMLExport::ShapeIdString( sal_uInt32 nId ) { - return OStringBuffer( 20 ).append( "shape_" ).append( sal_Int64( nId ) ).makeStringAndClear(); + return "shape_" + OString::number( nId ); } void VMLExport::AddFlipXY( ) diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx index 99a14231190c..c1a23820f03a 100644 --- a/oox/source/helper/containerhelper.cxx +++ b/oox/source/helper/containerhelper.cxx @@ -86,7 +86,7 @@ OUString ContainerHelper::getUnusedName( OUString aNewName = rSuggestedName; sal_Int32 nIndex = -1; while( rxNameAccess->hasByName( aNewName ) ) - aNewName = OUStringBuffer( rSuggestedName ).append( cSeparator ).append( nIndex++ ).makeStringAndClear(); + aNewName = rSuggestedName + OUStringLiteral1(cSeparator) + OUString::number( nIndex++ ); return aNewName; } diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index eb7a54b94b9c..84402d3a0c3e 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -119,7 +119,7 @@ OUString VbaControlNamesSet::generateDummyName() OUString aCtrlName; do { - aCtrlName = OUStringBuffer( maDummyBaseName ).append( ++mnIndex ).makeStringAndClear(); + aCtrlName = maDummyBaseName + OUString::number( ++mnIndex ); } while( maCtrlNames.count( aCtrlName ) > 0 ); maCtrlNames.insert( aCtrlName ); diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index f7d6c6908b8f..17f52ff609b6 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -296,7 +296,7 @@ OUString ShapeBase::getShapeName() const { sal_Int32 nShapeIdx = mrDrawing.getLocalShapeIndex( getShapeId() ); if( nShapeIdx > 0 ) - return OUStringBuffer( aBaseName ).append( ' ' ).append( nShapeIdx ).makeStringAndClear(); + return aBaseName + OUStringLiteral1(' ') + OUString::number( nShapeIdx ); } return OUString(); |