summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 15:11:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 08:26:52 +0200
commit6eb7870aa10144281ccbc4702770d8ce1ceb3e9a (patch)
treea61b9bc4685c8fa4797a7b00660838937ec62e9a /sc/source
parent03516c505eced337149782a67b2ad98c246929b3 (diff)
loplugin:stringadd in sc
Change-Id: Idab16f785ca5e8954f8e50132938f6329106c927 Reviewed-on: https://gerrit.libreoffice.org/79891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/conditio.cxx8
-rw-r--r--sc/source/core/data/docpool.cxx7
-rw-r--r--sc/source/core/data/global2.cxx3
-rw-r--r--sc/source/core/data/stlpool.cxx3
-rw-r--r--sc/source/core/data/table3.cxx3
-rw-r--r--sc/source/core/tool/addincol.cxx13
-rw-r--r--sc/source/core/tool/formulalogger.cxx5
-rw-r--r--sc/source/core/tool/rangeutl.cxx3
-rw-r--r--sc/source/filter/excel/xechart.cxx3
-rw-r--r--sc/source/filter/lotus/lotform.cxx6
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx13
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx7
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx120
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx3
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx9
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx7
-rw-r--r--sc/source/ui/navipi/navipi.cxx3
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx4
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx4
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx16
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx3
-rw-r--r--sc/source/ui/unoobj/docuno.cxx11
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx3
-rw-r--r--sc/source/ui/view/formatsh.cxx16
-rw-r--r--sc/source/ui/view/tabview.cxx17
-rw-r--r--sc/source/ui/view/tabvwsha.cxx3
-rw-r--r--sc/source/ui/view/viewfun2.cxx14
-rw-r--r--sc/source/ui/view/viewfunc.cxx3
32 files changed, 137 insertions, 186 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 9a7be21f3a7c..97626a397e87 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1253,9 +1253,7 @@ OUString ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 n
}
else if (bIsStr1)
{
- aRet = "\"";
- aRet += aStrVal1;
- aRet += "\"";
+ aRet = "\"" + aStrVal1 + "\"";
}
else
mpDoc->GetFormatTable()->GetInputLineString(nVal1, nNumFmt, aRet);
@@ -1271,9 +1269,7 @@ OUString ScConditionEntry::GetExpression( const ScAddress& rCursor, sal_uInt16 n
}
else if (bIsStr2)
{
- aRet = "\"";
- aRet += aStrVal2;
- aRet += "\"";
+ aRet = "\"" + aStrVal2 + "\"";
}
else
mpDoc->GetFormatTable()->GetInputLineString(nVal2, nNumFmt, aRet);
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index d9515f6214b6..95597eb2a61b 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -438,10 +438,9 @@ static bool lcl_HFPresentation
eCoreMetric, ePresentationMetric, &rIntl );
aText += " " + EditResId(GetMetricId(ePresentationMetric));
}
- aText += cpDelim;
-
- // We don't have a nPropFirstLineOfst
- aText += EditResId(RID_SVXITEMS_LRSPACE_RIGHT);
+ aText += cpDelim +
+ // We don't have a nPropFirstLineOfst
+ EditResId(RID_SVXITEMS_LRSPACE_RIGHT);
if ( 100 != nPropRightMargin )
{
aText = aText + unicode::formatPercent(nPropLeftMargin,
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 04687ebf7ab0..228c6f422104 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -321,8 +321,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
OUString ScGlobal::GetDocTabName( const OUString& rFileName,
const OUString& rTabName )
{
- OUString aDocTab('\'');
- aDocTab += rFileName;
+ OUString aDocTab = "'" + rFileName;
sal_Int32 nPos = 1;
while( (nPos = aDocTab.indexOf( '\'', nPos )) != -1 )
{ // escape Quotes
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index d8a06a60069b..2a701c1b26e8 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -83,8 +83,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
sal_uInt32 nCount = GetIndexedStyleSheets().GetNumberOfStyleSheets();
for ( sal_uInt32 nAdd = 1; nAdd <= nCount; nAdd++ )
{
- OUString aNewName = ScResId(STR_STYLENAME_STANDARD);
- aNewName += OUString::number( nAdd );
+ OUString aNewName = ScResId(STR_STYLENAME_STANDARD) + OUString::number( nAdd );
if ( Find( aNewName, eFam ) == nullptr )
return SfxStyleSheetPool::Make(aNewName, eFam, mask);
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 64596e2c3101..ec92abad27e4 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2133,8 +2133,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
DBShowRow(aRowEntry.nDestRow, true);
// insert label
- OUString label = ScResId(STR_TABLE_GRAND);
- label += " ";
+ OUString label = ScResId(STR_TABLE_GRAND) + " ";
label += ScResId(lcl_GetSubTotalStrId(pResFunc[0]));
SetString(nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, nTab, label);
ApplyStyle(nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, pStyle);
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index ceeb156a0a31..59a7cb6bb648 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -405,10 +405,7 @@ void ScUnoAddInCollection::ReadConfiguration()
// get direct information on the function
- OUString aFuncPropPath = aFunctionsPath;
- aFuncPropPath += sSlash;
- aFuncPropPath += pFuncNameArray[nFuncPos];
- aFuncPropPath += sSlash;
+ OUString aFuncPropPath = aFunctionsPath + sSlash + pFuncNameArray[nFuncPos] + sSlash;
uno::Sequence<OUString> aFuncPropNames{
(aFuncPropPath + CFGSTR_DISPLAYNAME), // CFG_FUNCPROP_DISPLAYNAME
@@ -470,10 +467,7 @@ void ScUnoAddInCollection::ReadConfiguration()
sal_Int32 nIndex = 0;
for ( const OUString& rArgName : aArgumentNames )
{
- OUString aOneArgPath = aArgumentsPath;
- aOneArgPath += sSlash;
- aOneArgPath += rArgName;
- aOneArgPath += sSlash;
+ OUString aOneArgPath = aArgumentsPath + sSlash + rArgName + sSlash;
pPropNameArray[nIndex++] = aOneArgPath
+ CFGSTR_DISPLAYNAME;
@@ -1229,8 +1223,7 @@ bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
// no empty names...
if ( rDesc.maDefArgNames[nArg].isEmpty() )
{
- OUString aDefName("arg");
- aDefName += OUString::number( nArg+1 );
+ OUString aDefName = "arg" + OUString::number( nArg+1 );
rDesc.maDefArgNames[nArg] = aDefName;
}
diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx
index 06d42f48f407..31b3fe9f6072 100644
--- a/sc/source/core/tool/formulalogger.cxx
+++ b/sc/source/core/tool/formulalogger.cxx
@@ -343,9 +343,8 @@ FormulaLogger::GroupScope FormulaLogger::enterGroup(
if (aName.isEmpty())
aName = "-"; // unsaved document.
- OUString aGroupPrefix = aName;
-
- aGroupPrefix += ": formula-group: ";
+ OUString aGroupPrefix = aName +
+ ": formula-group: ";
aGroupPrefix += rCell.aPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDoc, rDoc.GetAddressConvention());
aGroupPrefix += ": ";
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index a2058a3023fd..968b2d7ddd49 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -115,8 +115,7 @@ bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr,
if ( -1 == aTempAreaStr.indexOf(':') )
{
- aTempAreaStr += ":";
- aTempAreaStr += rAreaStr;
+ aTempAreaStr += ":" + rAreaStr;
}
sal_Int32 nColonPos = aTempAreaStr.indexOf(':');
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index fbaeb04ba3b3..0f66e40409de 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1192,8 +1192,7 @@ void XclExpChText::ConvertTitle( Reference< XTitle > const & xTitle, sal_uInt16
if (pSubTitle)
{
// append subtitle as the 2nd line of the title.
- OUString aSubTitle("\n");
- aSubTitle += *pSubTitle;
+ OUString aSubTitle = "\n" + *pSubTitle;
mxSrcLink->AppendString(aSubTitle);
}
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 3ed086462173..360b5da2d40d 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -566,8 +566,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest
aStack << aPool.Store( nRngIndex );
else
{
- OUString aText( "NRREF ");
- aText += aTmp;
+ OUString aText = "NRREF " + aTmp;
aStack << aPool.Store( aText );
}
}
@@ -579,8 +578,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest
aStack << aPool.Store( nRngIndex );
else
{
- OUString aText( "ABSNREF " );
- aText += aTmp;
+ OUString aText = "ABSNREF " + aTmp;
aStack << aPool.Store( aText );
}
}
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 1dfa16ee8f9a..dac67e964272 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -183,9 +183,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
sCondition += "cell-content-is-decimal-number()";
break;
case sheet::ValidationType_LIST :
- sCondition += "cell-content-is-in-list(";
- sCondition += aValidation.sFormula1;
- sCondition += ")";
+ sCondition += "cell-content-is-in-list(" + aValidation.sFormula1 + ")";
break;
case sheet::ValidationType_TEXT_LEN :
if (aValidation.aOperator != sheet::ConditionOperator_BETWEEN &&
@@ -199,9 +197,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
sCondition += "cell-content-is-whole-number()";
break;
case sheet::ValidationType_CUSTOM :
- sCondition += "is-true-formula(";
- sCondition += aValidation.sFormula1;
- sCondition += ")";
+ sCondition += "is-true-formula(" + aValidation.sFormula1 + ")";
break;
default:
{
@@ -265,10 +261,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy
else
sCondition += "cell-content-is-not-between(";
}
- sCondition += aValidation.sFormula1;
- sCondition += ",";
- sCondition += aValidation.sFormula2;
- sCondition += ")";
+ sCondition += aValidation.sFormula1 + "," + aValidation.sFormula2 + ")";
}
}
else
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index cfb1babc12f4..f97b06884261 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1170,10 +1170,9 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& r
}
catch ( const util::MalformedNumberFormatException& rException )
{
- OUString sErrorMessage("Error in Formatstring ");
- sErrorMessage += sFormatString;
- sErrorMessage += " at position ";
- sErrorMessage += OUString::number(rException.CheckPos);
+ OUString sErrorMessage ="Error in Formatstring " +
+ sFormatString + " at position " +
+ OUString::number(rException.CheckPos);
uno::Sequence<OUString> aSeq { sErrorMessage };
uno::Reference<xml::sax::XLocator> xLocator;
SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rException.Message, xLocator);
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 010bcb101030..0ad187384d93 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -493,8 +493,8 @@ uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
OUString strFor = mpViewShell->GetFormula(maCellAddress) ;
strFor = strFor.replaceAt(0,1,"");
strFor = ReplaceFourChar(strFor);
- strFor = "Formula:" + strFor;
- strFor += ";Note:";
+ strFor = "Formula:" + strFor +
+ ";Note:";
strFor += ReplaceFourChar(GetAllDisplayNote());
strFor += ";";
strFor += getShadowAttrs();//the string returned contains the spliter ";"
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 1cd9c0ff91f0..551311ad0654 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -401,18 +401,18 @@ OUString ScAccessibleCellBase::getShadowAttrs() const
return sShadowAttrs;
}
//else return all the shadow properties
- sShadowAttrs += "Location=";
- sShadowAttrs += OUString::number( nLocationVal );
- sShadowAttrs += sInnerSplit;
- sShadowAttrs += "ShadowWidth=";
- sShadowAttrs += OUString::number( static_cast<sal_Int32>(aShadowFmt.ShadowWidth) ) ;
- sShadowAttrs += sInnerSplit;
- sShadowAttrs += "IsTransparent=";
- sShadowAttrs += OUString::number( static_cast<int>(aShadowFmt.IsTransparent) ) ;
- sShadowAttrs += sInnerSplit;
- sShadowAttrs += "Color=";
- sShadowAttrs += OUString::number( static_cast<sal_Int32>(aShadowFmt.Color) );
- sShadowAttrs += sOuterSplit;
+ sShadowAttrs += "Location=" +
+ OUString::number( nLocationVal ) +
+ sInnerSplit +
+ "ShadowWidth=" +
+ OUString::number( static_cast<sal_Int32>(aShadowFmt.ShadowWidth) ) +
+ sInnerSplit +
+ "IsTransparent=" +
+ OUString::number( static_cast<int>(aShadowFmt.IsTransparent) ) +
+ sInnerSplit +
+ "Color=" +
+ OUString::number( static_cast<sal_Int32>(aShadowFmt.Color) ) +
+ sOuterSplit;
return sShadowAttrs;
}
@@ -488,18 +488,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
}
else//add all the border properties to the return string.
{
- sBorderAttrs += "TopBorder:Color=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.Color) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "InnerLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.InnerLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "OuterLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.OuterLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "LineDistance=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aTopBorder.LineDistance) );
- sBorderAttrs += sOuterSplit;
+ sBorderAttrs += "TopBorder:Color=" +
+ OUString::number( static_cast<sal_Int32>(aTopBorder.Color) ) +
+ sInnerSplit +
+ "InnerLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aTopBorder.InnerLineWidth) ) +
+ sInnerSplit +
+ "OuterLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aTopBorder.OuterLineWidth) ) +
+ sInnerSplit +
+ "LineDistance=" +
+ OUString::number( static_cast<sal_Int32>(aTopBorder.LineDistance) ) +
+ sOuterSplit;
}
//bottom border
if ( aBottomBorder.InnerLineWidth == 0 && aBottomBorder.OuterLineWidth == 0 )
@@ -508,18 +508,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
}
else
{
- sBorderAttrs += "BottomBorder:Color=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.Color) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "InnerLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.InnerLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "OuterLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.OuterLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "LineDistance=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aBottomBorder.LineDistance) );
- sBorderAttrs += sOuterSplit;
+ sBorderAttrs += "BottomBorder:Color=" +
+ OUString::number( static_cast<sal_Int32>(aBottomBorder.Color) ) +
+ sInnerSplit +
+ "InnerLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aBottomBorder.InnerLineWidth) ) +
+ sInnerSplit +
+ "OuterLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aBottomBorder.OuterLineWidth) ) +
+ sInnerSplit +
+ "LineDistance=" +
+ OUString::number( static_cast<sal_Int32>(aBottomBorder.LineDistance) ) +
+ sOuterSplit;
}
//left border
if ( aLeftBorder.InnerLineWidth == 0 && aLeftBorder.OuterLineWidth == 0 )
@@ -528,18 +528,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
}
else
{
- sBorderAttrs += "LeftBorder:Color=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.Color) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "InnerLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.InnerLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "OuterLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.OuterLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "LineDistance=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aLeftBorder.LineDistance) );
- sBorderAttrs += sOuterSplit;
+ sBorderAttrs += "LeftBorder:Color=" +
+ OUString::number( static_cast<sal_Int32>(aLeftBorder.Color) ) +
+ sInnerSplit +
+ "InnerLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aLeftBorder.InnerLineWidth) ) +
+ sInnerSplit +
+ "OuterLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aLeftBorder.OuterLineWidth) ) +
+ sInnerSplit +
+ "LineDistance=" +
+ OUString::number( static_cast<sal_Int32>(aLeftBorder.LineDistance) ) +
+ sOuterSplit;
}
//right border
if ( aRightBorder.InnerLineWidth == 0 && aRightBorder.OuterLineWidth == 0 )
@@ -548,18 +548,18 @@ OUString ScAccessibleCellBase::getBorderAttrs()
}
else
{
- sBorderAttrs += "RightBorder:Color=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.Color) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "InnerLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.InnerLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "OuterLineWidth=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.OuterLineWidth) );
- sBorderAttrs += sInnerSplit;
- sBorderAttrs += "LineDistance=";
- sBorderAttrs += OUString::number( static_cast<sal_Int32>(aRightBorder.LineDistance) );
- sBorderAttrs += sOuterSplit;
+ sBorderAttrs += "RightBorder:Color=" +
+ OUString::number( static_cast<sal_Int32>(aRightBorder.Color) ) +
+ sInnerSplit +
+ "InnerLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aRightBorder.InnerLineWidth) ) +
+ sInnerSplit +
+ "OuterLineWidth=" +
+ OUString::number( static_cast<sal_Int32>(aRightBorder.OuterLineWidth) ) +
+ sInnerSplit +
+ "LineDistance=" +
+ OUString::number( static_cast<sal_Int32>(aRightBorder.LineDistance) ) +
+ sOuterSplit;
}
return sBorderAttrs;
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index af2312c18e3a..85a626ac6c91 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2224,8 +2224,7 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
sName = "page-name:";
sValue = sName + sSheetName ;
sName = ";page-number:";
- sValue += sName;
- sValue += OUString::number(sheetIndex+1) ;
+ sValue += sName + OUString::number(sheetIndex+1) ;
sName = ";total-pages:";
sValue += sName;
sValue += OUString::number(GetDocument()->GetTableCount());
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 5d8764469b83..a6d7f5f08169 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1502,8 +1502,7 @@ OUString ScAccessibleDocumentPagePreview::getAccessibleName()
if (!aFileName.isEmpty())
{
- aName = aFileName + " - " + aName;
- aName += ScResId(STR_ACC_DOC_PREVIEW_SUFFIX);
+ aName = aFileName + " - " + aName + ScResId(STR_ACC_DOC_PREVIEW_SUFFIX);
}
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index ccd9076570a4..32d1d591b35a 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -364,11 +364,8 @@ void ScColRowNameRangesDlg::UpdateNames()
OUString rString;
const ScAddress::Details aDetails(pDoc->GetAddressConvention());
- OUString aString;
OUString strDelim(" --- ");
- aString = strDelim;
- aString += ScResId( STR_COLUMN );
- aString += strDelim;
+ OUString aString = strDelim + ScResId( STR_COLUMN ) + strDelim;
m_xLbRange->append(OUString::number(nEntryDataDelim), aString);
if ( (nCount = xColNameRanges->size()) > 0 )
{
@@ -407,9 +404,7 @@ void ScColRowNameRangesDlg::UpdateNames()
m_xLbRange->append(OUString::number(nEntryDataDelim), aInsStr);
}
}
- aString = strDelim;
- aString += ScResId( STR_ROW );
- aString += strDelim;
+ aString = strDelim + ScResId( STR_ROW ) + strDelim;
m_xLbRange->append(OUString::number(nEntryDataDelim), aString);
if ( (nCount = xRowNameRanges->size()) > 0 )
{
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 12652b6b7e9c..05ad987fa64b 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -215,8 +215,7 @@ void ScMoveTableDlg::InitDocListBox()
if ( pScSh == SfxObjectShell::Current() )
{
mnCurrentDocPos = nSelPos = i;
- aEntryName += " ";
- aEntryName += msCurrentDoc;
+ aEntryName += " " + msCurrentDoc;
}
OUString sId(OUString::number(reinterpret_cast<sal_uInt64>(&pScSh->GetDocument())));
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 42fce41bff06..34d104f37c22 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -188,8 +188,7 @@ void ScShareDocumentDlg::UpdateView()
// unknown user name
aUser = m_aStrUnknownUser;
}
- aUser += " ";
- aUser += m_aStrExclusiveAccess;
+ aUser += " " + m_aStrExclusiveAccess;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(mpDocShell->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 66115e8eeca2..33cfc826fd06 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -198,8 +198,7 @@ void ScSolverOptionsDialog::FillListBox()
if (aValue >>= fDoubleValue)
m_aOptions.back()->SetDoubleValue(fDoubleValue);
- OUString sTxt(aVisName);
- sTxt += ": ";
+ OUString sTxt = aVisName + ": ";
sTxt += rtl::math::doubleToUString(fDoubleValue,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true );
@@ -212,9 +211,7 @@ void ScSolverOptionsDialog::FillListBox()
if (aValue >>= nIntValue)
m_aOptions.back()->SetIntValue(nIntValue);
- OUString sTxt(aVisName);
- sTxt += ": ";
- sTxt += OUString::number(nIntValue);
+ OUString sTxt = aVisName + ": " + OUString::number(nIntValue);
m_xLbSettings->set_text(nPos, sTxt, 1);
}
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 755856c6a961..3b27a6b4ad5c 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -981,8 +981,7 @@ void ScNavigatorDlg::GetDocNames( const OUString* pManualSel )
OUString aHidden = aLbEntries->GetHiddenTitle();
if (!aHidden.isEmpty())
{
- OUString aEntry = aHidden;
- aEntry += aStrHidden;
+ OUString aEntry = aHidden + aStrHidden;
aLbDocuments->InsertEntry( aEntry );
if ( pManualSel && aHidden == *pManualSel )
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 539aa5955a1c..2d22892668b9 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -226,8 +226,8 @@ void ScHFEditPage::InitPreDefinedList()
OUString aUserNameEntry(aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", " + aPageEntry + ", " + aDateFieldValue);
m_xLbDefined->append_text( aUserNameEntry);
- OUString aCreatedByEntry( m_xFtCreatedBy->get_label() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", ");
- aCreatedByEntry += aDateFieldValue + ", " + aPageEntry;
+ OUString aCreatedByEntry = m_xFtCreatedBy->get_label() + " " + aUserOpt.GetFirstName() + " " + aUserOpt.GetLastName() + ", " +
+ aDateFieldValue + ", " + aPageEntry;
m_xLbDefined->append_text( aCreatedByEntry);
}
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index dc3d2083ed73..f63d7e884726 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -193,8 +193,8 @@ IMPL_LINK_NOARG(ScHFPage, BtnHdl, weld::Button&, void)
SvxNumType eNumType = aDataSet.Get(ATTR_PAGE).GetNumType();
static_cast<ScHFEditPage*>(aDlg.GetTabPage())->SetNumType(eNumType);
- aText += " (" + ScResId( STR_PAGESTYLE );
- aText += ": " + aStrPageStyle + ")";
+ aText += " (" + ScResId( STR_PAGESTYLE ) +
+ ": " + aStrPageStyle + ")";
aDlg.set_title(aText);
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 6fbe5d3d579d..f97bba82783c 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -140,14 +140,14 @@ IMPL_LINK_NOARG( NumberFormatPropertyPanel, NumFormatValueHdl, Edit&, void )
OUString sPrecision = OUString::number(nPrecision);
OUString sLeadZeroes = OUString::number(nLeadZeroes);
- aFormat += sThousand;
- aFormat += sBreak;
- aFormat += sNegRed;
- aFormat += sBreak;
- aFormat += sPrecision;
- aFormat += sBreak;
- aFormat += sLeadZeroes;
- aFormat += sBreak;
+ aFormat += sThousand +
+ sBreak +
+ sNegRed +
+ sBreak +
+ sPrecision +
+ sBreak +
+ sLeadZeroes +
+ sBreak;
SfxStringItem aItem( SID_NUMBER_FORMAT, aFormat );
GetBindings()->GetDispatcher()->ExecuteList(SID_NUMBER_FORMAT,
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 2aa0fb870c19..68bdd4e86ce4 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -3019,8 +3019,7 @@ public:
{
if ( meOrigin != chart2::data::LabelOrigin_LONG_SIDE)
{
- OUString aString = ScResId(STR_COLUMN);
- aString += " ";
+ OUString aString = ScResId(STR_COLUMN) + " ";
ScAddress aPos( nCol, 0, 0 );
OUString aColStr(aPos.Format(ScRefFlags::COL_VALID));
aString += aColStr;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 46599d873f71..58fdad8890f2 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -544,17 +544,16 @@ int ScModelObj::getPart()
OUString ScModelObj::getPartInfo( int nPart )
{
- OUString aPartInfo;
ScViewData* pViewData = ScDocShell::GetViewData();
const bool bIsVisible = pViewData->GetDocument()->IsVisible(nPart);
//FIXME: Implement IsSelected().
const bool bIsSelected = false; //pViewData->GetDocument()->IsSelected(nPart);
- aPartInfo += "{ \"visible\": \"";
- aPartInfo += OUString::number(static_cast<unsigned int>(bIsVisible));
- aPartInfo += "\", \"selected\": \"";
- aPartInfo += OUString::number(static_cast<unsigned int>(bIsSelected));
- aPartInfo += "\" }";
+ OUString aPartInfo = "{ \"visible\": \"" +
+ OUString::number(static_cast<unsigned int>(bIsVisible)) +
+ "\", \"selected\": \"" +
+ OUString::number(static_cast<unsigned int>(bIsSelected)) +
+ "\" }";
return aPartInfo;
}
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index f198c75f09e3..2d0dc66b29cd 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -397,8 +397,7 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasElements()
static OUString lcl_GetEntryNameFromIndex( sal_Int32 nIndex )
{
- OUString aRet( "Entry" );
- aRet += OUString::number( nIndex );
+ OUString aRet = "Entry" + OUString::number( nIndex );
return aRet;
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index a28f95f4d2cb..79576bede62a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2550,14 +2550,14 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
const OUString sPrecision = OUString::number(nPrecision);
const OUString sLeadZeroes = OUString::number(nLeadZeroes);
- aFormat += sThousand;
- aFormat += sBreak;
- aFormat += sNegRed;
- aFormat += sBreak;
- aFormat += sPrecision;
- aFormat += sBreak;
- aFormat += sLeadZeroes;
- aFormat += sBreak;
+ aFormat += sThousand +
+ sBreak +
+ sNegRed +
+ sBreak +
+ sPrecision +
+ sBreak +
+ sLeadZeroes +
+ sBreak;
rSet.Put(SfxStringItem(nWhich, aFormat));
}
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 50a026eb8007..baf486d514a5 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2424,12 +2424,11 @@ void lcl_createGroupsData(
bool bGroupHidden = pEntry->IsHidden();
- OUString aGroupData;
- aGroupData += "{ \"level\": \"" + OUString::number(nLevel + 1) + "\", ";
- aGroupData += "\"index\": \"" + OUString::number(nIndex) + "\", ";
- aGroupData += "\"startPos\": \"" + OUString::number(rGroupStartPositions[nLevel]) + "\", ";
- aGroupData += "\"endPos\": \"" + OUString::number(nTotalTwips) + "\", ";
- aGroupData += "\"hidden\": \"" + OUString::number(bGroupHidden ? 1 : 0) + "\" }";
+ OUString aGroupData = "{ \"level\": \"" + OUString::number(nLevel + 1) + "\", "
+ "\"index\": \"" + OUString::number(nIndex) + "\", "
+ "\"startPos\": \"" + OUString::number(rGroupStartPositions[nLevel]) + "\", "
+ "\"endPos\": \"" + OUString::number(nTotalTwips) + "\", "
+ "\"hidden\": \"" + OUString::number(bGroupHidden ? 1 : 0) + "\" }";
rGroupsBuffer += aGroupData;
@@ -2593,8 +2592,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
aBuffer.append("\"groupLevels\": \"").append(OUString::number(nRowGroupDepth)).append("\" }");
}
- OUString aRowGroupsBuffer;
- aRowGroupsBuffer += "\"rowGroups\": [\n";
+ OUString aRowGroupsBuffer = "\"rowGroups\": [\n";
std::vector<long> aRowGroupStartPositions(nRowGroupDepth, -nTotalPixels);
long nPrevSizePx = -1;
for (SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow)
@@ -2737,8 +2735,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
aBuffer.append("\"groupLevels\": \"").append(OUString::number(nColGroupDepth)).append("\" }");
}
- OUString aColGroupsBuffer;
- aColGroupsBuffer += "\"columnGroups\": [\n";
+ OUString aColGroupsBuffer = "\"columnGroups\": [\n";
std::vector<long> aColGroupStartPositions(nColGroupDepth, -nTotalPixels);
nPrevSizePx = -1;
for (SCCOL nCol = nStartCol + 1; nCol <= nEndCol; ++nCol)
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 4d7b021af7c0..76b7e288c803 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -111,8 +111,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode )
SCROW nPosY = rViewData.GetCurY();
SCTAB nTab = rViewData.GetTabNo();
- OUString aStr = ScResId(pGlobStrId);
- aStr += ": ";
+ OUString aStr = ScResId(pGlobStrId) + ": ";
ScAddress aCursor( nPosX, nPosY, nTab );
double nVal;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index ac926e722bb5..e997d63b11af 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2138,16 +2138,16 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
if ( bExact )
{
- aMsgStr += ScResId( STR_MSSG_SOLVE_0 );
- aMsgStr += aResStr;
- aMsgStr += ScResId( STR_MSSG_SOLVE_1 );
+ aMsgStr += ScResId( STR_MSSG_SOLVE_0 ) +
+ aResStr +
+ ScResId( STR_MSSG_SOLVE_1 );
}
else
{
- aMsgStr = ScResId( STR_MSSG_SOLVE_2 );
- aMsgStr += ScResId( STR_MSSG_SOLVE_3 );
- aMsgStr += aResStr ;
- aMsgStr += ScResId( STR_MSSG_SOLVE_4 );
+ aMsgStr = ScResId( STR_MSSG_SOLVE_2 ) +
+ ScResId( STR_MSSG_SOLVE_3 ) +
+ aResStr +
+ ScResId( STR_MSSG_SOLVE_4 );
}
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewData().GetDialogParent(),
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 129f791039dc..5c3d28ad871f 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -451,8 +451,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
nResult = RET_NO; // empty formula, just '='
else
{
- OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) );
- aMessage += aCorrectedFormula;
+ OUString aMessage = ScResId( SCSTR_FORMULA_AUTOCORRECTION ) + aCorrectedFormula;
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetViewData().GetDialogParent(),
VclMessageType::Question, VclButtonsType::YesNo,