summaryrefslogtreecommitdiff
path: root/reportdesign/source
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 /reportdesign/source
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 'reportdesign/source')
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx118
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx64
2 files changed, 91 insertions, 91 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 9ac14c4bc10e..99b5477788d3 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -559,68 +559,68 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
// UNO->ItemSet
static SfxItemInfo aItemInfos[] =
{
- // _nSID, _bNeedsPoolRegistration, _bShareable
- { 0, false, true }, // XATTR_FILLSTYLE
- { 0, true, true }, // XATTR_FILLCOLOR
- { 0, false, true }, // XATTR_FILLGRADIENT
- { 0, false, true }, // XATTR_FILLHATCH
- { 0, false, true }, // XATTR_FILLBITMAP
- { 0, false, true }, // XATTR_FILLTRANSPARENCE
- { 0, false, true }, // XATTR_GRADIENTSTEPCOUNT
- { 0, false, true }, // XATTR_FILLBMP_TILE
- { 0, false, true }, // XATTR_FILLBMP_POS
- { 0, false, true }, // XATTR_FILLBMP_SIZEX
- { 0, false, true }, // XATTR_FILLBMP_SIZEY
- { 0, false, true }, // XATTR_FILLFLOATTRANSPARENCE
- { 0, false, true }, // XATTR_SECONDARYFILLCOLOR
- { 0, false, true }, // XATTR_FILLBMP_SIZELOG
- { 0, false, true }, // XATTR_FILLBMP_TILEOFFSETX
- { 0, false, true }, // XATTR_FILLBMP_TILEOFFSETY
- { 0, false, true }, // XATTR_FILLBMP_STRETCH
- { 0, false, true }, // XATTR_FILLBMP_POSOFFSETX
- { 0, false, true }, // XATTR_FILLBMP_POSOFFSETY
- { 0, false, true }, // XATTR_FILLBACKGROUND
-
- { SID_ATTR_CHAR_FONT, false, true },
- { SID_ATTR_CHAR_FONTHEIGHT, false, true },
- { SID_ATTR_CHAR_LANGUAGE, false, true },
- { SID_ATTR_CHAR_POSTURE, false, true },
- { SID_ATTR_CHAR_WEIGHT, false, true },
- { SID_ATTR_CHAR_SHADOWED, false, true },
- { SID_ATTR_CHAR_WORDLINEMODE, false, true },
- { SID_ATTR_CHAR_CONTOUR, false, true },
- { SID_ATTR_CHAR_STRIKEOUT, false, true },
- { SID_ATTR_CHAR_UNDERLINE, false, true },
- { SID_ATTR_CHAR_COLOR, false, true },
- { SID_ATTR_CHAR_KERNING, false, true },
- { SID_ATTR_CHAR_CASEMAP, false, true },
- { SID_ATTR_CHAR_ESCAPEMENT, false, true },
- { SID_ATTR_CHAR_FONTLIST, false, true },
- { SID_ATTR_CHAR_AUTOKERN, false, true },
- { SID_COLOR_TABLE, false, true },
- { SID_ATTR_FLASH, false, true },
- { SID_ATTR_CHAR_EMPHASISMARK, false, true },
- { SID_ATTR_CHAR_TWO_LINES, false, true },
- { SID_ATTR_CHAR_ROTATED, false, true },
- { SID_ATTR_CHAR_SCALEWIDTH, false, true },
- { SID_ATTR_CHAR_RELIEF, false, true },
- { SID_ATTR_CHAR_HIDDEN, false, true },
- { SID_ATTR_BRUSH, false, true },
- { SID_ATTR_ALIGN_HOR_JUSTIFY, false, true },
- { SID_ATTR_ALIGN_VER_JUSTIFY, false, true },
+ // _nItemInfoSlotID, _nItemInfoFlags
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLSTYLE
+ { 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, // XATTR_FILLCOLOR
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLGRADIENT
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLHATCH
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBITMAP
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLTRANSPARENCE
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_GRADIENTSTEPCOUNT
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_TILE
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_POS
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_SIZEX
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_SIZEY
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLFLOATTRANSPARENCE
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_SECONDARYFILLCOLOR
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_SIZELOG
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_TILEOFFSETX
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_TILEOFFSETY
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_STRETCH
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_POSOFFSETX
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_POSOFFSETY
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBACKGROUND
+
+ { SID_ATTR_CHAR_FONT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_FONTHEIGHT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_LANGUAGE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_POSTURE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_WEIGHT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_SHADOWED, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_WORDLINEMODE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CONTOUR, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_STRIKEOUT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_UNDERLINE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_COLOR, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_KERNING, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CASEMAP, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_ESCAPEMENT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_FONTLIST, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_AUTOKERN, SFX_ITEMINFOFLAG_NONE },
+ { SID_COLOR_TABLE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_FLASH, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_EMPHASISMARK, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_TWO_LINES, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_ROTATED, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_RELIEF, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_HIDDEN, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_BRUSH, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_ALIGN_HOR_JUSTIFY, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_ALIGN_VER_JUSTIFY, SFX_ITEMINFOFLAG_NONE },
// Asian
- { SID_ATTR_CHAR_CJK_FONT, false, true },
- { SID_ATTR_CHAR_CJK_FONTHEIGHT, false, true },
- { SID_ATTR_CHAR_CJK_LANGUAGE, false, true },
- { SID_ATTR_CHAR_CJK_POSTURE, false, true },
- { SID_ATTR_CHAR_CJK_WEIGHT, false, true },
+ { SID_ATTR_CHAR_CJK_FONT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CJK_FONTHEIGHT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CJK_LANGUAGE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CJK_POSTURE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CJK_WEIGHT, SFX_ITEMINFOFLAG_NONE },
// Complex
- { SID_ATTR_CHAR_CTL_FONT, false, true },
- { SID_ATTR_CHAR_CTL_FONTHEIGHT, false, true },
- { SID_ATTR_CHAR_CTL_LANGUAGE, false, true },
- { SID_ATTR_CHAR_CTL_POSTURE, false, true },
- { SID_ATTR_CHAR_CTL_WEIGHT, false, true }
+ { SID_ATTR_CHAR_CTL_FONT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CTL_FONTHEIGHT, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CTL_LANGUAGE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CTL_POSTURE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_CHAR_CTL_WEIGHT, SFX_ITEMINFOFLAG_NONE }
};
FontList aFontList(Application::GetDefaultDevice());
XColorListRef pColorList( XColorList::CreateStdColorList() );
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 3047fd404642..b0a92b2a07e9 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2329,36 +2329,36 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
// UNO->ItemSet
static SfxItemInfo aItemInfos[] =
{
- // _nSID, _bNeedsPoolRegistration, _bShareable
- { SID_ATTR_LRSPACE, false, true },
- { SID_ATTR_ULSPACE, false, true },
- { SID_ATTR_PAGE, false, true },
- { SID_ATTR_PAGE_SIZE, false, true },
- { SID_ENUM_PAGE_MODE, false, true },
- { SID_PAPER_START, false, true },
- { SID_PAPER_END, false, true },
- { SID_ATTR_BRUSH, false, true },
- { 0, false, true }, // XATTR_FILLSTYLE
- { 0, true, true }, // XATTR_FILLCOLOR
- { 0, false, true }, // XATTR_FILLGRADIENT
- { 0, false, true }, // XATTR_FILLHATCH
- { 0, false, true }, // XATTR_FILLBITMAP
- { 0, false, true }, // XATTR_FILLTRANSPARENCE
- { 0, false, true }, // XATTR_GRADIENTSTEPCOUNT
- { 0, false, true }, // XATTR_FILLBMP_TILE
- { 0, false, true }, // XATTR_FILLBMP_POS
- { 0, false, true }, // XATTR_FILLBMP_SIZEX
- { 0, false, true }, // XATTR_FILLBMP_SIZEY
- { 0, false, true }, // XATTR_FILLFLOATTRANSPARENCE
- { 0, false, true }, // XATTR_SECONDARYFILLCOLOR
- { 0, false, true }, // XATTR_FILLBMP_SIZELOG
- { 0, false, true }, // XATTR_FILLBMP_TILEOFFSETX
- { 0, false, true }, // XATTR_FILLBMP_TILEOFFSETY
- { 0, false, true }, // XATTR_FILLBMP_STRETCH
- { 0, false, true }, // XATTR_FILLBMP_POSOFFSETX
- { 0, false, true }, // XATTR_FILLBMP_POSOFFSETY
- { 0, false, true }, // XATTR_FILLBACKGROUND
- { SID_ATTR_METRIC, false, true }
+ // _nItemInfoSlotID, _nItemInfoFlags
+ { SID_ATTR_LRSPACE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_ULSPACE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_PAGE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_PAGE_SIZE, SFX_ITEMINFOFLAG_NONE },
+ { SID_ENUM_PAGE_MODE, SFX_ITEMINFOFLAG_NONE },
+ { SID_PAPER_START, SFX_ITEMINFOFLAG_NONE },
+ { SID_PAPER_END, SFX_ITEMINFOFLAG_NONE },
+ { SID_ATTR_BRUSH, SFX_ITEMINFOFLAG_NONE },
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLSTYLE
+ { 0, SFX_ITEMINFOFLAG_SUPPORT_SURROGATE }, // XATTR_FILLCOLOR
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLGRADIENT
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLHATCH
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBITMAP
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLTRANSPARENCE
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_GRADIENTSTEPCOUNT
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_TILE
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_POS
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_SIZEX
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_SIZEY
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLFLOATTRANSPARENCE
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_SECONDARYFILLCOLOR
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_SIZELOG
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_TILEOFFSETX
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_TILEOFFSETY
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_STRETCH
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_POSOFFSETX
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBMP_POSOFFSETY
+ { 0, SFX_ITEMINFOFLAG_NONE }, // XATTR_FILLBACKGROUND
+ { SID_ATTR_METRIC, SFX_ITEMINFOFLAG_NONE }
};
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
@@ -4188,8 +4188,8 @@ void OReportController::openZoomDialog()
static SfxItemInfo aItemInfos[] =
{
- // _nSID, _bNeedsPoolRegistration, _bShareable
- { SID_ATTR_ZOOM, false, true }
+ // _nItemInfoSlotID, _nItemInfoFlags
+ { SID_ATTR_ZOOM, SFX_ITEMINFOFLAG_NONE }
};
std::vector<SfxPoolItem*> pDefaults
{