summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2024-01-12 18:40:24 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-01-14 21:02:46 +0100
commit845d92e1f30eef5745480604fb9f6e4c3e3b7284 (patch)
tree7499b058845fbd7317469332e7c0b7414da9f1c6 /sc/source/ui
parent04777d49b17834a5edf0063e89b968afae457191 (diff)
ITEM: Move Shareable ItemFlag to SfxPolItem
Currently a Pool-Attribute (in SfxItemInfo), but should be a SfxPoolItem property. Originally 'moved' from old 'poolable' used as hint. I identified needs more general and moved it to where it belongs. Also reworked SfxItemInfo to no longer have/support single bollean flags, but a FlagVariable and defined SFX_ITEMINFOFLAG_* entries to access these, that will make future changes easier without having to change all palces where these get defined over and over again. Added CheckItemInfoFlag for gereral access to that flag and e.g. NeedsSurrogateSupport to directly check for the SFX_ITEMINFOFLAG_SUPPORT_SURROGATE flag as syntactical sugar, that makes the intention clear. Change-Id: I09c238c7c5b7f721b657d7b0a44dbc8d14e02528 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161982 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/msgpool.cxx22
-rw-r--r--sc/source/ui/condformat/condformatdlgitem.cxx1
2 files changed, 12 insertions, 11 deletions
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 227dbce4560b..83a47c141e48 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -25,17 +25,17 @@
SfxItemInfo const aMsgItemInfos[] =
{
- // _nSID, _bNeedsPoolRegistration, _bShareable
- { 0, false, true }, // SCITEM_STRING
- { 0, false, true }, // SCITEM_SEARCHDATA - stop using this!
- { SID_SORT, false, true }, // SCITEM_SORTDATA
- { SID_QUERY, false, true }, // SCITEM_QUERYDATA
- { SID_SUBTOTALS, false, true }, // SCITEM_SUBTDATA
- { SID_CONSOLIDATE, false, true }, // SCITEM_CONSOLIDATEDATA
- { SID_PIVOT_TABLE, false, true }, // SCITEM_PIVOTDATA
- { SID_SOLVE, false, true }, // SCITEM_SOLVEDATA
- { SID_SCUSERLISTS, false, true }, // SCITEM_USERLIST
- { 0, true, false } // SCITEM_CONDFORMATDLGDATA
+ // _nItemInfoSlotID, _nItemInfoFlags
+ { 0, SFX_ITEMINFOFLAG_NONE }, // SCITEM_STRING
+ { 0, SFX_ITEMINFOFLAG_NONE }, // SCITEM_SEARCHDATA - stop using this!
+ { SID_SORT, SFX_ITEMINFOFLAG_NONE }, // SCITEM_SORTDATA
+ { SID_QUERY, SFX_ITEMINFOFLAG_NONE }, // SCITEM_QUERYDATA
+ { SID_SUBTOTALS, SFX_ITEMINFOFLAG_NONE }, // SCITEM_SUBTDATA
+ { SID_CONSOLIDATE, SFX_ITEMINFOFLAG_NONE }, // SCITEM_CONSOLIDATEDATA
+ { SID_PIVOT_TABLE, SFX_ITEMINFOFLAG_NONE }, // SCITEM_PIVOTDATA
+ { SID_SOLVE, SFX_ITEMINFOFLAG_NONE }, // SCITEM_SOLVEDATA
+ { SID_SCUSERLISTS, SFX_ITEMINFOFLAG_NONE }, // SCITEM_USERLIST
+ { 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE } // SCITEM_CONDFORMATDLGDATA
};
ScMessagePool::ScMessagePool()
diff --git a/sc/source/ui/condformat/condformatdlgitem.cxx b/sc/source/ui/condformat/condformatdlgitem.cxx
index b0bf511c3b79..e62e720049e9 100644
--- a/sc/source/ui/condformat/condformatdlgitem.cxx
+++ b/sc/source/ui/condformat/condformatdlgitem.cxx
@@ -21,6 +21,7 @@ ScCondFormatDlgItem::ScCondFormatDlgItem(std::shared_ptr<ScConditionalFormatList
meDialogType(condformat::dialog::CONDITION),
mbManaged(bManaged)
{
+ setNonShareable();
}
ScCondFormatDlgItem::~ScCondFormatDlgItem()