From 3ee177a14d8b816ef5b62500aeb54524c289e045 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 15 Oct 2019 20:24:10 +0200 Subject: loplugin:stringadd look through a couple more known-good methods Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/appl/appuno.cxx | 14 ++++++-------- sfx2/source/control/thumbnailviewitem.cxx | 3 +-- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 069d1b1fe47c..d5e315147957 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1272,10 +1272,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::SequenceaAttrib[n-1].nAID ) <= 127, "Member ID out of range" ); - OUString aName( OUString::createFromAscii( pSlot->pUnoName ) ) ; - aName += "."; - aName += OUString::createFromAscii( pType->aAttrib[n-1].pName ) ; - pValue[nActProp].Name = aName; + pValue[nActProp].Name = OUString::createFromAscii( pSlot->pUnoName ) + + "." + + OUString::createFromAscii( pType->aAttrib[n-1].pName ); if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) ) { SAL_WARN( "sfx", "Sub item " << pType->aAttrib[n-1].nAID @@ -1318,10 +1317,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::SequenceaAttrib[n-1].nAID) <= 127, "Member ID out of range" ); - OUString aName( OUString::createFromAscii( rArg.pName ) ) ; - aName += "."; - aName += OUString::createFromAscii( rArg.pType->aAttrib[n-1].pName ) ; - pValue[nActProp].Name = aName; + pValue[nActProp].Name = OUString::createFromAscii( rArg.pName ) + + "." + + OUString::createFromAscii( rArg.pType->aAttrib[n-1].pName ) ; if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) ) { SAL_WARN( "sfx", "Sub item " diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 6e0619daf945..c2957f9ff4bd 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -242,8 +242,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai --nLength; } - aText = aText.copy(0, nLineStart+nLength); - aText += "..."; + aText = aText.copy(0, nLineStart+nLength) + "..."; nLineLength = nLength + 3; } -- cgit