summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 18:23:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-02 08:39:14 +0200
commit91c836acea76cffb0e2d5df0d15fc94d84bfdc5a (patch)
tree24b688ec199566fd692aa7b7f22d772c1e484a8c /sw
parent9d99dc8a835d66cbe27e4cbf5869e6704dd781f9 (diff)
loplugin:stringadd in sw
Change-Id: I72e1cbc229a47660b2313f46898753e273b69d35 Reviewed-on: https://gerrit.libreoffice.org/79985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx7
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx10
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx8
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx4
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx7
-rw-r--r--sw/source/core/access/acccell.cxx4
-rw-r--r--sw/source/core/access/accdoc.cxx54
-rw-r--r--sw/source/core/access/accpara.cxx12
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx53
-rw-r--r--sw/source/core/doc/doc.cxx13
-rw-r--r--sw/source/core/doc/docnew.cxx3
-rw-r--r--sw/source/core/edit/edfcol.cxx4
-rw-r--r--sw/source/core/layout/dbg_lay.cxx6
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx4
-rw-r--r--sw/source/core/undo/unins.cxx11
-rw-r--r--sw/source/core/undo/unovwr.cxx4
-rw-r--r--sw/source/core/unocore/unochart.cxx10
-rw-r--r--sw/source/filter/html/css1atr.cxx16
-rw-r--r--sw/source/filter/html/htmlatr.cxx3
-rw-r--r--sw/source/filter/html/htmlcss1.cxx3
-rw-r--r--sw/source/filter/html/htmlform.cxx3
-rw-r--r--sw/source/filter/html/htmlforw.cxx7
-rw-r--r--sw/source/filter/html/htmlftn.cxx8
-rw-r--r--sw/source/filter/html/wrthtml.cxx24
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx3
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx9
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx3
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx7
-rw-r--r--sw/source/ui/fldui/fldvar.cxx3
-rw-r--r--sw/source/ui/misc/num.cxx3
-rw-r--r--sw/source/ui/misc/outline.cxx3
-rw-r--r--sw/source/ui/misc/pggrid.cxx4
-rw-r--r--sw/source/ui/table/tautofmt.cxx3
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx9
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx16
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx3
-rw-r--r--sw/source/uibase/envelp/labelcfg.cxx17
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx5
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx3
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx64
-rw-r--r--sw/source/uibase/uiview/srcview.cxx10
-rw-r--r--sw/source/uibase/uiview/view2.cxx8
-rw-r--r--sw/source/uibase/utlui/condedit.cxx6
-rw-r--r--sw/source/uibase/utlui/content.cxx15
-rw-r--r--sw/source/uibase/utlui/navipi.cxx6
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx15
48 files changed, 187 insertions, 313 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index f6b5894ee85c..cfc97d393fc6 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -357,11 +357,10 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
CPPUNIT_ASSERT(pStream);
sal_uInt64 nLength = pStream->TellEnd();
- OString aExpected("<reqif-xhtml:div><reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb"
- "</reqif-xhtml:p>" SAL_NEWLINE_STRING);
-
+ OString aExpected = "<reqif-xhtml:div><reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb"
+ "</reqif-xhtml:p>" SAL_NEWLINE_STRING
// This was '<table' instead.
- aExpected += "<reqif-xhtml:table";
+ "<reqif-xhtml:table";
OString aStream(read_uInt8s_ToOString(*pStream, nLength));
pStream->Seek(0);
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 35edcd79c090..b73ca07bf83f 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -848,11 +848,11 @@ protected:
}
else
{
- OString aMessage("validation requested, but don't know how to validate ");
- aMessage += filename;
- aMessage += " (";
- aMessage += OUStringToOString(aFilterName, RTL_TEXTENCODING_UTF8);
- aMessage += ")";
+ OString aMessage = "validation requested, but don't know how to validate " +
+ OString(filename) +
+ " (" +
+ OUStringToOString(aFilterName, RTL_TEXTENCODING_UTF8) +
+ ")";
CPPUNIT_FAIL(aMessage.getStr());
}
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 07ae47ffff37..c287d0954c7e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -468,14 +468,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125298, "tdf125298_crossreflink_nonascii_charlim
OUString bookmarkName2 = getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:bookmarkStart[1]", "name");
CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("\u00e91\u00e12\u01713\u01514\u00fa5\u00f66\u00fc7\u00f38\u00ed9"), bookmarkName2);
OUString fieldName1 = getXPathContent(pXmlDoc, "/w:document/w:body/w:p[5]/w:r[2]/w:instrText[1]");
- OUString expectedFieldName1(" REF ");
- expectedFieldName1 += bookmarkName1;
- expectedFieldName1 += " \\h ";
+ OUString expectedFieldName1 = " REF " + bookmarkName1 + " \\h ";
CPPUNIT_ASSERT_EQUAL(expectedFieldName1, fieldName1);
OUString fieldName2 = getXPathContent(pXmlDoc, "/w:document/w:body/w:p[7]/w:r[2]/w:instrText[1]");
- OUString expectedFieldName2(" REF ");
- expectedFieldName2 += bookmarkName2;
- expectedFieldName2 += " \\h ";
+ OUString expectedFieldName2 = " REF " + bookmarkName2 + " \\h ";
CPPUNIT_ASSERT_EQUAL(expectedFieldName2, fieldName2);
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 3fc5effa1d87..7398af46b798 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1235,9 +1235,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103090, "tdf103090.odt")
OUString fieldName = getXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText");
// Ensure that PAGEREF field refers exactly our bookmark
- OUString expectedFieldName(" PAGEREF ");
- expectedFieldName += bookmarkName;
- expectedFieldName += " \\h ";
+ OUString expectedFieldName = " PAGEREF " + bookmarkName + " \\h ";
CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName);
}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index bf2ce97f1745..a86987be9409 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1376,9 +1376,7 @@ DECLARE_RTFIMPORT_TEST(testTdf108947, "tdf108947.rtf")
//Document is very fragile, hence we need this guard.
#if HAVE_MORE_FONTS
- OUString aExpected = SAL_NEWLINE_STRING;
- aExpected += SAL_NEWLINE_STRING;
- aExpected += "Header Page 2 ?";
+ OUString aExpected = SAL_NEWLINE_STRING SAL_NEWLINE_STRING "Header Page 2 ?";
uno::Reference<text::XText> xHeaderTextLeft = getProperty<uno::Reference<text::XText>>(
getStyles("PageStyles")->getByName("Default Style"), "HeaderTextLeft");
aActual = xHeaderTextLeft->getString();
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index fd9bee5280d7..86412fd3ab24 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -1800,11 +1800,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testImageComment)
{
const boost::property_tree::ptree& rComment = rValue.second;
OString aAnchorPos(rComment.get<std::string>("anchorPos").c_str());
- OString aExpected;
- aExpected += OString::number(nFrameLeft);
- aExpected += ", ";
- aExpected += OString::number(nFrameTop);
- aExpected += ", 0, 0";
+ OString aExpected
+ = OString::number(nFrameLeft) + ", " + OString::number(nFrameTop) + ", 0, 0";
CPPUNIT_ASSERT_EQUAL(aExpected, aAnchorPos);
}
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index b71a38596e92..61c0144d5d87 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -394,9 +394,7 @@ css::uno::Any SAL_CALL SwAccessibleCell::getExtendedAttributes()
const SwTableBoxFormula& tbl_formula = pFrameFormat->GetTableBoxFormula();
OUString strFormula = ReplaceFourChar(tbl_formula.GetFormula());
- OUString strFor("Formula:");
- strFor += strFormula;
- strFor += ";" ;
+ OUString strFor = "Formula:" + strFormula + ";";
strRet <<= strFor;
return strRet;
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 434746a923f3..9d498a4b3132 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -529,7 +529,6 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SwFEShell* pFEShell = dynamic_cast<const SwFEShell*>( pCursorShell) != nullptr
? static_cast<SwFEShell*>( pCursorShell )
: nullptr;
- OUString sAttrName;
OUString sValue;
sal_uInt16 nPage, nLogPage;
OUString sDisplay;
@@ -537,19 +536,14 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
if( pFEShell )
{
pFEShell->GetPageNumber(-1,true,nPage,nLogPage,sDisplay);
- sAttrName = "page-name:";
-
- sValue = sAttrName + sDisplay ;
- sAttrName = ";page-number:";
- sValue += sAttrName;
- sValue += OUString::number( nPage ) ;
- sAttrName = ";total-pages:";
- sValue += sAttrName;
+
+ sValue = "page-name:" + sDisplay +
+ ";page-number:" +
+ OUString::number( nPage ) +
+ ";total-pages:";
sValue += OUString::number( pCursorShell->GetPageCnt() ) ;
sValue += ";";
- sAttrName = "line-number:";
-
SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame();
sal_uLong nLineNum = 0;
@@ -641,15 +635,11 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
}
}
- sValue += sAttrName;
- sValue += OUString::number( nLineNum ) ;
-
- sValue += ";";
+ sValue += "line-number:" + OUString::number( nLineNum ) + ";";
SwFrame* pCurrCol=static_cast<SwFrame*>(pCurrFrame)->FindColFrame();
- sAttrName = "column-number:";
- sValue += sAttrName;
+ sValue += "column-number:";
int nCurrCol = 1;
if(pCurrCol!=nullptr)
@@ -673,25 +663,16 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
}
}
}
- sValue += OUString::number( nCurrCol ) ;
- sValue += ";";
-
- sAttrName = "total-columns:";
+ sValue += OUString::number( nCurrCol ) + ";";
const SwFormatCol &rFormatCol=pCurrPage->GetAttrSet()->GetCol();
sal_uInt16 nColCount=rFormatCol.GetNumCols();
nColCount = nColCount>0?nColCount:1;
- sValue += sAttrName;
- sValue += OUString::number( nColCount ) ;
-
- sValue += ";";
+ sValue += "total-columns:" + OUString::number( nColCount ) + ";";
SwSectionFrame* pCurrSctFrame=static_cast<SwFrame*>(pCurrFrame)->FindSctFrame();
if(pCurrSctFrame!=nullptr && pCurrSctFrame->GetSection()!=nullptr )
{
- sAttrName = "section-name:";
-
- sValue += sAttrName;
OUString sectionName = pCurrSctFrame->GetSection()->GetSectionName();
sectionName = sectionName.replaceFirst( "\\" , "\\\\" );
@@ -700,12 +681,9 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
sectionName = sectionName.replaceFirst( "," , "\\," );
sectionName = sectionName.replaceFirst( ":" , "\\:" );
- sValue += sectionName;
-
- sValue += ";";
+ sValue += "section-name:" + sectionName + ";";
//section-columns-number
- sAttrName = "section-columns-number:";
nCurrCol = 1;
@@ -722,19 +700,15 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
}
}
}
- sValue += sAttrName;
- sValue += OUString::number( nCurrCol ) ;
- sValue += ";";
+ sValue += "section-columns-number:" +
+ OUString::number( nCurrCol ) + ";";
//section-total-columns
- sAttrName = "section-total-columns:";
const SwFormatCol &rFormatSctCol=pCurrSctFrame->GetAttrSet()->GetCol();
sal_uInt16 nSctColCount=rFormatSctCol.GetNumCols();
nSctColCount = nSctColCount>0?nSctColCount:1;
- sValue += sAttrName;
- sValue += OUString::number( nSctColCount ) ;
-
- sValue += ";";
+ sValue += "section-total-columns:" +
+ OUString::number( nSctColCount ) + ";";
}
anyAtrribute <<= sValue;
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 59587621c3b5..b834d11c7920 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1235,8 +1235,7 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
sEntry = aMgr.GetFormatStr( pField->GetTypeId(), pField->GetFormat() );
if (sEntry.getLength() > 0)
{
- strTypeName += "-";
- strTypeName += sEntry;
+ strTypeName += "-" + sEntry;
}
}
}
@@ -1253,8 +1252,7 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
sEntry = aMgr.GetFormatStr(pField->GetTypeId(), nFormat);
if (sEntry.getLength() > 0)
{
- strTypeName += "-";
- strTypeName += sEntry;
+ strTypeName += "-" + sEntry;
}
}
}
@@ -1268,8 +1266,7 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
sEntry = pField->GetTyp()->GetName();
if (sEntry.getLength() > 0)
{
- strTypeName += "-";
- strTypeName += sEntry;
+ strTypeName += "-" + sEntry;
}
}
break;
@@ -1319,8 +1316,7 @@ OUString SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
}
else
{
- strTypeName += "-";
- strTypeName += sEntry;
+ strTypeName += "-" + sEntry;
}
}
}
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 1e7a7be92be4..62cd9e4da77e 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -395,13 +395,12 @@ const char * dbg_out(const SwRect & rRect)
static OUString lcl_dbg_out(const SwFrameFormat & rFrameFormat)
{
- OUString aResult("[ ");
-
char sBuffer[256];
sprintf(sBuffer, "%p", &rFrameFormat);
- aResult += OUString(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US);
- aResult += "(";
+ OUString aResult = "[ " +
+ OUString(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US) +
+ "(";
aResult += rFrameFormat.GetName();
aResult += ")";
@@ -497,28 +496,22 @@ static OUString lcl_dbg_out_NumType(sal_Int16 nType)
static OUString lcl_dbg_out(const SwNode & rNode)
{
- OUString aTmpStr;
-
- aTmpStr += "<node ";
- aTmpStr += "index=\"";
- aTmpStr += OUString::number(rNode.GetIndex());
- aTmpStr += "\"";
-
- aTmpStr += " serial=\"";
- aTmpStr += OUString::number(rNode.GetSerial());
- aTmpStr += "\"";
-
- aTmpStr += " type=\"";
- aTmpStr += OUString::number(sal_Int32( rNode.GetNodeType() ) );
- aTmpStr += "\"";
-
- aTmpStr += " pointer=\"";
-
char aBuffer[128];
sprintf(aBuffer, "%p", &rNode);
- aTmpStr += OUString(aBuffer, strlen(aBuffer), RTL_TEXTENCODING_ASCII_US);
- aTmpStr += "\">";
+ OUString aTmpStr = "<node "
+ "index=\"" +
+ OUString::number(rNode.GetIndex()) +
+ "\""
+ " serial=\"" +
+ OUString::number(rNode.GetSerial()) +
+ "\""
+ " type=\"" +
+ OUString::number(sal_Int32( rNode.GetNodeType() ) ) +
+ "\""
+ " pointer=\"" +
+ OUString(aBuffer, strlen(aBuffer), RTL_TEXTENCODING_ASCII_US) +
+ "\">";
const SwTextNode * pTextNode = rNode.GetTextNode();
@@ -548,8 +541,8 @@ static OUString lcl_dbg_out(const SwNode & rNode)
}
aTmpStr += "</number>";
- aTmpStr += "<rule>";
- aTmpStr += pNumRule->GetName();
+ aTmpStr += "<rule>" +
+ pNumRule->GetName();
const SfxPoolItem * pItem = nullptr;
@@ -559,8 +552,7 @@ static OUString lcl_dbg_out(const SwNode & rNode)
aTmpStr += "(";
aTmpStr +=
static_cast<const SwNumRuleItem *>(pItem)->GetValue();
- aTmpStr += ")";
- aTmpStr += "*";
+ aTmpStr += ")*";
}
const SwNumFormat * pNumFormat = nullptr;
@@ -606,11 +598,10 @@ static OUString lcl_dbg_out(const SwNode & rNode)
if (!sNumruleName.isEmpty())
{
- aTmpStr += ", ";
- aTmpStr += sNumruleName;
+ aTmpStr += ", " + sNumruleName;
}
- aTmpStr += ")";
- aTmpStr += "</coll>";
+ aTmpStr += ")"
+ "</coll>";
}
SwFormatColl * pCColl = pTextNode->GetCondFormatColl();
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 60875366134b..283ee808e008 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -599,16 +599,15 @@ static void lcl_FormatPostIt(
}
OUString aStr( SwViewShell::GetShellRes()->aPostItPage );
- aStr += sTmp;
-
- aStr += OUString::number( nPageNo );
- aStr += " ";
+ aStr += sTmp +
+ OUString::number( nPageNo ) +
+ " ";
if( nLineNo )
{
aStr += SwViewShell::GetShellRes()->aPostItLine;
- aStr += sTmp;
- aStr += OUString::number( nLineNo );
- aStr += " ";
+ aStr += sTmp +
+ OUString::number( nLineNo ) +
+ " ";
}
aStr += SwViewShell::GetShellRes()->aPostItAuthor;
aStr += sTmp;
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 96ce88160f7e..eb3032565cb0 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -924,8 +924,7 @@ static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, const OUString& rSt
{
do
{
- OUString sTest = rStartingPageDesc;
- sTest += OUString::number( nDocNo );
+ OUString sTest = rStartingPageDesc + OUString::number( nDocNo );
if( !pTargetShell->FindPageDescByName( sTest ) )
return sTest;
++nDocNo;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index aa0d763c7bde..7216ab102c87 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -411,8 +411,8 @@ std::pair<bool, OUString> lcl_MakeParagraphSignatureFieldText(const SignatureDes
valid = valid
&& aInfo.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
- msg = SwResId(STR_SIGNED_BY) + ": " + aInfo.ouSubject + ", ";
- msg += aDescr.msDate;
+ msg = SwResId(STR_SIGNED_BY) + ": " + aInfo.ouSubject + ", " +
+ aDescr.msDate;
msg += (!aDescr.msUsage.isEmpty() ? (" (" + aDescr.msUsage + "): ") : OUString(": "));
msg += (valid ? SwResId(STR_VALID) : SwResId(STR_INVALID));
}
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index c69e27ba8ecc..dae9bb9f0acf 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -529,16 +529,14 @@ static OUString lcl_CellText(const SwCellFrame* pFrame)
result += "Para:";
rtl_str_valueOfInt64(sz, n, 10);
OUString s = OUString::createFromAscii(sz);
- result += s;
- result += " ";
+ result += s + " ";
result += pNode->GetTextNode()->GetText();
}
}
rtl_str_valueOfInt64(sz, n, 10);
OUString s = OUString::createFromAscii(sz);
- s += " para(s):";
- s += result;
+ s += " para(s):" + result;
return s;
}
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index f00a7e58a909..2a74d155751d 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -198,8 +198,8 @@ ErrCode SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const OUString& rNewShort, con
if (IsOnlyTextBlock ( nIdx ) )
{
OUString sExt(".xml");
- OUString aOldStreamName( aOldName ); aOldStreamName += sExt;
- OUString aNewStreamName( aPackageName ); aNewStreamName += sExt;
+ OUString aOldStreamName = aOldName + sExt;
+ OUString aNewStreamName = aPackageName + sExt;
xRoot = xBlkRoot->openStorageElement( aOldName, embed::ElementModes::READWRITE );
try
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 2d838b740760..7d59f85c2fe4 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -541,8 +541,7 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences,
aResult.AddRule(UndoArg1, OUString::number(occurrences));
aResult.AddRule(UndoArg2, SwResId(STR_OCCURRENCES_OF));
- OUString aTmpStr;
- aTmpStr += SwResId(STR_START_QUOTE);
+ OUString aTmpStr = SwResId(STR_START_QUOTE);
aTmpStr += ShortenString(sOld, nUndoStringLength,
SwResId(STR_LDOTS));
aTmpStr += SwResId(STR_END_QUOTE);
@@ -551,9 +550,7 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences,
else if (1 == occurrences)
{
{
- OUString aTmpStr;
-
- aTmpStr += SwResId(STR_START_QUOTE);
+ OUString aTmpStr = SwResId(STR_START_QUOTE);
// #i33488 #
aTmpStr += ShortenString(sOld, nUndoStringLength,
SwResId(STR_LDOTS));
@@ -564,9 +561,7 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences,
aResult.AddRule(UndoArg2, SwResId(STR_YIELDS));
{
- OUString aTmpStr;
-
- aTmpStr += SwResId(STR_START_QUOTE);
+ OUString aTmpStr = SwResId(STR_START_QUOTE);
// #i33488 #
aTmpStr += ShortenString(sNew, nUndoStringLength,
SwResId(STR_LDOTS));
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 62bcdb7ef17e..0ce97ace711c 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -312,9 +312,7 @@ SwRewriter SwUndoOverwrite::GetRewriter() const
{
SwRewriter aResult;
- OUString aString;
-
- aString += SwResId(STR_START_QUOTE);
+ OUString aString = SwResId(STR_START_QUOTE);
aString += ShortenString(aInsStr, nUndoStringLength,
SwResId(STR_LDOTS));
aString += SwResId(STR_END_QUOTE);
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index ffb53f9c7f69..a17f62576072 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -261,19 +261,15 @@ static OUString GetRangeRepFromTableAndCells( const OUString &rTableName,
{
OSL_ENSURE( !rTableName.isEmpty(), "table name missing" );
OSL_ENSURE( !rStartCell.isEmpty(), "cell name missing" );
- OUString aRes( rTableName );
- aRes += ".";
- aRes += rStartCell;
+ OUString aRes = rTableName + "." + rStartCell;
if (!rEndCell.isEmpty())
{
- aRes += ":";
- aRes += rEndCell;
+ aRes += ":" + rEndCell;
}
else if (bForceEndCellName)
{
- aRes += ":";
- aRes += rStartCell;
+ aRes += ":" + rStartCell;
}
return aRes;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 55cb6346b1e1..30ea4a999d80 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1297,8 +1297,7 @@ static bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const OUString& rSelector,
RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} );
aScriptItemSet.Put( rItemSet );
- OUString aNewSelector( aSelector );
- aNewSelector += ".western" + aPseudo;
+ OUString aNewSelector = aSelector + ".western" + aPseudo;
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
&aNewSelector );
@@ -1324,8 +1323,7 @@ static bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const OUString& rSelector,
// If there are script dependencies and we are derived from a tag,
// when we have to export a style dependent class for all
// scripts
- OUString aNewSelector( aSelector );
- aNewSelector += "-western" + aPseudo;
+ OUString aNewSelector = aSelector + "-western" + aPseudo;
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
&aNewSelector );
@@ -1400,8 +1398,7 @@ static void OutCSS1DropCapRule(
if( pDCCharFormat )
aScriptItemSet.Set( pDCCharFormat->GetAttrSet() );
- OUString aNewSelector( aSelector );
- aNewSelector += ".western" + aPseudo;
+ OUString aNewSelector = aSelector + ".western" + aPseudo;
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
&aNewSelector );
@@ -1427,8 +1424,7 @@ static void OutCSS1DropCapRule(
// If there are script dependencies and we are derived from a tag,
// when we have to export a style dependent class for all
// scripts
- OUString aNewSelector( aSelector );
- aNewSelector += "-western" + aPseudo;
+ OUString aNewSelector = aSelector + "-western" + aPseudo;
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
&aNewSelector );
@@ -1624,8 +1620,8 @@ static Writer& OutCSS1_SwFormat( Writer& rWrt, const SwFormat& rFormat,
const SfxPoolItem *pItem;
if( SfxItemState::SET==aItemSet.GetItemState( RES_PARATR_DROP, false, &pItem ))
{
- OUString sOut( aSelector );
- sOut += ":" + OStringToOUString( sCSS1_first_letter, RTL_TEXTENCODING_ASCII_US );
+ OUString sOut = aSelector +
+ ":" + OStringToOUString( sCSS1_first_letter, RTL_TEXTENCODING_ASCII_US );
const SwFormatDrop *pDrop = static_cast<const SwFormatDrop *>(pItem);
OutCSS1DropCapRule( rHTMLWrt, sOut, *pDrop, CSS1_FMT_ISTAG != nDeep, bHasScriptDependencies );
}
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 29254ad651c8..a50b3f7836b8 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -109,8 +109,7 @@ sal_uInt16 SwHTMLWriter::GetDefListLvl( const OUString& rNm, sal_uInt16 nPoolId
return 1 | HTML_DLCOLL_DT;
}
- OUString sDTDD( OOO_STRING_SVTOOLS_HTML_dt );
- sDTDD += " ";
+ OUString sDTDD = OOO_STRING_SVTOOLS_HTML_dt " ";
if( rNm.startsWith(sDTDD) )
// DefinitionList - term
return static_cast<sal_uInt16>(rNm.copy( sDTDD.getLength() ).toInt32()) | HTML_DLCOLL_DT;
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 053b43775627..e7a1827543a6 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1499,8 +1499,7 @@ void SwCSS1Parser::FillDropCap( SwFormatDrop& rDrop,
OUString aName;
if( pName )
{
- aName = *pName;
- aName += ".FL"; // first letter
+ aName = *pName + ".FL"; // first letter
pCFormat = m_pDoc->FindCharFormatByName( aName );
}
else
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 9e83aae9cd13..6058d7df206e 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -799,8 +799,7 @@ static bool lcl_html_setEvents(
if(!rUnoMacroParamTable.empty())
{
- OUString sSearch( sListener );
- sSearch += "-" +sMethod + "-";
+ OUString sSearch = sListener + "-" +sMethod + "-";
sal_Int32 nLen = sSearch.getLength();
for(const auto & rParam : rUnoMacroParamTable)
{
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 0aec0dd8e16b..b2c9f8f51145 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -733,10 +733,9 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
{
if ( TRISTATE_FALSE != *n )
{
- sOptions += " " OOO_STRING_SVTOOLS_HTML_O_checked;
- sOptions += "=\"";
- sOptions += OString(OOO_STRING_SVTOOLS_HTML_O_checked);
- sOptions += "\"";
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_checked "=\""
+ OOO_STRING_SVTOOLS_HTML_O_checked
+ "\"";
}
}
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 96534f4aa7d8..97b3d938fef6 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -411,15 +411,15 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFormatFootnote& rFormatFootnote,
if( rFormatFootnote.IsEndNote() )
{
sClass = OOO_STRING_SVTOOLS_HTML_sdendnote_sym;
- sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote;
- sFootnoteName += OUString::number(static_cast<sal_Int32>(m_nEndNote));
+ sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote +
+ OUString::number(static_cast<sal_Int32>(m_nEndNote));
pInfo = &m_pDoc->GetEndNoteInfo();
}
else
{
sClass = OOO_STRING_SVTOOLS_HTML_sdfootnote_sym;
- sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote;
- sFootnoteName += OUString::number(static_cast<sal_Int32>(m_nFootNote));
+ sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote +
+ OUString::number(static_cast<sal_Int32>(m_nFootNote));
pInfo = &m_pDoc->GetFootnoteInfo();
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 2fe1d4edc369..7375f911d476 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1182,21 +1182,21 @@ void SwHTMLWriter::OutPointFieldmarks( const SwPosition& rPos )
if (pCheckBox)
{
- OString aOut("<");
- aOut += OOO_STRING_SVTOOLS_HTML_input;
- aOut += " ";
- aOut += OOO_STRING_SVTOOLS_HTML_O_type;
- aOut += "=\"";
- aOut += OOO_STRING_SVTOOLS_HTML_IT_checkbox;
- aOut += "\"";
+ OString aOut("<"
+ OOO_STRING_SVTOOLS_HTML_input
+ " "
+ OOO_STRING_SVTOOLS_HTML_O_type
+ "=\""
+ OOO_STRING_SVTOOLS_HTML_IT_checkbox
+ "\"");
if (pCheckBox->IsChecked())
{
- aOut += " ";
- aOut += OOO_STRING_SVTOOLS_HTML_O_checked;
- aOut += "=\"";
- aOut += OOO_STRING_SVTOOLS_HTML_O_checked;
- aOut += "\"";
+ aOut += " "
+ OOO_STRING_SVTOOLS_HTML_O_checked
+ "=\""
+ OOO_STRING_SVTOOLS_HTML_O_checked
+ "\"";
}
aOut += "/>";
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 80c677fdf7ce..e9def02ef1a3 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -526,8 +526,7 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 nPos,
EndRun(&rNode, nPos);
m_rExport.OutputField(nullptr, ww::eEQ, aStr, FieldFlags::Start | FieldFlags::CmdStart);
aStr = rRuby.GetText();
- aStr += ")";
- aStr += ",";
+ aStr += "),";
m_rExport.OutputField(nullptr, ww::eEQ, aStr, FieldFlags::NONE);
}
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index f237d3e2a6cd..bc255784f3a8 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -615,16 +615,13 @@ void RtfExport::WriteUserProps()
{
WriteUserPropType(64);
// Format is 'YYYY. MM. DD.'.
- aValue += OUString::number(aDate.Year);
- aValue += ". ";
+ aValue += OUString::number(aDate.Year) + ". ";
if (aDate.Month < 10)
aValue += "0";
- aValue += OUString::number(aDate.Month);
- aValue += ". ";
+ aValue += OUString::number(aDate.Month) + ". ";
if (aDate.Day < 10)
aValue += "0";
- aValue += OUString::number(aDate.Day);
- aValue += ".";
+ aValue += OUString::number(aDate.Day) + ".";
WriteUserPropValue(aValue);
}
}
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index d66cb8cc280f..bb0ff68e4d96 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -238,8 +238,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
bool bIsNotDuplicate = aRes.second; //.second is false when element already existed
nPictureId = aRes.first->second;
Set_UInt32(pDataAdr, nPictureId);
- OUString sStorageName('_');
- sStorageName += OUString::number( nPictureId );
+ OUString sStorageName = "_" + OUString::number( nPictureId );
tools::SvRef<SotStorage> xOleStg = xObjStg->OpenSotStorage( sStorageName );
if( xOleStg.is() )
{
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 9bb3521e51ea..3b5535ef430a 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -344,9 +344,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
long nX=0, nY=0; // nX, nY is graphic size
bool bOleOk = true;
- OUString aSrcStgName('_');
// results in the name "_4711"
- aSrcStgName += OUString::number( m_nObjLocFc );
+ OUString aSrcStgName = "_" + OUString::number( m_nObjLocFc );
tools::SvRef<SotStorage> xSrc0 = m_pStg->OpenSotStorage(SL::aObjectPool);
tools::SvRef<SotStorage> xSrc1 = xSrc0->OpenSotStorage( aSrcStgName );
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index d8766b8a3c9d..5221c096ff6e 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -421,9 +421,7 @@ void SwSendMailDialog::IterateMails()
Image aInsertImg(StockImage::Yes, RID_BMP_FORMULA_CANCEL);
OUString sMessage = m_sSendingTo;
- OUString sTmp(pCurrentMailDescriptor->sEMail);
- sTmp += "\t";
- sTmp += m_sFailed;
+ OUString sTmp = pCurrentMailDescriptor->sEMail + "\t" + m_sFailed;
m_pStatus->InsertEntry( sMessage.replaceFirst("%1", sTmp), aInsertImg, aInsertImg);
++m_nSendCount;
++m_nErrorCount;
@@ -508,8 +506,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> const &
OUString sMessage = m_sSendingTo;
OUString sTmp(xMessage->getRecipients()[0]);
- sTmp += "\t";
- sTmp += bResult ? m_sCompleted : m_sFailed;
+ sTmp += "\t" + (bResult ? m_sCompleted : m_sFailed);
m_pStatus->InsertEntry( sMessage.replaceFirst("%1", sTmp), aInsertImg, aInsertImg);
++m_nSendCount;
if(!bResult)
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 99d6b1b8dcc4..2d9727084728 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1216,8 +1216,7 @@ sal_uInt16 SwFieldVarPage::GetGroup()
void SwFieldVarPage::FillUserData()
{
- OUString sData(USER_DATA_VERSION);
- sData += ";";
+ OUString sData = USER_DATA_VERSION ";";
sal_Int32 nTypeSel = m_xTypeLB->get_selected_index();
if( -1 == nTypeSel )
nTypeSel = USHRT_MAX;
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index ae637765fbe5..b5bccf498633 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -125,8 +125,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(weld::Container* pPage, weld::DialogC
// insert levels
for(sal_uInt16 i = 1; i <= MAXLEVEL; i++)
m_xLevelLB->append_text(OUString::number(i));
- OUString sEntry("1 - ");
- sEntry += OUString::number(MAXLEVEL);
+ OUString sEntry = "1 - " + OUString::number(MAXLEVEL);
m_xLevelLB->append_text(sEntry);
m_xLevelLB->select_text(sEntry);
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 5336288fe9a1..3eb0b9ea1da9 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -739,8 +739,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i), OUString()));
m_xLevelLB->append_text( OUString::number(i + 1) );
}
- OUString sStr("1 - ");
- sStr += OUString::number(MAXLEVEL);
+ OUString sStr = "1 - " + OUString::number(MAXLEVEL);
m_xLevelLB->append_text(sStr);
// query the texttemplates' outlining levels
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 8eec83f45d8e..b36fba8169a4 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -325,9 +325,7 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
void SwTextGridPage::SetLinesOrCharsRanges(weld::Label& rField, const sal_Int32 nValue )
{
- OUString aFieldStr("( 1 -");
- aFieldStr += OUString::number(nValue);
- aFieldStr += " )";
+ OUString aFieldStr = "( 1 -" + OUString::number(nValue) + " )";
rField.set_label(aFieldStr);
}
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index da6ffbe0455a..3dcf725cab70 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -265,8 +265,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl, weld::Button&, void)
IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl, weld::Button&, void)
{
- OUString aMessage = m_aStrDelMsg;
- aMessage += "\n\n";
+ OUString aMessage = m_aStrDelMsg + "\n\n";
aMessage += m_xLbFormat->get_selected_text();
aMessage += "\n";
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index d9341d8c60ea..fdfc9ee78873 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1392,8 +1392,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
PrintMonitor *pPrintMonDlg = static_cast<PrintMonitor*>(xProgressDlg.get());
pPrintMonDlg->m_xPrinter->set_label(bNeedsTempFiles
? aTempFileURL->GetBase() : pSourceDocSh->GetTitle( 2));
- OUString sStat( SwResId(STR_STATSTR_LETTER) );
- sStat += " " + OUString::number( nDocNo );
+ OUString sStat = SwResId(STR_STATSTR_LETTER) + " " + OUString::number( nDocNo );
pPrintMonDlg->m_xPrintInfo->set_label(sStat);
}
//TODO xProgressDlg->queue_draw();
@@ -2368,11 +2367,7 @@ bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rT
}
pFound->xStatement = pFound->xConnection->createStatement();
OUString aQuoteChar = xMetaData->getIdentifierQuoteString();
- OUString sStatement("SELECT * FROM ");
- sStatement = "SELECT * FROM ";
- sStatement += aQuoteChar;
- sStatement += rTableOrQuery;
- sStatement += aQuoteChar;
+ OUString sStatement = "SELECT * FROM " + aQuoteChar + rTableOrQuery + aQuoteChar;
pFound->xResultSet = pFound->xStatement->executeQuery( sStatement );
//after executeQuery the cursor must be positioned
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 65625e3fdc9c..2a0cb3aa7ff9 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -299,10 +299,10 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
sal_Int32 nAssign;
for(nAssign = 0; nAssign < aAssignProperties.getLength(); nAssign += 4)
{
- OUString sAssignPath = cAddressDataAssignments;
- sAssignPath += "/";
- sAssignPath += pAssignments[nAssign / 4];
- sAssignPath += "/";
+ OUString sAssignPath = OUStringLiteral(cAddressDataAssignments) +
+ "/" +
+ pAssignments[nAssign / 4] +
+ "/";
pAssignProperties[nAssign] = sAssignPath;
pAssignProperties[nAssign] += cDataSourceName;
pAssignProperties[nAssign + 1] = sAssignPath;
@@ -552,10 +552,7 @@ void SwMailMergeConfigItem_Impl::ImplCommit()
rAssignment.sConfigNodeName :
lcl_CreateNodeName(aAssignments);
OUString sSlash = "/";
- OUString sNodePath = cAddressDataAssignments;
- sNodePath += sSlash;
- sNodePath += sNewNode;
- sNodePath += sSlash;
+ OUString sNodePath = cAddressDataAssignments + sSlash + sNewNode + sSlash;
//only one new entry is written
Sequence< PropertyValue > aNewValues(4);
PropertyValue* pNewValues = aNewValues.getArray();
@@ -1243,8 +1240,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
if(rMaleEntries.getLength() > nCurrentMale)
sMale = rMaleEntries[nCurrentMale];
- OUString sAddress( sFemale );
- sAddress += sMale;
+ OUString sAddress = sFemale + sMale;
SwAddressIterator aIter(sAddress);
while(aIter.HasMore())
{
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index c8bce67fb972..4ca09ecab32a 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -276,8 +276,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case IsAttrAtPos::RefMark:
if(aContentAtPos.aFnd.pAttr)
{
- sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE);
- sText += ": ";
+ sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE) + ": ";
sText += static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName();
}
break;
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index 7693009b43fc..12aedd4c30b3 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -143,10 +143,7 @@ SwLabelConfig::SwLabelConfig() :
const Sequence<OUString> aLabels = GetNodeNames( rManufacturer );
for( const OUString& rLabel : aLabels )
{
- OUString sPrefix( rManufacturer );
- sPrefix += "/";
- sPrefix += rLabel;
- sPrefix += "/";
+ OUString sPrefix = rManufacturer + "/" + rLabel + "/";
Sequence<OUString> aPropNames = lcl_CreatePropertyNames( sPrefix );
Sequence<Any> aValues = GetProperties( aPropNames );
const Any* pValues = aValues.getConstArray();
@@ -293,8 +290,7 @@ void SwLabelConfig::SaveLabel( const OUString& rManufacturer,
const Sequence<OUString> aLabels = GetNodeNames( rManufacturer );
sal_Int32 nIndex = aLabels.getLength();
OUString sPrefix( "Label" );
- sFoundNode = sPrefix;
- sFoundNode += OUString::number( nIndex );
+ sFoundNode = sPrefix + OUString::number( nIndex );
while ( comphelper::findValue(aLabels, sFoundNode) != -1 )
{
sFoundNode = sPrefix + OUString::number(nIndex++);
@@ -307,10 +303,7 @@ void SwLabelConfig::SaveLabel( const OUString& rManufacturer,
const Sequence<OUString> aLabels = GetNodeNames( sManufacturer );
for (const OUString& rLabel : aLabels)
{
- OUString sPrefix( sManufacturer );
- sPrefix += "/";
- sPrefix += rLabel;
- sPrefix += "/";
+ OUString sPrefix = sManufacturer + "/" + rLabel + "/";
Sequence<OUString> aProperties { sPrefix };
aProperties.getArray()[0] += "Name";
Sequence<Any> aValues = GetProperties( aProperties );
@@ -329,9 +322,7 @@ void SwLabelConfig::SaveLabel( const OUString& rManufacturer,
}
OUString sPrefix( wrapConfigurationElementName( rManufacturer ) );
- sPrefix += "/";
- sPrefix += sFoundNode;
- sPrefix += "/";
+ sPrefix += "/" + sFoundNode + "/";
Sequence<OUString> aPropNames = lcl_CreatePropertyNames( sPrefix );
OUString sMeasure;
Sequence<PropertyValue> aPropValues = lcl_CreateProperties( aPropNames, sMeasure, rRec );
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index afe19a9c0a16..e6777811f099 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -655,9 +655,8 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
aRewriter.AddRule(UndoArg1, m_pSh->GetCursorDescr());
aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS));
- OUString aTmpStr( SwResId(STR_START_QUOTE) );
- aTmpStr += aTmp;
- aTmpStr += SwResId(STR_END_QUOTE);
+ OUString aTmpStr = SwResId(STR_START_QUOTE) +
+ aTmp + SwResId(STR_END_QUOTE);
aRewriter.AddRule(UndoArg3, aTmpStr);
m_pSh->StartUndo(SwUndoId::UI_REPLACE, &aRewriter);
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 09275a67339b..ff4e9c16514f 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -480,8 +480,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes,
OUString aPrefix = rName;
if(!rName.isEmpty())
aPrefix += ".";
- OUString aBoxes = aPrefix;
- aBoxes += rBoxes;
+ OUString aBoxes = aPrefix + rBoxes;
Selection aSelection(GetSelection());
sal_uInt16 nSel = static_cast<sal_uInt16>(aSelection.Len());
// OS: The following expression ensures that in the overwrite mode,
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index f6e389ee9ae7..4d66d901569a 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -299,40 +299,40 @@ void PageMarginControl::FillHelpText( const bool bUserCustomValuesAvailable )
SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_NARROW_VALUE, m_eUnit );
const OUString aNarrowValText = m_pWidthHeightField->GetText();
- OUString aHelpText = aLeft;
- aHelpText += aNarrowValText;
- aHelpText += aRight;
- aHelpText += aNarrowValText;
- aHelpText += aTop;
- aHelpText += aNarrowValText;
- aHelpText += aBottom;
- aHelpText += aNarrowValText;
+ OUString aHelpText = aLeft +
+ aNarrowValText +
+ aRight +
+ aNarrowValText +
+ aTop +
+ aNarrowValText +
+ aBottom +
+ aNarrowValText;
m_pNarrow->SetQuickHelpText( aHelpText );
SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_NORMAL_VALUE, m_eUnit );
const OUString aNormalValText = m_pWidthHeightField->GetText();
- aHelpText = aLeft;
- aHelpText += aNormalValText;
- aHelpText += aRight;
- aHelpText += aNormalValText;
- aHelpText += aTop;
- aHelpText += aNormalValText;
- aHelpText += aBottom;
- aHelpText += aNormalValText;
+ aHelpText = aLeft +
+ aNormalValText +
+ aRight +
+ aNormalValText +
+ aTop +
+ aNormalValText +
+ aBottom +
+ aNormalValText;
m_pNormal->SetQuickHelpText( aHelpText );
SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_WIDE_VALUE1, m_eUnit );
const OUString aWide1ValText = m_pWidthHeightField->GetText();
SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_WIDE_VALUE2, m_eUnit );
const OUString aWide2ValText = m_pWidthHeightField->GetText();
- aHelpText = aLeft;
- aHelpText += aWide2ValText;
- aHelpText += aRight;
- aHelpText += aWide2ValText;
- aHelpText += aTop;
- aHelpText += aWide1ValText;
- aHelpText += aBottom;
- aHelpText += aWide1ValText;
+ aHelpText = aLeft +
+ aWide2ValText +
+ aRight +
+ aWide2ValText +
+ aTop +
+ aWide1ValText +
+ aBottom +
+ aWide1ValText;
m_pWide->SetQuickHelpText( aHelpText );
const OUString aInner = SwResId( STR_MARGIN_TOOLTIP_INNER );
@@ -340,14 +340,14 @@ void PageMarginControl::FillHelpText( const bool bUserCustomValuesAvailable )
SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_WIDE_VALUE3, m_eUnit );
const OUString aWide3ValText = m_pWidthHeightField->GetText();
- aHelpText = aInner;
- aHelpText += aWide3ValText;
- aHelpText += aOuter;
- aHelpText += aWide1ValText;
- aHelpText += aTop;
- aHelpText += aWide1ValText;
- aHelpText += aBottom;
- aHelpText += aWide1ValText;
+ aHelpText = aInner +
+ aWide3ValText +
+ aOuter +
+ aWide1ValText +
+ aTop +
+ aWide1ValText +
+ aBottom +
+ aWide1ValText;
m_pMirrored->SetQuickHelpText( aHelpText );
if ( bUserCustomValuesAvailable )
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 2c70670b23b8..12c9f4bd7765 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -158,11 +158,7 @@ static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_
{
aFont.SetWeight( WEIGHT_NORMAL );
rOutDev.SetFont( aFont );
- OUString aPageStr( " [" );
- aPageStr += SwResId( STR_PAGE );
- aPageStr += " ";
- aPageStr += OUString::number( nCurPage );
- aPageStr += "]";
+ OUString aPageStr = " [" + SwResId( STR_PAGE ) + " " + OUString::number( nCurPage ) + "]";
aPos.AdjustX(rOutDev.GetTextWidth( rTitle ) );
rOutDev.DrawText( aPos, aPageStr );
}
@@ -450,8 +446,8 @@ void SwSrcView::GetState(SfxItemSet& rSet)
OUString aPos( SwResId(STR_SRCVIEW_ROW) );
TextSelection aSel = pTextView->GetSelection();
aPos += OUString::number( aSel.GetEnd().GetPara()+1 );
- aPos += " : ";
- aPos += SwResId(STR_SRCVIEW_COL);
+ aPos += " : " +
+ SwResId(STR_SRCVIEW_COL);
aPos += OUString::number( aSel.GetEnd().GetIndex()+1 );
SfxStringItem aItem( nWhich, aPos );
rSet.Put( aItem );
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index bfc36246debc..ea8b81a467f1 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1580,8 +1580,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
}
if (!sStr.isEmpty())
sStr += sStatusDelim;
- sStr += SwResId(STR_NUM_LEVEL);
- sStr += OUString::number( nNumLevel + 1 );
+ sStr += SwResId(STR_NUM_LEVEL) + OUString::number( nNumLevel + 1 );
}
}
@@ -1592,9 +1591,8 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
sStr += " , ";
if( bOutlineNum )
{
- sStr += SwResId(STR_OUTLINE_NUMBERING);
- sStr += sStatusDelim;
- sStr += SwResId(STR_NUM_LEVEL);
+ sStr += SwResId(STR_OUTLINE_NUMBERING) +
+ sStatusDelim + SwResId(STR_NUM_LEVEL);
}
else
sStr += SwResId(STR_NUM_OUTLINE);
diff --git a/sw/source/uibase/utlui/condedit.cxx b/sw/source/uibase/utlui/condedit.cxx
index 231a43cb74f8..c807104922f9 100644
--- a/sw/source/uibase/utlui/condedit.cxx
+++ b/sw/source/uibase/utlui/condedit.cxx
@@ -65,12 +65,10 @@ sal_Int8 ConditionEditDropTarget::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (bBrackets)
sDBName += "[";
OUString sTmp = aColDesc.getDataSource();
- sDBName += sTmp;
- sDBName += ".";
+ sDBName += sTmp + ".";
aColDesc[DataAccessDescriptorProperty::Command] >>= sTmp;
- sDBName += sTmp;
- sDBName += ".";
+ sDBName += sTmp + ".";
aColDesc[DataAccessDescriptorProperty::ColumnName] >>= sTmp;
sDBName += sTmp;
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index d6c6a7d7e9b0..55c9e8e26f6a 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1233,9 +1233,9 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu()
OUString sInsert = pView->GetDocShell()->GetTitle();
if(pView == pActiveView)
{
- sInsert += "(";
- sInsert += m_aContextStrings[IDX_STR_ACTIVE];
- sInsert += ")";
+ sInsert += "(" +
+ m_aContextStrings[IDX_STR_ACTIVE] +
+ ")";
}
pSubPop3->InsertItem(nId, sInsert, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK);
if (State::CONSTANT == m_eState && m_pActiveShell == &pView->GetWrtShell())
@@ -1247,9 +1247,9 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu()
if(m_pHiddenShell)
{
OUString sHiddenEntry = m_pHiddenShell->GetView().GetDocShell()->GetTitle();
- sHiddenEntry += " ( ";
- sHiddenEntry += m_aContextStrings[IDX_STR_HIDDEN];
- sHiddenEntry += " )";
+ sHiddenEntry += " ( " +
+ m_aContextStrings[IDX_STR_HIDDEN] +
+ " )";
pSubPop3->InsertItem(nId, sHiddenEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK);
}
@@ -3176,8 +3176,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
else
{
const size_t nMemberCount = static_cast<SwContentType*>(pUserData)->GetMemberCount();
- sEntry = OUString::number(nMemberCount);
- sEntry += " ";
+ sEntry = OUString::number(nMemberCount) + " ";
sEntry += nMemberCount == 1
? static_cast<SwContentType*>(pUserData)->GetSingleName()
: static_cast<SwContentType*>(pUserData)->GetName();
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 1eedb04e9c86..4d2615eb5979 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -991,9 +991,9 @@ void SwNavigationPI::UpdateListBox()
{
OUString sEntry = m_aContentTree->GetHiddenWrtShell()->GetView().
GetDocShell()->GetTitle();
- sEntry += " (";
- sEntry += m_aStatusArr[IDX_STR_HIDDEN];
- sEntry += ")";
+ sEntry += " (" +
+ m_aStatusArr[IDX_STR_HIDDEN] +
+ ")";
m_aDocListBox->InsertEntry(sEntry);
bDisable = false;
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 234413c00c46..6d6f9cfdbd8c 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -228,10 +228,8 @@ void SwWrtShell::Insert( const OUString &rStr )
aRewriter.AddRule(UndoArg1, GetCursorDescr());
aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS));
{
- OUString aTmpStr;
- aTmpStr += SwResId(STR_START_QUOTE);
- aTmpStr += rStr;
- aTmpStr += SwResId(STR_END_QUOTE);
+ OUString aTmpStr = SwResId(STR_START_QUOTE) +
+ rStr + SwResId(STR_END_QUOTE);
aRewriter.AddRule(UndoArg3, aTmpStr);
}
@@ -414,8 +412,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
{
SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
- OString aCmd(".uno:");
- aCmd += pSlot->GetUnoName();
+ OString aCmd = OStringLiteral(".uno:") + pSlot->GetUnoName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = GetWin();
ScopedVclPtr<SfxAbstractInsertObjectDialog> pDlg(pFact->CreateInsertObjectDialog(pWin ? pWin->GetFrameWeld() : nullptr,
@@ -1647,12 +1644,10 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
// is already clipped to the editshell
StartAllAction();
- OUString aTmpStr1;
- aTmpStr1 += SwResId(STR_START_QUOTE);
+ OUString aTmpStr1 = SwResId(STR_START_QUOTE);
aTmpStr1 += GetSelText();
aTmpStr1 += SwResId(STR_END_QUOTE);
- OUString aTmpStr3;
- aTmpStr3 += SwResId(STR_START_QUOTE);
+ OUString aTmpStr3 = SwResId(STR_START_QUOTE);
aTmpStr3 += OUStringLiteral1(cChar);
aTmpStr3 += SwResId(STR_END_QUOTE);
aRewriter.AddRule( UndoArg1, aTmpStr1 );