diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 07:46:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 09:44:09 +0200 |
commit | a8a461b2fba27f1a729e2b9b28426286617892a9 (patch) | |
tree | 8e05dfae5ef9b070dc54fcbd344ad591cf6e229c /cui/source | |
parent | f806a2832aee62efc0e0404f7c24d53aaaf814d0 (diff) |
clang-tidy performance-unnecessary-copy-init in canvas..cui
Change-Id: I08c137d852b5f1f817c171ee4f1cee7971417dc4
Reviewed-on: https://gerrit.libreoffice.org/62214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/customize/cfg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuicharmap.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/insdlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 3 | ||||
-rw-r--r-- | cui/source/options/optaccessibility.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optasian.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/macroass.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 2 |
9 files changed, 10 insertions, 11 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 70644c7ed9d3..87631448b711 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2483,7 +2483,7 @@ void ToolbarSaveInData::Reset() { try { - OUString url = entry->GetCommand(); + const OUString& url = entry->GetCommand(); GetConfigManager()->removeSettings( url ); } catch ( uno::Exception& ) diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 64581f5f5165..4639d6a6c9df 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SubsetSelectHdl, weld::ComboBox&, void) IMPL_LINK(SvxCharacterMap, RecentClearClickHdl, SvxCharView*, rView, void) { - OUString sTitle = rView->GetText(); + const OUString& sTitle = rView->GetText(); auto itChar = std::find(maRecentCharList.begin(), maRecentCharList.end(), sTitle); OUString sFont = rView->GetFont().GetFamilyName(); diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 32facb080e20..b954f29d9a52 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -95,7 +95,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, DoubleClickHdl, weld::TreeView&, void) IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl, weld::Button&, void) { sfx2::FileDialogHelper aHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, m_xDialog.get()); - Reference< XFilePicker3 > xFilePicker = aHelper.GetFilePicker(); + const Reference< XFilePicker3 >& xFilePicker = aHelper.GetFilePicker(); // add filter try diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 40e3cb890687..ef073d277cb2 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -230,9 +230,8 @@ void SFTreeListBox::Init( const OUString& language ) } } - OUString lang( language ); Reference< browse::XBrowseNode > langEntries = - getLangNodeFromRootNode( children[ n ], lang ); + getLangNodeFromRootNode( children[ n ], language ); insertEntry( uiName, app ? OUStringLiteral(RID_CUIBMP_HARDDISK) : OUStringLiteral(RID_CUIBMP_DOC), nullptr, true, o3tl::make_unique< SFEntry >( langEntries, xDocumentModel ), factoryURL ); diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index 5d4bd2e4522f..716fc042d7fe 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -120,7 +120,7 @@ void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet* ) m_pAutoDetectHC->Disable(); AllSettings aAllSettings = Application::GetSettings(); - MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); + const MiscSettings& aMiscSettings = aAllSettings.GetMiscSettings(); m_pAccessibilityTool->Check(aMiscSettings.GetEnableATToolSupport()); } diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 135cf9fdc1ff..935d6576c913 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -292,7 +292,7 @@ IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl, ListBox&, void) //set current value LanguageType eSelectLanguage = m_pLanguageLB->GetSelectedLanguage(); LanguageTag aLanguageTag( eSelectLanguage); - Locale aLocale( aLanguageTag.getLocale()); + const Locale& aLocale( aLanguageTag.getLocale()); OUString sStart, sEnd; bool bAvail; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 20e8429ba0ec..b754fd31c378 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -731,7 +731,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, Button*, void) aMapDlg.SetChar( (*pUserData->pString)[0] ); if (RET_OK == aMapDlg.execute()) { - vcl::Font aFont(aMapDlg.GetCharFont()); + const vcl::Font& aFont(aMapDlg.GetCharFont()); *pUserData->pFont = aFont; sal_UCS4 aChar = aMapDlg.GetChar(); // using the UCS4 constructor @@ -2525,7 +2525,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr ) for ( sal_uInt32 i = 0; i < nNumberOfRecognizers; ++i ) { - uno::Reference< smarttags::XSmartTagRecognizer > xRec = rSmartTagMgr.GetRecognizer(i); + const uno::Reference< smarttags::XSmartTagRecognizer >& xRec = rSmartTagMgr.GetRecognizer(i); const OUString aName = xRec->getName( aLocale ); const sal_Int32 nNumberOfSupportedSmartTags = xRec->getSmartTagCount(); diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index eb0dfa26c40a..9bd6a00f7d71 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -424,7 +424,7 @@ void SfxMacroTabPage::FillEvents() SvLBoxString& rLItem = static_cast<SvLBoxString&>( pE->GetItem( LB_MACROS_ITEMPOS ) ); DBG_ASSERT( SvLBoxItemType::String == rLItem.GetType(), "SfxMacroTabPage::FillEvents(): no LBoxString" ); - OUString sOld( rLItem.GetText() ); + const OUString& sOld( rLItem.GetText() ); OUString sNew; SvMacroItemId nEventId = static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>( pE->GetUserData() )); if( aTbl.IsKeyValid( nEventId ) ) diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 557065396065..59e5862a98e5 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -3275,7 +3275,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, StandardHdl_Impl, weld::Button&, void) if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt( pActNum->GetLevel( i ) ); - SvxNumberFormat aTempFmt(aTmpNumRule.GetLevel( i )); + const SvxNumberFormat& aTempFmt(aTmpNumRule.GetLevel( i )); aNumFmt.SetPositionAndSpaceMode( aTempFmt.GetPositionAndSpaceMode() ); if ( aTempFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { |