From 1182f2a579646c9721320c339ff39b1ef55683e9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 30 Sep 2019 15:11:55 +0200 Subject: loplugin:stringadd in sd Change-Id: If83625845d8687f2749fce9699cb9bd6b8825be0 Reviewed-on: https://gerrit.libreoffice.org/79892 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../ui/accessibility/AccessibleDocumentViewBase.cxx | 3 +-- sd/source/ui/animations/CustomAnimationList.cxx | 3 +-- sd/source/ui/func/fucopy.cxx | 4 ++-- sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx | 3 +-- sd/source/ui/unoidl/UnoDocumentSettings.cxx | 3 +-- sd/source/ui/unoidl/unomodel.cxx | 18 +++++++----------- 6 files changed, 13 insertions(+), 21 deletions(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index fe808039929e..c3004e7c1d61 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -691,8 +691,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes() if (!layerAltText.isEmpty()) { sName = " "; - sDisplay = sDisplay + sName; - sDisplay += layerAltText; + sDisplay = sDisplay + sName + layerAltText; } } } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 275575e64cf9..83def14415df 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -915,8 +915,7 @@ void CustomAnimationList::update() { SvTreeListEntry* pLBoxEntry = new CustomAnimationListEntry; pLBoxEntry->AddItem(std::make_unique(Image(), Image(), false)); - OUString aDescription = SdResId(STR_CUSTOMANIMATION_TRIGGER); - aDescription += ": "; + OUString aDescription = SdResId(STR_CUSTOMANIMATION_TRIGGER) + ": "; aDescription += getShapeDescription( xShape, false ); pLBoxEntry->AddItem(std::make_unique(aDescription)); Insert( pLBoxEntry ); diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 32b682e01db0..ea9d0f139b46 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -166,8 +166,8 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( nNumber > 1 ) { - OUString aStr( SdResId( STR_OBJECTS ) ); - aStr += " " + SdResId( STR_UNDO_COPYOBJECTS ); + OUString aStr = SdResId( STR_OBJECTS ) + + " " + SdResId( STR_UNDO_COPYOBJECTS ); pProgress.reset(new SfxProgress( mpDocSh, aStr, nNumber )); mpDocSh->SetWaitCursor( true ); diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx index 9065a27e76cd..c6f0b02b07a4 100644 --- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx +++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx @@ -200,8 +200,7 @@ void RecentlyUsedMasterPages::SavePersistentValues() for (const auto& rDescriptor : mvMasterPages) { // Create new child. - OUString sKey ("index_"); - sKey += OUString::number(nIndex); + OUString sKey = "index_" + OUString::number(nIndex); Reference xChild( xChildFactory->createInstance(), UNO_QUERY); if (xChild.is()) diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 77970bb24df1..666122868a57 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -366,8 +366,7 @@ uno::Sequence OUString aResult; if( pList->SaveTo( xSubStorage, aName.makeStringAndClear(), &aResult ) ) { - OUString aRealPath( "Settings/" ); - aRealPath += aResult; + OUString aRealPath = "Settings/" + aResult; aRet[i].Value <<= aRealPath; } } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index eeda330cc569..c7f8113a0513 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1563,8 +1563,7 @@ static void ImplPDFExportComments( const uno::Reference< drawing::XDrawPage >& x vcl::PDFNote aNote; OUString sTitle( xAnnotation->getAuthor() ); - sTitle += ", "; - sTitle += aStr; + sTitle += ", " + aStr; aNote.Title = sTitle; aNote.Contents = xText->getString(); rPDFExtOutDevData.CreateNote( ::tools::Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ), @@ -2271,15 +2270,14 @@ OUString SdXImpressDocument::getPartInfo(int nPart) if (!pViewSh) return OUString(); - OUString aPartInfo; const bool bIsVisible = pViewSh->IsVisible(nPart); const bool bIsSelected = pViewSh->IsSelected(nPart); - aPartInfo += "{ \"visible\": \""; - aPartInfo += OUString::number(static_cast(bIsVisible)); - aPartInfo += "\", \"selected\": \""; - aPartInfo += OUString::number(static_cast(bIsSelected)); - aPartInfo += "\" }"; + OUString aPartInfo = "{ \"visible\": \"" + + OUString::number(static_cast(bIsVisible)) + + "\", \"selected\": \"" + + OUString::number(static_cast(bIsSelected)) + + "\" }"; return aPartInfo; } @@ -3121,9 +3119,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn bUnique = std::find(aPageNames.begin(), aPageNames.end(), aPrefix) == aPageNames.end(); } - OUString aLayoutName( aPrefix ); - aLayoutName += SD_LT_SEPARATOR; - aLayoutName += STR_LAYOUT_OUTLINE; + OUString aLayoutName = aPrefix + SD_LT_SEPARATOR STR_LAYOUT_OUTLINE; // create styles static_cast(pDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix ); -- cgit