https://bugs.documentfoundation.org/show_bug.cgi?id=164685
Bug ID: 164685
Summary: Cleanup class SfxItemSetFixed
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: trivial
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
See comment on it in include/svl/itemset.hxx:
// Was: Allocate the items array inside the object, to reduce allocation cost.
// NOTE: No longer needed with unordered_set, but there are 560+ places to
// replace/adapt, so keep it for now.
// To adapt, there is the static makeFixedSfxItemSet member in SfxItemSet. Did
// that in one place to check functionality (easy hack...?)
Thus: all usages where a SfxItemSetFixed is constructed should be replaced
using SfxItemSet::makeFixedSfxItemSet. As an example there is one place where I
did that as POC: in sc/source/ui/view/cellsh3.cxx line 478. It is now
SfxItemSet aEmptySet(SfxItemSet::makeFixedSfxItemSet<ATTR_PATTERN_START,
ATTR_PATTERN_END>(*pReqArgs->GetPool()));
and it originally was
SfxItemSetFixed<ATTR_PATTERN_START, ATTR_PATTERN_END> aEmptySet(
*pReqArgs->GetPool() );
thus it is mainly just a re-arrangement. Maybe someone with skills could do
that even using a script or similar...
Actual Results:
class SfxItemSetFixed still exists.
Expected Results:
class SfxItemSetFixed can be completely removed from the code base.
Reproducible: Always
User Profile Reset: No
Additional Info:
This is an easy hack that needs C++ knowledge and maybe some scripting
experience.
--
You are receiving this mail because:
You are the assignee for the bug.