[Libreoffice-commits] core.git: editeng/source include/svl svl/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Jan 4 13:28:22 UTC 2018
editeng/source/editeng/editdoc.cxx | 9 +--------
include/svl/itempool.hxx | 1 -
svl/source/items/itempool.cxx | 15 ---------------
3 files changed, 1 insertion(+), 24 deletions(-)
New commits:
commit 4f11182566b02f9f1c1821985a94b4b4de363fbb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Jan 4 12:03:39 2018 +0200
GetTrueSlotId is dead
The only place is is used is ConvertAndPutItems.
Which only loops over EE_PARA* which ids.
But the only things which define slotid<->whichid mappings are XATTR*,
SDATTR*, SCHATTR*.
Which means that this code ConvertAndPutItems is dead, and that is the
last place using GetTrueSlotId.
Change-Id: I3037c25c2c15087572abacc9642970936824678d
Reviewed-on: https://gerrit.libreoffice.org/47377
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 07a495d2bb1f..0896b62af791 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -886,14 +886,7 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
{
// If possible go through SlotID ...
- sal_uInt16 nSourceWhich = nWhich;
- sal_uInt16 nSlot = pDestPool->GetTrueSlotId( nWhich );
- if ( nSlot )
- {
- sal_uInt16 nW = pSourcePool->GetTrueWhich( nSlot );
- if ( nW )
- nSourceWhich = nW;
- }
+ sal_uInt16 const nSourceWhich = nWhich;
if ( rSource.GetItemState( nSourceWhich, false ) == SfxItemState::SET )
{
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index f4f5d86f3a08..5b1d8b9af27c 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -186,7 +186,6 @@ public:
sal_uInt16 GetWhich( sal_uInt16 nSlot, bool bDeep = true ) const;
sal_uInt16 GetSlotId( sal_uInt16 nWhich ) const;
sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, bool bDeep = true ) const;
- sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich ) const;
static bool IsWhich(sal_uInt16 nId) {
return nId && nId <= SFX_WHICH_MAX; }
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 4357342dd499..e82a5ea4a496 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -939,21 +939,6 @@ sal_uInt16 SfxItemPool::GetTrueWhich( sal_uInt16 nSlotId, bool bDeep ) const
}
-sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich ) const
-{
- if ( !IsWhich(nWhich) )
- return 0;
-
- if ( !IsInRange( nWhich ) )
- {
- if ( pImpl->mpSecondary )
- return pImpl->mpSecondary->GetTrueSlotId(nWhich);
- assert(false && "unknown WhichId - cannot get slot-id");
- return 0;
- }
- return pItemInfos[nWhich - pImpl->mnStart]._nSID;
-}
-
void SfxItemPool::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemPool"));
More information about the Libreoffice-commits
mailing list