diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-16 08:51:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-17 17:45:09 +0200 |
commit | 3581de4d1d7dc3910b4642a2baef534dcd882597 (patch) | |
tree | cece21054c760690aa4470c407e753ede13eb686 | |
parent | 3fec689480644c274501740013ff83388cb24245 (diff) |
drop sal_uInt16* constructor in SfxItemSet
Change-Id: Ifb283a49b01c9c6421e385f697e749439db6a53f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119008
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 8 | ||||
-rw-r--r-- | include/svl/itemset.hxx | 2 | ||||
-rw-r--r-- | svl/source/items/itemset.cxx | 11 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 6 |
4 files changed, 5 insertions, 22 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index c590bf993915..2903b7a66ec4 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -768,13 +768,11 @@ bool callColumnFormatDialog(weld::Widget* _pParent, { SID_ATTR_NUMBERFORMAT_INFO, true }, { SID_ATTR_NUMBERFORMAT_ONE_AREA, true } }; - static const sal_uInt16 aAttrMap[] = - { + static const auto aAttrMap = svl::Items< SBA_DEF_RANGEFORMAT, SBA_ATTR_ALIGN_HOR_JUSTIFY, SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO, - SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA, - 0 - }; + SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA + >{}; std::vector<SfxPoolItem*> pDefaults { diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index befae1012990..0471dfd3603a 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -141,8 +141,6 @@ public: SfxItemSet(SfxItemPool& pool, svl::Items<WIDs...>) : SfxItemSet(pool, WhichRangesContainer(svl::Items<WIDs...>::value)) {} - SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable ); - virtual ~SfxItemSet(); virtual std::unique_ptr<SfxItemSet> Clone(bool bItems = true, SfxItemPool *pToPool = nullptr) const; diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 324cf6da69f0..55804cdfe723 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -119,17 +119,6 @@ SfxItemSet::SfxItemSet( m_pItems.reset( new SfxPoolItem const *[size]{} ); } -SfxItemSet::SfxItemSet( SfxItemPool& rPool, const sal_uInt16* pWhichPairTable ) - : m_pPool(&rPool) - , m_pParent(nullptr) - , m_nCount(0) -{ - const auto& [nCnt, nCap] = svl::detail::CountRangesOld(pWhichPairTable); - m_pItems.reset(new const SfxPoolItem* [nCap] {}); - m_pWhichRanges = WhichRangesContainer(reinterpret_cast<const WhichPair*>(pWhichPairTable), (nCnt-1)/2); - assert(svl::detail::validRanges2(m_pWhichRanges)); -} - SfxItemSet::SfxItemSet( const SfxItemSet& rASet ) : m_pPool( rASet.m_pPool ) , m_pParent( rASet.m_pParent ) diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 6974ce0f11fd..ad3aefa4d88c 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1646,8 +1646,7 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& { if( !mpImpl->mxItemSet ) { - sal_uInt16 aWhichPairTable[] = { pMap->nWID, pMap->nWID, 0, 0 }; - mpImpl->mxItemSet.emplace( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), aWhichPairTable); + mpImpl->mxItemSet.emplace( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), pMap->nWID, pMap->nWID ); } else { @@ -1657,8 +1656,7 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& } else { - sal_uInt16 aWhichPairTable[] = { pMap->nWID, pMap->nWID, 0, 0 }; - xLocalSet.emplace( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), aWhichPairTable); + xLocalSet.emplace( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), pMap->nWID, pMap->nWID); pSet = &*xLocalSet; } |