avmedia/source/framework/mediaitem.cxx | 2 basctl/source/basicide/sbxitem.cxx | 4 cui/source/options/cfgchart.cxx | 2 cui/source/options/cfgchart.hxx | 1 cui/source/options/connpoolsettings.cxx | 2 cui/source/options/connpoolsettings.hxx | 2 cui/source/options/dbregistersettings.cxx | 2 cui/source/options/dbregistersettings.hxx | 2 dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 dbaccess/source/ui/dlg/dsnItem.hxx | 1 dbaccess/source/ui/dlg/optionalboolitem.cxx | 2 dbaccess/source/ui/dlg/optionalboolitem.hxx | 1 dbaccess/source/ui/inc/stringlistitem.hxx | 1 dbaccess/source/ui/misc/stringlistitem.cxx | 2 editeng/source/items/bulitem.cxx | 2 editeng/source/items/charhiddenitem.cxx | 2 editeng/source/items/flditem.cxx | 4 editeng/source/items/frmitems.cxx | 54 +- editeng/source/items/justifyitem.cxx | 10 editeng/source/items/numitem.cxx | 8 editeng/source/items/optitems.cxx | 2 editeng/source/items/paraitem.cxx | 24 - editeng/source/items/textitem.cxx | 69 +-- editeng/source/items/writingmodeitem.cxx | 2 editeng/source/items/xmlcnitm.cxx | 2 include/avmedia/mediaitem.hxx | 1 include/basctl/sbxitem.hxx | 1 include/editeng/adjustitem.hxx | 1 include/editeng/autokernitem.hxx | 2 include/editeng/blinkitem.hxx | 1 include/editeng/boxitem.hxx | 2 include/editeng/brushitem.hxx | 1 include/editeng/bulletitem.hxx | 1 include/editeng/charhiddenitem.hxx | 1 include/editeng/charreliefitem.hxx | 1 include/editeng/charrotateitem.hxx | 5 include/editeng/charscaleitem.hxx | 2 include/editeng/cmapitem.hxx | 1 include/editeng/colritem.hxx | 1 include/editeng/contouritem.hxx | 2 include/editeng/crossedoutitem.hxx | 1 include/editeng/emphasismarkitem.hxx | 2 include/editeng/escapementitem.hxx | 1 include/editeng/fhgtitem.hxx | 1 include/editeng/flditem.hxx | 1 include/editeng/flstitem.hxx | 1 include/editeng/fontitem.hxx | 1 include/editeng/forbiddenruleitem.hxx | 1 include/editeng/formatbreakitem.hxx | 3 include/editeng/frmdiritem.hxx | 1 include/editeng/hngpnctitem.hxx | 1 include/editeng/hyphenzoneitem.hxx | 1 include/editeng/justifyitem.hxx | 3 include/editeng/keepitem.hxx | 2 include/editeng/kernitem.hxx | 2 include/editeng/langitem.hxx | 7 include/editeng/lineitem.hxx | 1 include/editeng/lrspitem.hxx | 7 include/editeng/lspcitem.hxx | 1 include/editeng/nhypitem.hxx | 1 include/editeng/numitem.hxx | 1 include/editeng/opaqitem.hxx | 3 include/editeng/optitems.hxx | 2 include/editeng/orphitem.hxx | 2 include/editeng/paravertalignitem.hxx | 2 include/editeng/pbinitem.hxx | 4 include/editeng/pgrditem.hxx | 1 include/editeng/pmdlitem.hxx | 2 include/editeng/postitem.hxx | 1 include/editeng/prntitem.hxx | 3 include/editeng/protitem.hxx | 3 include/editeng/rsiditem.hxx | 3 include/editeng/scriptspaceitem.hxx | 1 include/editeng/scripttypeitem.hxx | 1 include/editeng/shaditem.hxx | 1 include/editeng/shdditem.hxx | 2 include/editeng/sizeitem.hxx | 3 include/editeng/spltitem.hxx | 2 include/editeng/tstpitem.hxx | 1 include/editeng/twolinesitem.hxx | 1 include/editeng/udlnitem.hxx | 6 include/editeng/ulspitem.hxx | 1 include/editeng/wghtitem.hxx | 1 include/editeng/widwitem.hxx | 2 include/editeng/writingmodeitem.hxx | 1 include/editeng/wrlmitem.hxx | 2 include/editeng/xmlcnitm.hxx | 2 include/sfx2/app.hxx | 3 include/sfx2/dinfdlg.hxx | 1 include/sfx2/evntconf.hxx | 4 include/sfx2/frame.hxx | 4 include/sfx2/minfitem.hxx | 1 include/sfx2/objitem.hxx | 1 include/sfx2/objsh.hxx | 5 include/sfx2/tabdlg.hxx | 1 include/sfx2/tplpitem.hxx | 1 include/sfx2/viewfrm.hxx | 3 include/sfx2/watermarkitem.hxx | 1 include/sfx2/zoomitem.hxx | 2 include/svl/cenumitm.hxx | 3 include/svl/cintitem.hxx | 24 - include/svl/eitem.hxx | 11 include/svl/flagitem.hxx | 5 include/svl/globalnameitem.hxx | 1 include/svl/grabbagitem.hxx | 1 include/svl/ilstitem.hxx | 1 include/svl/imageitm.hxx | 1 include/svl/int64item.hxx | 1 include/svl/intitem.hxx | 33 - include/svl/lckbitem.hxx | 1 include/svl/macitem.hxx | 3 include/svl/metitem.hxx | 3 include/svl/poolitem.hxx | 117 +++--- include/svl/ptitem.hxx | 1 include/svl/rectitem.hxx | 1 include/svl/rngitem.hxx | 1 include/svl/setitem.hxx | 7 include/svl/slstitm.hxx | 1 include/svl/srchitem.hxx | 1 include/svl/stritem.hxx | 10 include/svl/visitem.hxx | 3 include/svl/voiditem.hxx | 1 include/svx/RectangleAlignmentItem.hxx | 1 include/svx/SmartTagItem.hxx | 1 include/svx/algitem.hxx | 2 include/svx/chrtitem.hxx | 5 include/svx/clipfmtitem.hxx | 1 include/svx/drawitem.hxx | 7 include/svx/e3ditem.hxx | 1 include/svx/galleryitem.hxx | 1 include/svx/grfcrop.hxx | 6 include/svx/hlnkitem.hxx | 3 include/svx/numinf.hxx | 2 include/svx/ofaitem.hxx | 2 include/svx/optgrid.hxx | 3 include/svx/pageitem.hxx | 2 include/svx/postattr.hxx | 8 include/svx/rotmodit.hxx | 1 include/svx/rulritem.hxx | 5 include/svx/sdangitm.hxx | 5 include/svx/sdasitm.hxx | 1 include/svx/sdgcpitm.hxx | 5 include/svx/sdggaitm.hxx | 4 include/svx/sdgluitm.hxx | 8 include/svx/sdgmoitm.hxx | 4 include/svx/sdmetitm.hxx | 5 include/svx/sdooitm.hxx | 5 include/svx/sdprcitm.hxx | 10 include/svx/sdtaaitm.hxx | 3 include/svx/sdtacitm.hxx | 3 include/svx/sdtaditm.hxx | 3 include/svx/sdtaiitm.hxx | 6 include/svx/sdtaitm.hxx | 8 include/svx/sdtakitm.hxx | 3 include/svx/sdtayitm.hxx | 3 include/svx/sdtfchim.hxx | 2 include/svx/sdtfsitm.hxx | 3 include/svx/sdynitm.hxx | 5 include/svx/statusitem.hxx | 1 include/svx/svx3ditems.hxx | 13 include/svx/svxgraphicitem.hxx | 1 include/svx/sxcecitm.hxx | 12 include/svx/sxcgitm.hxx | 3 include/svx/sxcllitm.hxx | 6 include/svx/sxctitm.hxx | 3 include/svx/sxekitm.hxx | 3 include/svx/sxelditm.hxx | 4 include/svx/sxenditm.hxx | 18 include/svx/sxmbritm.hxx | 3 include/svx/sxmtfitm.hxx | 9 include/svx/sxmtpitm.hxx | 6 include/svx/sxmtritm.hxx | 6 include/svx/sxmuitm.hxx | 3 include/svx/viewlayoutitem.hxx | 2 include/svx/xbtmpit.hxx | 3 include/svx/xcolit.hxx | 9 include/svx/xfillit0.hxx | 1 include/svx/xfilluseslidebackgrounditem.hxx | 1 include/svx/xflasit.hxx | 1 include/svx/xflbckit.hxx | 1 include/svx/xflbmpit.hxx | 1 include/svx/xflbmsli.hxx | 1 include/svx/xflbmsxy.hxx | 2 include/svx/xflbmtit.hxx | 1 include/svx/xflboxy.hxx | 2 include/svx/xflbstit.hxx | 1 include/svx/xflbtoxy.hxx | 2 include/svx/xflclit.hxx | 3 include/svx/xflftrit.hxx | 1 include/svx/xflgrit.hxx | 15 include/svx/xflhtit.hxx | 3 include/svx/xfltrit.hxx | 1 include/svx/xftadit.hxx | 1 include/svx/xftdiit.hxx | 1 include/svx/xftmrit.hxx | 1 include/svx/xftouit.hxx | 2 include/svx/xftshcit.hxx | 3 include/svx/xftshit.hxx | 1 include/svx/xftshxy.hxx | 3 include/svx/xftstit.hxx | 2 include/svx/xgrscit.hxx | 1 include/svx/xit.hxx | 7 include/svx/xlineit0.hxx | 1 include/svx/xlinjoit.hxx | 1 include/svx/xlnasit.hxx | 1 include/svx/xlncapit.hxx | 1 include/svx/xlnclit.hxx | 3 include/svx/xlndsit.hxx | 3 include/svx/xlnedcit.hxx | 1 include/svx/xlnedit.hxx | 1 include/svx/xlnedwit.hxx | 1 include/svx/xlnstcit.hxx | 1 include/svx/xlnstit.hxx | 1 include/svx/xlnstwit.hxx | 1 include/svx/xlntrit.hxx | 1 include/svx/xlnwtit.hxx | 1 include/svx/xsflclit.hxx | 1 include/svx/xtextit0.hxx | 2 include/svx/zoomslideritem.hxx | 2 sc/inc/attrib.hxx | 13 sc/inc/defaultsoptions.hxx | 1 sc/inc/docoptio.hxx | 1 sc/inc/formulaopt.hxx | 1 sc/inc/printopt.hxx | 1 sc/inc/viewopti.hxx | 1 sc/source/core/data/attrib.cxx | 42 +- sc/source/core/tool/defaultsoptions.cxx | 2 sc/source/core/tool/docoptio.cxx | 2 sc/source/core/tool/formulaopt.cxx | 2 sc/source/core/tool/printopt.cxx | 2 sc/source/core/tool/viewopti.cxx | 2 sc/source/ui/app/uiitems.cxx | 22 - sc/source/ui/inc/uiitems.hxx | 9 sd/source/ui/app/optsitem.cxx | 8 sd/source/ui/inc/optsitem.hxx | 3 sfx2/inc/sorgitm.hxx | 1 sfx2/source/control/minfitem.cxx | 2 sfx2/source/control/sorgitm.cxx | 2 sfx2/source/dialog/dinfdlg.cxx | 2 sfx2/source/dialog/tabdlg.cxx | 2 sfx2/source/dialog/tplpitem.cxx | 2 sfx2/source/doc/objitem.cxx | 2 sfx2/source/doc/watermarkitem.cxx | 2 sfx2/source/doc/zoomitem.cxx | 2 sfx2/source/view/frame.cxx | 10 svl/source/items/flagitem.cxx | 4 svl/source/items/globalnameitem.cxx | 4 svl/source/items/grabbagitem.cxx | 6 svl/source/items/ilstitem.cxx | 6 svl/source/items/imageitm.cxx | 2 svl/source/items/int64item.cxx | 2 svl/source/items/intitem.cxx | 4 svl/source/items/lckbitem.cxx | 2 svl/source/items/poolitem.cxx | 439 ----------------------- svl/source/items/ptitem.cxx | 4 svl/source/items/rectitem.cxx | 4 svl/source/items/rngitem.cxx | 2 svl/source/items/sitem.cxx | 10 svl/source/items/slstitm.cxx | 4 svl/source/items/srchitem.cxx | 2 svl/source/items/voiditem.cxx | 4 svx/inc/AffineMatrixItem.hxx | 1 svx/inc/sdgcoitm.hxx | 12 svx/inc/sdginitm.hxx | 4 svx/inc/sdgtritm.hxx | 4 svx/inc/sxallitm.hxx | 12 svx/inc/sxcaitm.hxx | 3 svx/inc/sxcikitm.hxx | 3 svx/inc/sxfiitm.hxx | 5 svx/inc/sxlayitm.hxx | 8 svx/inc/sxlogitm.hxx | 6 svx/inc/sxmfsitm.hxx | 2 svx/inc/sxmkitm.hxx | 3 svx/inc/sxmoitm.hxx | 3 svx/inc/sxmovitm.hxx | 6 svx/inc/sxmsitm.hxx | 3 svx/inc/sxmtaitm.hxx | 6 svx/inc/sxoneitm.hxx | 12 svx/inc/sxopitm.hxx | 6 svx/inc/sxreaitm.hxx | 6 svx/inc/sxreoitm.hxx | 6 svx/inc/sxroaitm.hxx | 3 svx/inc/sxrooitm.hxx | 3 svx/inc/sxsaitm.hxx | 3 svx/inc/sxsalitm.hxx | 6 svx/inc/sxsiitm.hxx | 6 svx/inc/sxsoitm.hxx | 6 svx/inc/sxtraitm.hxx | 12 svx/inc/xftshtit.hxx | 1 svx/source/dialog/rulritem.cxx | 18 svx/source/dialog/svxgraphicitem.cxx | 2 svx/source/engine3d/svx3ditems.cxx | 30 - svx/source/items/RectangleAlignmentItem.cxx | 2 svx/source/items/SmartTagItem.cxx | 2 svx/source/items/algitem.cxx | 8 svx/source/items/chrtitem.cxx | 10 svx/source/items/clipfmtitem.cxx | 2 svx/source/items/customshapeitem.cxx | 4 svx/source/items/drawitem.cxx | 28 - svx/source/items/e3ditem.cxx | 2 svx/source/items/galleryitem.cxx | 2 svx/source/items/grfitem.cxx | 9 svx/source/items/hlnkitem.cxx | 2 svx/source/items/numinf.cxx | 8 svx/source/items/ofaitem.cxx | 4 svx/source/items/pageitem.cxx | 2 svx/source/items/postattr.cxx | 4 svx/source/items/rotmodit.cxx | 2 svx/source/items/statusitem.cxx | 2 svx/source/items/viewlayoutitem.cxx | 2 svx/source/items/zoomslideritem.cxx | 2 svx/source/svdraw/svdattr.cxx | 2 svx/source/unodraw/UnoNameItemTable.cxx | 5 svx/source/xoutdev/xattr.cxx | 119 ++---- svx/source/xoutdev/xattr2.cxx | 38 - svx/source/xoutdev/xattrbmp.cxx | 4 sw/inc/ccoll.hxx | 1 sw/inc/cellatr.hxx | 3 sw/inc/fchrfmt.hxx | 1 sw/inc/fmtanchr.hxx | 1 sw/inc/fmtautofmt.hxx | 4 sw/inc/fmtclbl.hxx | 3 sw/inc/fmtclds.hxx | 1 sw/inc/fmtcnct.hxx | 3 sw/inc/fmtcntnt.hxx | 1 sw/inc/fmteiro.hxx | 3 sw/inc/fmtflcnt.hxx | 1 sw/inc/fmtfld.hxx | 1 sw/inc/fmtfollowtextflow.hxx | 4 sw/inc/fmtfordr.hxx | 1 sw/inc/fmtfsize.hxx | 1 sw/inc/fmtftn.hxx | 1 sw/inc/fmtftntx.hxx | 4 sw/inc/fmthdft.hxx | 2 sw/inc/fmtinfmt.hxx | 1 sw/inc/fmtline.hxx | 1 sw/inc/fmtlsplt.hxx | 3 sw/inc/fmtmeta.hxx | 1 sw/inc/fmtornt.hxx | 2 sw/inc/fmtpdsc.hxx | 1 sw/inc/fmtrfmrk.hxx | 1 sw/inc/fmtrowsplt.hxx | 3 sw/inc/fmtruby.hxx | 1 sw/inc/fmtsrnd.hxx | 1 sw/inc/fmturl.hxx | 1 sw/inc/fmtwrapinfluenceonobjpos.hxx | 1 sw/inc/formatcontentcontrol.hxx | 1 sw/inc/formatflysplit.hxx | 1 sw/inc/formatlinebreak.hxx | 1 sw/inc/formatwraptextatflystart.hxx | 1 sw/inc/grfatr.hxx | 32 + sw/inc/hfspacingitem.hxx | 3 sw/inc/hints.hxx | 4 sw/inc/paratr.hxx | 11 sw/inc/tgrditem.hxx | 1 sw/inc/tox.hxx | 1 sw/source/core/attr/cellatr.cxx | 8 sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx | 2 sw/source/core/attr/formatflysplit.cxx | 2 sw/source/core/attr/formatwraptextatflystart.cxx | 2 sw/source/core/attr/hints.cxx | 2 sw/source/core/graphic/grfatr.cxx | 6 sw/source/core/layout/atrfrm.cxx | 48 +- sw/source/core/para/paratr.cxx | 4 sw/source/core/tox/tox.cxx | 6 sw/source/core/txtnode/atrfld.cxx | 4 sw/source/core/txtnode/atrflyin.cxx | 2 sw/source/core/txtnode/atrftn.cxx | 2 sw/source/core/txtnode/atrref.cxx | 4 sw/source/core/txtnode/attrcontentcontrol.cxx | 4 sw/source/core/txtnode/attrlinebreak.cxx | 2 sw/source/core/txtnode/fmtatr2.cxx | 20 - sw/source/filter/basflt/fltshell.cxx | 10 sw/source/filter/inc/fltshell.hxx | 7 sw/source/uibase/chrdlg/ccoll.cxx | 2 sw/source/uibase/config/cfgitems.cxx | 20 - sw/source/uibase/dialog/swwrtshitem.cxx | 2 sw/source/uibase/envelp/envimg.cxx | 2 sw/source/uibase/envelp/labimg.cxx | 2 sw/source/uibase/inc/cfgitems.hxx | 8 sw/source/uibase/inc/envimg.hxx | 1 sw/source/uibase/inc/labimg.hxx | 1 sw/source/uibase/inc/swwrtshitem.hxx | 1 sw/source/uibase/inc/uiitems.hxx | 4 sw/source/uibase/utlui/uiitems.cxx | 8 385 files changed, 1124 insertions(+), 1178 deletions(-)
New commits: commit 9304f13db61dc101ff1c121277c344a472c2951a Author: Armin Le Grand (Collabora) <armin.le.gr...@me.com> AuthorDate: Thu Jan 9 11:51:33 2025 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Fri Jan 10 19:38:37 2025 +0100 ITEM: Refactor ItemType ItemType is useful and faster than RTTI. Until now it was implemented by a 16-bit member in the base class, plus (potentially) all constructors having to hand a value in at item construction type (of type SfxItemType) to get that member set correctly. This works, but there is no reliable way to guarantee coverage, and there have already been cases with missing SfxItemType - these fallback to '0' and thus all Items with ItemType() == 0 are assumed equal and might be static_cast'ed to the wrong classes. Note that I identified *35* Items that had no correct ItemType set/implemented actually. It also uses 16-bit per incarnated Item at runtime. I thought and realized now a more systematic approach to do that with a pure virtual function at the Item itself. That can also be secured by a clang compiler plugin in the future to keep it working. It uses one virtual function per derived class, no longer space in incarnated Items. Also the constructors will get more simple again. But the main aspect is security - we cannot afford Items potentially being held as equal if they are not. Unfortunately C++ does not offer something like a 'strict pure virtual function' that would force to be overloaded in every derivation, but the used methotology and adding a clang test is reasonably safe. Have now done the cleanup of previous method. Change-Id: I04768285f1e9b73d64b0bb87df401944b5d35678 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180017 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index c2ecaa29d9bf..fbabb684383e 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -84,7 +84,7 @@ struct MediaItem::Impl MediaItem::MediaItem( sal_uInt16 i_nWhich, AVMediaSetMask nMaskSet ) - : SfxPoolItem( i_nWhich, SfxItemType::MediaItemType ) + : SfxPoolItem( i_nWhich ) , m_pImpl( new Impl(nMaskSet) ) { } diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx index 8d098c5ab68e..a2aa90f27399 100644 --- a/basctl/source/basicide/sbxitem.cxx +++ b/basctl/source/basicide/sbxitem.cxx @@ -31,7 +31,7 @@ SbxItem::SbxItem ( OUString aName, SbxItemType eSbxType ) : - SfxPoolItem(nWhichItem, SfxItemType::SbxItemType), + SfxPoolItem(nWhichItem), m_aDocument(std::move(aDocument)), m_aLibName(std::move(aLibName)), m_aName(std::move(aName)), @@ -46,7 +46,7 @@ SbxItem::SbxItem ( OUString aMethodName, SbxItemType eSbxType ) : - SfxPoolItem(nWhichItem, SfxItemType::SbxItemType), + SfxPoolItem(nWhichItem), m_aDocument(std::move(aDocument)), m_aLibName(std::move(aLibName)), m_aName(std::move(aName)), diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index 1ac75f6db361..8d1bd5e4130e 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -215,7 +215,7 @@ void SvxChartOptions::SetDefaultColors( const SvxChartColorTable& rDefColors ) SvxChartColorTableItem::SvxChartColorTableItem( sal_uInt16 nWhich_, SvxChartColorTable aTable ) : - SfxPoolItem( nWhich_, SfxItemType::SvxChartColorTableItemType ), + SfxPoolItem( nWhich_ ), m_aColorTable(std::move( aTable )) { } diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx index ce39b0a1734a..32e8fc5bee5e 100644 --- a/cui/source/options/cfgchart.hxx +++ b/cui/source/options/cfgchart.hxx @@ -65,6 +65,7 @@ namespace SvxChartOptions class SvxChartColorTableItem : public SfxPoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxChartColorTableItem) SvxChartColorTableItem( sal_uInt16 nWhich, SvxChartColorTable ); virtual SvxChartColorTableItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx index 144be599bb10..a0c100d2f9a1 100644 --- a/cui/source/options/connpoolsettings.cxx +++ b/cui/source/options/connpoolsettings.cxx @@ -46,7 +46,7 @@ namespace offapp DriverPoolingSettingsItem::DriverPoolingSettingsItem( sal_uInt16 _nId, DriverPoolingSettings _aSettings ) - :SfxPoolItem(_nId, SfxItemType::DriverPoolingSettingsItemType) + :SfxPoolItem(_nId ) ,m_aSettings(std::move(_aSettings)) { } diff --git a/cui/source/options/connpoolsettings.hxx b/cui/source/options/connpoolsettings.hxx index 1e2404b88583..0ebd1322c38f 100644 --- a/cui/source/options/connpoolsettings.hxx +++ b/cui/source/options/connpoolsettings.hxx @@ -71,7 +71,7 @@ namespace offapp DriverPoolingSettings m_aSettings; public: - + DECLARE_ITEM_TYPE_FUNCTION(DriverPoolingSettingsItem) DriverPoolingSettingsItem( sal_uInt16 _nId, DriverPoolingSettings _aSettings ); virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/cui/source/options/dbregistersettings.cxx b/cui/source/options/dbregistersettings.cxx index 6441de2b6b00..c544e1111fe3 100644 --- a/cui/source/options/dbregistersettings.cxx +++ b/cui/source/options/dbregistersettings.cxx @@ -26,7 +26,7 @@ namespace svx { DatabaseMapItem::DatabaseMapItem( sal_uInt16 _nId, DatabaseRegistrations&& _rRegistrations ) - :SfxPoolItem( _nId, SfxItemType::DatabaseMapItemType ) + :SfxPoolItem( _nId ) ,m_aRegistrations( std::move(_rRegistrations) ) { } diff --git a/cui/source/options/dbregistersettings.hxx b/cui/source/options/dbregistersettings.hxx index b1db16542f02..15f4a64e182d 100644 --- a/cui/source/options/dbregistersettings.hxx +++ b/cui/source/options/dbregistersettings.hxx @@ -64,7 +64,7 @@ namespace svx DatabaseRegistrations m_aRegistrations; public: - + DECLARE_ITEM_TYPE_FUNCTION(DatabaseMapItem) DatabaseMapItem( sal_uInt16 _nId, DatabaseRegistrations&& _rRegistrations ); virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index bb2286ffef3e..428f5b0a06df 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -1079,7 +1079,7 @@ void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSo // DbuTypeCollectionItem DbuTypeCollectionItem::DbuTypeCollectionItem(sal_Int16 _nWhich, ::dbaccess::ODsnTypeCollection* _pCollection) - :SfxPoolItem(_nWhich, SfxItemType::DbuTypeCollectionItemType) + :SfxPoolItem(_nWhich ) ,m_pCollection(_pCollection) { } diff --git a/dbaccess/source/ui/dlg/dsnItem.hxx b/dbaccess/source/ui/dlg/dsnItem.hxx index 4ae414881e57..8f73921af359 100644 --- a/dbaccess/source/ui/dlg/dsnItem.hxx +++ b/dbaccess/source/ui/dlg/dsnItem.hxx @@ -35,6 +35,7 @@ namespace dbaui ::dbaccess::ODsnTypeCollection* m_pCollection; public: + DECLARE_ITEM_TYPE_FUNCTION(DbuTypeCollectionItem) DbuTypeCollectionItem(sal_Int16 nWhich, ::dbaccess::ODsnTypeCollection* _pCollection); DbuTypeCollectionItem(const DbuTypeCollectionItem& _rSource); diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx index 1caf1c884393..30d176391ba4 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.cxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx @@ -24,7 +24,7 @@ namespace dbaui // OptionalBoolItem OptionalBoolItem::OptionalBoolItem( sal_uInt16 _nWhich ) - :SfxPoolItem( _nWhich, SfxItemType::OptionalBoolItemType ) + :SfxPoolItem( _nWhich ) { } diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx index 1c1d039e2650..c319c5737d84 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.hxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx @@ -32,6 +32,7 @@ namespace dbaui ::std::optional< bool > m_aValue; public: + DECLARE_ITEM_TYPE_FUNCTION(OptionalBoolItem) explicit OptionalBoolItem( sal_uInt16 nWhich ); virtual bool operator==( const SfxPoolItem& _rItem ) const override; diff --git a/dbaccess/source/ui/inc/stringlistitem.hxx b/dbaccess/source/ui/inc/stringlistitem.hxx index 3d16f6770c30..18156cc2385e 100644 --- a/dbaccess/source/ui/inc/stringlistitem.hxx +++ b/dbaccess/source/ui/inc/stringlistitem.hxx @@ -34,6 +34,7 @@ class OStringListItem : public SfxPoolItem css::uno::Sequence<OUString> m_aList; public: + DECLARE_ITEM_TYPE_FUNCTION(OStringListItem) OStringListItem(sal_Int16 nWhich, const css::uno::Sequence<OUString>& _rList); OStringListItem(const OStringListItem& _rSource); diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx index ea50c99e04c2..97e75fe6d4b6 100644 --- a/dbaccess/source/ui/misc/stringlistitem.cxx +++ b/dbaccess/source/ui/misc/stringlistitem.cxx @@ -25,7 +25,7 @@ using namespace ::com::sun::star::uno; // OStringListItem OStringListItem::OStringListItem(sal_Int16 _nWhich, const Sequence<OUString>& _rList) - : SfxPoolItem(_nWhich, SfxItemType::OStringListItemType) + : SfxPoolItem(_nWhich) , m_aList(_rList) { } diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index b4d46f9b1d3b..769179748b40 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -22,7 +22,7 @@ #include <editeng/bulletitem.hxx> SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) - : SfxPoolItem(_nWhich, SfxItemType::SvxBulletItemType) + : SfxPoolItem(_nWhich) , aFont(OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE )) , nStart(1) , nStyle(SvxBulletStyle::N123) diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx index 77487bb7b50d..ec2a0af3c703 100644 --- a/editeng/source/items/charhiddenitem.cxx +++ b/editeng/source/items/charhiddenitem.cxx @@ -24,7 +24,7 @@ SvxCharHiddenItem::SvxCharHiddenItem( const bool bHidden, const sal_uInt16 nId ) : - SfxBoolItem( nId, bHidden, SfxItemType::SvxCharHiddenItemType ) + SfxBoolItem( nId, bHidden ) { } diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index c3f729a0e231..ca0b9f43546a 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -277,13 +277,13 @@ MetaAction* SvxFieldData::createEndComment() SvxFieldItem::SvxFieldItem( std::unique_ptr<SvxFieldData> pField, const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxFieldItemType ) + SfxPoolItem( nId ) , mpField( std::move(pField) ) { } SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxFieldItemType ) + SfxPoolItem( nId ) , mpField( rField.Clone() ) { } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 924ce4b50ece..397a47eb710e 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -140,9 +140,9 @@ bool SvxPaperBinItem::GetPresentation } -SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize, SfxItemType eItemType ) : +SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) : - SfxPoolItem( nId, eItemType ), + SfxPoolItem( nId ), m_aSize( rSize ) { @@ -225,7 +225,7 @@ bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SvxSizeItem::SvxSizeItem( const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxSizeItemType ) + SfxPoolItem( nId ) { } @@ -405,7 +405,7 @@ bool lcl_FillRelativeMeasureAny(const SvxIndentValue& rIndent, uno::Any& rVal) } SvxLRSpaceItem::SvxLRSpaceItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxLRSpaceItemType) + : SfxPoolItem(nId) , m_nGutterMargin(0) , m_nRightGutterMargin(0), nPropFirstLineOffset( 100 ), @@ -419,7 +419,7 @@ SvxLRSpaceItem::SvxLRSpaceItem(const sal_uInt16 nId) SvxLRSpaceItem::SvxLRSpaceItem(SvxIndentValue stLeft, SvxIndentValue stRight, SvxIndentValue stOffset, const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxLRSpaceItemType) + : SfxPoolItem(nId) , m_nGutterMargin(0) , m_nRightGutterMargin(0) , nPropFirstLineOffset(100) @@ -880,12 +880,12 @@ sal_Int32 SvxLRSpaceItem::ResolveTextLeft(const SvxFontUnitMetrics& rMetrics) co } SvxLeftMarginItem::SvxLeftMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxLeftMarginItemType) + : SfxPoolItem(nId) { } SvxLeftMarginItem::SvxLeftMarginItem(const tools::Long nLeft, const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxLeftMarginItemType) + : SfxPoolItem(nId) , m_nLeftMargin(nLeft) { } @@ -1048,12 +1048,12 @@ boost::property_tree::ptree SvxLeftMarginItem::dumpAsJSON() const } SvxTextLeftMarginItem::SvxTextLeftMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxTextLeftMarginItemType) + : SfxPoolItem(nId) { } SvxTextLeftMarginItem::SvxTextLeftMarginItem(SvxIndentValue stLeft, const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxTextLeftMarginItemType) + : SfxPoolItem(nId) { SetTextLeft(stLeft); } @@ -1265,7 +1265,7 @@ boost::property_tree::ptree SvxTextLeftMarginItem::dumpAsJSON() const } SvxFirstLineIndentItem::SvxFirstLineIndentItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxFirstLineIndentItemType) + : SfxPoolItem(nId) { } @@ -1527,12 +1527,12 @@ boost::property_tree::ptree SvxFirstLineIndentItem::dumpAsJSON() const } SvxRightMarginItem::SvxRightMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxRightMarginItemType) + : SfxPoolItem(nId) { } SvxRightMarginItem::SvxRightMarginItem(SvxIndentValue stRight, const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxRightMarginItemType) + : SfxPoolItem(nId) { SetRight(stRight); } @@ -1741,7 +1741,7 @@ boost::property_tree::ptree SvxRightMarginItem::dumpAsJSON() const } SvxGutterLeftMarginItem::SvxGutterLeftMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxGutterLeftMarginItemType) + : SfxPoolItem(nId) { } @@ -1850,7 +1850,7 @@ boost::property_tree::ptree SvxGutterLeftMarginItem::dumpAsJSON() const } SvxGutterRightMarginItem::SvxGutterRightMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxGutterRightMarginItemType) + : SfxPoolItem(nId) { } @@ -2179,7 +2179,7 @@ boost::property_tree::ptree SvxLRSpaceItem::dumpAsJSON() const SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nId ) - : SfxPoolItem(nId, SfxItemType::SvxULSpaceItemType) + : SfxPoolItem(nId) , nUpper(0) , nLower(0) , bContext(false) @@ -2191,7 +2191,7 @@ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nId ) SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, const sal_uInt16 nId ) - : SfxPoolItem(nId, SfxItemType::SvxULSpaceItemType) + : SfxPoolItem(nId) , nUpper(nUp) , nLower(nLow) , bContext(false) @@ -2565,7 +2565,7 @@ void SvxProtectItem::dumpAsXml(xmlTextWriterPtr pWriter) const SvxShadowItem::SvxShadowItem( const sal_uInt16 nId, const Color *pColor, const sal_uInt16 nW, const SvxShadowLocation eLoc ) : - SfxEnumItemInterface( nId, SfxItemType::SvxShadowItemType ), + SfxEnumItemInterface( nId ), aShadowColor(COL_GRAY), nWidth ( nW ), eLocation ( eLoc ) @@ -2849,7 +2849,7 @@ SvxBoxItem::SvxBoxItem(const SvxBoxItem& rCopy) SvxBoxItem::SvxBoxItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxBoxItemType) + : SfxPoolItem(nId) { } @@ -3811,7 +3811,7 @@ bool SvxBoxItem::HasBorder( bool bTreatPaddingAsBorder ) const // class SvxBoxInfoItem -------------------------------------------------- SvxBoxInfoItem::SvxBoxInfoItem(const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxBoxInfoItemType) + : SfxPoolItem(nId) , mbDistance(false) , mbMinimumDistance(false) { @@ -4401,7 +4401,7 @@ void SvxFormatKeepItem::dumpAsXml(xmlTextWriterPtr pWriter) const } SvxLineItem::SvxLineItem( const sal_uInt16 nId ) : - SfxPoolItem ( nId, SfxItemType::SvxLineItemType ) + SfxPoolItem ( nId ) { } @@ -4539,7 +4539,7 @@ ItemInstanceManager* SvxBrushItem::getItemInstanceManager() const } SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) + : SfxPoolItem(_nWhich ) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4550,7 +4550,7 @@ SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) } SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) + : SfxPoolItem(_nWhich ) , aColor(rColor) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4561,7 +4561,7 @@ SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) } SvxBrushItem::SvxBrushItem(Color const& rColor, model::ComplexColor const& rComplexColor, sal_uInt16 nWhich) - : SfxPoolItem(nWhich, SfxItemType::SvxBrushItemType) + : SfxPoolItem(nWhich) , aColor(rColor) , maComplexColor(rComplexColor) , aFilterColor(COL_TRANSPARENT) @@ -4573,7 +4573,7 @@ SvxBrushItem::SvxBrushItem(Color const& rColor, model::ComplexColor const& rComp } SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) + : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4586,7 +4586,7 @@ SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal } SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition ePos, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) + : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4600,7 +4600,7 @@ SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition SvxBrushItem::SvxBrushItem(OUString aLink, OUString aFilter, SvxGraphicPosition ePos, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) + : SfxPoolItem(_nWhich) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -5178,7 +5178,7 @@ ItemInstanceManager* SvxFrameDirectionItem::getItemInstanceManager() const SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue , sal_uInt16 _nWhich ) - : SfxEnumItem<SvxFrameDirection>( _nWhich, SfxItemType::SvxFrameDirectionItemType, nValue ) + : SfxEnumItem<SvxFrameDirection>( _nWhich, nValue ) { } diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx index 5b496e233a87..7fe699cb2c36 100644 --- a/editeng/source/items/justifyitem.cxx +++ b/editeng/source/items/justifyitem.cxx @@ -36,13 +36,13 @@ using namespace ::com::sun::star; SvxHorJustifyItem::SvxHorJustifyItem( const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxHorJustifyItemType, SvxCellHorJustify::Standard ) + SfxEnumItem( nId, SvxCellHorJustify::Standard ) { } SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify, const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxHorJustifyItemType, eJustify ) + SfxEnumItem( nId, eJustify ) { } @@ -173,13 +173,13 @@ sal_uInt16 SvxHorJustifyItem::GetValueCount() const SvxVerJustifyItem::SvxVerJustifyItem( const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxVerJustifyItemType, SvxCellVerJustify::Standard ) + SfxEnumItem( nId, SvxCellVerJustify::Standard ) { } SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify, const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxVerJustifyItemType, eJustify ) + SfxEnumItem( nId, eJustify ) { } @@ -298,7 +298,7 @@ sal_uInt16 SvxVerJustifyItem::GetValueCount() const SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify, const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxJustifyMethodItemType, eJustify ) + SfxEnumItem( nId, eJustify ) { } diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 791b417f5cad..60d9b43a1047 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -1083,25 +1083,25 @@ void SvxNumRule::UnLinkGraphics() } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule const & rRule) : - SfxPoolItem(SID_ATTR_NUMBERING_RULE, SfxItemType::SvxNumBulletItemType), + SfxPoolItem(SID_ATTR_NUMBERING_RULE), maNumRule(rRule) { } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule && rRule) : - SfxPoolItem(SID_ATTR_NUMBERING_RULE, SfxItemType::SvxNumBulletItemType), + SfxPoolItem(SID_ATTR_NUMBERING_RULE), maNumRule(std::move(rRule)) { } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule const & rRule, sal_uInt16 _nWhich ) : - SfxPoolItem(_nWhich, SfxItemType::SvxNumBulletItemType), + SfxPoolItem(_nWhich), maNumRule(rRule) { } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule && rRule, sal_uInt16 _nWhich ) : - SfxPoolItem(_nWhich, SfxItemType::SvxNumBulletItemType), + SfxPoolItem(_nWhich), maNumRule(std::move(rRule)) { } diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx index 40d521d48a1e..254da79d91c1 100644 --- a/editeng/source/items/optitems.cxx +++ b/editeng/source/items/optitems.cxx @@ -26,7 +26,7 @@ SfxHyphenRegionItem::SfxHyphenRegionItem( const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SfxRegionItemType ) + SfxPoolItem( nId ) { nMinLead = nMinTrail = 0; } diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 3bdec7afbf1d..d06255ea3e89 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -79,7 +79,7 @@ enum class SvxSpecialLineSpace } SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId ) - : SfxEnumItemInterface( nId, SfxItemType::SvxLineSpacingItemType ) + : SfxEnumItemInterface( nId ) { nPropLineSpace = 100; nInterLineSpace = 0; @@ -360,7 +360,7 @@ ItemInstanceManager* SvxAdjustItem::getItemInstanceManager() const } SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId ) - : SfxEnumItemInterface( nId, SfxItemType::SvxAdjustItemType ), + : SfxEnumItemInterface( nId ), bOneBlock( false ), bLastCenter( false ), bLastBlock( false ) { SetAdjust( eAdjst ); @@ -495,7 +495,7 @@ void SvxAdjustItem::SetEnumValue( sal_uInt16 nVal ) // class SvxWidowsItem --------------------------------------------------- SvxWidowsItem::SvxWidowsItem(const sal_uInt8 nL, const sal_uInt16 nId ) : - SfxByteItem( nId, nL, SfxItemType::SvxWidowsItemType ) + SfxByteItem( nId, nL ) { } @@ -539,7 +539,7 @@ bool SvxWidowsItem::GetPresentation // class SvxOrphansItem -------------------------------------------------- SvxOrphansItem::SvxOrphansItem(const sal_uInt8 nL, const sal_uInt16 nId ) : - SfxByteItem( nId, nL, SfxItemType::SvxOrphansItemType ) + SfxByteItem( nId, nL ) { } @@ -583,7 +583,7 @@ bool SvxOrphansItem::GetPresentation // class SvxHyphenZoneItem ----------------------------------------------- SvxHyphenZoneItem::SvxHyphenZoneItem( const bool bHyph, const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxHyphenZoneItemType ), + SfxPoolItem( nId ), bHyphen(bHyph), bKeep(false), bNoCapsHyphenation(false), @@ -859,7 +859,7 @@ void SvxTabStop::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxTabStopItem -------------------------------------------------- SvxTabStopItem::SvxTabStopItem( sal_uInt16 _nWhich ) : - SfxPoolItem( _nWhich, SfxItemType::SvxTabStopItemType ) + SfxPoolItem( _nWhich ) { const sal_uInt16 nTabs = SVX_TAB_DEFCOUNT, nDist = SVX_TAB_DEFDIST; const SvxTabAdjust eAdjst= SvxTabAdjust::Default; @@ -876,7 +876,7 @@ SvxTabStopItem::SvxTabStopItem( const sal_uInt16 nTabs, const sal_uInt16 nDist, const SvxTabAdjust eAdjst, sal_uInt16 _nWhich ) : - SfxPoolItem( _nWhich, SfxItemType::SvxTabStopItemType ) + SfxPoolItem( _nWhich ) { for ( sal_uInt16 i = 0; i < nTabs; ++i ) { @@ -1266,7 +1266,7 @@ bool SvxPageModelItem::GetPresentation SvxScriptSpaceItem::SvxScriptSpaceItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn, SfxItemType::SvxScriptSpaceItemType ) + : SfxBoolItem( nId, bOn ) { } @@ -1289,7 +1289,7 @@ bool SvxScriptSpaceItem::GetPresentation( SvxHangingPunctuationItem::SvxHangingPunctuationItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn, SfxItemType::SvxHangingPunctuationItemType ) + : SfxBoolItem( nId, bOn ) { } @@ -1312,7 +1312,7 @@ bool SvxHangingPunctuationItem::GetPresentation( SvxForbiddenRuleItem::SvxForbiddenRuleItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn, SfxItemType::SvxForbiddenRuleItemType ) + : SfxBoolItem( nId, bOn ) { } @@ -1338,7 +1338,7 @@ bool SvxForbiddenRuleItem::GetPresentation( SvxParaVertAlignItem::SvxParaVertAlignItem( Align nValue, TypedWhichId<SvxParaVertAlignItem> nW ) - : SfxUInt16Item( nW, static_cast<sal_uInt16>(nValue), SfxItemType::SvxParaVertAlignItemType ) + : SfxUInt16Item( nW, static_cast<sal_uInt16>(nValue) ) { } @@ -1386,7 +1386,7 @@ bool SvxParaVertAlignItem::PutValue( const css::uno::Any& rVal, } SvxParaGridItem::SvxParaGridItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn, SfxItemType::SvxParaGridItemType ) + : SfxBoolItem( nId, bOn ) { } diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 3931dd8176be..22647b09669f 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -112,7 +112,7 @@ SfxPoolItem* SvxCharReliefItem::CreateDefault() {return new SvxCharReliefItem(Fo SvxFontListItem::SvxFontListItem( const FontList* pFontLst, const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxFontListItemType ), + SfxPoolItem( nId ), pFontList( pFontLst ) { if ( pFontList ) @@ -179,7 +179,7 @@ size_t SvxFontItem::hashCode() const SvxFontItem::SvxFontItem( const sal_uInt16 nId) -: SfxPoolItem( nId, SfxItemType::SvxFontItemType ) +: SfxPoolItem( nId ) , aFamilyName() , aStyleName() , eFamily(FAMILY_SWISS) @@ -195,7 +195,7 @@ SvxFontItem::SvxFontItem( const FontPitch eFontPitch, const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId) -: SfxPoolItem( nId, SfxItemType::SvxFontItemType ) +: SfxPoolItem( nId ) , aFamilyName(std::move(aName)) , aStyleName(std::move(aStName)) , eFamily(eFam) @@ -408,7 +408,7 @@ ItemInstanceManager* SvxPostureItem::getItemInstanceManager() const } SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxPostureItemType, ePosture ) + SfxEnumItem( nId, ePosture ) { } @@ -530,7 +530,7 @@ ItemInstanceManager* SvxWeightItem::getItemInstanceManager() const } SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxWeightItemType, eWght ) + SfxEnumItem( nId, eWght ) { } @@ -672,7 +672,7 @@ size_t SvxFontHeightItem::hashCode() const SvxFontHeightItem::SvxFontHeightItem( const sal_uInt32 nSz, const sal_uInt16 nPrp, const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxFontHeightItemType ) + SfxPoolItem( nId ) { SetHeight( nSz,nPrp ); // calculate in percentage } @@ -1007,8 +1007,8 @@ void SvxFontHeightItem::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxTextLineItem ------------------------------------------------ -SvxTextLineItem::SvxTextLineItem( const FontLineStyle eSt, const sal_uInt16 nId, SfxItemType eItemType ) - : SfxEnumItem(nId, eItemType, eSt) +SvxTextLineItem::SvxTextLineItem( const FontLineStyle eSt, const sal_uInt16 nId ) + : SfxEnumItem(nId, eSt) , maColor(COL_TRANSPARENT) { } @@ -1166,7 +1166,7 @@ ItemInstanceManager* SvxUnderlineItem::getItemInstanceManager() const } SvxUnderlineItem::SvxUnderlineItem( const FontLineStyle eSt, const sal_uInt16 nId ) - : SvxTextLineItem( eSt, nId, SfxItemType::SvxUnderlineItemType ) + : SvxTextLineItem( eSt, nId ) { } @@ -1213,7 +1213,7 @@ ItemInstanceManager* SvxOverlineItem::getItemInstanceManager() const } SvxOverlineItem::SvxOverlineItem( const FontLineStyle eSt, const sal_uInt16 nId ) - : SvxTextLineItem( eSt, nId, SfxItemType::SvxOverlineItemType ) + : SvxTextLineItem( eSt, nId ) { } @@ -1260,7 +1260,7 @@ ItemInstanceManager* SvxCrossedOutItem::getItemInstanceManager() const } SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 nId ) - : SfxEnumItem( nId, SfxItemType::SvxCrossedOutItemType, eSt ) + : SfxEnumItem( nId, eSt ) { } @@ -1361,7 +1361,7 @@ bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // class SvxShadowedItem ------------------------------------------------- SvxShadowedItem::SvxShadowedItem( const bool bShadowed, const sal_uInt16 nId ) : - SfxBoolItem( nId, bShadowed, SfxItemType::SvxShadowedItemType ) + SfxBoolItem( nId, bShadowed ) { } @@ -1389,7 +1389,7 @@ bool SvxShadowedItem::GetPresentation // class SvxAutoKernItem ------------------------------------------------- SvxAutoKernItem::SvxAutoKernItem( const bool bAutoKern, const sal_uInt16 nId ) : - SfxBoolItem( nId, bAutoKern, SfxItemType::SvxAutoKernItemType ) + SfxBoolItem( nId, bAutoKern ) { } @@ -1418,7 +1418,7 @@ bool SvxAutoKernItem::GetPresentation SvxWordLineModeItem::SvxWordLineModeItem( const bool bWordLineMode, const sal_uInt16 nId ) : - SfxBoolItem( nId, bWordLineMode, SfxItemType::SvxWordLineItemType ) + SfxBoolItem( nId, bWordLineMode ) { } @@ -1446,7 +1446,7 @@ bool SvxWordLineModeItem::GetPresentation // class SvxContourItem -------------------------------------------------- SvxContourItem::SvxContourItem( const bool bContoured, const sal_uInt16 nId ) : - SfxBoolItem( nId, bContoured, SfxItemType::SvxContourItemType ) + SfxBoolItem( nId, bContoured ) { } @@ -1473,19 +1473,19 @@ bool SvxContourItem::GetPresentation // class SvxColorItem ---------------------------------------------------- SvxColorItem::SvxColorItem( const sal_uInt16 nId ) : - SfxPoolItem(nId, SfxItemType::SvxColorItemType), + SfxPoolItem(nId), mColor( COL_BLACK ) { } SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) : - SfxPoolItem( nId, SfxItemType::SvxColorItemType ), + SfxPoolItem( nId ), mColor( rCol ) { } SvxColorItem::SvxColorItem(Color const& rColor, model::ComplexColor const& rComplexColor, const sal_uInt16 nId) - : SfxPoolItem(nId, SfxItemType::SvxColorItemType) + : SfxPoolItem(nId) , mColor(rColor) , maComplexColor(rComplexColor) { @@ -1744,7 +1744,7 @@ void SvxColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxKerningItem -------------------------------------------------- SvxKerningItem::SvxKerningItem( const short nKern, const sal_uInt16 nId ) : - SfxInt16Item( nId, nKern, SfxItemType::SvxKerningItemType ) + SfxInt16Item( nId, nKern ) { } @@ -1823,7 +1823,7 @@ bool SvxKerningItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) // class SvxCaseMapItem -------------------------------------------------- SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const sal_uInt16 nId ) : - SfxEnumItem( nId, SfxItemType::SvxCaseMapItemType, eMap ) + SfxEnumItem( nId, eMap ) { } @@ -1903,7 +1903,7 @@ bool SvxCaseMapItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) // class SvxEscapementItem ----------------------------------------------- SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) : - SfxEnumItemInterface( nId, SfxItemType::SvxEscapementItemType ), + SfxEnumItemInterface( nId ), nEsc ( 0 ), nProp ( 100 ) @@ -1913,7 +1913,7 @@ SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) : SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, const sal_uInt16 nId ) : - SfxEnumItemInterface( nId, SfxItemType::SvxEscapementItemType ), + SfxEnumItemInterface( nId ), nProp( 100 ) { SetEscapement( eEscape ); @@ -1925,7 +1925,7 @@ SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, SvxEscapementItem::SvxEscapementItem( const short _nEsc, const sal_uInt8 _nProp, const sal_uInt16 nId ) : - SfxEnumItemInterface( nId, SfxItemType::SvxEscapementItemType ), + SfxEnumItemInterface( nId ), nEsc ( _nEsc ), nProp ( _nProp ) { @@ -2071,7 +2071,7 @@ ItemInstanceManager* SvxLanguageItem::getItemInstanceManager() const } SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId ) - : SvxLanguageItem_Base( nId , SfxItemType::SvxLanguageItemType, eLang ) + : SvxLanguageItem_Base( nId , eLang ) { } @@ -2150,7 +2150,7 @@ bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // class SvxNoHyphenItem ------------------------------------------------- SvxNoHyphenItem::SvxNoHyphenItem( const bool bNoHyphen, const sal_uInt16 nId ) : - SfxBoolItem( nId, bNoHyphen, SfxItemType::SvxNoHyphenItemType ) + SfxBoolItem( nId, bNoHyphen ) { } @@ -2185,7 +2185,7 @@ bool SvxNoHyphenItem::GetPresentation SvxBlinkItem::SvxBlinkItem( const bool bBlink, const sal_uInt16 nId ) : - SfxBoolItem( nId, bBlink, SfxItemType::SvxBlinkItemType ) + SfxBoolItem( nId, bBlink ) { } @@ -2220,7 +2220,7 @@ ItemInstanceManager* SvxEmphasisMarkItem::getItemInstanceManager() const SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue, TypedWhichId<SvxEmphasisMarkItem> nId ) - : SfxUInt16Item( nId, static_cast<sal_uInt16>(nValue), SfxItemType::SvxEmphasisMarkItemType ) + : SfxUInt16Item( nId, static_cast<sal_uInt16>(nValue) ) { } @@ -2324,7 +2324,7 @@ bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SvxTwoLinesItem::SvxTwoLinesItem( bool bFlag, sal_Unicode nStartBracket, sal_Unicode nEndBracket, sal_uInt16 nW ) - : SfxPoolItem( nW, SfxItemType::SvxTwoLinesItemType ), + : SfxPoolItem( nW ), cStartBracket( nStartBracket ), cEndBracket( nEndBracket ), bOn( bFlag ) { } @@ -2431,8 +2431,8 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/, |* class SvxTextRotateItem *************************************************************************/ -SvxTextRotateItem::SvxTextRotateItem(Degree10 nValue, TypedWhichId<SvxTextRotateItem> nW, SfxItemType eItemType) - : SfxUInt16Item(nW, nValue.get(), eItemType) +SvxTextRotateItem::SvxTextRotateItem(Degree10 nValue, TypedWhichId<SvxTextRotateItem> nW) + : SfxUInt16Item(nW, nValue.get()) { } @@ -2511,7 +2511,7 @@ void SvxTextRotateItem::dumpAsXml(xmlTextWriterPtr pWriter) const SvxCharRotateItem::SvxCharRotateItem( Degree10 nValue, bool bFitIntoLine, TypedWhichId<SvxCharRotateItem> nW ) - : SvxTextRotateItem(nValue, nW, SfxItemType::SvxCharRotateItemType), + : SvxTextRotateItem(nValue, nW), bFitToLine( bFitIntoLine ) { } @@ -2601,7 +2601,7 @@ void SvxCharRotateItem::dumpAsXml(xmlTextWriterPtr pWriter) const SvxCharScaleWidthItem::SvxCharScaleWidthItem( sal_uInt16 nValue, TypedWhichId<SvxCharScaleWidthItem> nW ) - : SfxUInt16Item( nW, nValue, SfxItemType::SvxCharScaleWidthItemType ) + : SfxUInt16Item( nW, nValue ) { } @@ -2661,7 +2661,7 @@ ItemInstanceManager* SvxCharReliefItem::getItemInstanceManager() const SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue, const sal_uInt16 nId ) - : SfxEnumItem( nId, SfxItemType::SvxCharReliefItemType, eValue ) + : SfxEnumItem( nId, eValue ) { } @@ -2750,8 +2750,7 @@ bool SvxCharReliefItem::QueryValue( css::uno::Any& rVal, SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ) : SfxSetItem( nSlotId, SfxItemSet( rPool, - svl::Items<SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT> ), - SfxItemType::SvxScriptSetItemType ) + svl::Items<SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT> ) ) { sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index d1d8cb6e065a..35dbddabab2d 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -26,7 +26,7 @@ using namespace ::com::sun::star::text; SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, TypedWhichId<SvxWritingModeItem> _nWhich ) - : SfxUInt16Item( _nWhich, static_cast<sal_uInt16>(eValue), SfxItemType::SvxWritingModeItemType ) + : SfxUInt16Item( _nWhich, static_cast<sal_uInt16>(eValue) ) { } diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index 976fd5aa8150..71f75a910246 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::xml; SvXMLAttrContainerItem::SvXMLAttrContainerItem( sal_uInt16 _nWhich ) : - SfxPoolItem( _nWhich, SfxItemType::SvXMLAttrContainerItemType ) + SfxPoolItem( _nWhich ) { } diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx index 9836346c2159..024c427b3f7b 100644 --- a/include/avmedia/mediaitem.hxx +++ b/include/avmedia/mediaitem.hxx @@ -72,6 +72,7 @@ class AVMEDIA_DLLPUBLIC MediaItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(MediaItem) explicit MediaItem( sal_uInt16 i_nWhich = 0, AVMediaSetMask nMaskSet = AVMediaSetMask::NONE ); MediaItem( const MediaItem& rMediaItem ); diff --git a/include/basctl/sbxitem.hxx b/include/basctl/sbxitem.hxx index 23244fe2e42f..09cdb1a4d032 100644 --- a/include/basctl/sbxitem.hxx +++ b/include/basctl/sbxitem.hxx @@ -45,6 +45,7 @@ class BASCTL_DLLPUBLIC SbxItem : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SbxItem) SbxItem(sal_uInt16 nWhich, ScriptDocument aDocument, OUString aLibName, OUString aName, SbxItemType); SbxItem(sal_uInt16 nWhich, ScriptDocument aDocument, OUString aLibName, OUString aName, OUString aMethodName, SbxItemType eSbxType); diff --git a/include/editeng/adjustitem.hxx b/include/editeng/adjustitem.hxx index b12d91806bc7..4e85d090d9c4 100644 --- a/include/editeng/adjustitem.hxx +++ b/include/editeng/adjustitem.hxx @@ -50,6 +50,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxAdjustItem) SvxAdjustItem( const SvxAdjust eAdjst /*= SvxAdjust::Left*/, const sal_uInt16 nId ); diff --git a/include/editeng/autokernitem.hxx b/include/editeng/autokernitem.hxx index 798aab04bd97..376096912b76 100644 --- a/include/editeng/autokernitem.hxx +++ b/include/editeng/autokernitem.hxx @@ -33,7 +33,7 @@ class EDITENG_DLLPUBLIC SvxAutoKernItem final : public SfxBoolItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxAutoKernItem) SvxAutoKernItem( const bool bAutoKern /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/blinkitem.hxx b/include/editeng/blinkitem.hxx index 4a4af0e6217f..369f050e3e90 100644 --- a/include/editeng/blinkitem.hxx +++ b/include/editeng/blinkitem.hxx @@ -33,6 +33,7 @@ class EDITENG_DLLPUBLIC SvxBlinkItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxBlinkItem) SvxBlinkItem( const bool bBlink /*= false*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx index 60a6d09c5b92..7b7946cef19a 100644 --- a/include/editeng/boxitem.hxx +++ b/include/editeng/boxitem.hxx @@ -76,6 +76,7 @@ class EDITENG_DLLPUBLIC SvxBoxItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxBoxItem) explicit SvxBoxItem( const sal_uInt16 nId ); SvxBoxItem( const SvxBoxItem &rCpy ); virtual ~SvxBoxItem() override; @@ -227,6 +228,7 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxBoxInfoItem) explicit SvxBoxInfoItem( const sal_uInt16 nId ); SvxBoxInfoItem( const SvxBoxInfoItem &rCpy ); virtual ~SvxBoxInfoItem() override; diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx index cc71f6135d80..30469c8d71dc 100644 --- a/include/editeng/brushitem.hxx +++ b/include/editeng/brushitem.hxx @@ -60,6 +60,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxBrushItem) explicit SvxBrushItem( sal_uInt16 nWhich ); SvxBrushItem(Color const& rColor, sal_uInt16 nWhich); SvxBrushItem(Color const& rColor, model::ComplexColor const& rComplexColor, sal_uInt16 nWhich); diff --git a/include/editeng/bulletitem.hxx b/include/editeng/bulletitem.hxx index 4e736b776323..2cef39743d34 100644 --- a/include/editeng/bulletitem.hxx +++ b/include/editeng/bulletitem.hxx @@ -57,6 +57,7 @@ class EDITENG_DLLPUBLIC SvxBulletItem final : public SfxPoolItem sal_Unicode cSymbol; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxBulletItem) explicit SvxBulletItem( sal_uInt16 nWhich ); SvxBulletItem( const SvxBulletItem& ); virtual ~SvxBulletItem() override; diff --git a/include/editeng/charhiddenitem.hxx b/include/editeng/charhiddenitem.hxx index ed72e08dcec0..db6d14d33727 100644 --- a/include/editeng/charhiddenitem.hxx +++ b/include/editeng/charhiddenitem.hxx @@ -32,6 +32,7 @@ class EDITENG_DLLPUBLIC SvxCharHiddenItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxCharHiddenItem) SvxCharHiddenItem( const bool bHidden /*= false*/, const sal_uInt16 nId ); virtual SvxCharHiddenItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/include/editeng/charreliefitem.hxx b/include/editeng/charreliefitem.hxx index 910adcf11e24..b4e0ec16e61a 100644 --- a/include/editeng/charreliefitem.hxx +++ b/include/editeng/charreliefitem.hxx @@ -39,6 +39,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxCharReliefItem) SvxCharReliefItem( FontRelief eValue /*= FontRelief::NONE*/, const sal_uInt16 nId ); diff --git a/include/editeng/charrotateitem.hxx b/include/editeng/charrotateitem.hxx index 42e4d5f16467..a5fed5af8b39 100644 --- a/include/editeng/charrotateitem.hxx +++ b/include/editeng/charrotateitem.hxx @@ -35,7 +35,8 @@ class EDITENG_DLLPUBLIC SvxTextRotateItem : public SfxUInt16Item { public: - SvxTextRotateItem(Degree10 nValue, TypedWhichId<SvxTextRotateItem> nId, SfxItemType eItemType = SfxItemType::SvxTextRotateItemType); + DECLARE_ITEM_TYPE_FUNCTION(SvxTextRotateItem) + SvxTextRotateItem(Degree10 nValue, TypedWhichId<SvxTextRotateItem> nId); virtual SvxTextRotateItem* Clone(SfxItemPool *pPool = nullptr) const override; @@ -78,7 +79,7 @@ class EDITENG_DLLPUBLIC SvxCharRotateItem final : public SvxTextRotateItem bool bFitToLine; public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxCharRotateItem) SvxCharRotateItem( Degree10 nValue /*= 0*/, bool bFitIntoLine /*= false*/, TypedWhichId<SvxCharRotateItem> nId ); diff --git a/include/editeng/charscaleitem.hxx b/include/editeng/charscaleitem.hxx index 7e5025fb37f7..5e7d8255d51d 100644 --- a/include/editeng/charscaleitem.hxx +++ b/include/editeng/charscaleitem.hxx @@ -36,7 +36,7 @@ class EDITENG_DLLPUBLIC SvxCharScaleWidthItem final : public SfxUInt16Item { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxCharScaleWidthItem) SvxCharScaleWidthItem( sal_uInt16 nValue /*= 100*/, TypedWhichId<SvxCharScaleWidthItem> nId ); diff --git a/include/editeng/cmapitem.hxx b/include/editeng/cmapitem.hxx index d0b4bff258bf..f109558c6608 100644 --- a/include/editeng/cmapitem.hxx +++ b/include/editeng/cmapitem.hxx @@ -35,6 +35,7 @@ class EDITENG_DLLPUBLIC SvxCaseMapItem final : public SfxEnumItem<SvxCaseMap> public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxCaseMapItem) SvxCaseMapItem( const SvxCaseMap eMap /*= SvxCaseMap::NotMapped*/, const sal_uInt16 nId ); diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx index 1acb863f6a86..57188716ce99 100644 --- a/include/editeng/colritem.hxx +++ b/include/editeng/colritem.hxx @@ -37,6 +37,7 @@ private: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxColorItem) explicit SvxColorItem(const sal_uInt16 nId); SvxColorItem(const Color& aColor, const sal_uInt16 nId); SvxColorItem(const Color& aColor, model::ComplexColor const& rComplexColor, const sal_uInt16 nId); diff --git a/include/editeng/contouritem.hxx b/include/editeng/contouritem.hxx index 9c67384fc8d2..7dcb49a65656 100644 --- a/include/editeng/contouritem.hxx +++ b/include/editeng/contouritem.hxx @@ -32,7 +32,7 @@ class EDITENG_DLLPUBLIC SvxContourItem final : public SfxBoolItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxContourItem) SvxContourItem( const bool bContoured /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/crossedoutitem.hxx b/include/editeng/crossedoutitem.hxx index 259eb412e1e1..2e85f39c0020 100644 --- a/include/editeng/crossedoutitem.hxx +++ b/include/editeng/crossedoutitem.hxx @@ -37,6 +37,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxCrossedOutItem) SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/, const sal_uInt16 nId ); diff --git a/include/editeng/emphasismarkitem.hxx b/include/editeng/emphasismarkitem.hxx index 94d48e4b8d9c..77b0f70b4330 100644 --- a/include/editeng/emphasismarkitem.hxx +++ b/include/editeng/emphasismarkitem.hxx @@ -37,7 +37,7 @@ protected: public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxEmphasisMarkItem) SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= FontEmphasisMark::NONE*/, TypedWhichId<SvxEmphasisMarkItem> nId ); diff --git a/include/editeng/escapementitem.hxx b/include/editeng/escapementitem.hxx index d889d7bc309e..94db1972673c 100644 --- a/include/editeng/escapementitem.hxx +++ b/include/editeng/escapementitem.hxx @@ -44,6 +44,7 @@ class EDITENG_DLLPUBLIC SvxEscapementItem final : public SfxEnumItemInterface public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxEscapementItem) explicit SvxEscapementItem( const sal_uInt16 nId ); SvxEscapementItem( const SvxEscapement eEscape, const sal_uInt16 nId ); diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx index c8643a8095d7..a2db8e82bf71 100644 --- a/include/editeng/fhgtitem.hxx +++ b/include/editeng/fhgtitem.hxx @@ -50,6 +50,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxFontHeightItem) SvxFontHeightItem( const sal_uInt32 nSz /*= 240*/, const sal_uInt16 nPropHeight /*= 100*/, const sal_uInt16 nId ); diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx index 7dec33e9e891..a20692982752 100644 --- a/include/editeng/flditem.hxx +++ b/include/editeng/flditem.hxx @@ -70,6 +70,7 @@ class EDITENG_DLLPUBLIC SvxFieldItem final : public SfxPoolItem { std::unique_ptr<SvxFieldData> mpField; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxFieldItem) SvxFieldItem( std::unique_ptr<SvxFieldData> pField, const sal_uInt16 nId ); SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ); SvxFieldItem( const SvxFieldItem& rItem ); diff --git a/include/editeng/flstitem.hxx b/include/editeng/flstitem.hxx index 71756464e5b0..46cccdc44e57 100644 --- a/include/editeng/flstitem.hxx +++ b/include/editeng/flstitem.hxx @@ -42,6 +42,7 @@ private: css::uno::Sequence< OUString > aFontNameSeq; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxFontListItem) SvxFontListItem( const FontList* pFontLst, const sal_uInt16 nId ); diff --git a/include/editeng/fontitem.hxx b/include/editeng/fontitem.hxx index c00208fee9bf..1f93e88e5fde 100644 --- a/include/editeng/fontitem.hxx +++ b/include/editeng/fontitem.hxx @@ -40,6 +40,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxFontItem) explicit SvxFontItem(const sal_uInt16 nId); SvxFontItem(const FontFamily eFam, OUString aFamilyName, OUString aStyleName, diff --git a/include/editeng/forbiddenruleitem.hxx b/include/editeng/forbiddenruleitem.hxx index 93e46b433b29..df5f9dd33503 100644 --- a/include/editeng/forbiddenruleitem.hxx +++ b/include/editeng/forbiddenruleitem.hxx @@ -32,6 +32,7 @@ class EDITENG_DLLPUBLIC SvxForbiddenRuleItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxForbiddenRuleItem) SvxForbiddenRuleItem( bool bOn /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/formatbreakitem.hxx b/include/editeng/formatbreakitem.hxx index 7e9b0b27661e..2e696cae795f 100644 --- a/include/editeng/formatbreakitem.hxx +++ b/include/editeng/formatbreakitem.hxx @@ -38,6 +38,7 @@ class EDITENG_DLLPUBLIC SvxFormatBreakItem final : public SfxEnumItem<SvxBreak> public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxFormatBreakItem) inline SvxFormatBreakItem( const SvxBreak eBrk /*= SvxBreak::NONE*/, const sal_uInt16 nWhich ); SvxFormatBreakItem(SvxFormatBreakItem const &) = default; // SfxPoolItem copy function dichotomy @@ -62,7 +63,7 @@ public: inline SvxFormatBreakItem::SvxFormatBreakItem( const SvxBreak eBreak, const sal_uInt16 _nWhich ) : - SfxEnumItem( _nWhich, SfxItemType::SvxFormatBreakItemType, eBreak ) + SfxEnumItem( _nWhich, eBreak ) {} diff --git a/include/editeng/frmdiritem.hxx b/include/editeng/frmdiritem.hxx index e2bba96b8974..6a7d2623628c 100644 --- a/include/editeng/frmdiritem.hxx +++ b/include/editeng/frmdiritem.hxx @@ -34,6 +34,7 @@ protected: virtual ItemInstanceManager* getItemInstanceManager() const override; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxFrameDirectionItem) SvxFrameDirectionItem( SvxFrameDirection nValue, sal_uInt16 nWhich ); virtual ~SvxFrameDirectionItem() override; diff --git a/include/editeng/hngpnctitem.hxx b/include/editeng/hngpnctitem.hxx index c59d4db0cf0d..159a3f2c251a 100644 --- a/include/editeng/hngpnctitem.hxx +++ b/include/editeng/hngpnctitem.hxx @@ -32,6 +32,7 @@ class EDITENG_DLLPUBLIC SvxHangingPunctuationItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxHangingPunctuationItem) SvxHangingPunctuationItem( bool bOn /*= false*/, const sal_uInt16 nId ); virtual SvxHangingPunctuationItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/include/editeng/hyphenzoneitem.hxx b/include/editeng/hyphenzoneitem.hxx index d7aa7ea61862..5e68ca9281ae 100644 --- a/include/editeng/hyphenzoneitem.hxx +++ b/include/editeng/hyphenzoneitem.hxx @@ -47,6 +47,7 @@ class EDITENG_DLLPUBLIC SvxHyphenZoneItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxHyphenZoneItem) SvxHyphenZoneItem( const bool bHyph /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/justifyitem.hxx b/include/editeng/justifyitem.hxx index 616427f466f9..82e02932a035 100644 --- a/include/editeng/justifyitem.hxx +++ b/include/editeng/justifyitem.hxx @@ -30,6 +30,7 @@ class EDITENG_DLLPUBLIC SvxHorJustifyItem final : public SfxEnumItem<SvxCellHorJ public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxHorJustifyItem) explicit SvxHorJustifyItem( const sal_uInt16 nId ); SvxHorJustifyItem( @@ -57,6 +58,7 @@ class EDITENG_DLLPUBLIC SvxVerJustifyItem final : public SfxEnumItem<SvxCellVerJ public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxVerJustifyItem) explicit SvxVerJustifyItem( const sal_uInt16 nId ); SvxVerJustifyItem( @@ -82,6 +84,7 @@ public: class EDITENG_DLLPUBLIC SvxJustifyMethodItem final : public SfxEnumItem<SvxCellJustifyMethod> { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxJustifyMethodItem) SvxJustifyMethodItem( const SvxCellJustifyMethod eMethod, const sal_uInt16 nId ); diff --git a/include/editeng/keepitem.hxx b/include/editeng/keepitem.hxx index c108560ce3aa..f3633687fd8b 100644 --- a/include/editeng/keepitem.hxx +++ b/include/editeng/keepitem.hxx @@ -34,7 +34,7 @@ class EDITENG_DLLPUBLIC SvxFormatKeepItem final : public SfxBoolItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxFormatKeepItem) inline SvxFormatKeepItem( const bool bKeep /*= false*/, const sal_uInt16 _nWhich ); SvxFormatKeepItem(SvxFormatKeepItem const &) = default; // SfxPoolItem copy function dichotomy diff --git a/include/editeng/kernitem.hxx b/include/editeng/kernitem.hxx index 23a8c1909546..8e66d0e1c462 100644 --- a/include/editeng/kernitem.hxx +++ b/include/editeng/kernitem.hxx @@ -36,7 +36,7 @@ class EDITENG_DLLPUBLIC SvxKerningItem final : public SfxInt16Item { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxKerningItem) SvxKerningItem( const short nKern /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem diff --git a/include/editeng/langitem.hxx b/include/editeng/langitem.hxx index 4ebef0837a6c..524a3c9af392 100644 --- a/include/editeng/langitem.hxx +++ b/include/editeng/langitem.hxx @@ -33,8 +33,9 @@ // MSVC hack: class SAL_DLLPUBLIC_RTTI SvxLanguageItem_Base: public SfxEnumItem<LanguageType> { protected: - explicit SvxLanguageItem_Base(sal_uInt16 nWhich, SfxItemType eItemType, LanguageType nValue): - SfxEnumItem(nWhich, eItemType, nValue) + DECLARE_ITEM_TYPE_FUNCTION(SvxLanguageItem_Base) + explicit SvxLanguageItem_Base(sal_uInt16 nWhich, LanguageType nValue): + SfxEnumItem(nWhich, nValue) {} }; @@ -45,7 +46,7 @@ protected: public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxLanguageItem) SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/, const sal_uInt16 nId ); diff --git a/include/editeng/lineitem.hxx b/include/editeng/lineitem.hxx index 0e481767a730..f8d21d65e66c 100644 --- a/include/editeng/lineitem.hxx +++ b/include/editeng/lineitem.hxx @@ -41,6 +41,7 @@ class EDITENG_DLLPUBLIC SvxLineItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxLineItem) explicit SvxLineItem( const sal_uInt16 nId ); SvxLineItem( const SvxLineItem& rCpy ); virtual ~SvxLineItem() override; diff --git a/include/editeng/lrspitem.hxx b/include/editeng/lrspitem.hxx index f5b4d1054056..726fffc2301e 100644 --- a/include/editeng/lrspitem.hxx +++ b/include/editeng/lrspitem.hxx @@ -108,6 +108,7 @@ public: sal_uInt16 GetPropLeft() const { return m_nPropLeftMargin; } + DECLARE_ITEM_TYPE_FUNCTION(SvxLeftMarginItem) explicit SvxLeftMarginItem(const sal_uInt16 nId); SvxLeftMarginItem(const tools::Long nLeft, const sal_uInt16 nId); SvxLeftMarginItem(SvxLeftMarginItem const &) = default; // SfxPoolItem copy function dichotomy @@ -153,6 +154,7 @@ public: sal_Int32 ResolveTextLeft(const SvxFontUnitMetrics& rMetrics) const; SvxIndentValue GetTextLeft() const; + DECLARE_ITEM_TYPE_FUNCTION(SvxTextLeftMarginItem) explicit SvxTextLeftMarginItem(const sal_uInt16 nId); SvxTextLeftMarginItem(SvxIndentValue stLeft, const sal_uInt16 nId); SvxTextLeftMarginItem(SvxTextLeftMarginItem const &) = default; // SfxPoolItem copy function dichotomy @@ -199,6 +201,7 @@ public: SvxIndentValue GetTextFirstLineOffset() const; sal_Int32 ResolveTextFirstLineOffset(const SvxFontUnitMetrics& rMetrics) const; + DECLARE_ITEM_TYPE_FUNCTION(SvxFirstLineIndentItem) explicit SvxFirstLineIndentItem(const sal_uInt16 nId); SvxFirstLineIndentItem(SvxIndentValue stValue, const sal_uInt16 nId); SvxFirstLineIndentItem(SvxFirstLineIndentItem const &) = default; // SfxPoolItem copy function dichotomy @@ -243,6 +246,7 @@ public: sal_uInt16 GetPropRight() const; + DECLARE_ITEM_TYPE_FUNCTION(SvxRightMarginItem) explicit SvxRightMarginItem(const sal_uInt16 nId); SvxRightMarginItem(SvxIndentValue stRight, const sal_uInt16 nId); SvxRightMarginItem(SvxRightMarginItem const &) = default; // SfxPoolItem copy function dichotomy @@ -279,6 +283,7 @@ public: void SetGutterMargin(const tools::Long nGutterMargin) { m_nGutterMargin = nGutterMargin; } tools::Long GetGutterMargin() const { return m_nGutterMargin; } + DECLARE_ITEM_TYPE_FUNCTION(SvxGutterLeftMarginItem) explicit SvxGutterLeftMarginItem(const sal_uInt16 nId); SvxGutterLeftMarginItem(SvxGutterLeftMarginItem const &) = default; // SfxPoolItem copy function dichotomy @@ -311,6 +316,7 @@ private: public: tools::Long GetRightGutterMargin() const { return m_nRightGutterMargin; } + DECLARE_ITEM_TYPE_FUNCTION(SvxGutterRightMarginItem) explicit SvxGutterRightMarginItem(const sal_uInt16 nId); SvxGutterRightMarginItem(SvxGutterRightMarginItem const &) = default; // SfxPoolItem copy function dichotomy @@ -354,6 +360,7 @@ public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxLRSpaceItem) explicit SvxLRSpaceItem( const sal_uInt16 nId ); SvxLRSpaceItem(SvxIndentValue stLeft, SvxIndentValue stRight, SvxIndentValue stValue, const sal_uInt16 nId); diff --git a/include/editeng/lspcitem.hxx b/include/editeng/lspcitem.hxx index 1bc4e769cff1..d34db2eaae3a 100644 --- a/include/editeng/lspcitem.hxx +++ b/include/editeng/lspcitem.hxx @@ -47,6 +47,7 @@ public: // writer? => Rather have a crooked vales as the default, but the // programmer sees that there's something special happening. + DECLARE_ITEM_TYPE_FUNCTION(SvxLineSpacingItem) SvxLineSpacingItem( sal_uInt16 nLineHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem diff --git a/include/editeng/nhypitem.hxx b/include/editeng/nhypitem.hxx index b0bd0192cb92..537051b90a7c 100644 --- a/include/editeng/nhypitem.hxx +++ b/include/editeng/nhypitem.hxx @@ -26,6 +26,7 @@ class EDITENG_DLLPUBLIC SvxNoHyphenItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxNoHyphenItem) SvxNoHyphenItem( const bool bNoHyphen, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index c6067c53cb40..9226e1a3b867 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -317,6 +317,7 @@ class EDITENG_DLLPUBLIC SvxNumBulletItem final : public SfxPoolItem { SvxNumRule maNumRule; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxNumBulletItem) explicit SvxNumBulletItem(SvxNumRule const & rRule); explicit SvxNumBulletItem(SvxNumRule && rRule); SvxNumBulletItem(SvxNumRule const & rRule, sal_uInt16 nWhich ); diff --git a/include/editeng/opaqitem.hxx b/include/editeng/opaqitem.hxx index 112a62e6aaef..b37290fffdb8 100644 --- a/include/editeng/opaqitem.hxx +++ b/include/editeng/opaqitem.hxx @@ -33,6 +33,7 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxOpaqueItem) explicit SvxOpaqueItem( const sal_uInt16 nId , const bool bOpa = true ); // "pure virtual Methods" from SfxPoolItem @@ -45,7 +46,7 @@ public: }; inline SvxOpaqueItem::SvxOpaqueItem( const sal_uInt16 nId, const bool bOpa ) - : SfxBoolItem( nId, bOpa, SfxItemType::SvxOpaqueItemType ) + : SfxBoolItem( nId, bOpa ) {} #endif diff --git a/include/editeng/optitems.hxx b/include/editeng/optitems.hxx index f4cbd2df81ab..3967edc2a515 100644 --- a/include/editeng/optitems.hxx +++ b/include/editeng/optitems.hxx @@ -31,7 +31,7 @@ class EDITENG_DLLPUBLIC SfxHyphenRegionItem final : public SfxPoolItem sal_uInt8 nMinTrail; public: - + DECLARE_ITEM_TYPE_FUNCTION(SfxHyphenRegionItem) SfxHyphenRegionItem( const sal_uInt16 nId ); virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/include/editeng/orphitem.hxx b/include/editeng/orphitem.hxx index 251dc5150dc0..75a2ea50fbc6 100644 --- a/include/editeng/orphitem.hxx +++ b/include/editeng/orphitem.hxx @@ -30,7 +30,7 @@ class EDITENG_DLLPUBLIC SvxOrphansItem final : public SfxByteItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxOrphansItem) SvxOrphansItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem diff --git a/include/editeng/paravertalignitem.hxx b/include/editeng/paravertalignitem.hxx index c58274b8fe16..d20e3a154a18 100644 --- a/include/editeng/paravertalignitem.hxx +++ b/include/editeng/paravertalignitem.hxx @@ -36,7 +36,7 @@ class EDITENG_DLLPUBLIC SvxParaVertAlignItem final : public SfxUInt16Item public: enum class Align { Automatic, Baseline, Top, Center, Bottom }; static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxParaVertAlignItem) SvxParaVertAlignItem( Align nValue /*= 0*/, TypedWhichId<SvxParaVertAlignItem> nId ); virtual SvxParaVertAlignItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/include/editeng/pbinitem.hxx b/include/editeng/pbinitem.hxx index a4fadccb7ef3..b8ae2a1ee760 100644 --- a/include/editeng/pbinitem.hxx +++ b/include/editeng/pbinitem.hxx @@ -37,7 +37,7 @@ class EDITENG_DLLPUBLIC SvxPaperBinItem final : public SfxByteItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxPaperBinItem) explicit inline SvxPaperBinItem( const sal_uInt16 nId , const sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS ); @@ -50,7 +50,7 @@ public: }; inline SvxPaperBinItem::SvxPaperBinItem( const sal_uInt16 nId, const sal_uInt8 nT ) - : SfxByteItem( nId, nT, SfxItemType::SvxPaperBinItemType ) + : SfxByteItem( nId, nT ) {} #endif diff --git a/include/editeng/pgrditem.hxx b/include/editeng/pgrditem.hxx index ef8c24e66290..d3a21ee55064 100644 --- a/include/editeng/pgrditem.hxx +++ b/include/editeng/pgrditem.hxx @@ -33,6 +33,7 @@ class EDITENG_DLLPUBLIC SvxParaGridItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxParaGridItem) SvxParaGridItem( const bool bSnapToGrid /*= true*/, const sal_uInt16 nId ); diff --git a/include/editeng/pmdlitem.hxx b/include/editeng/pmdlitem.hxx index 45ca6ac6f4d3..26e3044e6d9c 100644 --- a/include/editeng/pmdlitem.hxx +++ b/include/editeng/pmdlitem.hxx @@ -36,7 +36,7 @@ private: public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxPageModelItem) explicit inline SvxPageModelItem( TypedWhichId<SvxPageModelItem> nWh ); inline SvxPageModelItem( const OUString& rModel, bool bA /*= false*/, TypedWhichId<SvxPageModelItem> nWh ); diff --git a/include/editeng/postitem.hxx b/include/editeng/postitem.hxx index 392a9627feb6..20800f656b8c 100644 --- a/include/editeng/postitem.hxx +++ b/include/editeng/postitem.hxx @@ -38,6 +38,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxPostureItem) SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/, const sal_uInt16 nId ); diff --git a/include/editeng/prntitem.hxx b/include/editeng/prntitem.hxx index 34f490b46084..68953f7fca27 100644 --- a/include/editeng/prntitem.hxx +++ b/include/editeng/prntitem.hxx @@ -35,6 +35,7 @@ class EDITENG_DLLPUBLIC SvxPrintItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxPrintItem) explicit SvxPrintItem( const sal_uInt16 nId , const bool bPrt = true ); // "pure virtual Methods" from SfxPoolItem @@ -47,7 +48,7 @@ public: }; inline SvxPrintItem::SvxPrintItem( const sal_uInt16 nId, const bool bPrt ) - : SfxBoolItem( nId, bPrt, SfxItemType::SvxPrintItemType ) + : SfxBoolItem( nId, bPrt ) {} #endif diff --git a/include/editeng/protitem.hxx b/include/editeng/protitem.hxx index 0c3b473700d1..3a51db7e9b7c 100644 --- a/include/editeng/protitem.hxx +++ b/include/editeng/protitem.hxx @@ -39,6 +39,7 @@ class EDITENG_DLLPUBLIC SvxProtectItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxProtectItem) explicit inline SvxProtectItem( const sal_uInt16 nId ); SvxProtectItem(SvxProtectItem const &) = default; // SfxPoolItem copy function dichotomy @@ -66,7 +67,7 @@ public: }; inline SvxProtectItem::SvxProtectItem( const sal_uInt16 nId ) - : SfxPoolItem( nId, SfxItemType::SvxProtectItemType ) + : SfxPoolItem( nId ) { bCntnt = bSize = bPos = false; } diff --git a/include/editeng/rsiditem.hxx b/include/editeng/rsiditem.hxx index 9e9cf18767ee..41fe62283321 100644 --- a/include/editeng/rsiditem.hxx +++ b/include/editeng/rsiditem.hxx @@ -19,7 +19,8 @@ class EDITENG_DLLPUBLIC SvxRsidItem final : public SfxUInt32Item { public: - SvxRsidItem( sal_uInt32 nRsid, sal_uInt16 nId ) : SfxUInt32Item( nId, nRsid, SfxItemType::SvxRsidItemType ) {} + DECLARE_ITEM_TYPE_FUNCTION(SvxRsidItem) + SvxRsidItem( sal_uInt32 nRsid, sal_uInt16 nId ) : SfxUInt32Item( nId, nRsid ) {} virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, diff --git a/include/editeng/scriptspaceitem.hxx b/include/editeng/scriptspaceitem.hxx index 9a4cac3de2b5..6f6e9a8d3827 100644 --- a/include/editeng/scriptspaceitem.hxx +++ b/include/editeng/scriptspaceitem.hxx @@ -33,6 +33,7 @@ class EDITENG_DLLPUBLIC SvxScriptSpaceItem final : public SfxBoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxScriptSpaceItem) SvxScriptSpaceItem( bool bOn /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/scripttypeitem.hxx b/include/editeng/scripttypeitem.hxx index bfe84f5f6a9a..f5ebe264d5ca 100644 --- a/include/editeng/scripttypeitem.hxx +++ b/include/editeng/scripttypeitem.hxx @@ -26,6 +26,7 @@ class EDITENG_DLLPUBLIC SvxScriptSetItem final : public SfxSetItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxScriptSetItem) SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ); virtual SvxScriptSetItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/include/editeng/shaditem.hxx b/include/editeng/shaditem.hxx index 549c2f5fc2ec..a247cffe386d 100644 --- a/include/editeng/shaditem.hxx +++ b/include/editeng/shaditem.hxx @@ -43,6 +43,7 @@ class EDITENG_DLLPUBLIC SvxShadowItem final : public SfxEnumItemInterface public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxShadowItem) explicit SvxShadowItem( const sal_uInt16 nId , const Color *pColor = nullptr, const sal_uInt16 nWidth = 100 /*5pt*/, const SvxShadowLocation eLoc = SvxShadowLocation::NONE ); diff --git a/include/editeng/shdditem.hxx b/include/editeng/shdditem.hxx index dbe30a672265..0cc0ade42eb9 100644 --- a/include/editeng/shdditem.hxx +++ b/include/editeng/shdditem.hxx @@ -33,7 +33,7 @@ class EDITENG_DLLPUBLIC SvxShadowedItem final : public SfxBoolItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxShadowedItem) SvxShadowedItem( const bool bShadowed /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/sizeitem.hxx b/include/editeng/sizeitem.hxx index 172099985fac..9438acc5af58 100644 --- a/include/editeng/sizeitem.hxx +++ b/include/editeng/sizeitem.hxx @@ -38,8 +38,9 @@ class EDITENG_DLLPUBLIC SvxSizeItem : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxSizeItem) explicit SvxSizeItem( const sal_uInt16 nId ); - SvxSizeItem( const sal_uInt16 nId, const Size& rSize, SfxItemType eItemType = SfxItemType::SvxSizeItemType); + SvxSizeItem( const sal_uInt16 nId, const Size& rSize); // "pure virtual Methods" from SfxPoolItem virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/include/editeng/spltitem.hxx b/include/editeng/spltitem.hxx index 553e3263f7a5..4ada7aeb69f7 100644 --- a/include/editeng/spltitem.hxx +++ b/include/editeng/spltitem.hxx @@ -34,7 +34,7 @@ class EDITENG_DLLPUBLIC SvxFormatSplitItem final : public SfxBoolItem public: static SfxPoolItem* CreateDefault(); virtual ~SvxFormatSplitItem() override; - + DECLARE_ITEM_TYPE_FUNCTION(SvxFormatSplitItem) inline SvxFormatSplitItem( const bool bSplit /*= true*/, const sal_uInt16 nWh ); diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx index 840b294243f9..3c06537496e7 100644 --- a/include/editeng/tstpitem.hxx +++ b/include/editeng/tstpitem.hxx @@ -97,6 +97,7 @@ class EDITENG_DLLPUBLIC SvxTabStopItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxTabStopItem) explicit SvxTabStopItem( sal_uInt16 nWhich ); SvxTabStopItem( const sal_uInt16 nTabs, const sal_uInt16 nDist, diff --git a/include/editeng/twolinesitem.hxx b/include/editeng/twolinesitem.hxx index d39a3ac6035d..8ea442b71bac 100644 --- a/include/editeng/twolinesitem.hxx +++ b/include/editeng/twolinesitem.hxx @@ -28,6 +28,7 @@ class EDITENG_DLLPUBLIC SvxTwoLinesItem final : public SfxPoolItem sal_Unicode cStartBracket, cEndBracket; bool bOn; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxTwoLinesItem) SvxTwoLinesItem( bool bOn /*= true*/, sal_Unicode nStartBracket /*= 0*/, sal_Unicode nEndBracket /*= 0*/, diff --git a/include/editeng/udlnitem.hxx b/include/editeng/udlnitem.hxx index ec0f35d54ae6..703e4e0e39ac 100644 --- a/include/editeng/udlnitem.hxx +++ b/include/editeng/udlnitem.hxx @@ -34,9 +34,9 @@ class EDITENG_DLLPUBLIC SvxTextLineItem : public SfxEnumItem<FontLineStyle> model::ComplexColor maComplexColor; public: + DECLARE_ITEM_TYPE_FUNCTION(SvxTextLineItem) SvxTextLineItem( const FontLineStyle eSt, - const sal_uInt16 nId, - SfxItemType eItemType = SfxItemType::SvxTextLineItemType); + const sal_uInt16 nId); // "pure virtual Methods" from SfxPoolItem virtual bool GetPresentation( SfxItemPresentation ePres, @@ -94,6 +94,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxUnderlineItem) SvxUnderlineItem( const FontLineStyle eSt, const sal_uInt16 nId ); @@ -113,6 +114,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxOverlineItem) SvxOverlineItem( const FontLineStyle eSt, const sal_uInt16 nId ); diff --git a/include/editeng/ulspitem.hxx b/include/editeng/ulspitem.hxx index 2658033614a4..ef427ac78f0c 100644 --- a/include/editeng/ulspitem.hxx +++ b/include/editeng/ulspitem.hxx @@ -39,6 +39,7 @@ class EDITENG_DLLPUBLIC SvxULSpaceItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxULSpaceItem) explicit SvxULSpaceItem( const sal_uInt16 nId ); SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, const sal_uInt16 nId ); diff --git a/include/editeng/wghtitem.hxx b/include/editeng/wghtitem.hxx index f8beb7c7a62f..87528d048422 100644 --- a/include/editeng/wghtitem.hxx +++ b/include/editeng/wghtitem.hxx @@ -38,6 +38,7 @@ protected: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SvxWeightItem) SvxWeightItem( const FontWeight eWght /*= WEIGHT_NORMAL*/, const sal_uInt16 nId ); diff --git a/include/editeng/widwitem.hxx b/include/editeng/widwitem.hxx index 0bb6138fd082..f048697bdbf6 100644 --- a/include/editeng/widwitem.hxx +++ b/include/editeng/widwitem.hxx @@ -30,7 +30,7 @@ class EDITENG_DLLPUBLIC SvxWidowsItem final : public SfxByteItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxWidowsItem) SvxWidowsItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem diff --git a/include/editeng/writingmodeitem.hxx b/include/editeng/writingmodeitem.hxx index d01be0e41495..df3996587492 100644 --- a/include/editeng/writingmodeitem.hxx +++ b/include/editeng/writingmodeitem.hxx @@ -28,6 +28,7 @@ class EDITENG_DLLPUBLIC SvxWritingModeItem final : public SfxUInt16Item { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxWritingModeItem) SvxWritingModeItem( css::text::WritingMode eValue /*= css::text::WritingMode_LR_TB*/, TypedWhichId<SvxWritingModeItem> nWhich /*= SDRATTR_TEXTDIRECTION*/ ); virtual ~SvxWritingModeItem() override; diff --git a/include/editeng/wrlmitem.hxx b/include/editeng/wrlmitem.hxx index 6226d3262e07..d809e59bc894 100644 --- a/include/editeng/wrlmitem.hxx +++ b/include/editeng/wrlmitem.hxx @@ -34,7 +34,7 @@ class EDITENG_DLLPUBLIC SvxWordLineModeItem final : public SfxBoolItem { public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxWordLineModeItem) SvxWordLineModeItem( const bool bWordLineMode /*= false*/, const sal_uInt16 nId ); diff --git a/include/editeng/xmlcnitm.hxx b/include/editeng/xmlcnitm.hxx index a0ee0a63fb55..288bdc81ad21 100644 --- a/include/editeng/xmlcnitm.hxx +++ b/include/editeng/xmlcnitm.hxx @@ -30,7 +30,7 @@ class EDITENG_DLLPUBLIC SvXMLAttrContainerItem final : public SfxPoolItem SvXMLAttrContainerData maContainerData; public: - + DECLARE_ITEM_TYPE_FUNCTION(SvXMLAttrContainerItem) SvXMLAttrContainerItem( sal_uInt16 nWhich = 0 ); SvXMLAttrContainerItem( const SvXMLAttrContainerItem& ); virtual ~SvXMLAttrContainerItem() override; diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index d8c1ca989496..01de050679dc 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -83,8 +83,9 @@ class SFX2_DLLPUBLIC SfxLinkItem final : public SfxPoolItem void operator =(SfxLinkItem const &) = delete; public: + DECLARE_ITEM_TYPE_FUNCTION(SfxLinkItem) SfxLinkItem( sal_uInt16 nWhichId, const Link<SfxPoolItem const *, void>& rValue ) - : SfxPoolItem( nWhichId, SfxItemType::SfxLinkItemType ) + : SfxPoolItem( nWhichId ) { aLink = rValue; } virtual ~SfxLinkItem() override; diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 5c0641e8ca79..17ec9d15dc39 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -91,6 +91,7 @@ private: public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxDocumentInfoItem) SfxDocumentInfoItem(); SfxDocumentInfoItem( const OUString &rFileName, const css::uno::Reference< css::document::XDocumentProperties> & i_xDocProps, diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx index 81d0ee391445..da7d2c52be8e 100644 --- a/include/sfx2/evntconf.hxx +++ b/include/sfx2/evntconf.hxx @@ -69,9 +69,9 @@ class SFX2_DLLPUBLIC SfxEventNamesItem final : public SfxPoolItem SfxEventNamesList aEventsList; public: - + DECLARE_ITEM_TYPE_FUNCTION(SfxEventNamesItem) SfxEventNamesItem ( const sal_uInt16 nId ) - : SfxPoolItem( nId, SfxItemType::SfxEventNamesItemType ) {} + : SfxPoolItem( nId ) {} virtual bool operator==( const SfxPoolItem& ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx index b2b7159e9256..f78f51509d4f 100644 --- a/include/sfx2/frame.hxx +++ b/include/sfx2/frame.hxx @@ -152,7 +152,7 @@ class SFX2_DLLPUBLIC SfxFrameItem final : public SfxPoolItem SfxFrameWeakRef wFrame; public: - + DECLARE_ITEM_TYPE_FUNCTION(SfxFrameItem) SfxFrameItem( sal_uInt16 nWhich, SfxViewFrame const *p ); SfxFrameItem( sal_uInt16 nWhich, SfxFrame *p ); @@ -170,6 +170,7 @@ class SFX2_DLLPUBLIC SfxUnoAnyItem final : public SfxPoolItem css::uno::Any aValue; public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxUnoAnyItem) SfxUnoAnyItem( sal_uInt16 nWhich, const css::uno::Any& rAny ); const css::uno::Any& GetValue() const { return aValue; } @@ -186,6 +187,7 @@ class SFX2_DLLPUBLIC SfxUnoFrameItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxUnoFrameItem) SfxUnoFrameItem(); SfxUnoFrameItem( sal_uInt16 nWhich, css::uno::Reference< css::frame::XFrame > i_xFrame ); const css::uno::Reference< css::frame::XFrame >& diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx index 1b6ff400c6bf..955304107360 100644 --- a/include/sfx2/minfitem.hxx +++ b/include/sfx2/minfitem.hxx @@ -40,6 +40,7 @@ class SFX2_DLLPUBLIC SfxMacroInfoItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxMacroInfoItem) SfxMacroInfoItem( sal_uInt16 nWhich, const BasicManager* pMgr, OUString aLibName, diff --git a/include/sfx2/objitem.hxx b/include/sfx2/objitem.hxx index 17b7f0cf1de2..6b04fcc4e96c 100644 --- a/include/sfx2/objitem.hxx +++ b/include/sfx2/objitem.hxx @@ -31,6 +31,7 @@ class SFX2_DLLPUBLIC SfxObjectItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxObjectItem) SfxObjectItem( sal_uInt16 nWhich=0, SfxShell *pSh=nullptr ); virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 3238e40d85a9..bac056f0a5d1 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -943,13 +943,14 @@ class SFX2_DLLPUBLIC SfxObjectShellItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxObjectShellItem) SfxObjectShellItem() : - SfxPoolItem( 0, SfxItemType::SfxObjectShellItemType ), + SfxPoolItem( 0 ), pObjSh( nullptr ) {} SfxObjectShellItem( sal_uInt16 nWhichId, SfxObjectShell *pObjShell ): - SfxPoolItem( nWhichId, SfxItemType::SfxObjectShellItemType ), + SfxPoolItem( nWhichId ), pObjSh( pObjShell ) {} diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 6559416094a5..17d0dd035f78 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -49,6 +49,7 @@ namespace com::sun::star::frame { class XFrame; } class SFX2_DLLPUBLIC SfxTabDialogItem final : public SfxSetItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SfxTabDialogItem) SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet ); SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool); virtual SfxTabDialogItem* Clone(SfxItemPool* pToPool = nullptr) const override; diff --git a/include/sfx2/tplpitem.hxx b/include/sfx2/tplpitem.hxx index d61981b44de8..3206f929197c 100644 --- a/include/sfx2/tplpitem.hxx +++ b/include/sfx2/tplpitem.hxx @@ -31,6 +31,7 @@ class SFX2_DLLPUBLIC SfxTemplateItem final : public SfxFlagItem OUString aStyleIdentifier; public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxTemplateItem) SfxTemplateItem(); SfxTemplateItem( sal_uInt16 nWhich, OUString aStyle, diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index de21273be0b3..7ef97412e8d6 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -267,8 +267,9 @@ class SFX2_DLLPUBLIC SfxViewFrameItem final : public SfxPoolItem SfxViewFrame* pFrame; public: + DECLARE_ITEM_TYPE_FUNCTION(SfxViewFrameItem) SfxViewFrameItem( SfxViewFrame *pViewFrame ): - SfxPoolItem( 0, SfxItemType::SfxViewFrameItemType ), + SfxPoolItem( 0 ), pFrame( pViewFrame) {} diff --git a/include/sfx2/watermarkitem.hxx b/include/sfx2/watermarkitem.hxx index c298894bb518..710158e58291 100644 --- a/include/sfx2/watermarkitem.hxx +++ b/include/sfx2/watermarkitem.hxx @@ -17,6 +17,7 @@ class SFX2_DLLPUBLIC SfxWatermarkItem final : public SfxPoolItem { public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxWatermarkItem) SfxWatermarkItem(); virtual SfxWatermarkItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/include/sfx2/zoomitem.hxx b/include/sfx2/zoomitem.hxx index fa1fd9b9d7e8..aa5d0aa750ba 100644 --- a/include/sfx2/zoomitem.hxx +++ b/include/sfx2/zoomitem.hxx @@ -59,7 +59,7 @@ class SFX2_DLLPUBLIC SvxZoomItem final : public SfxUInt16Item public: static SfxPoolItem* CreateDefault(); - + DECLARE_ITEM_TYPE_FUNCTION(SvxZoomItem) SvxZoomItem( SvxZoomType eZoomType = SvxZoomType::PERCENT, sal_uInt16 nVal = 0, TypedWhichId<SvxZoomItem> nWhich = SID_ATTR_ZOOM ); diff --git a/include/svl/cenumitm.hxx b/include/svl/cenumitm.hxx index 292648d0f572..d40d3768a3db 100644 --- a/include/svl/cenumitm.hxx +++ b/include/svl/cenumitm.hxx @@ -26,11 +26,12 @@ class SVL_DLLPUBLIC SfxEnumItemInterface: public SfxPoolItem { protected: - explicit SfxEnumItemInterface(sal_uInt16 which, SfxItemType eItemType): SfxPoolItem(which, eItemType) {} + explicit SfxEnumItemInterface(sal_uInt16 which): SfxPoolItem(which) {} SfxEnumItemInterface(const SfxEnumItemInterface &) = default; public: + DECLARE_ITEM_TYPE_FUNCTION(SfxEnumItemInterface) virtual bool operator ==(const SfxPoolItem & rItem) const override; diff --git a/include/svl/cintitem.hxx b/include/svl/cintitem.hxx index 17becbaba92c..57644cd9c4e1 100644 --- a/include/svl/cintitem.hxx +++ b/include/svl/cintitem.hxx @@ -29,9 +29,9 @@ class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem sal_uInt8 m_nValue; public: - - CntByteItem(sal_uInt16 which, sal_uInt8 nTheValue, SfxItemType eItemType = SfxItemType::CntByteItemType): - SfxPoolItem(which, eItemType), m_nValue(nTheValue) {} + DECLARE_ITEM_TYPE_FUNCTION(CntByteItem) + CntByteItem(sal_uInt16 which, sal_uInt8 nTheValue): + SfxPoolItem(which), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -62,9 +62,9 @@ class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem sal_uInt16 m_nValue; public: - - CntUInt16Item(sal_uInt16 which, sal_uInt16 nTheValue, SfxItemType eItemType = SfxItemType::CntUInt16ItemType): - SfxPoolItem(which, eItemType), m_nValue(nTheValue) + DECLARE_ITEM_TYPE_FUNCTION(CntUInt16Item) + CntUInt16Item(sal_uInt16 which, sal_uInt16 nTheValue): + SfxPoolItem(which), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -97,9 +97,9 @@ class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem sal_Int32 m_nValue; public: - - CntInt32Item(sal_uInt16 which, sal_Int32 nTheValue, SfxItemType eItemType = SfxItemType::CntInt32ItemType): - SfxPoolItem(which, eItemType), m_nValue(nTheValue) + DECLARE_ITEM_TYPE_FUNCTION(CntInt32Item) + CntInt32Item(sal_uInt16 which, sal_Int32 nTheValue): + SfxPoolItem(which), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -132,9 +132,9 @@ class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem sal_uInt32 m_nValue; public: - - CntUInt32Item(sal_uInt16 which, sal_uInt32 nTheValue, SfxItemType eItemType = SfxItemType::CntUInt32ItemType): - SfxPoolItem(which, eItemType), m_nValue(nTheValue) + DECLARE_ITEM_TYPE_FUNCTION(CntUInt32Item) + CntUInt32Item(sal_uInt16 which, sal_uInt32 nTheValue): + SfxPoolItem(which), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; diff --git a/include/svl/eitem.hxx b/include/svl/eitem.hxx index fd398e8f0cbb..518ebe51db62 100644 --- a/include/svl/eitem.hxx +++ b/include/svl/eitem.hxx @@ -30,8 +30,8 @@ class SAL_DLLPUBLIC_RTTI SfxEnumItem : public SfxEnumItemInterface EnumT m_nValue; protected: - explicit SfxEnumItem(sal_uInt16 const nWhich, SfxItemType eItemType, EnumT const nValue) - : SfxEnumItemInterface(nWhich, eItemType) + explicit SfxEnumItem(sal_uInt16 const nWhich, EnumT const nValue) + : SfxEnumItemInterface(nWhich) , m_nValue(nValue) { } @@ -84,10 +84,9 @@ protected: public: static SfxPoolItem* CreateDefault(); - - explicit SfxBoolItem(sal_uInt16 const nWhich = 0, bool const bValue = false, - SfxItemType eItemType = SfxItemType::SfxBoolItemType) - : SfxPoolItem(nWhich, eItemType) + DECLARE_ITEM_TYPE_FUNCTION(SfxBoolItem) + explicit SfxBoolItem(sal_uInt16 const nWhich = 0, bool const bValue = false) + : SfxPoolItem(nWhich) , m_bValue(bValue) { } diff --git a/include/svl/flagitem.hxx b/include/svl/flagitem.hxx index f269e65582a8..8a8f70b869b4 100644 --- a/include/svl/flagitem.hxx +++ b/include/svl/flagitem.hxx @@ -28,9 +28,8 @@ class SVL_DLLPUBLIC SfxFlagItem: public SfxPoolItem sal_uInt16 nVal; public: - - explicit SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0, - SfxItemType eItemType = SfxItemType::SfxFlagItemType ); + DECLARE_ITEM_TYPE_FUNCTION(SfxFlagItem) + explicit SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0 ); virtual sal_uInt8 GetFlagCount() const; diff --git a/include/svl/globalnameitem.hxx b/include/svl/globalnameitem.hxx index edbb56273232..198330020697 100644 --- a/include/svl/globalnameitem.hxx +++ b/include/svl/globalnameitem.hxx @@ -30,6 +30,7 @@ class SVL_DLLPUBLIC SfxGlobalNameItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxGlobalNameItem) SfxGlobalNameItem(); SfxGlobalNameItem( sal_uInt16 nWhich, const SvGlobalName& ); virtual ~SfxGlobalNameItem() override; diff --git a/include/svl/grabbagitem.hxx b/include/svl/grabbagitem.hxx index a50a5af9dc82..ea1dbef3f22d 100644 --- a/include/svl/grabbagitem.hxx +++ b/include/svl/grabbagitem.hxx @@ -22,6 +22,7 @@ private: std::map<OUString, css::uno::Any> m_aMap; public: + DECLARE_ITEM_TYPE_FUNCTION(SfxGrabBagItem) SfxGrabBagItem(); SfxGrabBagItem(sal_uInt16 nWhich); SfxGrabBagItem(sal_uInt16 nWhich, std::map<OUString, css::uno::Any> aMap); diff --git a/include/svl/ilstitem.hxx b/include/svl/ilstitem.hxx index bb49d18c9dbb..19fa21406c4d 100644 --- a/include/svl/ilstitem.hxx +++ b/include/svl/ilstitem.hxx @@ -32,6 +32,7 @@ class SVL_DLLPUBLIC SfxIntegerListItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxIntegerListItem) SfxIntegerListItem(); SfxIntegerListItem( sal_uInt16 nWhich, std::vector < sal_Int32 >&& rList ); SfxIntegerListItem( sal_uInt16 nWhich, const css::uno::Sequence < sal_Int32 >& rList ); diff --git a/include/svl/imageitm.hxx b/include/svl/imageitm.hxx index 4ef7e4d47f1e..321931bd9bf3 100644 --- a/include/svl/imageitm.hxx +++ b/include/svl/imageitm.hxx @@ -28,6 +28,7 @@ class SVL_DLLPUBLIC SfxImageItem final : public SfxInt16Item { public: static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(SfxImageItem) SfxImageItem( sal_uInt16 nWhich = 0 ); SfxImageItem( const SfxImageItem& ); virtual ~SfxImageItem() override; diff --git a/include/svl/int64item.hxx b/include/svl/int64item.hxx index 70a502c645a8..774d986f62b6 100644 --- a/include/svl/int64item.hxx +++ b/include/svl/int64item.hxx @@ -18,6 +18,7 @@ class SVL_DLLPUBLIC SfxInt64Item final : public SfxPoolItem sal_Int64 mnValue; public: + DECLARE_ITEM_TYPE_FUNCTION(SfxInt64Item) SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal ); virtual ~SfxInt64Item() override; diff --git a/include/svl/intitem.hxx b/include/svl/intitem.hxx index 1197ed5de085..d8452fef6c2f 100644 --- a/include/svl/intitem.hxx +++ b/include/svl/intitem.hxx @@ -29,10 +29,9 @@ class SVL_DLLPUBLIC SfxByteItem: public CntByteItem { public: static SfxPoolItem* CreateDefault(); - - explicit SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0, - SfxItemType eItemType = SfxItemType::SfxByteItemType): - CntByteItem(which, nValue, eItemType) {} + DECLARE_ITEM_TYPE_FUNCTION(SfxByteItem) + explicit SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0): + CntByteItem(which, nValue) {} virtual SfxByteItem* Clone(SfxItemPool * = nullptr) const override { return new SfxByteItem(*this); } @@ -44,10 +43,9 @@ class SVL_DLLPUBLIC SfxInt16Item: public SfxPoolItem public: static SfxPoolItem* CreateDefault(); - - explicit SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0, - SfxItemType eItemType = SfxItemType::SfxInt16ItemType): - SfxPoolItem(which, eItemType), m_nValue(nTheValue) + DECLARE_ITEM_TYPE_FUNCTION(SfxInt16Item) + explicit SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0): + SfxPoolItem(which), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -80,10 +78,9 @@ class SVL_DLLPUBLIC SfxUInt16Item: public CntUInt16Item { public: static SfxPoolItem* CreateDefault(); - - explicit SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0, - SfxItemType eItemType = SfxItemType::SfxUInt16ItemType): - CntUInt16Item(which, nValue, eItemType) {} + DECLARE_ITEM_TYPE_FUNCTION(SfxUInt16Item) + explicit SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0): + CntUInt16Item(which, nValue) {} virtual SfxUInt16Item* Clone(SfxItemPool * = nullptr) const override { return new SfxUInt16Item(*this); } @@ -98,9 +95,9 @@ class SVL_DLLPUBLIC SfxInt32Item: public CntInt32Item public: static SfxPoolItem* CreateDefault(); - explicit SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0, - SfxItemType eItemType = SfxItemType::SfxInt32ItemType): - CntInt32Item(which, nValue, eItemType) {} + DECLARE_ITEM_TYPE_FUNCTION(SfxInt32Item) + explicit SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0): + CntInt32Item(which, nValue) {} virtual SfxInt32Item* Clone(SfxItemPool * = nullptr) const override { return new SfxInt32Item(*this); } @@ -114,9 +111,9 @@ class SVL_DLLPUBLIC SfxUInt32Item: public CntUInt32Item { public: static SfxPoolItem* CreateDefault(); - - explicit SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0, SfxItemType eItemType = SfxItemType::SfxUInt32ItemType): - CntUInt32Item(which, nValue, eItemType) {} + DECLARE_ITEM_TYPE_FUNCTION(SfxUInt32Item) + explicit SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0): + CntUInt32Item(which, nValue) {} virtual SfxUInt32Item* Clone(SfxItemPool * = nullptr) const override { return new SfxUInt32Item(*this); } diff --git a/include/svl/lckbitem.hxx b/include/svl/lckbitem.hxx index af19872d05eb..9a61bb55e643 100644 --- a/include/svl/lckbitem.hxx +++ b/include/svl/lckbitem.hxx @@ -33,6 +33,7 @@ public: SfxLockBytesItem(); virtual ~SfxLockBytesItem() override; + DECLARE_ITEM_TYPE_FUNCTION(SfxLockBytesItem) SfxLockBytesItem(SfxLockBytesItem const &) = default; SfxLockBytesItem(SfxLockBytesItem &&) = default; SfxLockBytesItem & operator =(SfxLockBytesItem const &) = delete; // due to SfxPoolItem diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx index 999acb8a9f02..0445396f4f22 100644 --- a/include/svl/macitem.hxx +++ b/include/svl/macitem.hxx @@ -110,6 +110,7 @@ This item describes a Macro table. class SVL_DLLPUBLIC SvxMacroItem final : public SfxPoolItem { public: + DECLARE_ITEM_TYPE_FUNCTION(SvxMacroItem) explicit inline SvxMacroItem ( const sal_uInt16 nId ); // "pure virtual methods" of SfxPoolItem @@ -135,7 +136,7 @@ private: }; inline SvxMacroItem::SvxMacroItem( const sal_uInt16 nId ) - : SfxPoolItem( nId, SfxItemType::SvxMacroItemType ) + : SfxPoolItem( nId ) {} inline bool SvxMacroItem::HasMacro( SvMacroItemId nEvent ) const diff --git a/include/svl/metitem.hxx b/include/svl/metitem.hxx index 125ee7c3dc1d..30cf75b7f864 100644 --- a/include/svl/metitem.hxx +++ b/include/svl/metitem.hxx @@ -25,8 +25,7 @@ class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item { public: - explicit SfxMetricItem( sal_uInt16 nWhich, sal_Int32 nValue, - SfxItemType eItemType = SfxItemType::SfxMetricItemType ); + explicit SfxMetricItem( sal_uInt16 nWhich, sal_Int32 nValue ); virtual void ScaleMetrics( tools::Long lMult, tools::Long lDiv ) override; virtual bool HasMetrics() const override; diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 43dc82143339..3475aea6c039 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -105,7 +105,16 @@ enum class SfxItemState { SET = 0x0040 }; -enum class SfxItemType : sal_uInt16 { +/** + * These defines SfxItemType. Each derivation from SfxPoolItem needs one + * unique value that is returned in the call to ItemType(). This is done + * using DECLARE_ITEM_TYPE_FUNCTION in the public section of each definition + * of a derivation of SfxItemType, also for types derived deeper than one + * step. It overloads virtual SfxItemType ItemType() with the secified + * type, see that macro. +*/ +enum class SfxItemType : sal_uInt16 +{ AffineMatrixItemType, CntByteItemType, CntInt32ItemType, @@ -117,11 +126,11 @@ enum class SfxItemType : sal_uInt16 { InvalidOrDisabledItemType, MediaItemType, NameOrIndexType, - OStringListItemType, OfaPtrItemType, OfaXColorListItemType, OptionalBoolItemType, - RectangleAlignmentType, + OStringListItemType, + SampleItemType, SbxItemType, ScCondFormatItemType, ScConsolidateItemType, @@ -130,6 +139,7 @@ enum class SfxItemType : sal_uInt16 { ScInputStatusItemType, ScLineBreakCellType, ScMergeAttrType, + ScMergeFlagAttrType, ScPageHFItemType, ScPageScaleToItemType, ScPivotItemType, @@ -149,6 +159,7 @@ enum class SfxItemType : sal_uInt16 { ScUserListItemType, ScVerticalStackCellType, ScViewObjectModeItemType, + SdOptionsGridItemType, SdOptionsMiscItemType, SdOptionsPrintItemType, SdrAllPositionXItemType, @@ -157,12 +168,12 @@ enum class SfxItemType : sal_uInt16 { SdrAllSizeWidthItemType, SdrAngleItemType, SdrCaptionAngleItemType, - SdrCaptionGapItemType, SdrCaptionEscAbsItemType, SdrCaptionEscDirItemType, - SdrCaptionEscRelItemType, SdrCaptionEscIsRelItemType, + SdrCaptionEscRelItemType, SdrCaptionFitLineLenItemType, + SdrCaptionGapItemType, SdrCaptionLineLenItemType, SdrCaptionTypeItemType, SdrCircKindItemType, @@ -178,21 +189,23 @@ enum class SfxItemType : sal_uInt16 { SdrFractionItemType, SdrGrafBlueItemType, -e ... etc. - the rest is truncated