summaryrefslogtreecommitdiff
path: root/svl/source/items/itempool.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-02 09:52:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-03 13:54:12 +0100
commitd4f61a594608219d08b489205ebb5569d905f444 (patch)
tree8dca491703de6a4aa329ec1e68e3374e57834755 /svl/source/items/itempool.cxx
parenta5eddf3b047dca78ea321005cc6dc5e92914e032 (diff)
no point in mapping SID to itself
and once we remove that self mapping, no need to call GetWhich for those IDs either Change-Id: Ia881328a29bb022dace8d5f25c57279a381e0377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/items/itempool.cxx')
-rw-r--r--svl/source/items/itempool.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index fe13cfb96a32..8d4aa074e4f5 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -167,6 +167,24 @@ SfxItemPool::SfxItemPool
if ( pDefaults )
SetDefaults(pDefaults);
+
+#ifdef DBG_UTIL
+ if (pItemInfos)
+ {
+ auto p = pItemInfos;
+ auto nWhich = nStartWhich;
+ while (nWhich <= nEndWhich)
+ {
+ if (p->_nSID == nWhich)
+ {
+ SAL_WARN("svl.items", "No point mapping a SID to itself, just put a 0 here in the SfxItemInfo array, at index " << (p - pItemInfos));
+ assert(false);
+ }
+ ++p;
+ ++nWhich;
+ }
+ }
+#endif
}