avmedia/source/framework/mediaitem.cxx | 2 basctl/source/basicide/baside2.cxx | 4 basctl/source/basicide/baside2.hxx | 2 basctl/source/basicide/baside3.cxx | 4 basctl/source/basicide/basides1.cxx | 20 - basctl/source/basicide/basides2.cxx | 2 basctl/source/basicide/basides3.cxx | 2 basctl/source/basicide/basidesh.cxx | 4 basctl/source/basicide/bastype3.cxx | 14 - basctl/source/basicide/bastypes.cxx | 12 basctl/source/basicide/moduldl2.cxx | 2 basctl/source/basicide/moduldlg.cxx | 4 basctl/source/basicide/sbxitem.cxx | 14 - basctl/source/inc/baside3.hxx | 2 basctl/source/inc/basidesh.hxx | 2 basctl/source/inc/bastype2.hxx | 2 basctl/source/inc/bastypes.hxx | 12 basctl/source/inc/sbxitem.hxx | 22 - cui/source/options/cfgchart.cxx | 2 cui/source/options/connpoolsettings.cxx | 2 cui/source/options/dbregistersettings.cxx | 2 dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 dbaccess/source/ui/dlg/optionalboolitem.cxx | 2 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 | 60 ++-- 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 | 60 ++-- editeng/source/items/writingmodeitem.cxx | 2 editeng/source/items/xmlcnitm.cxx | 2 include/editeng/borderline.hxx | 16 + include/editeng/boxitem.hxx | 4 include/editeng/formatbreakitem.hxx | 2 include/editeng/langitem.hxx | 4 include/editeng/protitem.hxx | 2 include/sfx2/app.hxx | 3 include/sfx2/evntconf.hxx | 3 include/sfx2/objsh.hxx | 4 include/sfx2/viewfrm.hxx | 2 include/svl/cenumitm.hxx | 2 include/svl/cintitem.hxx | 16 - include/svl/custritm.hxx | 7 include/svl/eitem.hxx | 9 include/svl/flagitem.hxx | 3 include/svl/intitem.hxx | 20 - include/svl/macitem.hxx | 2 include/svl/metitem.hxx | 3 include/svl/poolitem.hxx | 316 ++++++++++++++++++++++- include/svl/setitem.hxx | 6 include/svl/stritem.hxx | 7 include/svl/visitem.hxx | 2 include/svtools/borderline.hxx | 11 include/svx/grfcrop.hxx | 5 include/svx/hlnkitem.hxx | 3 include/svx/optgrid.hxx | 3 include/svx/sdangitm.hxx | 3 include/svx/sdgmoitm.hxx | 2 include/svx/sdtaditm.hxx | 3 include/svx/sdtaitm.hxx | 9 include/svx/sdtakitm.hxx | 3 include/svx/sdtfsitm.hxx | 2 include/svx/sdynitm.hxx | 3 include/svx/sxcecitm.hxx | 3 include/svx/sxctitm.hxx | 3 include/svx/sxekitm.hxx | 3 include/svx/sxmtpitm.hxx | 4 include/svx/sxmuitm.hxx | 3 sc/source/core/data/attrib.cxx | 30 +- 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 - sd/source/ui/app/optsitem.cxx | 8 sfx2/source/control/minfitem.cxx | 2 sfx2/source/dialog/dinfdlg.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 | 9 svl/source/items/flagitem.cxx | 4 svl/source/items/globalnameitem.cxx | 5 svl/source/items/grabbagitem.cxx | 7 svl/source/items/ilstitem.cxx | 5 svl/source/items/imageitm.cxx | 2 svl/source/items/int64item.cxx | 2 svl/source/items/intitem.cxx | 4 svl/source/items/lckbitem.cxx | 1 svl/source/items/poolitem.cxx | 22 - svl/source/items/ptitem.cxx | 3 svl/source/items/rectitem.cxx | 3 svl/source/items/rngitem.cxx | 2 svl/source/items/sitem.cxx | 10 svl/source/items/slstitm.cxx | 5 svl/source/items/srchitem.cxx | 2 svl/source/items/voiditem.cxx | 4 svx/inc/sxcikitm.hxx | 3 svx/inc/sxfiitm.hxx | 3 svx/inc/sxlayitm.hxx | 6 svx/inc/sxmfsitm.hxx | 3 svx/inc/sxmkitm.hxx | 3 svx/inc/sxmsitm.hxx | 4 svx/inc/sxmtaitm.hxx | 6 svx/inc/sxreaitm.hxx | 6 svx/inc/sxreoitm.hxx | 6 svx/inc/sxsiitm.hxx | 4 svx/source/dialog/rulritem.cxx | 18 - svx/source/dialog/svxgraphicitem.cxx | 2 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 | 21 + svx/source/items/e3ditem.cxx | 2 svx/source/items/galleryitem.cxx | 3 svx/source/items/grfitem.cxx | 9 svx/source/items/hlnkitem.cxx | 2 svx/source/items/numinf.cxx | 8 svx/source/items/ofaitem.cxx | 6 svx/source/items/pageitem.cxx | 3 svx/source/items/rotmodit.cxx | 2 svx/source/xoutdev/xattr.cxx | 48 +-- svx/source/xoutdev/xattr2.cxx | 38 +- sw/inc/fmtcnct.hxx | 2 sw/inc/fmtftntx.hxx | 2 sw/inc/grfatr.hxx | 14 - sw/source/core/attr/cellatr.cxx | 6 sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx | 2 sw/source/core/attr/hints.cxx | 2 sw/source/core/graphic/grfatr.cxx | 6 sw/source/core/layout/atrfrm.cxx | 47 +-- 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 | 13 sw/source/filter/inc/fltshell.hxx | 3 sw/source/uibase/chrdlg/ccoll.cxx | 2 sw/source/uibase/config/cfgitems.cxx | 20 - sw/source/uibase/dialog/swwrtshitem.cxx | 3 sw/source/uibase/envelp/envimg.cxx | 2 sw/source/uibase/envelp/labimg.cxx | 2 sw/source/uibase/inc/cfgitems.hxx | 2 sw/source/uibase/utlui/uiitems.cxx | 9 158 files changed, 912 insertions(+), 489 deletions(-)
New commits: commit c39e4f6b8a942680bc7250177c34fd034a0605e0 Author: Oliver Specht <[email protected]> AuthorDate: Wed May 22 12:26:46 2024 +0200 Commit: Thorsten Behrens <[email protected]> CommitDate: Tue Jun 18 01:07:42 2024 +0200 Add SfxItemType to SfxPoolItem The SfxPoolItem has a new member SfxItemType m_eItemType to compare types based on enums instead of typeinfo() which consumes a lot of time e.g. while AutoFormat is running Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <[email protected]> Reviewed-by: Armin Le Grand <[email protected]> diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index ce04a88b6668..f7c65766b1f7 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -83,7 +83,7 @@ struct MediaItem::Impl MediaItem::MediaItem( sal_uInt16 i_nWhich, AVMediaSetMask nMaskSet ) - : SfxPoolItem( i_nWhich ) + : SfxPoolItem( i_nWhich, SfxItemType::MediaItemType ) , m_pImpl( new Impl(nMaskSet) ) { } diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index ca4424604594..7a779a7f0ddf 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1421,9 +1421,9 @@ OUString ModulWindow::GetHid () const { return HID_BASICIDE_MODULWINDOW; } -ItemType ModulWindow::GetType () const +SbxItemType ModulWindow::GetSbxType () const { - return TYPE_MODULE; + return SBX_TYPE_MODULE; } bool ModulWindow::HasActiveEditor () const diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index cd0485c46b4b..37d7d75754a7 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -398,7 +398,7 @@ public: virtual void OnNewDocument () override; virtual OUString GetHid () const override; - virtual ItemType GetType () const override; + virtual SbxItemType GetSbxType () const override; virtual bool HasActiveEditor () const override; void UpdateModule (); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 1d8660ee8289..119d843840ee 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1190,9 +1190,9 @@ OUString DialogWindow::GetHid () const return HID_BASICIDE_DIALOGWINDOW; } -ItemType DialogWindow::GetType () const +SbxItemType DialogWindow::GetSbxType () const { - return TYPE_DIALOG; + return SBX_TYPE_DIALOG; } diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 3c302709db86..43453a89a8b1 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -646,9 +646,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) const OUString& aName( rSbxItem.GetName() ); if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) ) { - if ( rSbxItem.GetType() == TYPE_MODULE ) + if ( rSbxItem.GetSbxType() == SBX_TYPE_MODULE ) FindBasWin( aDocument, aLibName, aName, true ); - else if ( rSbxItem.GetType() == TYPE_DIALOG ) + else if ( rSbxItem.GetSbxType() == SBX_TYPE_DIALOG ) FindDlgWin( aDocument, aLibName, aName, true ); } } @@ -658,7 +658,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ); const ScriptDocument& aDocument( rSbxItem.GetDocument() ); - VclPtr<BaseWindow> pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true ); + VclPtr<BaseWindow> pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetSbxType(), true ); if ( pWin ) RemoveWindow( pWin, true ); } @@ -672,15 +672,15 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) const OUString& aName( rSbxItem.GetName() ); SetCurLib( aDocument, aLibName ); BaseWindow* pWin = nullptr; - if ( rSbxItem.GetType() == TYPE_DIALOG ) + if ( rSbxItem.GetSbxType() == SBX_TYPE_DIALOG ) { pWin = FindDlgWin( aDocument, aLibName, aName, true ); } - else if ( rSbxItem.GetType() == TYPE_MODULE ) + else if ( rSbxItem.GetSbxType() == SBX_TYPE_MODULE ) { pWin = FindBasWin( aDocument, aLibName, aName, true ); } - else if ( rSbxItem.GetType() == TYPE_METHOD ) + else if ( rSbxItem.GetSbxType() == SBX_TYPE_METHOD ) { pWin = FindBasWin( aDocument, aLibName, aName, true ); static_cast<ModulWindow*>(pWin)->EditMacro( rSbxItem.GetMethodName() ); @@ -1354,7 +1354,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe pLayout->Deactivating(); if (pCurWin) { - if (pCurWin->GetType() == TYPE_MODULE) + if (pCurWin->GetSbxType() == SBX_TYPE_MODULE) pLayout = pModulLayout.get(); else pLayout = pDialogLayout.get(); @@ -1461,19 +1461,19 @@ void Shell::ManageToolbars() VclPtr<BaseWindow> Shell::FindApplicationWindow() { - return FindWindow( ScriptDocument::getApplicationScriptDocument(), u"", u"", TYPE_UNKNOWN ); + return FindWindow( ScriptDocument::getApplicationScriptDocument(), u"", u"", SBX_TYPE_UNKNOWN ); } VclPtr<BaseWindow> Shell::FindWindow( ScriptDocument const& rDocument, std::u16string_view rLibName, std::u16string_view rName, - ItemType eType, bool bFindSuspended + SbxItemType eSbxItemType, bool bFindSuspended ) { for (auto const& window : aWindowTable) { BaseWindow* const pWin = window.second; - if (pWin->Is(rDocument, rLibName, rName, eType, bFindSuspended)) + if (pWin->Is(rDocument, rLibName, rName, eSbxItemType, bFindSuspended)) return pWin; } return nullptr; diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 5bd69b76f380..249b3e6f43c7 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -208,7 +208,7 @@ VclPtr<ModulWindow> Shell::FindBasWin ( bool bCreateIfNotExist, bool bFindSuspended ) { - if (VclPtr<BaseWindow> pWin = FindWindow(rDocument, rLibName, rName, TYPE_MODULE, bFindSuspended)) + if (VclPtr<BaseWindow> pWin = FindWindow(rDocument, rLibName, rName, SBX_TYPE_MODULE, bFindSuspended)) return VclPtr<ModulWindow>(static_cast<ModulWindow*>(pWin.get())); return bCreateIfNotExist ? CreateBasWin(rDocument, rLibName, rName) : nullptr; } diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index 6cb0484c5497..cb3a6a0e4dff 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -117,7 +117,7 @@ VclPtr<DialogWindow> Shell::FindDlgWin ( bool bCreateIfNotExist, bool bFindSuspended ) { - if (VclPtr<BaseWindow> pWin = FindWindow(rDocument, rLibName, rName, TYPE_DIALOG, bFindSuspended)) + if (VclPtr<BaseWindow> pWin = FindWindow(rDocument, rLibName, rName, SBX_TYPE_DIALOG, bFindSuspended)) return static_cast<DialogWindow*>(pWin.get()); return bCreateIfNotExist ? CreateDlgWin(rDocument, rLibName, rName) : nullptr; } diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 6e072c5f77f8..3638ef566a64 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -718,7 +718,7 @@ void Shell::UpdateWindows() if ( !pWin ) pWin = CreateBasWin( doc, aLibName, aModName ); if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName && - pLibInfoItem->GetCurrentType() == TYPE_MODULE ) + pLibInfoItem->GetCurrentType() == SBX_TYPE_MODULE ) { pNextActiveWindow = pWin; } @@ -747,7 +747,7 @@ void Shell::UpdateWindows() if ( !pWin ) pWin = CreateDlgWin( doc, aLibName, aDlgName ); if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName && - pLibInfoItem->GetCurrentType() == TYPE_DIALOG ) + pLibInfoItem->GetCurrentType() == SBX_TYPE_DIALOG ) { pNextActiveWindow = pWin; } diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index d26ae83252f6..b025859a611c 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -341,17 +341,17 @@ EntryDescriptor SbTreeListBox::GetEntryDescriptor(const weld::TreeIter* pEntry) return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aName, aMethodName, eType ); } -ItemType SbTreeListBox::ConvertType (EntryType eType) +SbxItemType SbTreeListBox::ConvertType (EntryType eType) { switch (eType) { - case OBJ_TYPE_DOCUMENT: return TYPE_SHELL; - case OBJ_TYPE_LIBRARY: return TYPE_LIBRARY; - case OBJ_TYPE_MODULE: return TYPE_MODULE; - case OBJ_TYPE_DIALOG: return TYPE_DIALOG; - case OBJ_TYPE_METHOD: return TYPE_METHOD; + case OBJ_TYPE_DOCUMENT: return SBX_TYPE_SHELL; + case OBJ_TYPE_LIBRARY: return SBX_TYPE_LIBRARY; + case OBJ_TYPE_MODULE: return SBX_TYPE_MODULE; + case OBJ_TYPE_DIALOG: return SBX_TYPE_DIALOG; + case OBJ_TYPE_METHOD: return SBX_TYPE_METHOD; default: - return static_cast<ItemType>(OBJ_TYPE_UNKNOWN); + return static_cast<SbxItemType>(OBJ_TYPE_UNKNOWN); } } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 01cf214d1045..edc9fe32149a 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -279,22 +279,22 @@ void BaseWindow::OnNewDocument () void BaseWindow::InsertLibInfo () const { if (ExtraData* pData = GetExtraData()) - pData->GetLibInfo().InsertInfo(m_aDocument, m_aLibName, m_aName, GetType()); + pData->GetLibInfo().InsertInfo(m_aDocument, m_aLibName, m_aName, GetSbxType()); } bool BaseWindow::Is ( ScriptDocument const& rDocument, std::u16string_view rLibName, std::u16string_view rName, - ItemType eType, bool bFindSuspended + SbxItemType eSbxType, bool bFindSuspended ) { if (bFindSuspended || !IsSuspended()) { // any non-suspended window is ok - if (rLibName.empty() || rName.empty() || eType == TYPE_UNKNOWN) + if (rLibName.empty() || rName.empty() || eSbxType == SBX_TYPE_UNKNOWN) return true; // ok if the parameters match - if (m_aDocument == rDocument && m_aLibName == rLibName && m_aName == rName && GetType() == eType) + if (m_aDocument == rDocument && m_aLibName == rLibName && m_aName == rName && GetSbxType() == eSbxType) return true; } return false; @@ -694,7 +694,7 @@ void LibInfo::InsertInfo ( ScriptDocument const& rDocument, OUString const& rLibName, OUString const& rCurrentName, - ItemType eCurrentType + SbxItemType eCurrentType ) { Key aKey(rDocument, rLibName); @@ -737,7 +737,7 @@ size_t LibInfo::Key::Hash::operator () (Key const& rKey) const LibInfo::Item::Item ( OUString aCurrentName, - ItemType eCurrentType + SbxItemType eCurrentType ) : m_aCurrentName(std::move(aCurrentName)), m_eCurrentType(eCurrentType) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index b2a8a5e691ea..ee1ea8564636 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1339,7 +1339,7 @@ void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument, if (xDlgPersLibContainer.is()) xDlgPersLibContainer->storeLibraries(); - SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, TYPE_MODULE ); + SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, SBX_TYPE_MODULE ); if (SfxDispatcher* pDispatcher = GetDispatcher()) pDispatcher->ExecuteList(SID_BASICIDE_SBXINSERTED, SfxCallMode::SYNCHRON, { &aSbxItem }); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 988ee57fe0ad..81f6d768374f 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -838,7 +838,7 @@ void ObjectPage::NewDialog() if ( !aDocument.createDialog( aLibName, aDlgName, xISP ) ) return; - SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aDlgName, TYPE_DIALOG ); + SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aDlgName, SBX_TYPE_DIALOG ); if (SfxDispatcher* pDispatcher = GetDispatcher()) { pDispatcher->ExecuteList( SID_BASICIDE_SBXINSERTED, @@ -986,7 +986,7 @@ SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument, StarBASIC* pBasic = pBasMgr? pBasMgr->GetLib( aLibName ) : nullptr; if ( pBasic ) pModule = pBasic->FindModule( aModName ); - SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, TYPE_MODULE ); + SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, SBX_TYPE_MODULE ); if (SfxDispatcher* pDispatcher = GetDispatcher()) { pDispatcher->ExecuteList( SID_BASICIDE_SBXINSERTED, diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx index 39c86b1d0893..b3ceccc4727d 100644 --- a/basctl/source/basicide/sbxitem.cxx +++ b/basctl/source/basicide/sbxitem.cxx @@ -29,13 +29,13 @@ SbxItem::SbxItem ( ScriptDocument aDocument, OUString aLibName, OUString aName, - ItemType eType + SbxItemType eSbxType ) : - SfxPoolItem(nWhichItem), + SfxPoolItem(nWhichItem, SfxItemType::SbxItemType), m_aDocument(std::move(aDocument)), m_aLibName(std::move(aLibName)), m_aName(std::move(aName)), - m_eType(eType) + m_eSbxType(eSbxType) { } SbxItem::SbxItem ( @@ -44,14 +44,14 @@ SbxItem::SbxItem ( OUString aLibName, OUString aName, OUString aMethodName, - ItemType eType + SbxItemType eSbxType ) : - SfxPoolItem(nWhichItem), + SfxPoolItem(nWhichItem, SfxItemType::SbxItemType), m_aDocument(std::move(aDocument)), m_aLibName(std::move(aLibName)), m_aName(std::move(aName)), m_aMethodName(std::move(aMethodName)), - m_eType(eType) + m_eSbxType(eSbxType) { } SbxItem* SbxItem::Clone(SfxItemPool*) const @@ -68,7 +68,7 @@ bool SbxItem::operator==(const SfxPoolItem& rCmp) const m_aLibName == pSbxItem->m_aLibName && m_aName == pSbxItem->m_aName && m_aMethodName == pSbxItem->m_aMethodName && - m_eType == pSbxItem->m_eType; + m_eSbxType == pSbxItem->m_eSbxType; } } // namespace basctl diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 14fc68f07951..23bffd38eba3 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -108,7 +108,7 @@ public: virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; virtual OUString GetHid () const override; - virtual ItemType GetType () const override; + virtual SbxItemType GetSbxType () const override; }; diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index afaa47c88ff4..8b0aaea0c7c5 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -200,7 +200,7 @@ public: bool CallBasicErrorHdl( StarBASIC const * pBasic ); BasicDebugFlags CallBasicBreakHdl( StarBASIC const * pBasic ); - VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, std::u16string_view rLibName, std::u16string_view rName, ItemType nType, bool bFindSuspended = false ); + VclPtr<BaseWindow> FindWindow( const ScriptDocument& rDocument, std::u16string_view rLibName, std::u16string_view rName, SbxItemType nSbxType, bool bFindSuspended = false ); VclPtr<DialogWindow> FindDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rName, bool bCreateIfNotExist = false, bool bFindSuspended = false ); VclPtr<ModulWindow> FindBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName, bool bCreateIfNotExist = false, bool bFindSuspended = false ); VclPtr<BaseWindow> FindApplicationWindow(); diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx index 22321b309757..34115a1dff7d 100644 --- a/basctl/source/inc/bastype2.hxx +++ b/basctl/source/inc/bastype2.hxx @@ -220,7 +220,7 @@ public: bool FindEntry(std::u16string_view rText, EntryType eType, weld::TreeIter& rIter); EntryDescriptor GetEntryDescriptor(const weld::TreeIter* pEntry); - static ItemType ConvertType (EntryType eType); + static SbxItemType ConvertType (EntryType eType); bool IsValidEntry(const weld::TreeIter& rEntry); void AddEntry(const OUString& rText, const OUString& rImage, const weld::TreeIter* pParent, bool bChildrenOnDemand, diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 513fbce3a41c..ecd744528056 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -238,9 +238,9 @@ public: virtual void OnNewDocument (); virtual OUString GetHid () const = 0; - virtual ItemType GetType () const = 0; + virtual SbxItemType GetSbxType () const = 0; void InsertLibInfo () const; - bool Is (ScriptDocument const&, std::u16string_view, std::u16string_view, ItemType, bool bFindSuspended); + bool Is (ScriptDocument const&, std::u16string_view, std::u16string_view, SbxItemType, bool bFindSuspended); virtual bool HasActiveEditor () const; }; @@ -252,7 +252,7 @@ public: LibInfo (); ~LibInfo (); public: - void InsertInfo (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType); + void InsertInfo (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, SbxItemType eCurrentType); void RemoveInfoFor (ScriptDocument const&); Item const* GetInfo (ScriptDocument const&, OUString const& rLibName); @@ -279,12 +279,12 @@ public: { private: OUString m_aCurrentName; - ItemType m_eCurrentType; + SbxItemType m_eCurrentType; public: - Item (OUString aCurrentName, ItemType eCurrentType); + Item (OUString aCurrentName, SbxItemType eCurrentType); const OUString& GetCurrentName() const { return m_aCurrentName; } - ItemType GetCurrentType() const { return m_eCurrentType; } + SbxItemType GetCurrentType() const { return m_eCurrentType; } }; private: typedef std::unordered_map<Key, Item, Key::Hash> Map; diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx index 941ffd3e0ee9..a21e792742ca 100644 --- a/basctl/source/inc/sbxitem.hxx +++ b/basctl/source/inc/sbxitem.hxx @@ -24,14 +24,14 @@ namespace basctl { -enum ItemType +enum SbxItemType { - TYPE_UNKNOWN, - TYPE_SHELL, - TYPE_LIBRARY, - TYPE_MODULE, - TYPE_DIALOG, - TYPE_METHOD + SBX_TYPE_UNKNOWN, + SBX_TYPE_SHELL, + SBX_TYPE_LIBRARY, + SBX_TYPE_MODULE, + SBX_TYPE_DIALOG, + SBX_TYPE_METHOD }; class SbxItem : public SfxPoolItem @@ -40,12 +40,12 @@ class SbxItem : public SfxPoolItem const OUString m_aLibName; const OUString m_aName; const OUString m_aMethodName; - ItemType m_eType; + SbxItemType m_eSbxType; public: static SfxPoolItem* CreateDefault(); - SbxItem(sal_uInt16 nWhich, ScriptDocument aDocument, OUString aLibName, OUString aName, ItemType); - SbxItem(sal_uInt16 nWhich, ScriptDocument aDocument, OUString aLibName, OUString aName, OUString aMethodName, ItemType eType); + 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); virtual SbxItem* Clone(SfxItemPool *pPool = nullptr) const override; virtual bool operator==(const SfxPoolItem&) const override; @@ -54,7 +54,7 @@ public: OUString const& GetLibName () const { return m_aLibName; } OUString const& GetName () const { return m_aName; } OUString const& GetMethodName () const { return m_aMethodName; } - ItemType GetType () const { return m_eType; } + SbxItemType GetSbxType () const { return m_eSbxType; } }; } // namespace basctl diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index 8d1bd5e4130e..1ac75f6db361 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_ ), + SfxPoolItem( nWhich_, SfxItemType::SvxChartColorTableItemType ), m_aColorTable(std::move( aTable )) { } diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx index e92b26da555f..144be599bb10 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) + :SfxPoolItem(_nId, SfxItemType::DriverPoolingSettingsItemType) ,m_aSettings(std::move(_aSettings)) { } diff --git a/cui/source/options/dbregistersettings.cxx b/cui/source/options/dbregistersettings.cxx index c544e1111fe3..6441de2b6b00 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 ) + :SfxPoolItem( _nId, SfxItemType::DatabaseMapItemType ) ,m_aRegistrations( std::move(_rRegistrations) ) { } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index d1cbaa964c0a..78a19a9dd813 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -1081,7 +1081,7 @@ void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSo // DbuTypeCollectionItem DbuTypeCollectionItem::DbuTypeCollectionItem(sal_Int16 _nWhich, ::dbaccess::ODsnTypeCollection* _pCollection) - :SfxPoolItem(_nWhich) + :SfxPoolItem(_nWhich, SfxItemType::DbuTypeCollectionItemType) ,m_pCollection(_pCollection) { } diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx index 30d176391ba4..1caf1c884393 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 ) + :SfxPoolItem( _nWhich, SfxItemType::OptionalBoolItemType ) { } diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx index 97e75fe6d4b6..ea50c99e04c2 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) + : SfxPoolItem(_nWhich, SfxItemType::OStringListItemType) , m_aList(_rList) { } diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 769179748b40..b4d46f9b1d3b 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) + : SfxPoolItem(_nWhich, SfxItemType::SvxBulletItemType) , 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 ec2a0af3c703..77487bb7b50d 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 ) + SfxBoolItem( nId, bHidden, SfxItemType::SvxCharHiddenItemType ) { } diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 9371ccad4aa9..6f395e318b53 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -276,13 +276,13 @@ MetaAction* SvxFieldData::createEndComment() SvxFieldItem::SvxFieldItem( std::unique_ptr<SvxFieldData> pField, const sal_uInt16 nId ) : - SfxPoolItem( nId ) + SfxPoolItem( nId, SfxItemType::SvxFieldItemType ) , mpField( std::move(pField) ) { } SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ) : - SfxPoolItem( nId ) + SfxPoolItem( nId, SfxItemType::SvxFieldItemType ) , mpField( rField.Clone() ) { } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index fa393ff4ccd8..0d39a8c4d9ad 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -140,7 +140,7 @@ bool SvxPaperBinItem::GetPresentation SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxSizeItemType ), m_aSize( rSize ) { @@ -223,7 +223,7 @@ bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SvxSizeItem::SvxSizeItem( const sal_uInt16 nId ) : - SfxPoolItem( nId ) + SfxPoolItem( nId, SfxItemType::SvxSizeItemType ) { } @@ -288,7 +288,7 @@ bool SvxSizeItem::HasMetrics() const SvxLRSpaceItem::SvxLRSpaceItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxLRSpaceItemType) , nFirstLineOffset(0) , nLeftMargin(0) , nRightMargin(0) @@ -307,7 +307,7 @@ SvxLRSpaceItem::SvxLRSpaceItem(const sal_uInt16 nId) SvxLRSpaceItem::SvxLRSpaceItem( const tools::Long nLeft, const tools::Long nRight, const short nOfset, const sal_uInt16 nId ) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxLRSpaceItemType) , nFirstLineOffset(nOfset) , nLeftMargin(nLeft) , nRightMargin(nRight) @@ -573,12 +573,12 @@ tools::Long SvxLRSpaceItem::GetTextLeft() const } SvxLeftMarginItem::SvxLeftMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxLeftMarginItemType) { } SvxLeftMarginItem::SvxLeftMarginItem(const tools::Long nLeft, const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxLeftMarginItemType) , m_nLeftMargin(nLeft) { } @@ -741,12 +741,12 @@ boost::property_tree::ptree SvxLeftMarginItem::dumpAsJSON() const } SvxTextLeftMarginItem::SvxTextLeftMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxTextLeftMarginItemType) { } SvxTextLeftMarginItem::SvxTextLeftMarginItem(const tools::Long nLeft, const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxTextLeftMarginItemType) , m_nTextLeftMargin(nLeft) { } @@ -918,12 +918,12 @@ boost::property_tree::ptree SvxTextLeftMarginItem::dumpAsJSON() const } SvxFirstLineIndentItem::SvxFirstLineIndentItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxFirstLineIndentItemType) { } SvxFirstLineIndentItem::SvxFirstLineIndentItem(const short nFirst, const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxFirstLineIndentItemType) , m_nFirstLineOffset(nFirst) { } @@ -1096,12 +1096,12 @@ boost::property_tree::ptree SvxFirstLineIndentItem::dumpAsJSON() const } SvxRightMarginItem::SvxRightMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxRightMarginItemType) { } SvxRightMarginItem::SvxRightMarginItem(const tools::Long nRight, const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxRightMarginItemType) , m_nRightMargin(nRight) { } @@ -1274,7 +1274,7 @@ boost::property_tree::ptree SvxRightMarginItem::dumpAsJSON() const } SvxGutterLeftMarginItem::SvxGutterLeftMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxGutterLeftMarginItemType) { } @@ -1383,7 +1383,7 @@ boost::property_tree::ptree SvxGutterLeftMarginItem::dumpAsJSON() const } SvxGutterRightMarginItem::SvxGutterRightMarginItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxGutterRightMarginItemType) { } @@ -1662,7 +1662,7 @@ boost::property_tree::ptree SvxLRSpaceItem::dumpAsJSON() const SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nId ) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxULSpaceItemType) , nUpper(0) , nLower(0) , bContext(false) @@ -1674,7 +1674,7 @@ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nId ) SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, const sal_uInt16 nId ) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxULSpaceItemType) , nUpper(nUp) , nLower(nLow) , bContext(false) @@ -2035,7 +2035,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 ), + SfxEnumItemInterface( nId, SfxItemType::SvxShadowItemType ), aShadowColor(COL_GRAY), nWidth ( nW ), eLocation ( eLoc ) @@ -2308,7 +2308,7 @@ SvxBoxItem::SvxBoxItem(const SvxBoxItem& rCopy) SvxBoxItem::SvxBoxItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxBoxItemType) { } @@ -3256,13 +3256,18 @@ bool SvxBoxItem::HasBorder( bool bTreatPaddingAsBorder ) const // class SvxBoxInfoItem -------------------------------------------------- SvxBoxInfoItem::SvxBoxInfoItem(const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxBoxInfoItemType) , mbDistance(false) , mbMinimumDistance(false) { ResetFlags(); } +ItemInstanceManager* SvxBoxItem::getItemInstanceManager() const +{ + static DefaultItemInstanceManager aInstanceManager(typeid(SvxBoxItem).hash_code()); + return &aInstanceManager; +} SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCopy ) : SfxPoolItem(rCopy) @@ -3847,7 +3852,7 @@ void SvxFormatKeepItem::dumpAsXml(xmlTextWriterPtr pWriter) const } SvxLineItem::SvxLineItem( const sal_uInt16 nId ) : - SfxPoolItem ( nId ) + SfxPoolItem ( nId, SfxItemType::SvxLineItemType ) { } @@ -3985,7 +3990,7 @@ ItemInstanceManager* SvxBrushItem::getItemInstanceManager() const } SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -3996,7 +4001,7 @@ SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) } SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) , aColor(rColor) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4007,7 +4012,7 @@ SvxBrushItem::SvxBrushItem(const Color& rColor, sal_uInt16 _nWhich) } SvxBrushItem::SvxBrushItem(Color const& rColor, model::ComplexColor const& rComplexColor, sal_uInt16 nWhich) - : SfxPoolItem(nWhich) + : SfxPoolItem(nWhich, SfxItemType::SvxBrushItemType) , aColor(rColor) , maComplexColor(rComplexColor) , aFilterColor(COL_TRANSPARENT) @@ -4019,7 +4024,7 @@ SvxBrushItem::SvxBrushItem(Color const& rColor, model::ComplexColor const& rComp } SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4032,7 +4037,7 @@ SvxBrushItem::SvxBrushItem(const Graphic& rGraphic, SvxGraphicPosition ePos, sal } SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition ePos, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4046,7 +4051,7 @@ SvxBrushItem::SvxBrushItem(const GraphicObject& rGraphicObj, SvxGraphicPosition SvxBrushItem::SvxBrushItem(OUString aLink, OUString aFilter, SvxGraphicPosition ePos, sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -4595,7 +4600,6 @@ void SvxBrushItem::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterEndElement(pWriter); } - ItemInstanceManager* SvxFrameDirectionItem::getItemInstanceManager() const { static DefaultItemInstanceManager aInstanceManager(typeid(SvxFrameDirectionItem).hash_code()); @@ -4604,7 +4608,7 @@ ItemInstanceManager* SvxFrameDirectionItem::getItemInstanceManager() const SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue , sal_uInt16 _nWhich ) - : SfxEnumItem<SvxFrameDirection>( _nWhich, nValue ) + : SfxEnumItem<SvxFrameDirection>( _nWhich, SfxItemType::SvxFrameDirectionItemType, nValue ) { } diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx index 7fe699cb2c36..5b496e233a87 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, SvxCellHorJustify::Standard ) + SfxEnumItem( nId, SfxItemType::SvxHorJustifyItemType, SvxCellHorJustify::Standard ) { } SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify, const sal_uInt16 nId ) : - SfxEnumItem( nId, eJustify ) + SfxEnumItem( nId, SfxItemType::SvxHorJustifyItemType, eJustify ) { } @@ -173,13 +173,13 @@ sal_uInt16 SvxHorJustifyItem::GetValueCount() const SvxVerJustifyItem::SvxVerJustifyItem( const sal_uInt16 nId ) : - SfxEnumItem( nId, SvxCellVerJustify::Standard ) + SfxEnumItem( nId, SfxItemType::SvxVerJustifyItemType, SvxCellVerJustify::Standard ) { } SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify, const sal_uInt16 nId ) : - SfxEnumItem( nId, eJustify ) + SfxEnumItem( nId, SfxItemType::SvxVerJustifyItemType, eJustify ) { } @@ -298,7 +298,7 @@ sal_uInt16 SvxVerJustifyItem::GetValueCount() const SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify, const sal_uInt16 nId ) : - SfxEnumItem( nId, eJustify ) + SfxEnumItem( nId, SfxItemType::SvxJustifyMethodItemType, eJustify ) { } diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index f0fe0085e157..c5e4240343b2 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), + SfxPoolItem(SID_ATTR_NUMBERING_RULE, SfxItemType::SvxNumBulletItemType), maNumRule(rRule) { } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule && rRule) : - SfxPoolItem(SID_ATTR_NUMBERING_RULE), + SfxPoolItem(SID_ATTR_NUMBERING_RULE, SfxItemType::SvxNumBulletItemType), maNumRule(std::move(rRule)) { } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule const & rRule, sal_uInt16 _nWhich ) : - SfxPoolItem(_nWhich), + SfxPoolItem(_nWhich, SfxItemType::SvxNumBulletItemType), maNumRule(rRule) { } SvxNumBulletItem::SvxNumBulletItem(SvxNumRule && rRule, sal_uInt16 _nWhich ) : - SfxPoolItem(_nWhich), + SfxPoolItem(_nWhich, SfxItemType::SvxNumBulletItemType), maNumRule(std::move(rRule)) { } diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx index 254da79d91c1..40d521d48a1e 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 ) + SfxPoolItem( nId, SfxItemType::SfxRegionItemType ) { nMinLead = nMinTrail = 0; } diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 4b55fa49026e..07a927947bdd 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -78,7 +78,7 @@ enum class SvxSpecialLineSpace } SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId ) - : SfxEnumItemInterface( nId ) + : SfxEnumItemInterface( nId, SfxItemType::SvxLineSpacingItemType ) { nPropLineSpace = 100; nInterLineSpace = 0; @@ -346,7 +346,7 @@ ItemInstanceManager* SvxAdjustItem::getItemInstanceManager() const } SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId ) - : SfxEnumItemInterface( nId ), + : SfxEnumItemInterface( nId, SfxItemType::SvxAdjustItemType ), bOneBlock( false ), bLastCenter( false ), bLastBlock( false ) { SetAdjust( eAdjst ); @@ -471,7 +471,7 @@ void SvxAdjustItem::SetEnumValue( sal_uInt16 nVal ) // class SvxWidowsItem --------------------------------------------------- SvxWidowsItem::SvxWidowsItem(const sal_uInt8 nL, const sal_uInt16 nId ) : - SfxByteItem( nId, nL ) + SfxByteItem( nId, nL, SfxItemType::SvxWidowsItemType ) { } @@ -515,7 +515,7 @@ bool SvxWidowsItem::GetPresentation // class SvxOrphansItem -------------------------------------------------- SvxOrphansItem::SvxOrphansItem(const sal_uInt8 nL, const sal_uInt16 nId ) : - SfxByteItem( nId, nL ) + SfxByteItem( nId, nL, SfxItemType::SvxOrphansItemType ) { } @@ -559,7 +559,7 @@ bool SvxOrphansItem::GetPresentation // class SvxHyphenZoneItem ----------------------------------------------- SvxHyphenZoneItem::SvxHyphenZoneItem( const bool bHyph, const sal_uInt16 nId ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxHyphenZoneItem ), bHyphen(bHyph), bKeep(false), bNoCapsHyphenation(false), @@ -833,7 +833,7 @@ void SvxTabStop::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxTabStopItem -------------------------------------------------- SvxTabStopItem::SvxTabStopItem( sal_uInt16 _nWhich ) : - SfxPoolItem( _nWhich ) + SfxPoolItem( _nWhich, SfxItemType::SvxTabStopItemType ) { const sal_uInt16 nTabs = SVX_TAB_DEFCOUNT, nDist = SVX_TAB_DEFDIST; const SvxTabAdjust eAdjst= SvxTabAdjust::Default; @@ -850,7 +850,7 @@ SvxTabStopItem::SvxTabStopItem( const sal_uInt16 nTabs, const sal_uInt16 nDist, const SvxTabAdjust eAdjst, sal_uInt16 _nWhich ) : - SfxPoolItem( _nWhich ) + SfxPoolItem( _nWhich, SfxItemType::SvxTabStopItemType ) { for ( sal_uInt16 i = 0; i < nTabs; ++i ) { @@ -1224,7 +1224,7 @@ bool SvxPageModelItem::GetPresentation SvxScriptSpaceItem::SvxScriptSpaceItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxScriptSpaceItemType ) { } @@ -1247,7 +1247,7 @@ bool SvxScriptSpaceItem::GetPresentation( SvxHangingPunctuationItem::SvxHangingPunctuationItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxHangingPunctuationItemType ) { } @@ -1270,7 +1270,7 @@ bool SvxHangingPunctuationItem::GetPresentation( SvxForbiddenRuleItem::SvxForbiddenRuleItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxForbiddenRuleItemType ) { } @@ -1296,7 +1296,7 @@ bool SvxForbiddenRuleItem::GetPresentation( SvxParaVertAlignItem::SvxParaVertAlignItem( Align nValue, TypedWhichId<SvxParaVertAlignItem> nW ) - : SfxUInt16Item( nW, static_cast<sal_uInt16>(nValue) ) + : SfxUInt16Item( nW, static_cast<sal_uInt16>(nValue), SfxItemType::SvxParaVertAlignItemType ) { } @@ -1344,7 +1344,7 @@ bool SvxParaVertAlignItem::PutValue( const css::uno::Any& rVal, } SvxParaGridItem::SvxParaGridItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxParaGridItemType ) { } diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 914ca28a051d..f187637866e5 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 ), + SfxPoolItem( nId, SfxItemType::SvxFontListItemType ), pFontList( pFontLst ) { if ( pFontList ) @@ -213,6 +213,7 @@ namespace { maRegistered.erase(hashCode(rItem)); } + } ItemInstanceManager* SvxFontItem::getItemInstanceManager() const @@ -223,7 +224,7 @@ ItemInstanceManager* SvxFontItem::getItemInstanceManager() const SvxFontItem::SvxFontItem( const sal_uInt16 nId) -: SfxPoolItem( nId ) +: SfxPoolItem( nId, SfxItemType::SvxFontItemType ) , aFamilyName() , aStyleName() , eFamily(FAMILY_SWISS) @@ -239,7 +240,7 @@ SvxFontItem::SvxFontItem( const FontPitch eFontPitch, const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId) -: SfxPoolItem( nId ) +: SfxPoolItem( nId, SfxItemType::SvxFontItemType ) , aFamilyName(std::move(aName)) , aStyleName(std::move(aStName)) , eFamily(eFam) @@ -504,7 +505,7 @@ ItemInstanceManager* SvxPostureItem::getItemInstanceManager() const } SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const sal_uInt16 nId ) : - SfxEnumItem( nId, ePosture ) + SfxEnumItem( nId, SfxItemType::SvxPostureItemType, ePosture ) { } @@ -626,7 +627,7 @@ ItemInstanceManager* SvxWeightItem::getItemInstanceManager() const } SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) : - SfxEnumItem( nId, eWght ) + SfxEnumItem( nId, SfxItemType::SvxWeightItemType, eWght ) { } @@ -812,7 +813,7 @@ ItemInstanceManager* SvxFontHeightItem::getItemInstanceManager() const SvxFontHeightItem::SvxFontHeightItem( const sal_uInt32 nSz, const sal_uInt16 nPrp, const sal_uInt16 nId ) : - SfxPoolItem( nId ) + SfxPoolItem( nId, SfxItemType::SvxFontHeightItemType ) { SetHeight( nSz,nPrp ); // calculate in percentage } @@ -1153,7 +1154,7 @@ void SvxFontHeightItem::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxTextLineItem ------------------------------------------------ SvxTextLineItem::SvxTextLineItem( const FontLineStyle eSt, const sal_uInt16 nId ) - : SfxEnumItem(nId, eSt) + : SfxEnumItem(nId, SfxItemType::SvxTextLineItemType,eSt) , maColor(COL_TRANSPARENT) { } @@ -1405,7 +1406,7 @@ ItemInstanceManager* SvxCrossedOutItem::getItemInstanceManager() const } SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 nId ) - : SfxEnumItem( nId, eSt ) + : SfxEnumItem( nId, SfxItemType::SvxCrossedOutItemType, eSt ) { } @@ -1506,7 +1507,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 ) + SfxBoolItem( nId, bShadowed, SfxItemType::SvxShadowedItemType ) { } @@ -1534,7 +1535,7 @@ bool SvxShadowedItem::GetPresentation // class SvxAutoKernItem ------------------------------------------------- SvxAutoKernItem::SvxAutoKernItem( const bool bAutoKern, const sal_uInt16 nId ) : - SfxBoolItem( nId, bAutoKern ) + SfxBoolItem( nId, bAutoKern, SfxItemType::SvxAutoKernItemType ) { } @@ -1563,7 +1564,7 @@ bool SvxAutoKernItem::GetPresentation SvxWordLineModeItem::SvxWordLineModeItem( const bool bWordLineMode, const sal_uInt16 nId ) : - SfxBoolItem( nId, bWordLineMode ) + SfxBoolItem( nId, bWordLineMode, SfxItemType::SvxWordLineItemType ) { } @@ -1591,7 +1592,7 @@ bool SvxWordLineModeItem::GetPresentation // class SvxContourItem -------------------------------------------------- SvxContourItem::SvxContourItem( const bool bContoured, const sal_uInt16 nId ) : - SfxBoolItem( nId, bContoured ) + SfxBoolItem( nId, bContoured, SfxItemType::SvxContourItemType ) { } @@ -1618,19 +1619,19 @@ bool SvxContourItem::GetPresentation // class SvxColorItem ---------------------------------------------------- SvxColorItem::SvxColorItem( const sal_uInt16 nId ) : - SfxPoolItem(nId), + SfxPoolItem(nId, SfxItemType::SvxColorItemType), mColor( COL_BLACK ) { } SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxColorItemType ), mColor( rCol ) { } SvxColorItem::SvxColorItem(Color const& rColor, model::ComplexColor const& rComplexColor, const sal_uInt16 nId) - : SfxPoolItem(nId) + : SfxPoolItem(nId, SfxItemType::SvxColorItemType) , mColor(rColor) , maComplexColor(rComplexColor) { @@ -1880,7 +1881,7 @@ void SvxColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxKerningItem -------------------------------------------------- SvxKerningItem::SvxKerningItem( const short nKern, const sal_uInt16 nId ) : - SfxInt16Item( nId, nKern ) + SfxInt16Item( nId, nKern, SfxItemType::SvxKerningItemType ) { } @@ -1959,7 +1960,7 @@ bool SvxKerningItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) // class SvxCaseMapItem -------------------------------------------------- SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const sal_uInt16 nId ) : - SfxEnumItem( nId, eMap ) + SfxEnumItem( nId, SfxItemType::SvxCaseMapItemType, eMap ) { } @@ -2039,7 +2040,7 @@ bool SvxCaseMapItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) // class SvxEscapementItem ----------------------------------------------- SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) : - SfxEnumItemInterface( nId ), + SfxEnumItemInterface( nId, SfxItemType::SvxEscapementItemType ), nEsc ( 0 ), nProp ( 100 ) @@ -2049,7 +2050,7 @@ SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) : SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, const sal_uInt16 nId ) : - SfxEnumItemInterface( nId ), + SfxEnumItemInterface( nId, SfxItemType::SvxEscapementItemType ), nProp( 100 ) { SetEscapement( eEscape ); @@ -2061,7 +2062,7 @@ SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, SvxEscapementItem::SvxEscapementItem( const short _nEsc, const sal_uInt8 _nProp, const sal_uInt16 nId ) : - SfxEnumItemInterface( nId ), + SfxEnumItemInterface( nId, SfxItemType::SvxEscapementItemType ), nEsc ( _nEsc ), nProp ( _nProp ) { @@ -2207,7 +2208,7 @@ ItemInstanceManager* SvxLanguageItem::getItemInstanceManager() const } SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId ) - : SvxLanguageItem_Base( nId , eLang ) + : SvxLanguageItem_Base( nId , SfxItemType::SvxLanguageItemType, eLang ) { } @@ -2286,7 +2287,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 ) + SfxBoolItem( nId, bNoHyphen, SfxItemType::SvxNoHyphenItemType ) { } @@ -2321,7 +2322,7 @@ bool SvxNoHyphenItem::GetPresentation SvxBlinkItem::SvxBlinkItem( const bool bBlink, const sal_uInt16 nId ) : - SfxBoolItem( nId, bBlink ) + SfxBoolItem( nId, bBlink, SfxItemType::SvxBlinkItemType ) { } @@ -2356,7 +2357,7 @@ ItemInstanceManager* SvxEmphasisMarkItem::getItemInstanceManager() const SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue, TypedWhichId<SvxEmphasisMarkItem> nId ) - : SfxUInt16Item( nId, static_cast<sal_uInt16>(nValue) ) + : SfxUInt16Item( nId, static_cast<sal_uInt16>(nValue), SfxItemType::SvxEmphasisMarkItemType ) { } @@ -2460,7 +2461,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 ), + : SfxPoolItem( nW, SfxItemType::SvxTwoLinesItemType ), cStartBracket( nStartBracket ), cEndBracket( nEndBracket ), bOn( bFlag ) { } @@ -2568,7 +2569,7 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/, *************************************************************************/ SvxTextRotateItem::SvxTextRotateItem(Degree10 nValue, TypedWhichId<SvxTextRotateItem> nW) - : SfxUInt16Item(nW, nValue.get()) + : SfxUInt16Item(nW, nValue.get(), SfxItemType::SvxTextRotateItemType) { } @@ -2736,7 +2737,7 @@ void SvxCharRotateItem::dumpAsXml(xmlTextWriterPtr pWriter) const SvxCharScaleWidthItem::SvxCharScaleWidthItem( sal_uInt16 nValue, TypedWhichId<SvxCharScaleWidthItem> nW ) - : SfxUInt16Item( nW, nValue ) + : SfxUInt16Item( nW, nValue, SfxItemType::SvxCharScaleWidthItem ) { } @@ -2796,7 +2797,7 @@ ItemInstanceManager* SvxCharReliefItem::getItemInstanceManager() const SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue, const sal_uInt16 nId ) - : SfxEnumItem( nId, eValue ) + : SfxEnumItem( nId, SfxItemType::SvxCharReliefItemType, eValue ) { } @@ -2885,7 +2886,8 @@ 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> )) + svl::Items<SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT> ), + SfxItemType::SvxScriptSetItemType ) { sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 35dbddabab2d..d1d8cb6e065a 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) ) + : SfxUInt16Item( _nWhich, static_cast<sal_uInt16>(eValue), SfxItemType::SvxWritingModeItemType ) { } diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index 71f75a910246..976fd5aa8150 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 ) + SfxPoolItem( _nWhich, SfxItemType::SvXMLAttrContainerItemType ) { } diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx index 851c16156dee..86c6be8161be 100644 --- a/include/editeng/borderline.hxx +++ b/include/editeng/borderline.hxx @@ -28,6 +28,7 @@ #include <editeng/editengdllapi.h> #include <svtools/borderline.hxx> #include <docmodel/color/ComplexColor.hxx> +#include <o3tl/hash_combine.hxx> class IntlWrapper; @@ -253,6 +254,21 @@ public: static Color threeDDarkColor( Color aMain ); static BorderWidthImpl getWidthImpl( SvxBorderLineStyle nStyle ); + + std::size_t getHash() const + { + std::size_t seed = 0; + o3tl::hash_combine(seed, m_nWidth); + o3tl::hash_combine(seed, m_nMult); + o3tl::hash_combine(seed, m_nDiv); + o3tl::hash_combine(seed, m_aWidthImpl.getHash()); + o3tl::hash_combine(seed, m_aColor.operator::sal_uInt32()); + o3tl::hash_combine(seed, m_aComplexColor.getHash()); + o3tl::hash_combine(seed, m_nStyle); + o3tl::hash_combine(seed, m_bMirrorWidths); + o3tl::hash_combine(seed, m_bUseLeftTop); + return seed; + } }; EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& rLeft, const SvxBorderLine& rRight ); diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx index 6ceff99268c3..49f18d6de4b4 100644 --- a/include/editeng/boxitem.hxx +++ b/include/editeng/boxitem.hxx @@ -73,6 +73,9 @@ class EDITENG_DLLPUBLIC SvxBoxItem final : public SfxPoolItem void tryMigrateComplexColor(SvxBoxItemLine eLine); +protected: + virtual ItemInstanceManager* getItemInstanceManager() const override; + public: static SfxPoolItem* CreateDefault(); @@ -138,6 +141,7 @@ public: sal_uInt16 GetSmallestDistance() const; bool IsRemoveAdjacentCellBorder() const { return mbRemoveAdjCellBorder; } + const std::array<model::ComplexColor, 4>& GetTempComplexColors() const {return maTempComplexColors;} void SetDistance( sal_Int16 nNew, SvxBoxItemLine nLine ); void SetAllDistances(sal_Int16 nNew) diff --git a/include/editeng/formatbreakitem.hxx b/include/editeng/formatbreakitem.hxx index 71f33176990f..7e9b0b27661e 100644 --- a/include/editeng/formatbreakitem.hxx +++ b/include/editeng/formatbreakitem.hxx @@ -62,7 +62,7 @@ public: inline SvxFormatBreakItem::SvxFormatBreakItem( const SvxBreak eBreak, const sal_uInt16 _nWhich ) : - SfxEnumItem( _nWhich, eBreak ) + SfxEnumItem( _nWhich, SfxItemType::SvxFormatBreakItemType, eBreak ) {} diff --git a/include/editeng/langitem.hxx b/include/editeng/langitem.hxx index 7c8f68e96fd6..4ebef0837a6c 100644 --- a/include/editeng/langitem.hxx +++ b/include/editeng/langitem.hxx @@ -33,8 +33,8 @@ // MSVC hack: class SAL_DLLPUBLIC_RTTI SvxLanguageItem_Base: public SfxEnumItem<LanguageType> { protected: - explicit SvxLanguageItem_Base(sal_uInt16 nWhich, LanguageType nValue): - SfxEnumItem(nWhich, nValue) + explicit SvxLanguageItem_Base(sal_uInt16 nWhich, SfxItemType eItemType, LanguageType nValue): + SfxEnumItem(nWhich, eItemType, nValue) {} }; diff --git a/include/editeng/protitem.hxx b/include/editeng/protitem.hxx index 4f3f1c4acd22..0c3b473700d1 100644 --- a/include/editeng/protitem.hxx +++ b/include/editeng/protitem.hxx @@ -66,7 +66,7 @@ public: }; inline SvxProtectItem::SvxProtectItem( const sal_uInt16 nId ) - : SfxPoolItem( nId ) + : SfxPoolItem( nId, SfxItemType::SvxProtectItemType ) { bCntnt = bSize = bPos = false; } diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index b1d45b4c40e1..312a2c9dbc34 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -79,7 +79,8 @@ class SFX2_DLLPUBLIC SfxLinkItem final : public SfxPoolItem { Link<SfxPoolItem const *, void> aLink; public: - SfxLinkItem( sal_uInt16 nWhichId, const Link<SfxPoolItem const *, void>& rValue ) : SfxPoolItem( nWhichId ) + SfxLinkItem( sal_uInt16 nWhichId, const Link<SfxPoolItem const *, void>& rValue ) + : SfxPoolItem( nWhichId, SfxItemType::SfxLinkItemType ) { aLink = rValue; } virtual SfxLinkItem* Clone( SfxItemPool* = nullptr ) const override diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx index 6716678813d1..81d0ee391445 100644 --- a/include/sfx2/evntconf.hxx +++ b/include/sfx2/evntconf.hxx @@ -70,7 +70,8 @@ class SFX2_DLLPUBLIC SfxEventNamesItem final : public SfxPoolItem public: - SfxEventNamesItem ( const sal_uInt16 nId ) : SfxPoolItem( nId ) {} + SfxEventNamesItem ( const sal_uInt16 nId ) + : SfxPoolItem( nId, SfxItemType::SfxEventNamesItemType ) {} virtual bool operator==( const SfxPoolItem& ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index eececb850bd9..562bca9bc927 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -936,12 +936,12 @@ public: static SfxPoolItem* CreateDefault(); SfxObjectShellItem() : - SfxPoolItem( 0 ), + SfxPoolItem( 0, SfxItemType::SfxObjectShellItemType ), pObjSh( nullptr ) {} SfxObjectShellItem( sal_uInt16 nWhichId, SfxObjectShell *pObjShell ): - SfxPoolItem( nWhichId ), + SfxPoolItem( nWhichId, SfxItemType::SfxObjectShellItemType ), pObjSh( pObjShell ) {} diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index ff942d4b27b1..23271831d2c8 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -268,7 +268,7 @@ class SFX2_DLLPUBLIC SfxViewFrameItem final : public SfxPoolItem public: SfxViewFrameItem( SfxViewFrame *pViewFrame ): - SfxPoolItem( 0 ), + SfxPoolItem( 0, SfxItemType::SfxViewFrameItemType ), pFrame( pViewFrame) {} diff --git a/include/svl/cenumitm.hxx b/include/svl/cenumitm.hxx index 9428e095ce29..292648d0f572 100644 --- a/include/svl/cenumitm.hxx +++ b/include/svl/cenumitm.hxx @@ -26,7 +26,7 @@ class SVL_DLLPUBLIC SfxEnumItemInterface: public SfxPoolItem { protected: - explicit SfxEnumItemInterface(sal_uInt16 which): SfxPoolItem(which) {} + explicit SfxEnumItemInterface(sal_uInt16 which, SfxItemType eItemType): SfxPoolItem(which, eItemType) {} SfxEnumItemInterface(const SfxEnumItemInterface &) = default; diff --git a/include/svl/cintitem.hxx b/include/svl/cintitem.hxx index bde59c39906b..0b3da790d1ed 100644 --- a/include/svl/cintitem.hxx +++ b/include/svl/cintitem.hxx @@ -30,8 +30,8 @@ class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem public: - CntByteItem(sal_uInt16 which, sal_uInt8 nTheValue): - SfxPoolItem(which), m_nValue(nTheValue) {} + CntByteItem(sal_uInt16 which, sal_uInt8 nTheValue, SfxItemType eItemType = SfxItemType::CntByteItemType): + SfxPoolItem(which, eItemType), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -66,8 +66,8 @@ class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem public: - CntUInt16Item(sal_uInt16 which, sal_uInt16 nTheValue): - SfxPoolItem(which), m_nValue(nTheValue) + CntUInt16Item(sal_uInt16 which, sal_uInt16 nTheValue, SfxItemType eItemType = SfxItemType::CntUInt16ItemType): + SfxPoolItem(which, eItemType), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -103,8 +103,8 @@ class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem public: - CntInt32Item(sal_uInt16 which, sal_Int32 nTheValue): - SfxPoolItem(which), m_nValue(nTheValue) + CntInt32Item(sal_uInt16 which, sal_Int32 nTheValue, SfxItemType eItemType = SfxItemType::CntInt32ItemType): + SfxPoolItem(which, eItemType), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -140,8 +140,8 @@ class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem public: - CntUInt32Item(sal_uInt16 which, sal_uInt32 nTheValue): - SfxPoolItem(which), m_nValue(nTheValue) + CntUInt32Item(sal_uInt16 which, sal_uInt32 nTheValue, SfxItemType eItemType = SfxItemType::CntUInt32ItemType): + SfxPoolItem(which, eItemType), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; diff --git a/include/svl/custritm.hxx b/include/svl/custritm.hxx index 3159c41dfc96..0251df2ca182 100644 --- a/include/svl/custritm.hxx +++ b/include/svl/custritm.hxx @@ -31,11 +31,12 @@ class SVL_DLLPUBLIC CntUnencodedStringItem: public SfxPoolItem public: - CntUnencodedStringItem(sal_uInt16 which): SfxPoolItem(which) + CntUnencodedStringItem(sal_uInt16 which, SfxItemType eItemType = SfxItemType::CntUnencodedStringItemType) + : SfxPoolItem(which, eItemType) {} - CntUnencodedStringItem(sal_uInt16 which, OUString aTheValue): - SfxPoolItem(which), m_aValue(std::move(aTheValue)) + CntUnencodedStringItem(sal_uInt16 which, OUString aTheValue, SfxItemType eItemType = SfxItemType::CntUnencodedStringItemType): + SfxPoolItem(which, eItemType), m_aValue(std::move(aTheValue)) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; diff --git a/include/svl/eitem.hxx b/include/svl/eitem.hxx index 18bb334a7e96..8e95bed00881 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, EnumT const nValue) - : SfxEnumItemInterface(nWhich) + explicit SfxEnumItem(sal_uInt16 const nWhich, SfxItemType eItemType, EnumT const nValue) + : SfxEnumItemInterface(nWhich, eItemType) , m_nValue(nValue) { } @@ -75,8 +75,9 @@ protected: public: static SfxPoolItem* CreateDefault(); - explicit SfxBoolItem(sal_uInt16 const nWhich = 0, bool const bValue = false) - : SfxPoolItem(nWhich) + explicit SfxBoolItem(sal_uInt16 const nWhich = 0, bool const bValue = false, + SfxItemType eItemType = SfxItemType::SfxBoolItemType) + : SfxPoolItem(nWhich, eItemType) , m_bValue(bValue) { } diff --git a/include/svl/flagitem.hxx b/include/svl/flagitem.hxx index 70b968f2c95c..76226cb1aa80 100644 --- a/include/svl/flagitem.hxx +++ b/include/svl/flagitem.hxx @@ -31,7 +31,8 @@ class SVL_DLLPUBLIC SfxFlagItem: public SfxPoolItem public: - explicit SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0 ); + explicit SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0, + SfxItemType eItemType = SfxItemType::SfxFlagItemType ); virtual sal_uInt8 GetFlagCount() const; diff --git a/include/svl/intitem.hxx b/include/svl/intitem.hxx index 92999568b7f2..f189388e748e 100644 --- a/include/svl/intitem.hxx +++ b/include/svl/intitem.hxx @@ -30,8 +30,9 @@ class SVL_DLLPUBLIC SfxByteItem: public CntByteItem public: static SfxPoolItem* CreateDefault(); - explicit SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0): - CntByteItem(which, nValue) {} + explicit SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0, + SfxItemType eItemType = SfxItemType::SfxByteItemType): + CntByteItem(which, nValue, eItemType) {} virtual SfxByteItem* Clone(SfxItemPool * = nullptr) const override { return new SfxByteItem(*this); } @@ -44,8 +45,9 @@ class SVL_DLLPUBLIC SfxInt16Item: public SfxPoolItem public: static SfxPoolItem* CreateDefault(); - explicit SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0): - SfxPoolItem(which), m_nValue(nTheValue) + explicit SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0, + SfxItemType eItemType = SfxItemType::SfxInt16ItemType): + SfxPoolItem(which, eItemType), m_nValue(nTheValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; @@ -83,8 +85,9 @@ class SVL_DLLPUBLIC SfxUInt16Item: public CntUInt16Item public: static SfxPoolItem* CreateDefault(); - explicit SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0): - CntUInt16Item(which, nValue) {} + explicit SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0, + SfxItemType eItemType = SfxItemType::SfxUInt16ItemType): + CntUInt16Item(which, nValue, eItemType) {} virtual SfxUInt16Item* Clone(SfxItemPool * = nullptr) const override { return new SfxUInt16Item(*this); } @@ -99,8 +102,9 @@ class SVL_DLLPUBLIC SfxInt32Item: public CntInt32Item public: static SfxPoolItem* CreateDefault(); - explicit SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0): - CntInt32Item(which, nValue) {} + explicit SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0, + SfxItemType eItemType = SfxItemType::SfxInt32ItemType): + CntInt32Item(which, nValue, eItemType) {} virtual SfxInt32Item* Clone(SfxItemPool * = nullptr) const override { return new SfxInt32Item(*this); } diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx index 1c2a4cf301b7..412f5cec8ece 100644 --- a/include/svl/macitem.hxx +++ b/include/svl/macitem.hxx @@ -135,7 +135,7 @@ private: }; inline SvxMacroItem::SvxMacroItem( const sal_uInt16 nId ) - : SfxPoolItem( nId ) + : SfxPoolItem( nId, SfxItemType::SvxMacroItemType ) {} inline bool SvxMacroItem::HasMacro( SvMacroItemId nEvent ) const diff --git a/include/svl/metitem.hxx b/include/svl/metitem.hxx index 30cf75b7f864..125ee7c3dc1d 100644 --- a/include/svl/metitem.hxx +++ b/include/svl/metitem.hxx @@ -25,7 +25,8 @@ class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item { public: - explicit SfxMetricItem( sal_uInt16 nWhich, sal_Int32 nValue ); + explicit SfxMetricItem( sal_uInt16 nWhich, sal_Int32 nValue, + SfxItemType eItemType = SfxItemType::SfxMetricItemType ); 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 b48d1000426e..4f71bc871a58 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -104,6 +104,314 @@ enum class SfxItemState { SET = 0x0040 }; +enum class SfxItemType : sal_uInt16 { + SfxPoolItemType, + AffineMatrixItemType, + CntByteItemType, + CntInt32ItemType, + CntUInt16ItemType, + CntUInt32ItemType, + CntUnencodedStringItemType, + DatabaseMapItemType, + DbuTypeCollectionItemType, + DriverPoolingSettingsItemType, + InvalidOrDisabledItemType, + MediaItemType, + NameOrIndexType, + OStringListItemType, + OfaPtrItemType, + OfaXColorListItemType, + OptionalBoolItemType, + RectangleAlignmentType, + SbxItemType, + ScCondFormatItemType, + ScConsolidateItemType, + ScInputStatusItemType, + ScMergeAttrType, + ScPageHFItemType, + ScPageScaleToItemType, + ScPivotItemType, + ScProtectionAttrType, + ScQueryItemType, + ScSolveItemType, + ScSortItemType, + ScSubTotalItemType, + ScTabOpItemType, + ScTpCalcItemType, + ScTpDefaultsItemType, + ScTpFormulaItemType, + ScTpPrintItemType, + ScTpViewItemType, + ScUserListItemType, + ScViewObjectModeItemType, + SdOptionsMiscItemType, + SdOptionsPrintItemType, + SdOptionsSnapItemType, + SdrAngleItemType, + SdrCaptionEscDirItemType, + SdrCaptionTypeItem, + SdrCaptionTypeItemType, + SdrCircKindItemType, + SdrCustomShapeGeometryItemType, + SdrEdgeKindItemType, + SdrFractionItemType, + SdrGrafModeItem_Base, + SdrLayerIdItemType, + SdrLayerNameItemType, + SdrMeasureFormatStringItemType, + SdrMeasureKindItemType, + SdrMeasureScaleItemType, + SdrMeasureTextAutoAngleItemType, + SdrMeasureTextAutoAngleViewItemType, + SdrMeasureTextHPosItemType, + SdrMeasureTextVPosItemType, + SdrMeasureUnitItemType, + SdrResizeXAllItemType, + SdrResizeXOneItemType, + SdrResizeYAllItemType, + SdrResizeYOneItemType, + SdrScaleItemType, + SdrTextAniDirectionItemType, + SdrTextAniKindItemType, + SdrTextFitToSizeTypeItemType, + SdrTextHorzAdjustType, + SdrTextVertAdjustType, + SdrYesNoItemType, + SfxBoolItemType, + SfxByteItemType, + SfxDocumentInfoItemType, + SfxEnumItemInterface, + SfxEventNamesItemType, + SfxFlagItemType, + SfxFrameItemType, + SfxGlobalNameItemType, + SfxGrabBagItemType, + SfxHyphenRegionItemType, + SfxImageItemType, + SfxInt16ItemType, + SfxInt32ItemType, + SfxInt64ItemType, + SfxIntegerListItemType, + SfxLinkItemType, + SfxLockBytesItemType, + SfxMacroInfoItemType, + SfxMetricItemType, + SfxObjectItemType, + SfxObjectShellItemType, + SfxPointItemType, + SfxRangeItemType, + SfxRectangleItemType, + SfxRegionItemType, + SfxSetItemType, + SfxStringItemType, + SfxStringListItemType, + SfxTemplateItemType, + SfxUInt16ItemType, + SfxUnoAnyItemType, + SfxUnoFrameItemType, + SfxViewFrameItemType, + SfxVisibilityItemType, + SfxVoidItemType, + SfxWatermarkItemType, + SfxZoomItemType, + SvXMLAttrContainerItemType, + SvxAdjustItemType, + SvxAutoKernItemType, + SvxB3DVectorItemType, + SvxBitmapListItemType, + SvxBlinkItemType, + SvxBoxInfoItemType, + SvxBoxItemType, + SvxBrushItemType, + SvxBulletItemType, + SvxCaseMapItemType, + SvxCharHiddenItemType, + SvxCharReliefItemType, + SvxCharScaleWidthItem, + SvxChartColorTableItemType, + SvxChartIndicateItemType, + SvxChartKindErrorItemType, + SvxChartRegressItemType, + SvxChartTextOrderItemType, + SvxClipboardFormatItemType, + SvxColorItemType, + SvxColorListItemType, + SvxColumnItemType, + SvxContourItemType, + SvxCrossedOutItemType, + SvxDashListItemType, + SvxDoubleItemType, + SvxEmphasisMarkItemType, + SvxEscapementItemType, + SvxFieldItemType, + SvxFirstLineIndentItemType, + SvxFontHeightItemType, + SvxFontItemType, + SvxFontListItemType, + SvxForbiddenRuleItemType, + SvxFormatBreakItemType, + SvxFrameDirectionItemType, + SvxGalleryItemType, + SvxGradientListItemType, + SvxGraphicItemType, + SvxGrfCrop, + SvxGrfCropType, + SvxGridItem, + SvxGridItemType, + SvxGutterLeftMarginItemType, + SvxGutterRightMarginItemType, + SvxHangingPunctuationItemType, + SvxHatchListItemType, + SvxHorJustifyItemType, + SvxHyperlinkItemType, + SvxHyphenZoneItem, + SvxHyphenZoneItemType, + SvxJustifyMethodItemType, + SvxKerningItemType, + SvxLRSpaceItemType, + SvxLanguageItemType, + SvxLeftMarginItemType, + SvxLineEndListItemType, + SvxLineItemType, + SvxLineSpacingItemType, + SvxLongLRSpaceItemType, + SvxLongULSpaceItemType, + SvxMacroItemType, + SvxMarginItemType, + SvxNoHyphenItemType, + SvxNumBulletItemType, + SvxNumberInfoItemType, + SvxObjectItemType, + SvxOrientationItemType, + SvxOrphansItemType, + SvxPageItemType, + SvxPagePosSizeItemType, + SvxParaGridItemType, + SvxParaVertAlignItemType, + SvxPatternListItemType, + SvxPostureItemType, + SvxProtectItemType, + SvxRightMarginItemType, + SvxRotateModeItemType, + SvxScriptSetItemType, + SvxScriptSpaceItemType, + SvxSearchItemType, + SvxShadowItemType, + SvxShadowedItemType, + SvxSizeItem , + SvxSizeItemType, + SvxSmartTagItemType, + SvxTabStopItemType, + SvxTextLeftMarginItemType, + SvxTextLineItemType, + SvxTextRotateItemType, + SvxTwoLinesItemType, + SvxULSpaceItemType, + SvxVerJustifyItemType, + SvxWeightItemType, + SvxWidowsItemType, + SvxWordLineItemType, + SvxWritingModeItemType, + SwAddPrinterItemType, + SwCondCollItemType, + SwCropGrfType, + SwDocDisplayItemType, + SwDrawModeGrf_BaseType, + SwElemItemType, + SwEnvItemType, + SwFltAnchorType, + SwFltBookmarkType, + SwFltRDFMarkType, + SwFltRedlineType, + SwFltTOXType, + SwFmtAidsAutoComplItemType, + SwFormatAnchorType, + SwFormatAutoFormatType, + SwFormatChainType, + SwFormatCharFormatType, + SwFormatColType, + SwFormatContentControlType, + SwFormatContentType, + SwFormatDropType, + SwFormatFieldType, + SwFormatFillOrderType, + SwFormatFlyCntType, + SwFormatFooterType, + SwFormatFootnoteEndAtTextEndType, + SwFormatFootnoteType, + SwFormatHeaderType, + SwFormatHoriOrientType, + SwFormatINetFormatType, + SwFormatLineNumberType, + SwFormatLinebreakType, + SwFormatMetaType, + SwFormatPageDescType, + SwFormatRefMarkType, + SwFormatRubyType, + SwFormatSurroundType, + SwFormatURLType, + SwFormatVertOrientType, + SwFormatWrapInfluenceOnOjPosType, + SwGammaGrfType, + SwInvertGrfType, + SwLabItemType, + SwMirrorGrfType, + SwMsgPoolItemType, + SwPaMItemType, + SwPageFootnoteInfoItemType, + SwPtrItemType, + SwRotationGrfType, + SwShadowCursorItemType, + SwTOXMarkType, + SwTableBoxValueType, + SwTableFormulaType, + SwTextGridItemType, + SwTransparencyGrfType, + SwUINumRuleItemType, + SwWrtShellItemType, + XFillAttrSetItemType, + XFillBackgroundItemType, + XFillBmpPosItemType, + XFillBmpPosOffsetXItemType, + XFillBmpPosOffsetYItemType, + XFillBmpSizeLogItemType, + XFillBmpSizeXItemType, + XFillBmpSizeYItemType, + XFillBmpStretchItemType, + XFillBmpTileItemType, + XFillBmpTileOffsetXItemType, + XFillBmpTileOffsetYItemType, + XFillStyleItemType, + XFillTransparenceItemType, + XFillUseSlideBackgroundItemType, + XFormTextAdjustItemType, + XFormTextDistanceItemType, + XFormTextHideFormItemType, + XFormTextMirrorItem, + XFormTextOutlineItemType, + XFormTextShadowItemType, + XFormTextShadowTranspItemType, + XFormTextShadowXValItemType, + XFormTextShadowYValItemType, + XFormTextStartItemType, + XFormTextStyleItemType, + XGradientStepCountItemType, + XLineAttrSetItemType, + XLineCapItemType, + XLineEndCenterItemType, + XLineEndWidthItemType, + XLineJointItemType, + XLineStartCenterItem, + XLineStartWidthItemType, + XLineStyleItemType, + XLineTransparenceItemType, + XLineWidthItemType +#ifdef DBG_UTIL + , SwTestItemType +#endif +}; + + #ifdef DBG_UTIL SVL_DLLPUBLIC size_t getAllocatedSfxPoolItemCount(); SVL_DLLPUBLIC size_t getUsedSfxPoolItemCount(); @@ -129,6 +437,7 @@ class SVL_DLLPUBLIC SfxPoolItem mutable sal_uInt32 m_nRefCount; sal_uInt16 m_nWhich; + SfxItemType m_eItemType; #ifdef DBG_UTIL // for debugging add a serial number, will be set in the constructor @@ -209,9 +518,10 @@ private: } protected: - explicit SfxPoolItem( sal_uInt16 nWhich = 0 ); + + explicit SfxPoolItem( sal_uInt16 nWhich, SfxItemType ); SfxPoolItem( const SfxPoolItem& rCopy) - : SfxPoolItem(rCopy.m_nWhich) {} + : SfxPoolItem(rCopy.m_nWhich, rCopy.m_eItemType) {} public: virtual ~SfxPoolItem(); @@ -223,6 +533,8 @@ public: m_nWhich = nId; } sal_uInt16 Which() const { return m_nWhich; } + SfxItemType ItemType() const { return m_eItemType;} + // StaticWhichCast asserts if the TypedWhichId is not matching its type, otherwise it returns a reference. // You can use StaticWhichCast when you are sure about the type at compile time -- like a static_cast. template<class T> T& StaticWhichCast(TypedWhichId<T> nId) diff --git a/include/svl/setitem.hxx b/include/svl/setitem.hxx index 69ebea4b1d23..6468037870be 100644 --- a/include/svl/setitem.hxx +++ b/include/svl/setitem.hxx @@ -31,8 +31,10 @@ class SVL_DLLPUBLIC SfxSetItem : public SfxPoolItem SfxSetItem& operator=(const SfxSetItem&) = delete; public: - SfxSetItem(sal_uInt16 nWhich, SfxItemSet&& pSet); - SfxSetItem(sal_uInt16 nWhich, const SfxItemSet& rSet); + SfxSetItem(sal_uInt16 nWhich, SfxItemSet&& pSet, + SfxItemType eItemType = SfxItemType::SfxSetItemType); + SfxSetItem(sal_uInt16 nWhich, const SfxItemSet& rSet, + SfxItemType eItemType = SfxItemType::SfxSetItemType); SfxSetItem(const SfxSetItem&, SfxItemPool* pPool = nullptr); virtual bool operator==(const SfxPoolItem&) const override; diff --git a/include/svl/stritem.hxx b/include/svl/stritem.hxx index fe3695f7947b..1b788c05bdf5 100644 --- a/include/svl/stritem.hxx +++ b/include/svl/stritem.hxx @@ -29,10 +29,11 @@ class SVL_DLLPUBLIC SfxStringItem: public CntUnencodedStringItem public: static SfxPoolItem* CreateDefault(); - SfxStringItem(sal_uInt16 which = 0): CntUnencodedStringItem(which) {} + SfxStringItem(sal_uInt16 which = 0, SfxItemType eItemType = SfxItemType::SfxStringItemType) + : CntUnencodedStringItem(which, eItemType) {} - SfxStringItem(sal_uInt16 which, const OUString & rValue): - CntUnencodedStringItem(which, rValue) {} + SfxStringItem(sal_uInt16 which, const OUString & rValue, SfxItemType eItemType = SfxItemType::SfxStringItemType): + CntUnencodedStringItem(which, rValue, eItemType) {} virtual SfxStringItem* Clone(SfxItemPool * = nullptr) const override; diff --git a/include/svl/visitem.hxx b/include/svl/visitem.hxx index 4ae5cdd550c1..8a458bbf2f6c 100644 --- a/include/svl/visitem.hxx +++ b/include/svl/visitem.hxx @@ -31,7 +31,7 @@ class SVL_DLLPUBLIC SfxVisibilityItem final : public SfxPoolItem public: explicit SfxVisibilityItem(sal_uInt16 which, bool bVisible): - SfxPoolItem(which) + SfxPoolItem(which, SfxItemType::SfxVisibilityItemType) { m_nValue.bVisible = bVisible; } diff --git a/include/svtools/borderline.hxx b/include/svtools/borderline.hxx index 36780bddf422..90ecee6512f5 100644 --- a/include/svtools/borderline.hxx +++ b/include/svtools/borderline.hxx @@ -21,6 +21,7 @@ #include <svtools/svtdllapi.h> #include <o3tl/typed_flags_set.hxx> +#include <o3tl/hash_combine.hxx> #include <tools/long.hxx> /** @@ -73,6 +74,16 @@ public: bool IsEmpty( ) const { return (0 == m_nRate1) && (0 == m_nRate2); } bool IsDouble( ) const { return (0 != m_nRate1) && (0 != m_nRate2); } + std::size_t getHash() const + { + std::size_t seed = 0; + o3tl::hash_combine(seed, m_nFlags); + o3tl::hash_combine(seed, m_nRate1); + o3tl::hash_combine(seed, m_nRate2); + o3tl::hash_combine(seed, m_nRateGap); + return seed; + } + }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/grfcrop.hxx b/include/svx/grfcrop.hxx index de0cfef5b976..3eed97fbab47 100644 --- a/include/svx/grfcrop.hxx +++ b/include/svx/grfcrop.hxx @@ -30,10 +30,11 @@ class SVXCORE_DLLPUBLIC SvxGrfCrop : public SfxPoolItem { sal_Int32 nLeft, nRight, nTop, nBottom; public: - SvxGrfCrop( TypedWhichId<SvxGrfCrop> ); + SvxGrfCrop( TypedWhichId<SvxGrfCrop>, SfxItemType eType = SfxItemType::SvxGrfCropType ); SvxGrfCrop( sal_Int32 nLeft, sal_Int32 nRight, sal_Int32 nTop, sal_Int32 nBottom, - TypedWhichId<SvxGrfCrop> ); + TypedWhichId<SvxGrfCrop>, + SfxItemType eItemType = SfxItemType::SvxGrfCropType ); virtual ~SvxGrfCrop() override; SvxGrfCrop(SvxGrfCrop const &) = default; diff --git a/include/svx/hlnkitem.hxx b/include/svx/hlnkitem.hxx index 03eb8424561c..95a42c273c59 100644 --- a/include/svx/hlnkitem.hxx +++ b/include/svx/hlnkitem.hxx @@ -62,7 +62,8 @@ public: static SfxPoolItem* CreateDefault(); SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> _nWhich = SID_HYPERLINK_GETLINK ): - SfxPoolItem(_nWhich) { eType = HLINK_DEFAULT; nMacroEvents=HyperDialogEvent::NONE; }; + SfxPoolItem(_nWhich, SfxItemType::SvxHyperlinkItemType) + { eType = HLINK_DEFAULT; nMacroEvents=HyperDialogEvent::NONE; }; SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ); SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> nWhich, OUString aName, OUString aURL, OUString aTarget, OUString aIntName, diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx index 7cdcdf8399f3..6876d0c25b30 100644 --- a/include/svx/optgrid.hxx +++ b/include/svx/optgrid.hxx @@ -69,7 +69,8 @@ class SVX_DLLPUBLIC SvxGridItem : public SvxOptionsGrid, public SfxPoolItem friend class SvxGridTabPage; public: - SvxGridItem( TypedWhichId<SvxGridItem> _nWhich) : SfxPoolItem(_nWhich){}; + SvxGridItem( TypedWhichId<SvxGridItem> _nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxGridItemType){}; virtual SvxGridItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/include/svx/sdangitm.hxx b/include/svx/sdangitm.hxx index ee4af385a171..2d778010c6cd 100644 --- a/include/svx/sdangitm.hxx +++ b/include/svx/sdangitm.hxx @@ -27,7 +27,8 @@ class SVXCORE_DLLPUBLIC SdrAngleItem: public SfxInt32Item { public: - SdrAngleItem(TypedWhichId<SdrAngleItem> nId, Degree100 nAngle): SfxInt32Item(nId,nAngle.get()) {} + SdrAngleItem(TypedWhichId<SdrAngleItem> nId, Degree100 nAngle, SfxItemType eItemType = SfxItemType::SdrAngleItemType) + : SfxInt32Item(nId,nAngle.get(), eItemType) {} virtual SdrAngleItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual bool GetPresentation(SfxItemPresentation ePres, diff --git a/include/svx/sdgmoitm.hxx b/include/svx/sdgmoitm.hxx index 2ea7a84ca292..cb5a1d90cb6c 100644 --- a/include/svx/sdgmoitm.hxx +++ b/include/svx/sdgmoitm.hxx @@ -29,7 +29,7 @@ class SAL_DLLPUBLIC_RTTI SdrGrafModeItem_Base: public SfxEnumItem<GraphicDrawMode> { protected: SdrGrafModeItem_Base(GraphicDrawMode eMode): - SfxEnumItem(SDRATTR_GRAFMODE, eMode) {} + SfxEnumItem(SDRATTR_GRAFMODE, SfxItemType::SdrGrafModeItem_Base, eMode) {} }; class SVXCORE_DLLPUBLIC SdrGrafModeItem final : public SdrGrafModeItem_Base diff --git a/include/svx/sdtaditm.hxx b/include/svx/sdtaditm.hxx index 79ae6bc011be..6225352e2738 100644 --- a/include/svx/sdtaditm.hxx +++ b/include/svx/sdtaditm.hxx @@ -33,7 +33,8 @@ enum class SdrTextAniDirection class SVXCORE_DLLPUBLIC SdrTextAniDirectionItem final : public SfxEnumItem<SdrTextAniDirection> { public: - SdrTextAniDirectionItem(SdrTextAniDirection eDir=SdrTextAniDirection::Left): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION, eDir) {} + SdrTextAniDirectionItem(SdrTextAniDirection eDir=SdrTextAniDirection::Left) + : SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION, SfxItemType::SdrTextAniDirectionItemType, eDir) {} virtual SdrTextAniDirectionItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; diff --git a/include/svx/sdtaitm.hxx b/include/svx/sdtaitm.hxx index 716f703ec4eb..4838c85c4a53 100644 --- a/include/svx/sdtaitm.hxx +++ b/include/svx/sdtaitm.hxx @@ -34,8 +34,10 @@ enum SdrTextVertAdjust {SDRTEXTVERTADJUST_TOP, // aligned to top (normally class SVXCORE_DLLPUBLIC SdrTextVertAdjustItem final : public SfxEnumItem<SdrTextVertAdjust> { public: - SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): SfxEnumItem(SDRATTR_TEXT_VERTADJUST, eAdj) {} - SdrTextVertAdjustItem(SdrTextVertAdjust eAdj, TypedWhichId<SdrTextVertAdjustItem> nWhich): SfxEnumItem(nWhich, eAdj) {} + SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): + SfxEnumItem(SDRATTR_TEXT_VERTADJUST, SfxItemType::SdrTextVertAdjustType, eAdj) {} + SdrTextVertAdjustItem(SdrTextVertAdjust eAdj, TypedWhichId<SdrTextVertAdjustItem> nWhich) + : SfxEnumItem(nWhich, SfxItemType::SdrTextVertAdjustType, eAdj) {} virtual SdrTextVertAdjustItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 5; } @@ -58,7 +60,8 @@ enum SdrTextHorzAdjust {SDRTEXTHORZADJUST_LEFT, // left adjusted class SVXCORE_DLLPUBLIC SdrTextHorzAdjustItem final : public SfxEnumItem<SdrTextHorzAdjust> { public: - SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): SfxEnumItem(SDRATTR_TEXT_HORZADJUST, eAdj) {} + SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): + SfxEnumItem(SDRATTR_TEXT_HORZADJUST, SfxItemType::SdrTextHorzAdjustType, eAdj) {} virtual SdrTextHorzAdjustItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; diff --git a/include/svx/sdtakitm.hxx b/include/svx/sdtakitm.hxx index 0d86e517bb84..38ec15a2b851 100644 --- a/include/svx/sdtakitm.hxx +++ b/include/svx/sdtakitm.hxx @@ -78,7 +78,8 @@ enum class SdrTextAniKind { class SVXCORE_DLLPUBLIC SdrTextAniKindItem final : public SfxEnumItem<SdrTextAniKind> { public: - SdrTextAniKindItem(SdrTextAniKind eKind=SdrTextAniKind::NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND, eKind) {} + SdrTextAniKindItem(SdrTextAniKind eKind=SdrTextAniKind::NONE) + : SfxEnumItem(SDRATTR_TEXT_ANIKIND, SfxItemType::SdrTextAniKindItemType, eKind) {} virtual SdrTextAniKindItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 5; } diff --git a/include/svx/sdtfsitm.hxx b/include/svx/sdtfsitm.hxx index 55fe48a5fc61..c61349d5352d 100644 --- a/include/svx/sdtfsitm.hxx +++ b/include/svx/sdtfsitm.hxx @@ -36,7 +36,7 @@ class SVXCORE_DLLPUBLIC SdrTextFitToSizeTypeItem final public: static SfxPoolItem* CreateDefault(); SdrTextFitToSizeTypeItem(css::drawing::TextFitToSizeType const eFit = css::drawing::TextFitToSizeType_NONE) - : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, eFit) + : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, SfxItemType::SdrTextFitToSizeTypeItemType, eFit) { } diff --git a/include/svx/sdynitm.hxx b/include/svx/sdynitm.hxx index 970956a42cee..08884c3404d2 100644 --- a/include/svx/sdynitm.hxx +++ b/include/svx/sdynitm.hxx @@ -29,7 +29,8 @@ //-------------------------------------------------- ---------- class SVXCORE_DLLPUBLIC SdrYesNoItem: public SfxBoolItem { public: - SdrYesNoItem(TypedWhichId<SdrYesNoItem> nId, bool bOn): SfxBoolItem(nId,bOn) {} + SdrYesNoItem(TypedWhichId<SdrYesNoItem> nId, bool bOn, SfxItemType eItemType = SfxItemType::SdrYesNoItemType) + : SfxBoolItem(nId, bOn, eItemType) {} virtual SdrYesNoItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual OUString GetValueTextByVal(bool bVal) const override; virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override; diff --git a/include/svx/sxcecitm.hxx b/include/svx/sxcecitm.hxx index 493234ea6c7f..9f20c10c1a7f 100644 --- a/include/svx/sxcecitm.hxx +++ b/include/svx/sxcecitm.hxx @@ -32,7 +32,8 @@ enum class SdrCaptionEscDir { Horizontal, Vertical, BestFit }; class SVXCORE_DLLPUBLIC SdrCaptionEscDirItem final : public SfxEnumItem<SdrCaptionEscDir> { public: - SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SdrCaptionEscDir::Horizontal): SfxEnumItem(SDRATTR_CAPTIONESCDIR, eDir) {} + SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SdrCaptionEscDir::Horizontal) + : SfxEnumItem(SDRATTR_CAPTIONESCDIR, SfxItemType::SdrCaptionEscDirItemType, eDir) {} SAL_DLLPRIVATE virtual SdrCaptionEscDirItem* Clone(SfxItemPool* pPool=nullptr) const override; SAL_DLLPRIVATE virtual sal_uInt16 GetValueCount() const override; // { return 3; } diff --git a/include/svx/sxctitm.hxx b/include/svx/sxctitm.hxx index 402f6320b505..5872f079b34e 100644 --- a/include/svx/sxctitm.hxx +++ b/include/svx/sxctitm.hxx @@ -29,7 +29,8 @@ enum class SdrCaptionType { Type1, Type2, Type3, Type4 }; class SVXCORE_DLLPUBLIC SdrCaptionTypeItem final : public SfxEnumItem<SdrCaptionType> { public: - SdrCaptionTypeItem(SdrCaptionType eStyle=SdrCaptionType::Type3): SfxEnumItem(SDRATTR_CAPTIONTYPE, eStyle) {} + SdrCaptionTypeItem(SdrCaptionType eStyle=SdrCaptionType::Type3) + : SfxEnumItem(SDRATTR_CAPTIONTYPE, SfxItemType::SdrCaptionTypeItemType, eStyle) {} SAL_DLLPRIVATE virtual SdrCaptionTypeItem* Clone(SfxItemPool* pPool=nullptr) const override; SAL_DLLPRIVATE virtual sal_uInt16 GetValueCount() const override; // { return 4; } SAL_DLLPRIVATE static OUString GetValueTextByPos(sal_uInt16 nPos); diff --git a/include/svx/sxekitm.hxx b/include/svx/sxekitm.hxx index 4d6b05bf9d6b..7aa6bdb6f55b 100644 --- a/include/svx/sxekitm.hxx +++ b/include/svx/sxekitm.hxx @@ -30,7 +30,8 @@ enum class SdrEdgeKind class SVXCORE_DLLPUBLIC SdrEdgeKindItem final : public SfxEnumItem<SdrEdgeKind> { public: - SdrEdgeKindItem(SdrEdgeKind eStyle=SdrEdgeKind::OrthoLines): SfxEnumItem(SDRATTR_EDGEKIND, eStyle) {} + SdrEdgeKindItem(SdrEdgeKind eStyle=SdrEdgeKind::OrthoLines) + : SfxEnumItem(SDRATTR_EDGEKIND, SfxItemType::SdrEdgeKindItemType, eStyle) {} SAL_DLLPRIVATE virtual SdrEdgeKindItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 5; } SAL_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; diff --git a/include/svx/sxmtpitm.hxx b/include/svx/sxmtpitm.hxx index 0a07ea0fb6f6..3cb963ca5b7e 100644 --- a/include/svx/sxmtpitm.hxx +++ b/include/svx/sxmtpitm.hxx @@ -28,7 +28,7 @@ class SVXCORE_DLLPUBLIC SdrMeasureTextHPosItem final : public SfxEnumItem<css::drawing::MeasureTextHorzPos> { public: SdrMeasureTextHPosItem(css::drawing::MeasureTextHorzPos ePos = css::drawing::MeasureTextHorzPos::MeasureTextHorzPos_AUTO) - : SfxEnumItem(SDRATTR_MEASURETEXTHPOS, ePos) + : SfxEnumItem(SDRATTR_MEASURETEXTHPOS, SfxItemType::SdrMeasureTextHPosItemType, ePos) { } SAL_DLLPRIVATE virtual SdrMeasureTextHPosItem* Clone(SfxItemPool* pPool=nullptr) const override; @@ -44,7 +44,7 @@ public: class SVXCORE_DLLPUBLIC SdrMeasureTextVPosItem final : public SfxEnumItem<css::drawing::MeasureTextVertPos> { public: SdrMeasureTextVPosItem(css::drawing::MeasureTextVertPos ePos = css::drawing::MeasureTextVertPos_AUTO) - : SfxEnumItem(SDRATTR_MEASURETEXTVPOS, ePos) + : SfxEnumItem(SDRATTR_MEASURETEXTVPOS, SfxItemType::SdrMeasureTextVPosItemType, ePos) { } SAL_DLLPRIVATE virtual SdrMeasureTextVPosItem* Clone(SfxItemPool* pPool=nullptr) const override; diff --git a/include/svx/sxmuitm.hxx b/include/svx/sxmuitm.hxx index 5ebf0a4f6499..d409f2973ad2 100644 --- a/include/svx/sxmuitm.hxx +++ b/include/svx/sxmuitm.hxx @@ -28,7 +28,8 @@ // (based on the facts of the MapUnit of the model). This unity is displayed if necessary. class SVXCORE_DLLPUBLIC SdrMeasureUnitItem final : public SfxEnumItem<FieldUnit> { public: - SdrMeasureUnitItem(FieldUnit eUnit=FieldUnit::NONE): SfxEnumItem(SDRATTR_MEASUREUNIT, eUnit) {} + SdrMeasureUnitItem(FieldUnit eUnit=FieldUnit::NONE) + : SfxEnumItem(SDRATTR_MEASUREUNIT, SfxItemType::SdrMeasureUnitItemType, eUnit) {} SAL_DLLPRIVATE virtual SdrMeasureUnitItem* Clone(SfxItemPool* pPool=nullptr) const override; SAL_DLLPRIVATE virtual sal_uInt16 GetValueCount() const override; // { return 14; } diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 35e6e991dd53..f118ca7d063e 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -80,19 +80,19 @@ bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxB * Merge */ ScMergeAttr::ScMergeAttr(): - SfxPoolItem(ATTR_MERGE), + SfxPoolItem(ATTR_MERGE, SfxItemType::ScMergeAttrType), nColMerge(0), nRowMerge(0) {} ScMergeAttr::ScMergeAttr( SCCOL nCol, SCROW nRow): - SfxPoolItem(ATTR_MERGE), + SfxPoolItem(ATTR_MERGE, SfxItemType::ScMergeAttrType), nColMerge(nCol), nRowMerge(nRow) {} ScMergeAttr::ScMergeAttr(const ScMergeAttr& rItem): - SfxPoolItem(ATTR_MERGE) + SfxPoolItem(ATTR_MERGE, SfxItemType::ScMergeAttrType) { nColMerge = rItem.nColMerge; nRowMerge = rItem.nRowMerge; @@ -183,7 +183,7 @@ void ScMergeFlagAttr::dumpAsXml(xmlTextWriterPtr pWriter) const * Protection */ ScProtectionAttr::ScProtectionAttr(): - SfxPoolItem(ATTR_PROTECTION), + SfxPoolItem(ATTR_PROTECTION, SfxItemType::ScProtectionAttrType), bProtection(true), bHideFormula(false), bHideCell(false), @@ -193,7 +193,7 @@ ScProtectionAttr::ScProtectionAttr(): ScProtectionAttr::ScProtectionAttr( bool bProtect, bool bHFormula, bool bHCell, bool bHPrint): - SfxPoolItem(ATTR_PROTECTION), + SfxPoolItem(ATTR_PROTECTION, SfxItemType::ScProtectionAttrType), bProtection(bProtect), bHideFormula(bHFormula), bHideCell(bHCell), @@ -202,7 +202,7 @@ ScProtectionAttr::ScProtectionAttr( bool bProtect, bool bHFormula, } ScProtectionAttr::ScProtectionAttr(const ScProtectionAttr& rItem): - SfxPoolItem(ATTR_PROTECTION) + SfxPoolItem(ATTR_PROTECTION, SfxItemType::ScProtectionAttrType) { bProtection = rItem.bProtection; bHideFormula = rItem.bHideFormula; @@ -392,7 +392,7 @@ void ScProtectionAttr::dumpAsXml(xmlTextWriterPtr pWriter) const * ScPageHFItem - Dates from the Head and Foot lines */ ScPageHFItem::ScPageHFItem( sal_uInt16 nWhichP ) - : SfxPoolItem ( nWhichP ) + : SfxPoolItem( nWhichP, SfxItemType::ScPageHFItemType ) { } @@ -518,12 +518,12 @@ void ScPageHFItem::dumpAsXml(xmlTextWriterPtr pWriter) const * ScViewObjectModeItem - Display Mode of View Objects */ ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP ) - : SfxEnumItem( nWhichP, VOBJ_MODE_SHOW ) + : SfxEnumItem( nWhichP, SfxItemType::ScViewObjectModeItemType, VOBJ_MODE_SHOW ) { } ScViewObjectModeItem::ScViewObjectModeItem( sal_uInt16 nWhichP, ScVObjMode eMode ) - : SfxEnumItem( nWhichP, eMode ) + : SfxEnumItem( nWhichP, SfxItemType::ScViewObjectModeItemType, eMode ) { } @@ -588,14 +588,14 @@ ScViewObjectModeItem* ScViewObjectModeItem::Clone( SfxItemPool* ) const } ScPageScaleToItem::ScPageScaleToItem() : - SfxPoolItem( ATTR_PAGE_SCALETO ), + SfxPoolItem( ATTR_PAGE_SCALETO, SfxItemType::ScPageScaleToItemType ), mnWidth( 0 ), mnHeight( 0 ) { } ScPageScaleToItem::ScPageScaleToItem( sal_uInt16 nWidth, sal_uInt16 nHeight ) : - SfxPoolItem( ATTR_PAGE_SCALETO ), + SfxPoolItem( ATTR_PAGE_SCALETO, SfxItemType::ScPageScaleToItemType ), mnWidth( nWidth ), mnHeight( nHeight ) { @@ -695,24 +695,24 @@ void ScPageScaleToItem::dumpAsXml(xmlTextWriterPtr pWriter) const } ScCondFormatItem::ScCondFormatItem(): - SfxPoolItem( ATTR_CONDITIONAL ) + SfxPoolItem( ATTR_CONDITIONAL, SfxItemType::ScCondFormatItemType ) { } ScCondFormatItem::ScCondFormatItem( sal_uInt32 nIndex ): - SfxPoolItem( ATTR_CONDITIONAL ) + SfxPoolItem( ATTR_CONDITIONAL, SfxItemType::ScCondFormatItemType ) { maIndex.insert(nIndex); } ScCondFormatItem::ScCondFormatItem( const ScCondFormatIndexes& rIndex ): - SfxPoolItem( ATTR_CONDITIONAL ), + SfxPoolItem( ATTR_CONDITIONAL, SfxItemType::ScCondFormatItemType ), maIndex( rIndex ) { } ScCondFormatItem::ScCondFormatItem( ScCondFormatIndexes&& aIndex ) noexcept: - SfxPoolItem( ATTR_CONDITIONAL ), + SfxPoolItem( ATTR_CONDITIONAL, SfxItemType::ScCondFormatItemType ), maIndex( std::move(aIndex) ) { } diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx index 098cc11e6230..6436b7e9f910 100644 --- a/sc/source/core/tool/defaultsoptions.cxx +++ b/sc/source/core/tool/defaultsoptions.cxx @@ -40,7 +40,7 @@ bool ScDefaultsOptions::operator==( const ScDefaultsOptions& rOpt ) const } ScTpDefaultsItem::ScTpDefaultsItem( ScDefaultsOptions aOpt ) : - SfxPoolItem ( SID_SCDEFAULTSOPTIONS ), + SfxPoolItem ( SID_SCDEFAULTSOPTIONS, SfxItemType::ScTpDefaultsItemType ), theOptions (std::move( aOpt )) { } diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx index 98c8bd7124d6..bc6bc326a9b5 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -106,7 +106,7 @@ void ScDocOptions::SetFormulaWildcardsEnabled( bool bVal ) // ScTpCalcItem - data for the CalcOptions TabPage ScTpCalcItem::ScTpCalcItem( sal_uInt16 nWhichP, const ScDocOptions& rOpt ) - : SfxPoolItem ( nWhichP ), + : SfxPoolItem ( nWhichP, SfxItemType::ScTpCalcItemType ), theOptions ( rOpt ) { } diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx -e ... etc. - the rest is truncated
