summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/afmtuno.cxx
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2024-07-10 15:54:40 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-07-11 11:01:01 +0200
commitece698a575710ac7de0c628ef7b8dc7f59e03108 (patch)
tree130c5624cac6b15467c320528e54f5f64fb09fa6 /sc/source/ui/unoobj/afmtuno.cxx
parent27829e4a6c5a4a1162599550c46b5e7f974aba91 (diff)
ITEM: replaced typeid/hash_code with SfxItemType
for the ItemInstanceManager the identification was done using typeid/hash_code, but that has problems - it is only defined to be identical for two instances of the same type, but other types can have the same code. Thanks to Noel to find that out, that is not reliable to be used. In the meantime we have SfxItemType to identify Item instances, so I changed the code to use that. The master had five additionally added Items that use the (2a) method of this mechanism (see comments in svl/source/items/globalpool.cxx for that). The gloal is to use as less as possible of this Items in that mechanism, so I checked. For four of these hashing was used, so the mem/runtime aspect is okay -> access is fast enough to prefer mem over runtime. Adding hashed Items (or any other fast mechanism) is always okay. One did not have that (SvxBoxItem) and used just the fallback ItemInstanceManager, so I removed it. We now have 18 Items for which that mechanism is initialized immediately. Noel also already moved the countdown for starting to use the mechanism in case of default handling (case (1), NUMBER_OF_UNSHARED_INSTANCES) to the unorderd_set. someting I had already planned to do, too - thanks! Change-Id: Icf6f427e5ea64672f385357aaad75bb5b7fcbf98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170314 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sc/source/ui/unoobj/afmtuno.cxx')
0 files changed, 0 insertions, 0 deletions