summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 15:12:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 10:46:15 +0200
commit46c2a3688c9ee7f558f75cbe856c26c4b8849b7e (patch)
tree782b141db099812d21c01b0693db178d66b9c965 /sfx2
parent044a683e6c8f864d46fe8ebe3ef5c757cbea30a6 (diff)
loplugin:stringadd n sfx2..svl
Change-Id: Iaf1bbe37449d4e0cfa817909d56d4bffe1e5a184 Reviewed-on: https://gerrit.libreoffice.org/79893 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx26
-rw-r--r--sfx2/source/bastyp/helper.cxx11
-rw-r--r--sfx2/source/control/minfitem.cxx10
-rw-r--r--sfx2/source/control/msg.cxx4
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx15
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx12
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
-rw-r--r--sfx2/source/statbar/stbitem.cxx3
9 files changed, 35 insertions, 54 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 73d2d2cc3619..48147b9245c5 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -621,14 +621,12 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const vcl::Window* p
// add some debug information?
if ( bIsDebug )
{
- sHelpText += "\n-------------\n";
- sHelpText += sModuleName;
- sHelpText += ": ";
- sHelpText += aCommandURL;
+ sHelpText += "\n-------------\n" +
+ sModuleName + ": " + aCommandURL;
if ( !aNewHelpId.isEmpty() )
{
- sHelpText += " - ";
- sHelpText += OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8);
+ sHelpText += " - " +
+ OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8);
}
}
@@ -664,14 +662,12 @@ OUString SfxHelp::GetHelpText(const OUString& aCommandURL, const weld::Widget* p
// add some debug information?
if ( bIsDebug )
{
- sHelpText += "\n-------------\n";
- sHelpText += sModuleName;
- sHelpText += ": ";
- sHelpText += aCommandURL;
+ sHelpText += "\n-------------\n" +
+ sModuleName + ": " + aCommandURL;
if ( !aNewHelpId.isEmpty() )
{
- sHelpText += " - ";
- sHelpText += OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8);
+ sHelpText += " - " +
+ OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8);
}
}
@@ -956,9 +952,9 @@ static bool impl_showOfflineHelp( const OUString& rURL )
SvStream* pStream = aTempFile.GetStream(StreamMode::WRITE);
pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
- OUString aTempStr(SHTML1 SHTML2);
- aTempStr += aHelpLink + SHTML3;
- aTempStr += aHelpLink + SHTML4;
+ OUString aTempStr = SHTML1 SHTML2 +
+ aHelpLink + SHTML3 +
+ aHelpLink + SHTML4;
pStream->WriteUnicodeOrByteText(aTempStr);
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 0976c8f80f28..fec0cd321c8b 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -93,10 +93,10 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
{
OUString aTitle( xRow->getString(1) );
OUString aType( xRow->getString(2) );
- OUString aRow = aTitle;
- aRow += "\t";
- aRow += aType;
- aRow += "\t";
+ OUString aRow = aTitle +
+ "\t" +
+ aType +
+ "\t";
aRow += xContentAccess->queryContentIdentifierString();
aList.push_back( aRow );
}
@@ -156,8 +156,7 @@ std::vector< OUString > SfxContentHelper::GetHelpTreeViewContents( const OUStrin
{
OUString aTitle( xRow->getString(1) );
bool bFolder = xRow->getBoolean(2);
- OUString aRow = aTitle;
- aRow += "\t";
+ OUString aRow = aTitle + "\t";
aRow += xContentAccess->queryContentIdentifierString();
aRow += "\t";
aRow += bFolder ? OUString("1") : OUString("0");
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index 179e78668b60..080723380525 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -61,11 +61,11 @@ SfxPoolItem *SfxMacroInfoItem::Clone( SfxItemPool *) const
OUString SfxMacroInfoItem::GetQualifiedName() const
{
- OUString aMacroName = aLibName;
- aMacroName += ".";
- aMacroName += aModuleName;
- aMacroName += ".";
- aMacroName += aMethodName;
+ OUString aMacroName = aLibName +
+ "." +
+ aModuleName +
+ "." +
+ aMethodName;
return aMacroName;
}
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index 711aaf992771..faf69598ea06 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -46,9 +46,7 @@ sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const
OString SfxSlot::GetCommand() const
{
- OString sRet(".uno:");
- sRet += pUnoName;
- return sRet;
+ return OString(".uno:") + pUnoName;
}
OUString SfxSlot::GetCommandString() const
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index e826b0f68409..27239b8ba1f7 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -102,8 +102,7 @@ namespace {
OUString CreateSizeText( sal_Int64 nSize )
{
- OUString aUnitStr(" ");
- aUnitStr += SfxResId(STR_BYTES);
+ OUString aUnitStr = " " + SfxResId(STR_BYTES);
sal_Int64 nSize1 = nSize;
sal_Int64 nSize2 = nSize1;
sal_Int64 nMega = 1024 * 1024;
@@ -114,24 +113,21 @@ OUString CreateSizeText( sal_Int64 nSize )
if ( nSize1 >= 10000 && nSize1 < nMega )
{
nSize1 /= 1024;
- aUnitStr = " ";
- aUnitStr += SfxResId(STR_KB);
+ aUnitStr = " " + SfxResId(STR_KB);
fSize /= 1024;
nDec = 0;
}
else if ( nSize1 >= nMega && nSize1 < nGiga )
{
nSize1 /= nMega;
- aUnitStr = " ";
- aUnitStr += SfxResId(STR_MB);
+ aUnitStr = " " + SfxResId(STR_MB);
fSize /= nMega;
nDec = 2;
}
else if ( nSize1 >= nGiga )
{
nSize1 /= nGiga;
- aUnitStr = " ";
- aUnitStr += SfxResId(STR_GB);
+ aUnitStr = " " + SfxResId(STR_GB);
fSize /= nGiga;
nDec = 3;
}
@@ -166,8 +162,7 @@ OUString ConvertDateTime_Impl( const OUString& rName,
OUString aAuthor = comphelper::string::stripStart(rName, ' ');
if (!aAuthor.isEmpty())
{
- aStr += aDelim;
- aStr += aAuthor;
+ aStr += aDelim + aAuthor;
}
return aStr;
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 1b6b04db197e..958ff03dc230 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1176,8 +1176,8 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
while ( *_pControlId )
{
DBG_ASSERT( INetURLObject( OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INetProtocol::NotValid, "Wrong HelpId!" );
- OUString sId( sHelpIdPrefix );
- sId += OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 );
+ OUString sId = sHelpIdPrefix +
+ OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 );
xControlAccess->setValue( *_pControlId, ControlActions::SET_HELP_URL, makeAny( sId ) );
++_pControlId; ++_pHelpId;
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index aa4357d61b5d..5dfcd6829df5 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2967,27 +2967,23 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation(HiddenWarningFact eFact, weld::
if ( nStates & HiddenInformation::RECORDEDCHANGES )
{
- sMessage += SfxResId(STR_HIDDENINFO_RECORDCHANGES);
- sMessage += "\n";
+ sMessage += SfxResId(STR_HIDDENINFO_RECORDCHANGES) + "\n";
bWarning = true;
}
if ( nStates & HiddenInformation::NOTES )
{
- sMessage += SfxResId(STR_HIDDENINFO_NOTES);
- sMessage += "\n";
+ sMessage += SfxResId(STR_HIDDENINFO_NOTES) + "\n";
bWarning = true;
}
if ( nStates & HiddenInformation::DOCUMENTVERSIONS )
{
- sMessage += SfxResId(STR_HIDDENINFO_DOCVERSIONS);
- sMessage += "\n";
+ sMessage += SfxResId(STR_HIDDENINFO_DOCVERSIONS) + "\n";
bWarning = true;
}
if ( bWarning )
{
- sMessage += "\n";
- sMessage += SfxResId(pResId);
+ sMessage += "\n" + SfxResId(pResId);
std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::YesNo, sMessage));
xWarn->set_default_response(RET_NO);
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 54cd6ffd96d8..aac1a07935d9 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -886,9 +886,7 @@ void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory)
sFilterExt += "*.vor";
- sFilterName += " (";
- sFilterName += sFilterExt;
- sFilterName += ")";
+ sFilterName += " (" + sFilterExt + ")";
aFileDlg.AddFilter( sFilterName, sFilterExt );
aFileDlg.SetCurrentFilter( sFilterName );
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index f041c7a705e9..23fd6ecc41ba 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -119,8 +119,7 @@ svt::StatusbarController* SfxStatusBarControllerFactory(
sal_uInt16 nSlotId = pSlot->GetSlotId();
if ( nSlotId > 0 )
{
- OString aCmd(".uno:");
- aCmd += pSlot->GetUnoName();
+ OString aCmd = OString(".uno:") + pSlot->GetUnoName();
pStatusBar->SetHelpId( nSlotId, aCmd );
return SfxStatusBarControl::CreateControl( nSlotId, nID, pStatusBar, pModule );
}