diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-09 14:56:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-10 06:51:17 +0000 |
commit | 76c8336eec82862732d3a26be84b5e8a52efe022 (patch) | |
tree | ffb1cbc0fe3cf7bf4f5620a5cfbf255e3792e560 /cui/source/tabpages/numfmt.cxx | |
parent | 029a936aecb9b25d3ffefef072ba6fe86e19d305 (diff) |
loplugin:expandablemethods in cui
Change-Id: I3dae1d142874c767ec1e32401acba0bbca95df5f
Reviewed-on: https://gerrit.libreoffice.org/30716
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/tabpages/numfmt.cxx')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 5ba83a25ffad..c3abc9ae85b5 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -832,14 +832,6 @@ DeactivateRC SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* _pSet ) return DeactivateRC::LeavePage; } -void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem ) -{ - if(pNumItem==nullptr) - { - pNumItem = static_cast<SvxNumberInfoItem*>(rItem.Clone()); - } -} - void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEntries ) { OUString aEntry; @@ -1844,8 +1836,8 @@ void SvxNumberFormatTabPage::PageCreated(const SfxAllItemSet& aSet) { const SvxNumberInfoItem* pNumberInfoItem = aSet.GetItem<SvxNumberInfoItem>(SID_ATTR_NUMBERFORMAT_INFO, false); const SfxLinkItem* pLinkItem = aSet.GetItem<SfxLinkItem>(SID_LINK_TYPE, false); - if (pNumberInfoItem) - SetInfoItem(*pNumberInfoItem); + if (pNumberInfoItem && !pNumItem) + pNumItem = static_cast<SvxNumberInfoItem*>(pNumberInfoItem->Clone()); if (pLinkItem) fnOkHdl = pLinkItem->GetValue(); } |