diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-02 18:59:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-03 17:11:14 +0100 |
commit | ab285c743afa1c8769581871d7b56374fd8c49f1 (patch) | |
tree | d5628df49fb4db29d474e5e7b7cef4072c33153a /sfx2/source | |
parent | f4544f3903fed3a656e3cd57e1bd83582e024b96 (diff) |
loplugin:stringadd
tweak the plugin to be more permissive, then validate by hand
afterwards
Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654
Reviewed-on: https://gerrit.libreoffice.org/81942
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/bastyp/helper.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/dialog/srchdlg.cxx | 10 |
4 files changed, 16 insertions, 18 deletions
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 727c06d1e1bf..f828982f0726 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -414,8 +414,7 @@ IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused*/, vo int iFiles; for ( iFiles = 1; iFiles < nFiles; iFiles++ ) { - OUString aURL = aBaseDirURL; - aURL += sFiles[iFiles]; + OUString aURL = aBaseDirURL + sFiles[iFiles]; OpenURL( aURL, "_default", aArgs ); } } diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index 6c357ddcc6c8..691baa157d75 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -96,8 +96,8 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL ) OUString aRow = aTitle + "\t" + aType + - "\t"; - aRow += xContentAccess->queryContentIdentifierString(); + "\t" + + xContentAccess->queryContentIdentifierString(); aList.push_back( aRow ); } } @@ -156,9 +156,9 @@ std::vector< OUString > SfxContentHelper::GetHelpTreeViewContents( const OUStrin { OUString aTitle( xRow->getString(1) ); bool bFolder = xRow->getBoolean(2); - OUString aRow = aTitle + "\t"; - aRow += xContentAccess->queryContentIdentifierString() + "\t"; - aRow += bFolder ? OUStringLiteral("1") : OUStringLiteral("0"); + OUString aRow = aTitle + "\t" + + xContentAccess->queryContentIdentifierString() + "\t" + + (bFolder ? OUStringLiteral("1") : OUStringLiteral("0")); aProperties.push_back( aRow ); } } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d58bd3986540..85d46610b73a 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -133,8 +133,7 @@ OUString CreateSizeText( sal_Int64 nSize ) } const SvtSysLocale aSysLocale; const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData(); - OUString aSizeStr( rLocaleWrapper.getNum( nSize1, 0 ) ); - aSizeStr += aUnitStr; + OUString aSizeStr = rLocaleWrapper.getNum( nSize1, 0 ) + aUnitStr; if ( nSize1 < nSize2 ) { aSizeStr = ::rtl::math::doubleToUString( fSize, @@ -818,8 +817,8 @@ void SfxDocumentPage::ImplUpdateSignatures() else if ( aInfos.getLength() == 1 ) { const security::DocumentSignatureInformation& rInfo = aInfos[ 0 ]; - s = utl::GetDateTimeString( rInfo.SignatureDate, rInfo.SignatureTime ) + ", "; - s += comphelper::xmlsec::GetContentPart(rInfo.Signer->getSubjectName()); + s = utl::GetDateTimeString( rInfo.SignatureDate, rInfo.SignatureTime ) + ", " + + comphelper::xmlsec::GetContentPart(rInfo.Signer->getSubjectName()); } m_xSignedValFt->set_label(s); } @@ -1223,8 +1222,8 @@ void CustomPropertiesDurationField::set_visible(bool bVisible) void CustomPropertiesDurationField::SetDuration( const util::Duration& rDuration ) { m_aDuration = rDuration; - OUString sText(rDuration.Negative ? OUString('-') : OUString('+')); - sText += SfxResId(SFX_ST_DURATION_FORMAT); + OUString sText = (rDuration.Negative ? OUString('-') : OUString('+')) + + SfxResId(SFX_ST_DURATION_FORMAT); sText = sText.replaceFirst( "%1", OUString::number( rDuration.Years ) ); sText = sText.replaceFirst( "%2", OUString::number( rDuration.Months ) ); sText = sText.replaceFirst( "%3", OUString::number( rDuration.Days ) ); diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index edfbf407961d..a9e0cfe08809 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -95,11 +95,11 @@ void SearchDialog::SaveConfig() { sUserData += m_xSearchEdit->get_text(i) + "\t"; } - sUserData = comphelper::string::stripStart(sUserData, '\t') + ";"; - sUserData += OUString::number( m_xWholeWordsBox->get_active() ? 1 : 0 ) + ";"; - sUserData += OUString::number( m_xMatchCaseBox->get_active() ? 1 : 0 ) + ";"; - sUserData += OUString::number( m_xWrapAroundBox->get_active() ? 1 : 0 ) + ";"; - sUserData += OUString::number( m_xBackwardsBox->get_active() ? 1 : 0 ); + sUserData = comphelper::string::stripStart(sUserData, '\t') + ";" + + OUString::number( m_xWholeWordsBox->get_active() ? 1 : 0 ) + ";" + + OUString::number( m_xMatchCaseBox->get_active() ? 1 : 0 ) + ";" + + OUString::number( m_xWrapAroundBox->get_active() ? 1 : 0 ) + ";" + + OUString::number( m_xBackwardsBox->get_active() ? 1 : 0 ); Any aUserItem = makeAny( sUserData ); aViewOpt.SetUserItem( "UserItem", aUserItem ); |