summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 18:22:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-02 08:01:26 +0200
commit32617df2f59b05ca5942fd18b3440ec834982565 (patch)
tree348c5a5671f7a81b86d0d436c33c224e2cb49d5f /svx
parentfe3d9961e32fd7230e21716793adaddffdf2463e (diff)
loplugin:stringadd in svx
Change-Id: I47944e589c5261d26d5ef0c116a9173bf6ed1f03 Reviewed-on: https://gerrit.libreoffice.org/79983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/unit/customshapes.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx4
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx6
-rw-r--r--svx/source/fmcomp/gridctrl.cxx8
-rw-r--r--svx/source/form/datanavi.cxx34
-rw-r--r--svx/source/form/fmPropBrw.cxx4
-rw-r--r--svx/source/form/fmobj.cxx3
-rw-r--r--svx/source/sidebar/line/LineWidthPopup.cxx4
-rw-r--r--svx/source/svdraw/svdibrow.cxx3
-rw-r--r--svx/source/svdraw/svdotext.cxx7
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx4
-rw-r--r--svx/source/tbxctrls/layctrl.cxx8
-rw-r--r--svx/source/xml/xmleohlp.cxx6
-rw-r--r--svx/source/xml/xmlgrhlp.cxx6
14 files changed, 35 insertions, 66 deletions
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index ed26337380bf..5ad16cc5ea53 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -453,8 +453,8 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf126512_OOXML_handle_in_ODP)
if (aInitialPosition.X == aObservedPosition.X
&& aInitialPosition.Y == aObservedPosition.Y)
{
- sErrors += "\n";
- sErrors += OUString::number(i) + " " + sShapeType + " " + OUString::number(j);
+ sErrors
+ += "\n" + OUString::number(i) + " " + sShapeType + " " + OUString::number(j);
}
}
}
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 6151ea928e47..fdec9dbdebf3 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -271,8 +271,8 @@ OUString EnhancedCustomShape2d::GetEquation( const sal_uInt16 nFlags, sal_Int32
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
aEquation += "/";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
- aEquation += ")";
- aEquation += "*(";
+ aEquation += ")"
+ "*(";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP1, b1Special );
aEquation += "/";
EnhancedCustomShape2d::AppendEnhancedCustomShapeEquationParameter( aEquation, nP2, b2Special );
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 7bc0df78cf2d..ba2bbb140d07 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -315,8 +315,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
sal_Int32 nStartLevel = std::min(static_cast<sal_Int32>(aParentNumberings[i]), i);
for(sal_Int32 nParentLevel = i - nStartLevel; nParentLevel < i; nParentLevel++)
{
- OUString sTmp(sLevelTexts[nParentLevel]);
- sTmp += ".";
+ OUString sTmp = sLevelTexts[nParentLevel] + ".";
lcl_PaintLevel(pVDev,
aNumberingTypes[nParentLevel],
sBulletChars[nParentLevel],
@@ -690,8 +689,7 @@ void NumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
sal_Int32 nStartLevel = std::min(static_cast<sal_Int32>(aParentNumberings[i]), i);
for(sal_Int32 nParentLevel = i - nStartLevel; nParentLevel < i; nParentLevel++)
{
- OUString sTmp(sLevelTexts[nParentLevel]);
- sTmp += ".";
+ OUString sTmp = sLevelTexts[nParentLevel] + ".";
lcl_PaintLevel(pVDev,
aNumberingTypes[nParentLevel],
sBulletChars[nParentLevel],
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index bd44a83b3f50..0c3a7ce185dc 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -455,9 +455,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
// count an extra hairspace (U+200A) left and right
const OUString sevenDigits(m_aAbsolute->CreateFieldText(6000000));
const OUString hairSpace(u'\x200A');
- OUString textPattern(hairSpace);
- textPattern += sevenDigits;
- textPattern += hairSpace;
+ OUString textPattern = hairSpace + sevenDigits + hairSpace;
nTextWidth = m_aAbsolute->GetTextWidth(textPattern);
m_aAbsolute->SetPosPixel(Point(nX,nY));
m_aAbsolute->SetSizePixel(Size(nTextWidth, nH));
@@ -741,8 +739,8 @@ void DbGridControl::NavigationBar::SetState(DbGridControlNavigationBarState nWhi
// add the number of selected rows, if applicable
if (pParent->GetSelectRowCount())
{
- OUString aExtendedInfo(aText);
- aExtendedInfo += " (";
+ OUString aExtendedInfo = aText +
+ " (";
aExtendedInfo += m_aAbsolute->CreateFieldText(pParent->GetSelectRowCount());
aExtendedInfo += ")";
pWnd->SetText(aExtendedInfo);
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index e8966b1d97c4..c39630ea3dd4 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -726,8 +726,7 @@ namespace svxform
{
OUString sTemp;
pNode->m_xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sNewName += sTemp;
- sNewName += ": ";
+ sNewName += sTemp + ": ";
pNode->m_xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sNewName += sTemp;
}
@@ -811,8 +810,7 @@ namespace svxform
pEntry = m_pItemList->InsertEntry( sTemp, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode );
// Action
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
- OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION );
- sEntry += sTemp;
+ OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION ) + sTemp;
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Method
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
@@ -821,13 +819,11 @@ namespace svxform
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Ref
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF ) + sTemp;
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Bind
_rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ) + sTemp;
m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry );
// Replace
_rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
@@ -846,8 +842,7 @@ namespace svxform
{
OUString sName;
_rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sName += sTemp;
- sName += ": ";
+ sName += sTemp + ": ";
_rEntry->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sName += sTemp;
pEntry = m_pItemList->InsertEntry(
@@ -885,19 +880,16 @@ namespace svxform
m_pItemList->SetEntryText( pEntry, sTemp );
_rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND );
- sEntry += sTemp;
+ OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ) + sTemp;
sal_uIntPtr nPos = 0;
SvTreeListEntry* pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF ) + sTemp;
pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
- sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION );
- sEntry += sTemp;
+ sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION ) + sTemp;
pChild = m_pItemList->GetEntry( pEntry, nPos++ );
m_pItemList->SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
@@ -1158,8 +1150,7 @@ namespace svxform
OUString sEntry;
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sEntry += sTemp;
- sEntry += ": ";
+ sEntry += sTemp + ": ";
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
@@ -2006,9 +1997,7 @@ namespace svxform
if ( sInstName.isEmpty() )
{
SAL_WARN( "svx.form", "DataNavigatorWindow::CreateInstancePage(): instance without name" );
- OUString sTemp("untitled");
- sTemp += OUString::number( nPageId );
- sInstName = sTemp;
+ sInstName = "untitled" + OUString::number( nPageId );
}
m_pTabCtrl->InsertPage( nPageId, sInstName, m_pTabCtrl->GetPageCount() - 2 );
}
@@ -3094,8 +3083,7 @@ namespace svxform
OUString sEntry;
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sEntry += sTemp;
- sEntry += ": ";
+ sEntry += sTemp + ": ";
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sEntry += sTemp;
m_xBindLB->append_text(sEntry);
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 1674c5806824..3dec43d293f9 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -418,8 +418,8 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection )
else if ( _rSelection.size() > 1 )
{
// no form component and (no form or no name) -> Multiselection
- sTitle = SvxResId(RID_STR_PROPERTIES_CONTROL);
- sTitle += SvxResId(RID_STR_PROPTITLE_MULTISELECT);
+ sTitle = SvxResId(RID_STR_PROPERTIES_CONTROL) +
+ SvxResId(RID_STR_PROPTITLE_MULTISELECT);
}
else
{
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 62ca4bc61775..fc7c9aac731d 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -418,8 +418,7 @@ namespace
OUString sCurrentIndex = OUString::number(nPos);
if (!sReturn.isEmpty())
{
- sCurrentIndex += "\\";
- sCurrentIndex += sReturn;
+ sCurrentIndex += "\\" + sReturn;
}
sReturn = sCurrentIndex;
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx
index 813160616611..8df03806ad1e 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -188,8 +188,8 @@ void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUni
m_xVSWidth->SetImage(m_aIMGCus);
m_xVSWidth->SetCusEnable(true);
- OUString aStrTip( OUString::number( static_cast<double>(m_nCustomWidth) / 10));
- aStrTip += m_sPt;
+ OUString aStrTip = OUString::number( static_cast<double>(m_nCustomWidth) / 10) +
+ m_sPt;
m_xVSWidth->SetItemText(9, aStrTip);
}
else
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 431b36f4efc7..91cbd07ff29f 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -497,8 +497,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
pEditControl->SetSelection(Selection(SELECTION_MIN,SELECTION_MAX));
vcl::Window* pParent=GetParent();
aWNameMemorized=pParent->GetText();
- OUString aNewName(aWNameMemorized);
- aNewName += " ";
+ OUString aNewName = aWNameMemorized + " ";
aNewName += pEntry->GetItemTypeStr();
if (pEntry->bCanNum) {
aNewName += ": ";
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 93c80ff56325..7fd3a450bd2c 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -965,9 +965,7 @@ OUString SdrTextObj::TakeObjNameSingul() const
if(!aStr2.isEmpty() && aStr2.indexOf(u'\x00FF') == -1)
{
// space between ResStr and content text
- aStr += " ";
-
- aStr += "\'";
+ aStr += " \'";
if(aStr2.getLength() > 10)
{
@@ -975,8 +973,7 @@ OUString SdrTextObj::TakeObjNameSingul() const
aStr2 += "...";
}
- aStr += aStr2;
- aStr += "\'";
+ aStr += aStr2 + "\'";
}
}
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 37e1eb8c8461..1b2483f11e4e 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -160,9 +160,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
for( size_t nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )
{
- OUString aStr(SvxResId(RID_SVXFLOAT3D_FAVORITE));
- aStr += " ";
- aStr += OUString::number(nFavorite);
+ OUString aStr = SvxResId(RID_SVXFLOAT3D_FAVORITE) + " " + OUString::number(nFavorite);
Image aThumbImage( maFavoritesHorizontal[nFavorite-1] );
maCtlFavorites.InsertItem( static_cast<sal_uInt16>(nFavorite), aThumbImage, aStr );
}
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 38646d3dcd91..4cb6101d6f9b 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -293,14 +293,10 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
if (!nCol || !nLine)
return;
- OUString aText;
- aText += OUString::number( nCol );
- aText += " x ";
- aText += OUString::number( nLine );
+ OUString aText = OUString::number( nCol ) + " x " + OUString::number( nLine );
if(GetId() == FN_SHOW_MULTIPLE_PAGES)
{
- aText += " ";
- aText += SvxResId(RID_SVXSTR_PAGES);
+ aText += " " + SvxResId(RID_SVXSTR_PAGES);
}
Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight());
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 59fcdaa4db6d..96827d4e418c 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -449,8 +449,7 @@ OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL(
}
ImplReadObject( aContainerStorageName, aObjectStorageName, pClassId, pOut ? pOut->GetStream() : nullptr );
- sRetURL = XML_EMBEDDEDOBJECT_URL_BASE;
- sRetURL += aObjectStorageName;
+ sRetURL = XML_EMBEDDEDOBJECT_URL_BASE + aObjectStorageName;
if( pOut )
{
@@ -463,8 +462,7 @@ OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL(
sRetURL = "./";
if( !aContainerStorageName.isEmpty() )
{
- sRetURL += aContainerStorageName;
- sRetURL += "/";
+ sRetURL += aContainerStorageName + "/";
}
sRetURL += aObjectStorageName;
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 82f48337df01..14f9313c625d 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -844,8 +844,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
if (xStorage.is())
xStorage->commit();
- OUString aStoragePath("Pictures/");
- aStoragePath += rPictureStreamName;
+ OUString aStoragePath = "Pictures/" + rPictureStreamName;
// put into cache
maExportGraphics[aGraphic] = std::make_pair(aStoragePath, rOutSavedMimeType);
@@ -923,8 +922,7 @@ OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOut
if( !aId.isEmpty() )
{
- aRet = XML_GRAPHICOBJECT_URL_BASE;
- aRet += aId;
+ aRet = XML_GRAPHICOBJECT_URL_BASE + aId;
}
}
}