diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 09:47:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 08:36:11 +0200 |
commit | 2629aac31142449312f77c5843ea209cc810acb4 (patch) | |
tree | 2d8e11d8b346b50a48f80cf1c28fed6962831730 /svx/source/sidebar | |
parent | 4e51d68dc3595dae8b2519e0a023c9b1ca13a8fd (diff) |
clang-tidy performance-unnecessary-copy-init in svx
Change-Id: I27f4dd0cb08f9b62496a1c51eed732a678e1c2e5
Reviewed-on: https://gerrit.libreoffice.org/62252
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 5b4f67d85020..1235ecb98b2d 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -333,7 +333,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) const SvxHatchListItem* pItem( pSh->GetItem(SID_HATCH_LIST) ); if(pItem) { - XHatchListRef pXHatchList(pItem->GetHatchList()); + const XHatchListRef& pXHatchList(pItem->GetHatchList()); mpLbFillAttr->Enable(); mpLbFillAttr->Clear(); mpLbFillAttr->Fill(pXHatchList); @@ -381,7 +381,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) const SvxBitmapListItem* pItem = pSh->GetItem(SID_BITMAP_LIST); if(pItem) { - XBitmapListRef pXBitmapList(pItem->GetBitmapList()); + const XBitmapListRef& pXBitmapList(pItem->GetBitmapList()); mpLbFillAttr->Fill(pXBitmapList); mpLbFillAttr->AdaptDropDownLineCountToMaximum(); @@ -408,7 +408,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) const SvxPatternListItem* pItem = pSh->GetItem(SID_PATTERN_LIST); if(pItem) { - XPatternListRef pXPatternList(pItem->GetPatternList()); + const XPatternListRef& pXPatternList(pItem->GetPatternList()); mpLbFillAttr->Fill(pXPatternList); mpLbFillAttr->AdaptDropDownLineCountToMaximum(); diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 394215401a3e..4d21ea94fd9e 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -285,7 +285,7 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe if ( nActLv == sal_uInt16(0xFFFF) ) return sal_uInt16(0xFFFF); - SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); + const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv)); sal_Unicode cChar = aFmt.GetBulletChar(); for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++) { @@ -447,11 +447,11 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m if ( nActLv == sal_uInt16(0xFFFF) ) return sal_uInt16(0xFFFF); - SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); + const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv)); //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0]; //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0]; - OUString sPrefix = aFmt.GetPrefix(); - OUString sLclSuffix = aFmt.GetSuffix(); + const OUString& sPrefix = aFmt.GetPrefix(); + const OUString& sLclSuffix = aFmt.GetSuffix(); sal_Int16 eNumType = aFmt.GetNumberingType(); sal_uInt16 nCount = maNumberSettingsArr.size(); @@ -480,7 +480,7 @@ void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_ if ( nActLv == sal_uInt16(0xFFFF) ) return; - SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); + const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv)); SvxNumType eNumType = aFmt.GetNumberingType(); sal_uInt16 nCount = maNumberSettingsArr.size(); @@ -614,7 +614,7 @@ void OutlineTypeMgr::Init() Sequence<PropertyValue> aLevelProps; aValueAny >>= aLevelProps; NumSettings_Impl* pNew = lcl_CreateNumberingSettingsPtr(aLevelProps); - SvxNumberFormat aNumFmt( aDefNumRule.GetLevel( nLevel) ); + const SvxNumberFormat& aNumFmt( aDefNumRule.GetLevel( nLevel) ); pNew->eLabelFollowedBy = aNumFmt.GetLabelFollowedBy(); pNew->nTabValue = aNumFmt.GetListtabPos(); pNew->eNumAlign = aNumFmt.GetNumAdjust(); @@ -642,9 +642,9 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get(); sal_Int16 eNType = _pSet->nNumberType; - SvxNumberFormat aFmt(aNum.GetLevel(iLevel)); - OUString sPrefix = aFmt.GetPrefix(); - OUString sLclSuffix = aFmt.GetSuffix(); + const SvxNumberFormat& aFmt(aNum.GetLevel(iLevel)); + const OUString& sPrefix = aFmt.GetPrefix(); + const OUString& sLclSuffix = aFmt.GetSuffix(); sal_Int16 eNumType = aFmt.GetNumberingType(); if( eNumType == SVX_NUM_CHAR_SPECIAL) { @@ -713,7 +713,7 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI sal_uInt16 nCount = pItemArr->pNumSettingsArr->size(); for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++) { - SvxNumberFormat aFmt(aNum.GetLevel(iLevel)); + const SvxNumberFormat& aFmt(aNum.GetLevel(iLevel)); SvxNumType eNumType = aFmt.GetNumberingType(); NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get(); |