summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-02 18:59:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-03 17:11:14 +0100
commitab285c743afa1c8769581871d7b56374fd8c49f1 (patch)
treed5628df49fb4db29d474e5e7b7cef4072c33153a /sw/source/uibase
parentf4544f3903fed3a656e3cd57e1bd83582e024b96 (diff)
loplugin:stringadd
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/appenv.cxx3
-rw-r--r--sw/source/uibase/app/applab.cxx8
-rw-r--r--sw/source/uibase/app/docsh2.cxx3
-rw-r--r--sw/source/uibase/envelp/labelcfg.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx10
-rw-r--r--sw/source/uibase/utlui/navipi.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx12
7 files changed, 21 insertions, 23 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 5de37c41b4a0..1bcd43c41520 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -162,8 +162,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pNewView->AttrChangedNotify(nullptr); // so that SelectShell is being called
pSh = pNewView->GetWrtShellPtr();
- OUString aTmp( SwResId(STR_ENV_TITLE) );
- aTmp += OUString::number( ++nTitleNo );
+ OUString aTmp = SwResId(STR_ENV_TITLE) + OUString::number( ++nTitleNo );
xDocSh->SetTitle( aTmp );
// if applicable, copy the old Collections "Sender" and "Receiver" to
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 8d6c5f230a17..cf07dc9728c3 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -205,13 +205,13 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
OUString aTmp;
if(bLabel)
{
- aTmp = SwResId( STR_LAB_TITLE);
- aTmp += OUString::number(++nLabelTitleNo );
+ aTmp = SwResId( STR_LAB_TITLE) +
+ OUString::number(++nLabelTitleNo );
}
else
{
- aTmp = pDlg->GetBusinessCardStr();
- aTmp += OUString::number( ++nBCTitleNo );
+ aTmp = pDlg->GetBusinessCardStr() +
+ OUString::number( ++nBCTitleNo );
}
xDocSh->SetTitle( aTmp );
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 1b1c83f366f9..c69b3e2d889f 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -822,8 +822,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwView *pCurrView = static_cast<SwView*>( pFrame->GetViewShell());
// Set document's title
- OUString aTmp( SwResId(STR_ABSTRACT_TITLE) );
- aTmp += GetTitle();
+ OUString aTmp = SwResId(STR_ABSTRACT_TITLE) + GetTitle();
xDocSh->SetTitle( aTmp );
pCurrView->GetWrtShell().SetNewDoc();
pFrame->Show();
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index b2b7d743a7da..dcf07ab3efa5 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -321,8 +321,8 @@ void SwLabelConfig::SaveLabel( const OUString& rManufacturer,
}
}
- OUString sPrefix( wrapConfigurationElementName( rManufacturer ) );
- sPrefix += "/" + sFoundNode + "/";
+ OUString sPrefix = wrapConfigurationElementName( rManufacturer ) +
+ "/" + sFoundNode + "/";
Sequence<OUString> aPropNames = lcl_CreatePropertyNames( sPrefix );
OUString sMeasure;
Sequence<PropertyValue> aPropValues = lcl_CreateProperties( aPropNames, sMeasure, rRec );
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 47a6852df369..21b72b3a9bcd 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1263,8 +1263,8 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu()
pSubPop3->InsertItem(nId++, m_aContextStrings[IDX_STR_ACTIVE_VIEW], MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK);
if(m_pHiddenShell)
{
- OUString sHiddenEntry = m_pHiddenShell->GetView().GetDocShell()->GetTitle();
- sHiddenEntry += " ( " +
+ OUString sHiddenEntry = m_pHiddenShell->GetView().GetDocShell()->GetTitle() +
+ " ( " +
m_aContextStrings[IDX_STR_HIDDEN] +
" )";
pSubPop3->InsertItem(nId, sHiddenEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK);
@@ -3202,10 +3202,10 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
else
{
const size_t nMemberCount = static_cast<SwContentType*>(pUserData)->GetMemberCount();
- sEntry = OUString::number(nMemberCount) + " ";
- sEntry += nMemberCount == 1
+ sEntry = OUString::number(nMemberCount) + " " +
+ (nMemberCount == 1
? static_cast<SwContentType*>(pUserData)->GetSingleName()
- : static_cast<SwContentType*>(pUserData)->GetName();
+ : static_cast<SwContentType*>(pUserData)->GetName());
bRet = true;
}
if(bRet)
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index f6155e16d80f..e016ab69910f 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -989,8 +989,8 @@ void SwNavigationPI::UpdateListBox()
if(m_aContentTree->GetHiddenWrtShell())
{
OUString sEntry = m_aContentTree->GetHiddenWrtShell()->GetView().
- GetDocShell()->GetTitle();
- sEntry += " (" +
+ GetDocShell()->GetTitle() +
+ " (" +
m_aStatusArr[IDX_STR_HIDDEN] +
")";
m_aDocListBox->InsertEntry(sEntry);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 8dbde3081590..1f06646b94a6 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1644,12 +1644,12 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
// is already clipped to the editshell
StartAllAction();
- OUString aTmpStr1 = SwResId(STR_START_QUOTE);
- aTmpStr1 += GetSelText();
- aTmpStr1 += SwResId(STR_END_QUOTE);
- OUString aTmpStr3 = SwResId(STR_START_QUOTE);
- aTmpStr3 += OUStringChar(cChar);
- aTmpStr3 += SwResId(STR_END_QUOTE);
+ OUString aTmpStr1 = SwResId(STR_START_QUOTE) +
+ GetSelText() +
+ SwResId(STR_END_QUOTE);
+ OUString aTmpStr3 = SwResId(STR_START_QUOTE) +
+ OUStringChar(cChar) +
+ SwResId(STR_END_QUOTE);
aRewriter.AddRule( UndoArg1, aTmpStr1 );
aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) );
aRewriter.AddRule( UndoArg3, aTmpStr3 );