diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-05 11:10:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-05 13:01:33 +0100 |
commit | ec920ed0ecc9cb42b900138a299bf070dc86103c (patch) | |
tree | cdcd282559517d79ed68d8d4f75ea2993851c136 /svl | |
parent | a648c07de904c993daae71a27f2b4c4ebc2ece3b (diff) |
Revert "GetTrueSlotId is dead"
This reverts commit 4f11182566b02f9f1c1821985a94b4b4de363fbb.
Turns out I was wrong, there are tons of place defining
slotid<->whichid mappings.
Change-Id: I2a124ecba02c45f14ee917727adb993c39994881
Reviewed-on: https://gerrit.libreoffice.org/47454
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itempool.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index e82a5ea4a496..4357342dd499 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -939,6 +939,21 @@ 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")); |