[Libreoffice-commits] core.git: dbaccess/source include/svl svl/source svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 17 15:45:43 UTC 2021
dbaccess/source/ui/misc/UITools.cxx | 8 +++-----
include/svl/itemset.hxx | 2 --
svl/source/items/itemset.cxx | 11 -----------
svx/source/unodraw/unoshape.cxx | 6 ++----
4 files changed, 5 insertions(+), 22 deletions(-)
New commits:
commit 3581de4d1d7dc3910b4642a2baef534dcd882597
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 16 08:51:01 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 17 17:45:09 2021 +0200
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 at collabora.co.uk>
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;
}
More information about the Libreoffice-commits
mailing list