diff options
author | Oliver Specht <oliver.specht@cib.de> | 2024-05-22 12:26:46 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-06-19 23:32:20 +0200 |
commit | 04a5157e9526c1570034fc88973a061138b133ea (patch) | |
tree | 8fa13473284d737147828fb0898c9abca7c9a86d | |
parent | 60c00a1d12fe531dbec8c285eaf8bfa02684be3c (diff) |
Add SfxItemType to SfxPoolItem
cib_contract49c-24.2.4.2.M1
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 <thorsten.behrens@allotropia.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169185
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
160 files changed, 935 insertions, 513 deletions
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index 320a24bc9bfe..0b60fb3add58 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 b01e5c238a6c..e53f5fad7728 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1400,9 +1400,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 116dab2bb905..e94ccfbb391b 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -388,7 +388,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 4a6b1dfbfb5c..eee94719c45a 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 9ef9f75e3f40..70c0342ec574 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -627,9 +627,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 ); } } @@ -639,7 +639,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 ); } @@ -653,15 +653,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() ); @@ -1278,7 +1278,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(); @@ -1385,19 +1385,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 44bc54ba624f..acc6dbf0273f 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 d23da94d268f..765b22ddefd6 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -715,7 +715,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 e436bc9f7e0a..868dd3fea230 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 1221b0094218..41f353533ccc 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1336,7 +1336,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 4b67e320b5ac..1d32d8455987 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -839,7 +839,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, @@ -987,7 +987,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 f907abe6f214..a8b3b9061b7c 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -196,7 +196,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 0161797f16a2..dc9526ce3256 100644 --- a/basctl/source/inc/bastype2.hxx +++ b/basctl/source/inc/bastype2.hxx @@ -221,7 +221,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 94cdee5a9f05..a9413390ab8e 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -1083,7 +1083,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 b501d40ba968..2cc1a0d40543 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 94b7704303ba..2f84816bf4fb 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,14 +3256,13 @@ 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(); } - SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCopy ) : SfxPoolItem(rCopy) , mpHorizontalLine(rCopy.mpHorizontalLine ? new SvxBorderLine(*rCopy.mpHorizontalLine) : nullptr) @@ -3847,7 +3846,7 @@ void SvxFormatKeepItem::dumpAsXml(xmlTextWriterPtr pWriter) const } SvxLineItem::SvxLineItem( const sal_uInt16 nId ) : - SfxPoolItem ( nId ) + SfxPoolItem ( nId, SfxItemType::SvxLineItemType ) { } @@ -3979,7 +3978,7 @@ void SvxLineItem::SetLine( const SvxBorderLine* pNew ) } SvxBrushItem::SvxBrushItem(sal_uInt16 _nWhich) - : SfxPoolItem(_nWhich) + : SfxPoolItem(_nWhich, SfxItemType::SvxBrushItemType) , aColor(COL_TRANSPARENT) , aFilterColor(COL_TRANSPARENT) , nShadingValue(ShadingPattern::CLEAR) @@ -3990,7 +3989,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) @@ -4001,7 +4000,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) @@ -4013,7 +4012,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) @@ -4026,7 +4025,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) @@ -4040,7 +4039,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) @@ -4572,7 +4571,7 @@ void SvxBrushItem::dumpAsXml(xmlTextWriterPtr pWriter) 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 983eff2779e2..6d7693e4b9a7 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -1061,25 +1061,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 e10c323bcdf6..5415ed368cff 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -77,7 +77,7 @@ enum class SvxSpecialLineSpace } SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId ) - : SfxEnumItemInterface( nId ) + : SfxEnumItemInterface( nId, SfxItemType::SvxLineSpacingItemType ) { nPropLineSpace = 100; nInterLineSpace = 0; @@ -339,7 +339,7 @@ void SvxLineSpacingItem::SetEnumValue( sal_uInt16 nVal ) // class SvxAdjustItem --------------------------------------------------- SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId ) - : SfxEnumItemInterface( nId ), + : SfxEnumItemInterface( nId, SfxItemType::SvxAdjustItemType ), bOneBlock( false ), bLastCenter( false ), bLastBlock( false ) { SetAdjust( eAdjst ); @@ -463,7 +463,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 ) { } @@ -507,7 +507,7 @@ bool SvxWidowsItem::GetPresentation // class SvxOrphansItem -------------------------------------------------- SvxOrphansItem::SvxOrphansItem(const sal_uInt8 nL, const sal_uInt16 nId ) : - SfxByteItem( nId, nL ) + SfxByteItem( nId, nL, SfxItemType::SvxOrphansItemType ) { } @@ -551,7 +551,7 @@ bool SvxOrphansItem::GetPresentation // class SvxHyphenZoneItem ----------------------------------------------- SvxHyphenZoneItem::SvxHyphenZoneItem( const bool bHyph, const sal_uInt16 nId ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxHyphenZoneItem ), bHyphen(bHyph), bPageEnd(true), bNoCapsHyphenation(false), @@ -781,7 +781,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; @@ -798,7 +798,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 ) { @@ -1172,7 +1172,7 @@ bool SvxPageModelItem::GetPresentation SvxScriptSpaceItem::SvxScriptSpaceItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxScriptSpaceItemType ) { } @@ -1195,7 +1195,7 @@ bool SvxScriptSpaceItem::GetPresentation( SvxHangingPunctuationItem::SvxHangingPunctuationItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxHangingPunctuationItemType ) { } @@ -1218,7 +1218,7 @@ bool SvxHangingPunctuationItem::GetPresentation( SvxForbiddenRuleItem::SvxForbiddenRuleItem( bool bOn, const sal_uInt16 nId ) - : SfxBoolItem( nId, bOn ) + : SfxBoolItem( nId, bOn, SfxItemType::SvxForbiddenRuleItemType ) { } @@ -1244,7 +1244,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 ) { } @@ -1292,7 +1292,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 e242566bd36f..6d6439c4a060 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 ) @@ -159,30 +159,33 @@ bool SvxFontListItem::GetPresentation // class SvxFontItem ----------------------------------------------------- -SvxFontItem::SvxFontItem( const sal_uInt16 nId ) : - SfxPoolItem( nId ) +SvxFontItem::SvxFontItem( + const sal_uInt16 nId) +: SfxPoolItem( nId, SfxItemType::SvxFontItemType ) +, aFamilyName() +, aStyleName() +, eFamily(FAMILY_SWISS) +, ePitch(PITCH_VARIABLE) +, eTextEncoding(RTL_TEXTENCODING_DONTKNOW) { - eFamily = FAMILY_SWISS; - ePitch = PITCH_VARIABLE; - eTextEncoding = RTL_TEXTENCODING_DONTKNOW; } - -SvxFontItem::SvxFontItem( const FontFamily eFam, OUString aName, - OUString aStName, const FontPitch eFontPitch, - const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) : - - SfxPoolItem( nId ), - - aFamilyName(std::move(aName)), - aStyleName(std::move(aStName)) +SvxFontItem::SvxFontItem( + const FontFamily eFam, + OUString aName, + OUString aStName, + const FontPitch eFontPitch, + const rtl_TextEncoding eFontTextEncoding, + const sal_uInt16 nId) +: SfxPoolItem( nId, SfxItemType::SvxFontItemType ) +, aFamilyName(std::move(aName)) +, aStyleName(std::move(aStName)) +, eFamily(eFam) +, ePitch(eFontPitch) +, eTextEncoding(eFontTextEncoding) { - eFamily = eFam; - ePitch = eFontPitch; - eTextEncoding = eFontTextEncoding; } - bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; @@ -329,7 +332,7 @@ void SvxFontItem::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxPostureItem -------------------------------------------------- SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const sal_uInt16 nId ) : - SfxEnumItem( nId, ePosture ) + SfxEnumItem( nId, SfxItemType::SvxPostureItemType, ePosture ) { } @@ -442,7 +445,7 @@ void SvxPostureItem::dumpAsXml(xmlTextWriterPtr pWriter) const // class SvxWeightItem --------------------------------------------------- SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) : - SfxEnumItem( nId, eWght ) + SfxEnumItem( nId, SfxItemType::SvxWeightItemType, eWght ) { } @@ -565,7 +568,7 @@ void SvxWeightItem::dumpAsXml(xmlTextWriterPtr pWriter) 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 } @@ -899,7 +902,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) { } @@ -1124,7 +1127,7 @@ OUString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const // class SvxCrossedOutItem ----------------------------------------------- SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 nId ) - : SfxEnumItem( nId, eSt ) + : SfxEnumItem( nId, SfxItemType::SvxCrossedOutItemType, eSt ) { } @@ -1223,7 +1226,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 ) { } @@ -1251,7 +1254,7 @@ bool SvxShadowedItem::GetPresentation // class SvxAutoKernItem ------------------------------------------------- SvxAutoKernItem::SvxAutoKernItem( const bool bAutoKern, const sal_uInt16 nId ) : - SfxBoolItem( nId, bAutoKern ) + SfxBoolItem( nId, bAutoKern, SfxItemType::SvxAutoKernItemType ) { } @@ -1280,7 +1283,7 @@ bool SvxAutoKernItem::GetPresentation SvxWordLineModeItem::SvxWordLineModeItem( const bool bWordLineMode, const sal_uInt16 nId ) : - SfxBoolItem( nId, bWordLineMode ) + SfxBoolItem( nId, bWordLineMode, SfxItemType::SvxWordLineItemType ) { } @@ -1308,7 +1311,7 @@ bool SvxWordLineModeItem::GetPresentation // class SvxContourItem -------------------------------------------------- SvxContourItem::SvxContourItem( const bool bContoured, const sal_uInt16 nId ) : - SfxBoolItem( nId, bContoured ) + SfxBoolItem( nId, bContoured, SfxItemType::SvxContourItemType ) { } @@ -1335,19 +1338,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) { @@ -1597,7 +1600,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 ) { } @@ -1676,7 +1679,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 ) { } @@ -1756,7 +1759,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 ) @@ -1766,7 +1769,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 ); @@ -1778,7 +1781,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 ) { @@ -1918,7 +1921,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // class SvxLanguageItem ------------------------------------------------- SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId ) - : SvxLanguageItem_Base( nId , eLang ) + : SvxLanguageItem_Base( nId , SfxItemType::SvxLanguageItemType, eLang ) { } @@ -1995,7 +1998,7 @@ bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // class SvxNoHyphenItem ------------------------------------------------- SvxNoHyphenItem::SvxNoHyphenItem( const sal_uInt16 nId ) : - SfxBoolItem( nId , true ) + SfxBoolItem( nId , true, SfxItemType::SvxNoHyphenItemType ) { } @@ -2026,7 +2029,7 @@ bool SvxNoHyphenItem::GetPresentation SvxBlinkItem::SvxBlinkItem( const bool bBlink, const sal_uInt16 nId ) : - SfxBoolItem( nId, bBlink ) + SfxBoolItem( nId, bBlink, SfxItemType::SvxBlinkItemType ) { } @@ -2055,7 +2058,7 @@ bool SvxBlinkItem::GetPresentation SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue, TypedWhichId<SvxEmphasisMarkItem> nId ) - : SfxUInt16Item( nId, static_cast<sal_uInt16>(nValue) ) + : SfxUInt16Item( nId, static_cast<sal_uInt16>(nValue), SfxItemType::SvxEmphasisMarkItemType ) { } @@ -2158,7 +2161,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 ) { } @@ -2266,7 +2269,7 @@ bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/, *************************************************************************/ SvxTextRotateItem::SvxTextRotateItem(Degree10 nValue, TypedWhichId<SvxTextRotateItem> nW) - : SfxUInt16Item(nW, nValue.get()) + : SfxUInt16Item(nW, nValue.get(), SfxItemType::SvxTextRotateItemType) { } @@ -2434,7 +2437,7 @@ void SvxCharRotateItem::dumpAsXml(xmlTextWriterPtr pWriter) const SvxCharScaleWidthItem::SvxCharScaleWidthItem( sal_uInt16 nValue, TypedWhichId<SvxCharScaleWidthItem> nW ) - : SfxUInt16Item( nW, nValue ) + : SfxUInt16Item( nW, nValue, SfxItemType::SvxCharScaleWidthItem ) { } @@ -2488,7 +2491,7 @@ bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue, const sal_uInt16 nId ) - : SfxEnumItem( nId, eValue ) + : SfxEnumItem( nId, SfxItemType::SvxCharReliefItemType, eValue ) { } @@ -2574,7 +2577,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 7507ed2afdd0..76aaa4f85105 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -34,7 +34,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..0d9ee80281ef 100644 --- a/include/editeng/boxitem.hxx +++ b/include/editeng/boxitem.hxx @@ -138,6 +138,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 4d3852141666..c84aebf3b33c 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 96bce367fd75..a1f8be235f95 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 20e497b6e4af..77270d82f597 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -919,12 +919,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 7e038e9d6b96..86ff3ac01d4b 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -267,7 +267,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 114e451c061d..650a43204821 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) { } @@ -72,8 +72,9 @@ class SVL_DLLPUBLIC SfxBoolItem 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 af993096e655..22eee419ba49 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -97,6 +97,316 @@ 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, + ScCondFormatDlgItemType, + ScConsolidateItemType, + ScInputStatusItemType, + ScMergeAttrType, + ScPageHFItemType, + ScPageScaleToItemType, + ScPivotItemType, + ScProtectionAttrType, + ScQueryItemType, + ScSolveItemType, + ScSortItemType, + ScSubTotalItemType, + ScTabOpItemType, + ScTpCalcItemType, + ScTpDefaultsItemType, + ScTpFormulaItemType, + ScTpPrintItemType, + ScTpViewItemType, + ScUserListItemType, + ScViewObjectModeItemType, + SdOptionsMiscItemType, + SdOptionsPrintItemType, + SdOptionsSnapItemType, + SdOptionsLayoutItemType, + 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(); @@ -119,6 +429,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 @@ -193,9 +504,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(); @@ -207,6 +519,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 fa205b6db2e7..9e6b66844def 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 ccdcb7c4dbe9..bce12dca9c1c 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 6619c04be050..e358b7b3035c 100644 --- a/include/svx/sxcecitm.hxx +++ b/include/svx/sxcecitm.hxx @@ -32,10 +32,11 @@ 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) {} + virtual SdrCaptionEscDirItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 3; } - static OUString GetValueTextByPos(sal_uInt16 nPos); virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override; diff --git a/include/svx/sxctitm.hxx b/include/svx/sxctitm.hxx index 3d46f54cb0bd..f3ca502c32e3 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) {} virtual SdrCaptionTypeItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 4; } static OUString GetValueTextByPos(sal_uInt16 nPos); diff --git a/include/svx/sxekitm.hxx b/include/svx/sxekitm.hxx index fd54d38bbbe2..538a20bc4f03 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) {} virtual SdrEdgeKindItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 5; } 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 60e17d445d61..8d698c625c8d 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) { } 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) { } virtual SdrMeasureTextVPosItem* Clone(SfxItemPool* pPool=nullptr) const override; diff --git a/include/svx/sxmuitm.hxx b/include/svx/sxmuitm.hxx index ab0ad8a3cd35..827cb320f771 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) {} virtual SdrMeasureUnitItem* Clone(SfxItemPool* pPool=nullptr) const override; 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 1a587d2b6572..5f2998f236e0 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 a55f154fefe1..af04fc3a06f2 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 1f88b07c9bb1..f872a96ac2e7 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -107,7 +107,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 index 77a5e3cad9f2..631dc1b34e2c 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -127,7 +127,7 @@ bool ScFormulaOptions::operator!=( const ScFormulaOptions& rOpt ) const } ScTpFormulaItem::ScTpFormulaItem( ScFormulaOptions aOpt ) : - SfxPoolItem ( SID_SCFORMULAOPTIONS ), + SfxPoolItem ( SID_SCFORMULAOPTIONS, SfxItemType::ScTpFormulaItemType ), theOptions (std::move( aOpt )) { } diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx index e9b3e1516147..ee13e2be78e5 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -48,7 +48,7 @@ bool ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const } ScTpPrintItem::ScTpPrintItem( const ScPrintOptions& rOpt ) : - SfxPoolItem ( SID_SCPRINTOPTIONS ), + SfxPoolItem ( SID_SCPRINTOPTIONS, SfxItemType::ScTpPrintItemType ), theOptions ( rOpt ) { } diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 39e2e6e0e762..5ebc89fa35a4 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -161,7 +161,7 @@ std::unique_ptr<SvxGridItem> ScViewOptions::CreateGridItem() const // ScTpViewItem - data for the ViewOptions TabPage ScTpViewItem::ScTpViewItem( const ScViewOptions& rOpt ) - : SfxPoolItem ( SID_SCVIEWOPTIONS ), + : SfxPoolItem ( SID_SCVIEWOPTIONS, SfxItemType::ScTpViewItemType ), theOptions ( rOpt ) { } diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index ca3062c9fe30..c163582d4a8e 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -33,7 +33,7 @@ ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, OUString _aString, const EditTextObject* pData ) : - SfxPoolItem ( nWhichP ), + SfxPoolItem ( nWhichP, SfxItemType::ScInputStatusItemType ), aCursorPos ( rCurPos ), aStartPos ( rStartPos ), aEndPos ( rEndPos ), @@ -124,7 +124,7 @@ ScEditViewHint::~ScEditViewHint() ScSortItem::ScSortItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSortParam* pSortData ) : - SfxPoolItem ( nWhichP ), + SfxPoolItem ( nWhichP, SfxItemType::ScSortItemType ), pViewData ( ptrViewData ) { if ( pSortData ) theSortData = *pSortData; @@ -132,7 +132,7 @@ ScSortItem::ScSortItem( sal_uInt16 nWhichP, ScSortItem::ScSortItem( sal_uInt16 nWhichP, const ScSortParam* pSortData ) : - SfxPoolItem ( nWhichP ), + SfxPoolItem ( nWhichP, SfxItemType::ScSortItemType ), pViewData ( nullptr ) { if ( pSortData ) theSortData = *pSortData; @@ -166,7 +166,7 @@ bool ScSortItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) co ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScQueryParam* pQueryData ) : - SfxPoolItem ( nWhichP ), + SfxPoolItem ( nWhichP, SfxItemType::ScQueryItemType ), pViewData ( ptrViewData ), bIsAdvanced ( false ) { @@ -178,7 +178,7 @@ ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, const ScQueryParam* pQueryData ) : - SfxPoolItem ( nWhichP ), + SfxPoolItem ( nWhichP, SfxItemType::ScQueryItemType ), pViewData ( nullptr ), bIsAdvanced ( false ) { @@ -246,7 +246,7 @@ ScQueryItem* ScQueryItem::Clone( SfxItemPool * ) const ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSubTotalParam* pSubTotalData ) : - SfxPoolItem ( nWhichP ), + SfxPoolItem ( nWhichP, SfxItemType::ScSubTotalItemType ), pViewData ( ptrViewData ) { if ( pSubTotalData ) theSubTotalData = *pSubTotalData; @@ -278,7 +278,7 @@ bool ScSubTotalItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /* nMemberUd */ * Transporter for the UserLIst dialog */ ScUserListItem::ScUserListItem( sal_uInt16 nWhichP ) - : SfxPoolItem ( nWhichP ) + : SfxPoolItem ( nWhichP, SfxItemType::ScUserListItemType ) { } @@ -324,7 +324,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList ) ScConsolidateItem::ScConsolidateItem( sal_uInt16 nWhichP, const ScConsolidateParam* pConsolidateData ) : - SfxPoolItem ( nWhichP ) + SfxPoolItem ( nWhichP, SfxItemType::ScConsolidateItemType ) { if ( pConsolidateData ) theConsData = *pConsolidateData; } @@ -348,7 +348,7 @@ ScConsolidateItem* ScConsolidateItem::Clone( SfxItemPool * ) const */ ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData, const ScRange* pRange, bool bNew ) : - SfxPoolItem ( nWhichP ) + SfxPoolItem ( nWhichP, SfxItemType::ScPivotItemType ) { // pSaveData must always exist if ( pData ) @@ -393,7 +393,7 @@ ScPivotItem* ScPivotItem::Clone( SfxItemPool * ) const */ ScSolveItem::ScSolveItem( sal_uInt16 nWhichP, const ScSolveParam* pSolveData ) - : SfxPoolItem ( nWhichP ) + : SfxPoolItem ( nWhichP, SfxItemType::ScSolveItemType ) { if ( pSolveData ) theSolveData = *pSolveData; } @@ -417,7 +417,7 @@ ScSolveItem* ScSolveItem::Clone( SfxItemPool * ) const */ ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP, const ScTabOpParam* pTabOpData ) - : SfxPoolItem ( nWhichP ) + : SfxPoolItem ( nWhichP, SfxItemType::ScTabOpItemType ) { if ( pTabOpData ) theTabOpData = *pTabOpData; } diff --git a/sc/source/ui/condformat/condformatdlgitem.cxx b/sc/source/ui/condformat/condformatdlgitem.cxx index b0bf511c3b79..2c1a3d26e9c8 100644 --- a/sc/source/ui/condformat/condformatdlgitem.cxx +++ b/sc/source/ui/condformat/condformatdlgitem.cxx @@ -15,7 +15,7 @@ ScCondFormatDlgItem::ScCondFormatDlgItem(std::shared_ptr<ScConditionalFormatList> pCondFormats, sal_Int32 nItem, bool bManaged): - SfxPoolItem(SCITEM_CONDFORMATDLGDATA), + SfxPoolItem(SCITEM_CONDFORMATDLGDATA, SfxItemType::ScCondFormatDlgItemType), mpCondFormats(std::move(pCondFormats)), mnItem(nItem), meDialogType(condformat::dialog::CONDITION), diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 9fd8d453bbcd..0fc747f720ca 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -278,13 +278,13 @@ bool SdOptionsLayout::WriteData( Any* pValues ) const \************************************************************************/ SdOptionsLayoutItem::SdOptionsLayoutItem() -: SfxPoolItem ( ATTR_OPTIONS_LAYOUT ) +: SfxPoolItem ( ATTR_OPTIONS_LAYOUT, SfxItemType::SdOptionsLayoutItemType) , maOptionsLayout ( false, false ) { } SdOptionsLayoutItem::SdOptionsLayoutItem( SdOptions const * pOpts, ::sd::FrameView const * pView ) -: SfxPoolItem ( ATTR_OPTIONS_LAYOUT ) +: SfxPoolItem ( ATTR_OPTIONS_LAYOUT, SfxItemType::SdOptionsLayoutItemType ) , maOptionsLayout ( false, false ) { if( pOpts ) @@ -611,13 +611,13 @@ bool SdOptionsMisc::WriteData( Any* pValues ) const \************************************************************************/ SdOptionsMiscItem::SdOptionsMiscItem() -: SfxPoolItem ( ATTR_OPTIONS_MISC ) +: SfxPoolItem ( ATTR_OPTIONS_MISC, SfxItemType::SdOptionsMiscItemType ) , maOptionsMisc ( false, false ) { } SdOptionsMiscItem::SdOptionsMiscItem( SdOptions const * pOpts, ::sd::FrameView const * pView ) -: SfxPoolItem ( ATTR_OPTIONS_MISC ) +: SfxPoolItem ( ATTR_OPTIONS_MISC, SfxItemType::SdOptionsMiscItemType ) , maOptionsMisc ( false, false ) { if( pOpts ) @@ -822,13 +822,13 @@ bool SdOptionsSnap::WriteData( Any* pValues ) const \************************************************************************/ SdOptionsSnapItem::SdOptionsSnapItem() -: SfxPoolItem ( ATTR_OPTIONS_SNAP ) +: SfxPoolItem ( ATTR_OPTIONS_SNAP, SfxItemType::SdOptionsSnapItemType ) , maOptionsSnap ( false, false ) { } SdOptionsSnapItem::SdOptionsSnapItem( SdOptions const * pOpts, ::sd::FrameView const * pView ) -: SfxPoolItem ( ATTR_OPTIONS_SNAP ) +: SfxPoolItem ( ATTR_OPTIONS_SNAP, SfxItemType::SdOptionsSnapItemType ) , maOptionsSnap ( false, false ) { if( pView ) @@ -1264,13 +1264,13 @@ bool SdOptionsPrint::WriteData( Any* pValues ) const \************************************************************************/ SdOptionsPrintItem::SdOptionsPrintItem() -: SfxPoolItem ( ATTR_OPTIONS_PRINT ) +: SfxPoolItem ( ATTR_OPTIONS_PRINT, SfxItemType::SdOptionsPrintItemType ) , maOptionsPrint ( false, false ) { } SdOptionsPrintItem::SdOptionsPrintItem( SdOptions const * pOpts ) -: SfxPoolItem ( ATTR_OPTIONS_PRINT ) +: SfxPoolItem ( ATTR_OPTIONS_PRINT, SfxItemType::SdOptionsPrintItemType ) , maOptionsPrint ( false, false ) { if( !pOpts ) diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index 709ad6293c3c..c4d0136590c9 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -34,7 +34,7 @@ SfxMacroInfoItem::SfxMacroInfoItem( OUString _aModuleName, OUString _aMethodName, OUString _aComment) : - SfxPoolItem(nWhichId), + SfxPoolItem(nWhichId, SfxItemType::SfxMacroInfoItemType), pBasicManager(pMgr), aLibName(std::move(_aLibName)), aModuleName(std::move(_aModuleName)), diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 26f34882ec42..bd5caf382215 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -191,7 +191,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile, const uno::Reference<document::XDocumentProperties>& i_xDocProps, const uno::Sequence<document::CmisProperty>& i_cmisProps, bool bIs, bool _bIs ) - : SfxStringItem( SID_DOCINFO, rFile ) + : SfxStringItem( SID_DOCINFO, rFile, SfxItemType::SfxDocumentInfoItemType ) , m_AutoloadDelay( i_xDocProps->getAutoloadSecs() ) , m_AutoloadURL( i_xDocProps->getAutoloadURL() ) , m_isAutoloadEnabled( (m_AutoloadDelay > 0) || !m_AutoloadURL.isEmpty() ) diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index a453323bbb80..b9748407f82e 100644 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -33,7 +33,7 @@ SfxTemplateItem::SfxTemplateItem sal_uInt16 nWhichId, // Slot-ID OUString _aStyle, // Name of the current Styles OUString _aStyleIdentifier // Prog Name of current Style -) : SfxFlagItem( nWhichId, static_cast<sal_uInt16>(SfxStyleSearchBits::All) ), +) : SfxFlagItem( nWhichId, static_cast<sal_uInt16>(SfxStyleSearchBits::All), SfxItemType::SfxTemplateItemType ), aStyle(std::move( _aStyle )), aStyleIdentifier(std::move( _aStyleIdentifier )) { diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx index e776e6608788..47c721046225 100644 --- a/sfx2/source/doc/objitem.cxx +++ b/sfx2/source/doc/objitem.cxx @@ -69,7 +69,7 @@ bool SfxObjectShellItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMembe } SfxObjectItem::SfxObjectItem( sal_uInt16 nWhichId, SfxShell *pSh ) -: SfxPoolItem( nWhichId ), +: SfxPoolItem( nWhichId, SfxItemType::SfxObjectItemType ), _pSh( pSh ) {} diff --git a/sfx2/source/doc/watermarkitem.cxx b/sfx2/source/doc/watermarkitem.cxx index 4e64afd7ffbf..b472d1b4b29b 100644 --- a/sfx2/source/doc/watermarkitem.cxx +++ b/sfx2/source/doc/watermarkitem.cxx @@ -12,7 +12,7 @@ #include <comphelper/propertysequence.hxx> SfxWatermarkItem::SfxWatermarkItem() -: SfxPoolItem( SID_WATERMARK ) +: SfxPoolItem( SID_WATERMARK, SfxItemType::SfxWatermarkItemType ) , m_aText( "" ) , m_aFont( "Liberation Sans" ) , m_nAngle( 45 ) diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx index e4c160712b1d..c0aa57173006 100644 --- a/sfx2/source/doc/zoomitem.cxx +++ b/sfx2/source/doc/zoomitem.cxx @@ -41,7 +41,7 @@ SvxZoomItem::SvxZoomItem sal_uInt16 nVal, TypedWhichId<SvxZoomItem> _nWhich ) -: SfxUInt16Item( _nWhich, nVal ), +: SfxUInt16Item( _nWhich, nVal, SfxItemType::SfxZoomItemType ), nValueSet( SvxZoomEnableFlags::ALL ), eType( eZoomType ) { diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index ad04da35343b..fe55f1f85904 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -378,19 +378,19 @@ void SfxFrame::RemoveTopFrame_Impl( SfxFrame* pFrame ) } SfxFrameItem::SfxFrameItem( sal_uInt16 nWhichId, SfxViewFrame const *p ) - : SfxPoolItem( nWhichId ), pFrame( p ? &p->GetFrame() : nullptr ) + : SfxPoolItem( nWhichId, SfxItemType::SfxFrameItemType ), pFrame( p ? &p->GetFrame() : nullptr ) { wFrame = pFrame; } SfxFrameItem::SfxFrameItem( sal_uInt16 nWhichId, SfxFrame *p ): - SfxPoolItem( nWhichId ), + SfxPoolItem( nWhichId, SfxItemType::SfxFrameItemType ), pFrame( p ), wFrame( p ) { } SfxFrameItem::SfxFrameItem( SfxFrame *p ): - SfxPoolItem( 0 ), + SfxPoolItem( 0, SfxItemType::SfxFrameItemType ), pFrame( p ), wFrame( p ) { } @@ -444,7 +444,7 @@ bool SfxFrameItem::PutValue( const css::uno::Any& rVal, sal_uInt8 ) SfxUnoAnyItem::SfxUnoAnyItem( sal_uInt16 nWhichId, const css::uno::Any& rAny ) - : SfxPoolItem( nWhichId ) + : SfxPoolItem( nWhichId, SfxItemType::SfxUnoAnyItemType ) { aValue = rAny; } @@ -473,11 +473,12 @@ bool SfxUnoAnyItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ } SfxUnoFrameItem::SfxUnoFrameItem() + : SfxPoolItem( 0, SfxItemType::SfxUnoFrameItemType) { } SfxUnoFrameItem::SfxUnoFrameItem( sal_uInt16 nWhichId, css::uno::Reference< css::frame::XFrame > i_xFrame ) - : SfxPoolItem( nWhichId ) + : SfxPoolItem( nWhichId, SfxItemType::SfxUnoFrameItemType ) , m_xFrame(std::move( i_xFrame )) { } diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx index 270be1e57530..8a873bacbb61 100644 --- a/svl/source/items/flagitem.cxx +++ b/svl/source/items/flagitem.cxx @@ -26,8 +26,8 @@ #include <sal/log.hxx> -SfxFlagItem::SfxFlagItem( sal_uInt16 nW, sal_uInt16 nV ) : - SfxPoolItem( nW ), +SfxFlagItem::SfxFlagItem( sal_uInt16 nW, sal_uInt16 nV, SfxItemType eItemType ) : + SfxPoolItem( nW, eItemType ), nVal(nV) { } diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx index 3f8d3265d779..6cd1ece098ee 100644 --- a/svl/source/items/globalnameitem.cxx +++ b/svl/source/items/globalnameitem.cxx @@ -30,13 +30,14 @@ SfxPoolItem* SfxGlobalNameItem::CreateDefault() { return new SfxGlobalNameItem; } -SfxGlobalNameItem::SfxGlobalNameItem() +SfxGlobalNameItem::SfxGlobalNameItem() : + SfxPoolItem(0, SfxItemType::SfxGlobalNameItemType) { } SfxGlobalNameItem::SfxGlobalNameItem( sal_uInt16 nW, const SvGlobalName& rName ) -: SfxPoolItem( nW ), +: SfxPoolItem( nW, SfxItemType::SfxGlobalNameItemType ), m_aName( rName ) { } diff --git a/svl/source/items/grabbagitem.cxx b/svl/source/items/grabbagitem.cxx index 39ee566866b3..ce4d7804fd0b 100644 --- a/svl/source/items/grabbagitem.cxx +++ b/svl/source/items/grabbagitem.cxx @@ -16,10 +16,13 @@ using namespace com::sun::star; -SfxGrabBagItem::SfxGrabBagItem() = default; +SfxGrabBagItem::SfxGrabBagItem() + : SfxPoolItem(0, SfxItemType::SfxGrabBagItemType) +{ +} SfxGrabBagItem::SfxGrabBagItem(sal_uInt16 nWhich) - : SfxPoolItem(nWhich) + : SfxPoolItem(nWhich, SfxItemType::SfxGrabBagItemType) { } diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx index 0cb9ea8e6c49..adbc324c46ee 100644 --- a/svl/source/items/ilstitem.cxx +++ b/svl/source/items/ilstitem.cxx @@ -28,17 +28,18 @@ SfxPoolItem* SfxIntegerListItem::CreateDefault() { return new SfxIntegerListItem; } SfxIntegerListItem::SfxIntegerListItem() + : SfxPoolItem(0, SfxItemType::SfxIntegerListItemType) { } SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, ::std::vector < sal_Int32 >&& rList ) - : SfxPoolItem( which ) + : SfxPoolItem( which, SfxItemType::SfxIntegerListItemType ) , m_aList( std::move(rList) ) { } SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const css::uno::Sequence < sal_Int32 >& rList ) - : SfxPoolItem( which ) + : SfxPoolItem( which, SfxItemType::SfxIntegerListItemType ) { comphelper::sequenceToContainer(m_aList, rList); } diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx index cba4b7103b82..7020054d6889 100644 --- a/svl/source/items/imageitm.cxx +++ b/svl/source/items/imageitm.cxx @@ -25,7 +25,7 @@ SfxPoolItem* SfxImageItem::CreateDefault() { return new SfxImageItem; } SfxImageItem::SfxImageItem( sal_uInt16 which ) - : SfxInt16Item( which, 0 ), mnAngle(0), mbMirrored(false) + : SfxInt16Item( which, 0, SfxItemType::SfxImageItemType ), mnAngle(0), mbMirrored(false) { } diff --git a/svl/source/items/int64item.cxx b/svl/source/items/int64item.cxx index 06efd1fc9aca..644802edf9cc 100644 --- a/svl/source/items/int64item.cxx +++ b/svl/source/items/int64item.cxx @@ -10,7 +10,7 @@ #include <svl/int64item.hxx> SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal ) : - SfxPoolItem(nWhich), mnValue(nVal) + SfxPoolItem(nWhich, SfxItemType::SfxInt64ItemType), mnValue(nVal) { } diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx index 0ced3eb20146..9a56bdda68af 100644 --- a/svl/source/items/intitem.cxx +++ b/svl/source/items/intitem.cxx @@ -159,8 +159,8 @@ boost::property_tree::ptree SfxUInt32Item::dumpAsJSON() const return aTree; } -SfxMetricItem::SfxMetricItem(sal_uInt16 which, sal_Int32 nValue): - SfxInt32Item(which, nValue) +SfxMetricItem::SfxMetricItem(sal_uInt16 which, sal_Int32 nValue,SfxItemType eItemType): + SfxInt32Item(which, nValue, eItemType) { } diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index fd9cbb1dddee..acc5d64ea50a 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -61,7 +61,7 @@ static bool g_bItemClassicMode(getenv("ITEM_CLASSIC_MODE")); SfxPoolItemHolder::SfxPoolItemHolder() : m_pPool(nullptr) , m_pItem(nullptr) -#ifdef DBG_UTIL +#ifndef NDEBUG , m_bDeleted(false) #endif { diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx index 87165ae50756..2affcdceca36 100644 --- a/svl/source/items/lckbitem.cxx +++ b/svl/source/items/lckbitem.cxx @@ -28,6 +28,7 @@ SfxPoolItem* SfxLockBytesItem::CreateDefault() { return new SfxLockBytesItem; } SfxLockBytesItem::SfxLockBytesItem() + : SfxPoolItem(0, SfxItemType::SfxLockBytesItemType) { } diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index ae7c97136c48..d8395c836592 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -488,9 +488,10 @@ void listAllocatedSfxPoolItems() } #endif -SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich) +SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich, SfxItemType eType) : m_nRefCount(0) , m_nWhich(nWhich) + , m_eItemType(eType) #ifdef DBG_UTIL , m_nSerialNumber(nUsedSfxPoolItemCount) #endif @@ -524,11 +525,10 @@ SfxPoolItem::~SfxPoolItem() bool SfxPoolItem::operator==(const SfxPoolItem& rCmp) const { - SAL_WARN_IF(typeid(rCmp) != typeid(*this), "svl", + SAL_WARN_IF(rCmp.ItemType() != ItemType(), "svl", "comparing different pool item subclasses " << typeid(rCmp).name() << " && " << typeid(*this).name()); - assert(typeid(rCmp) == typeid(*this) && "comparing different pool item subclasses"); - (void)rCmp; + assert(rCmp.ItemType() == ItemType() && "comparing different pool item subclasses"); return true; } @@ -656,10 +656,8 @@ bool SfxPoolItem::areSame(const SfxPoolItem* pItem1, const SfxPoolItem* pItem2) // WhichIDs differ (fast) return false; - if (typeid(*pItem1) != typeid(*pItem2)) + if (pItem1->ItemType() != pItem2->ItemType()) // types differ (fast) - // NOTE: we can now use typeid since we do not have (-1) - // anymore for Invalid state -> safe return false; // return content compare using operator== at last @@ -678,10 +676,8 @@ bool SfxPoolItem::areSame(const SfxPoolItem& rItem1, const SfxPoolItem& rItem2) // WhichIDs differ (fast) return false; - if (typeid(rItem1) != typeid(rItem2)) + if (rItem1.ItemType() != rItem2.ItemType()) // types differ (fast) - // NOTE: we can now use typeid since we do not have (-1) - // anymore for Invalid state -> safe return false; // return content compare using operator== at last @@ -694,6 +690,15 @@ class InvalidItem final : public SfxPoolItem { virtual bool operator==(const SfxPoolItem&) const override { return true; } virtual SfxPoolItem* Clone(SfxItemPool*) const override { return nullptr; } + +public: + // make it StaticDefaultItem to process similar to these + // which is plausible (never change and are not allowed to) + InvalidItem() + : SfxPoolItem(0, SfxItemType::InvalidOrDisabledItemType) + { + setStaticDefault(); + } }; InvalidItem aInvalidItem; } diff --git a/svl/source/items/ptitem.cxx b/svl/source/items/ptitem.cxx index 361cb4f4fc7d..71ac1205b682 100644 --- a/svl/source/items/ptitem.cxx +++ b/svl/source/items/ptitem.cxx @@ -35,12 +35,13 @@ SfxPoolItem* SfxPointItem::CreateDefault() { return new SfxPointItem; } SfxPointItem::SfxPointItem() + : SfxPoolItem(0, SfxItemType::SfxPointItemType) { } SfxPointItem::SfxPointItem( sal_uInt16 nW, const Point& rVal ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SfxPointItemType ), aVal( rVal ) { } diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx index f6a5db309d4b..cd9eecdf672a 100644 --- a/svl/source/items/rectitem.cxx +++ b/svl/source/items/rectitem.cxx @@ -31,12 +31,13 @@ SfxPoolItem* SfxRectangleItem::CreateDefault() { return new SfxRectangleItem; } SfxRectangleItem::SfxRectangleItem() + : SfxPoolItem( 0, SfxItemType::SfxRectangleItemType ) { } SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, const tools::Rectangle& rVal ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SfxRectangleItemType ), maVal( rVal ) { } diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx index 89f7e642ed50..d7e6bff5cbb4 100644 --- a/svl/source/items/rngitem.cxx +++ b/svl/source/items/rngitem.cxx @@ -23,7 +23,7 @@ SfxRangeItem::SfxRangeItem( sal_uInt16 which, sal_uInt16 from, sal_uInt16 to ): - SfxPoolItem( which ), + SfxPoolItem( which, SfxItemType::SfxRangeItemType ), nFrom( from ), nTo( to ) { diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx index 037097f7bc3a..0e4499b55ab4 100644 --- a/svl/source/items/sitem.cxx +++ b/svl/source/items/sitem.cxx @@ -24,8 +24,9 @@ #include <svl/setitem.hxx> #include <svl/poolitem.hxx> -SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet) : - SfxPoolItem(which), +SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet, + SfxItemType eItemType) : + SfxPoolItem(which, eItemType), maSet(rSet) { assert(!dynamic_cast<const SfxAllItemSet*>(&rSet) && "cannot handle SfxAllItemSet here"); @@ -33,8 +34,9 @@ SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet) : } -SfxSetItem::SfxSetItem( sal_uInt16 which, SfxItemSet &&pS) : - SfxPoolItem(which), +SfxSetItem::SfxSetItem( sal_uInt16 which, SfxItemSet &&pS, + SfxItemType eItemType) : + SfxPoolItem(which, eItemType), maSet(pS) { assert(!dynamic_cast<SfxAllItemSet*>(&pS) && "cannot handle SfxAllItemSet here"); diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index 02784446ca52..1141784397b1 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -29,13 +29,14 @@ SfxPoolItem* SfxStringListItem::CreateDefault() { return new SfxStringListItem; } -SfxStringListItem::SfxStringListItem() +SfxStringListItem::SfxStringListItem() : + SfxPoolItem( 0, SfxItemType::SfxStringListItemType ) { } SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUString>* pList ) : - SfxPoolItem( which ) + SfxPoolItem( which, SfxItemType::SfxStringListItemType ) { // FIXME: Putting an empty list does not work // Therefore the query after the count is commented out diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index 6aa7c36ddca2..2a31c7d6af4b 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -99,7 +99,7 @@ static Sequence< OUString > lcl_GetNotifyNames() SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxSearchItemType ), ConfigItem( CFG_ROOT_NODE ), m_aSearchOpt ( SearchFlags::LEV_RELAXED, diff --git a/svl/source/items/voiditem.cxx b/svl/source/items/voiditem.cxx index 32057e1e2c75..b12ef1710c90 100644 --- a/svl/source/items/voiditem.cxx +++ b/svl/source/items/voiditem.cxx @@ -23,13 +23,13 @@ SfxPoolItem* SfxVoidItem::CreateDefault() { return new SfxVoidItem(0); } SfxVoidItem::SfxVoidItem(sal_uInt16 which) - : SfxPoolItem(which) + : SfxPoolItem(which, SfxItemType::SfxVoidItemType) { setIsVoidItem(); } SfxVoidItem::SfxVoidItem(const SfxVoidItem& rCopy) - : SfxPoolItem(rCopy.Which()) + : SfxPoolItem(rCopy.Which(), SfxItemType::SfxVoidItemType) { setIsVoidItem(); } diff --git a/svx/inc/sxcikitm.hxx b/svx/inc/sxcikitm.hxx index 738e59366524..7ae07ad71181 100644 --- a/svx/inc/sxcikitm.hxx +++ b/svx/inc/sxcikitm.hxx @@ -25,7 +25,8 @@ class SdrCircKindItem final : public SfxEnumItem<SdrCircKind> { public: - SdrCircKindItem(SdrCircKind eKind=SdrCircKind::Full): SfxEnumItem(SDRATTR_CIRCKIND, eKind) {} + SdrCircKindItem(SdrCircKind eKind=SdrCircKind::Full) + : SfxEnumItem(SDRATTR_CIRCKIND, SfxItemType::SdrCircKindItemType, eKind) {} virtual SdrCircKindItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 4; } diff --git a/svx/inc/sxfiitm.hxx b/svx/inc/sxfiitm.hxx index b629acfebaf7..20ef28db9add 100644 --- a/svx/inc/sxfiitm.hxx +++ b/svx/inc/sxfiitm.hxx @@ -28,7 +28,8 @@ class SdrFractionItem: public SfxPoolItem { Fraction nValue; public: - SdrFractionItem(sal_uInt16 nId, const Fraction& rVal): SfxPoolItem(nId), nValue(rVal) {} + SdrFractionItem(sal_uInt16 nId, const Fraction& rVal, SfxItemType eItemType = SfxItemType::SdrFractionItemType) + : SfxPoolItem(nId, eItemType), nValue(rVal) {} virtual bool operator==(const SfxPoolItem&) const override; virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper&) const override; virtual SdrFractionItem* Clone(SfxItemPool *pPool=nullptr) const override; diff --git a/svx/inc/sxlayitm.hxx b/svx/inc/sxlayitm.hxx index be444bec33dd..5c8c42d21c50 100644 --- a/svx/inc/sxlayitm.hxx +++ b/svx/inc/sxlayitm.hxx @@ -26,14 +26,16 @@ class SdrLayerIdItem final : public SfxInt16Item { public: - SdrLayerIdItem(SdrLayerID nId): SfxInt16Item(SDRATTR_LAYERID,nId.get()) {} + SdrLayerIdItem(SdrLayerID nId): + SfxInt16Item(SDRATTR_LAYERID,nId.get(), SfxItemType::SdrLayerIdItemType) {} SdrLayerID GetValue() const { return SdrLayerID(SfxInt16Item::GetValue()); } virtual SdrLayerIdItem* Clone(SfxItemPool* pPool=nullptr) const override; }; class SdrLayerNameItem final : public SfxStringItem { public: - SdrLayerNameItem() : SfxStringItem() { SetWhich(SDRATTR_LAYERNAME); } + SdrLayerNameItem() + : SfxStringItem(SDRATTR_LAYERNAME, SfxItemType::SdrLayerNameItemType) {} SdrLayerNameItem(const OUString& rStr) : SfxStringItem(SDRATTR_LAYERNAME,rStr) {} virtual SdrLayerNameItem* Clone(SfxItemPool* pPool=nullptr) const override; }; diff --git a/svx/inc/sxmfsitm.hxx b/svx/inc/sxmfsitm.hxx index c3c070952326..f3d6f0facf9d 100644 --- a/svx/inc/sxmfsitm.hxx +++ b/svx/inc/sxmfsitm.hxx @@ -25,7 +25,8 @@ // overwrites SdrMeasureUnitItem and SdrMeasureShowUnitItem class SdrMeasureFormatStringItem final : public SfxStringItem { public: - SdrMeasureFormatStringItem() : SfxStringItem() { SetWhich(SDRATTR_MEASUREFORMATSTRING); } + SdrMeasureFormatStringItem() + : SfxStringItem(SDRATTR_MEASUREFORMATSTRING, SfxItemType::SdrMeasureFormatStringItemType) {} virtual SdrMeasureFormatStringItem* Clone(SfxItemPool*) const override { return new SdrMeasureFormatStringItem(*this); diff --git a/svx/inc/sxmkitm.hxx b/svx/inc/sxmkitm.hxx index 12769a08577f..278a7a900f62 100644 --- a/svx/inc/sxmkitm.hxx +++ b/svx/inc/sxmkitm.hxx @@ -28,7 +28,8 @@ enum SdrMeasureKind {SDRMEASURE_STD,SDRMEASURE_RADIUS}; // n.i. class SdrMeasureKindItem final : public SfxEnumItem<SdrMeasureKind> { public: - SdrMeasureKindItem() : SfxEnumItem(SDRATTR_MEASUREKIND, SDRMEASURE_STD) {} + SdrMeasureKindItem() + : SfxEnumItem(SDRATTR_MEASUREKIND, SfxItemType::SdrMeasureKindItemType, SDRMEASURE_STD) {} virtual SdrMeasureKindItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual sal_uInt16 GetValueCount() const override; // { return 2; } diff --git a/svx/inc/sxmsitm.hxx b/svx/inc/sxmsitm.hxx index f821c73fe047..c8af17cf4ba5 100644 --- a/svx/inc/sxmsitm.hxx +++ b/svx/inc/sxmsitm.hxx @@ -28,8 +28,8 @@ class SdrMeasureScaleItem final : public SdrScaleItem { public: - SdrMeasureScaleItem() - : SdrScaleItem(SDRATTR_MEASURESCALE, Fraction(1, 1)) + SdrMeasureScaleItem(SfxItemType eItemType = SfxItemType::SdrMeasureScaleItemType) + : SdrScaleItem(SDRATTR_MEASURESCALE, Fraction(1, 1), eItemType) { } virtual SdrMeasureScaleItem* Clone(SfxItemPool*) const override diff --git a/svx/inc/sxmtaitm.hxx b/svx/inc/sxmtaitm.hxx index cb94874bdf62..94935cf2ec0c 100644 --- a/svx/inc/sxmtaitm.hxx +++ b/svx/inc/sxmtaitm.hxx @@ -27,7 +27,8 @@ // TextUpsideDown stays active and turns the text again if sal_True. class SdrMeasureTextAutoAngleItem final : public SdrYesNoItem { public: - SdrMeasureTextAutoAngleItem(bool bOn=true): SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,bOn) {} + SdrMeasureTextAutoAngleItem(bool bOn=true): + SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,bOn, SfxItemType::SdrMeasureTextAutoAngleItemType) {} virtual SdrMeasureTextAutoAngleItem* Clone(SfxItemPool*) const override { return new SdrMeasureTextAutoAngleItem(*this); @@ -38,7 +39,8 @@ public: // Angle in 1/100deg from viewpoint of the user. class SdrMeasureTextAutoAngleViewItem final : public SdrAngleItem { public: - SdrMeasureTextAutoAngleViewItem(Degree100 nVal=31500_deg100): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {} + SdrMeasureTextAutoAngleViewItem(Degree100 nVal=31500_deg100) + : SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal, SfxItemType::SdrMeasureTextAutoAngleViewItemType) {} virtual SdrMeasureTextAutoAngleViewItem* Clone(SfxItemPool*) const override { return new SdrMeasureTextAutoAngleViewItem(*this); diff --git a/svx/inc/sxreaitm.hxx b/svx/inc/sxreaitm.hxx index 2887e8ba0aab..bc61a10086ed 100644 --- a/svx/inc/sxreaitm.hxx +++ b/svx/inc/sxreaitm.hxx @@ -25,7 +25,8 @@ class SdrResizeXAllItem final : public SdrFractionItem { public: - SdrResizeXAllItem(): SdrFractionItem(SDRATTR_RESIZEXALL,Fraction(1,1)) {} + SdrResizeXAllItem() + : SdrFractionItem(SDRATTR_RESIZEXALL,Fraction(1,1), SfxItemType::SdrResizeXAllItemType) {} virtual SdrResizeXAllItem* Clone(SfxItemPool*) const override { return new SdrResizeXAllItem(*this); @@ -34,7 +35,8 @@ public: class SdrResizeYAllItem final : public SdrFractionItem { public: - SdrResizeYAllItem(): SdrFractionItem(SDRATTR_RESIZEYALL,Fraction(1,1)) {} + SdrResizeYAllItem() + : SdrFractionItem(SDRATTR_RESIZEYALL,Fraction(1,1), SfxItemType::SdrResizeYAllItemType) {} virtual SdrResizeYAllItem* Clone(SfxItemPool*) const override { return new SdrResizeYAllItem(*this); diff --git a/svx/inc/sxreoitm.hxx b/svx/inc/sxreoitm.hxx index 19d1cb6b8c54..c99ff4adc66d 100644 --- a/svx/inc/sxreoitm.hxx +++ b/svx/inc/sxreoitm.hxx @@ -25,7 +25,8 @@ class SdrResizeXOneItem final : public SdrFractionItem { public: - SdrResizeXOneItem(): SdrFractionItem(SDRATTR_RESIZEXONE,Fraction(1,1)) {} + SdrResizeXOneItem() + : SdrFractionItem(SDRATTR_RESIZEXONE,Fraction(1,1), SfxItemType::SdrResizeXOneItemType) {} SdrResizeXOneItem* Clone(SfxItemPool*) const override { return new SdrResizeXOneItem(*this); @@ -34,7 +35,8 @@ public: class SdrResizeYOneItem final : public SdrFractionItem { public: - SdrResizeYOneItem(): SdrFractionItem(SDRATTR_RESIZEYONE,Fraction(1,1)) {} + SdrResizeYOneItem() + : SdrFractionItem(SDRATTR_RESIZEYONE,Fraction(1,1), SfxItemType::SdrResizeYOneItemType) {} SdrResizeYOneItem* Clone(SfxItemPool*) const override { return new SdrResizeYOneItem(*this); diff --git a/svx/inc/sxsiitm.hxx b/svx/inc/sxsiitm.hxx index 2a5d6586393f..a55e2ab1fde2 100644 --- a/svx/inc/sxsiitm.hxx +++ b/svx/inc/sxsiitm.hxx @@ -22,7 +22,9 @@ class SdrScaleItem: public SdrFractionItem { public: - SdrScaleItem(sal_uInt16 nId, const Fraction& rVal): SdrFractionItem(nId,rVal) {} + SdrScaleItem(sal_uInt16 nId, const Fraction& rVal, + SfxItemType eItemType = SfxItemType::SdrScaleItemType) + : SdrFractionItem(nId,rVal, eItemType) {} virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper&) const override; virtual SdrScaleItem* Clone(SfxItemPool *pPool=nullptr) const override; }; diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 8e61bf381c3d..736f300e7c4b 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -135,13 +135,13 @@ SvxLongLRSpaceItem* SvxLongLRSpaceItem::Clone(SfxItemPool *) const } SvxLongLRSpaceItem::SvxLongLRSpaceItem(tools::Long lLeft, tools::Long lRight, TypedWhichId<SvxLongLRSpaceItem> nId) : - SfxPoolItem (nId), + SfxPoolItem (nId, SfxItemType::SvxLongLRSpaceItemType), mlLeft (lLeft), mlRight (lRight) {} SvxLongLRSpaceItem::SvxLongLRSpaceItem() : - SfxPoolItem (0), + SfxPoolItem (0, SfxItemType::SvxLongLRSpaceItemType), mlLeft (0), mlRight (0) {} @@ -254,13 +254,13 @@ SvxLongULSpaceItem* SvxLongULSpaceItem::Clone(SfxItemPool *) const } SvxLongULSpaceItem::SvxLongULSpaceItem(tools::Long lLeft, tools::Long lRight, TypedWhichId<SvxLongULSpaceItem> nId) : - SfxPoolItem (nId), + SfxPoolItem (nId, SfxItemType::SvxLongULSpaceItemType), mlLeft (lLeft), mlRight (lRight) {} SvxLongULSpaceItem::SvxLongULSpaceItem() : - SfxPoolItem (0), + SfxPoolItem (0, SfxItemType::SvxLongULSpaceItemType), mlLeft (0), mlRight (0) {} @@ -369,14 +369,14 @@ SvxPagePosSizeItem* SvxPagePosSizeItem::Clone(SfxItemPool *) const } SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, tools::Long lW, tools::Long lH) : - SfxPoolItem (SID_RULER_PAGE_POS), + SfxPoolItem (SID_RULER_PAGE_POS, SfxItemType::SvxPagePosSizeItemType), aPos (rP), lWidth (lW), lHeight (lH) {} SvxPagePosSizeItem::SvxPagePosSizeItem() : - SfxPoolItem (0), + SfxPoolItem (0, SfxItemType::SvxPagePosSizeItemType), aPos (0, 0), lWidth (0), lHeight (0) @@ -404,7 +404,7 @@ bool SvxColumnItem::operator==(const SfxPoolItem& rCmp) const } SvxColumnItem::SvxColumnItem( sal_uInt16 nAct ) : - SfxPoolItem (SID_RULER_BORDERS), + SfxPoolItem (SID_RULER_BORDERS, SfxItemType::SvxColumnItemType ), nLeft (0), nRight (0), nActColumn (nAct), @@ -414,7 +414,7 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nAct ) : {} SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, sal_uInt16 left, sal_uInt16 right ) : - SfxPoolItem (SID_RULER_BORDERS), + SfxPoolItem (SID_RULER_BORDERS, SfxItemType::SvxColumnItemType), nLeft (left), nRight (right), nActColumn (nActCol), @@ -648,7 +648,7 @@ SvxObjectItem* SvxObjectItem::Clone(SfxItemPool *) const SvxObjectItem::SvxObjectItem( tools::Long nSX, tools::Long nEX, tools::Long nSY, tools::Long nEY ) : - SfxPoolItem (SID_RULER_OBJECT), + SfxPoolItem (SID_RULER_OBJECT, SfxItemType::SvxObjectItemType), nStartX (nSX), nEndX (nEX), nStartY (nSY), diff --git a/svx/source/dialog/svxgraphicitem.cxx b/svx/source/dialog/svxgraphicitem.cxx index 940941b6055a..eb5458c3284e 100644 --- a/svx/source/dialog/svxgraphicitem.cxx +++ b/svx/source/dialog/svxgraphicitem.cxx @@ -22,7 +22,7 @@ #include <utility> SvxGraphicItem::SvxGraphicItem( Graphic _aGraphic ) - : SfxPoolItem( SID_GRAPHIC ), aGraphic(std::move( _aGraphic )) + : SfxPoolItem( SID_GRAPHIC, SfxItemType::SvxGraphicItemType ), aGraphic(std::move( _aGraphic )) { } diff --git a/svx/source/items/RectangleAlignmentItem.cxx b/svx/source/items/RectangleAlignmentItem.cxx index 3b0b7b0f1081..6f09bf83b4e5 100644 --- a/svx/source/items/RectangleAlignmentItem.cxx +++ b/svx/source/items/RectangleAlignmentItem.cxx @@ -12,7 +12,7 @@ SvxRectangleAlignmentItem::SvxRectangleAlignmentItem(sal_uInt16 nWhich, model::RectangleAlignment nValue) - : SfxEnumItem<model::RectangleAlignment>(nWhich, nValue) + : SfxEnumItem<model::RectangleAlignment>(nWhich, SfxItemType::RectangleAlignmentType, nValue) { } diff --git a/svx/source/items/SmartTagItem.cxx b/svx/source/items/SmartTagItem.cxx index 6cb9a1ced72b..695b4dc87349 100644 --- a/svx/source/items/SmartTagItem.cxx +++ b/svx/source/items/SmartTagItem.cxx @@ -39,7 +39,7 @@ SvxSmartTagItem::SvxSmartTagItem( const TypedWhichId<SvxSmartTagItem> nId, css::lang::Locale aLocale, OUString aApplicationName, OUString aRangeText ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxSmartTagItemType ), maActionComponentsSequence( rActionComponentsSequence ), maActionIndicesSequence( rActionIndicesSequence ), maStringKeyMaps( rStringKeyMaps ), diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index 1a102f76d1fb..3a29c103df67 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -38,12 +38,12 @@ SfxPoolItem* SvxMarginItem::CreateDefault() { return new SvxMarginItem(TypedWhi SvxOrientationItem::SvxOrientationItem( const SvxCellOrientation eOrientation, const TypedWhichId<SvxOrientationItem> nId): - SfxEnumItem( nId, eOrientation ) + SfxEnumItem( nId, SfxItemType::SvxOrientationItemType, eOrientation ) { } SvxOrientationItem::SvxOrientationItem( Degree100 nRotation, bool bStacked, const TypedWhichId<SvxOrientationItem> nId ) : - SfxEnumItem( nId, SvxCellOrientation::Standard ) + SfxEnumItem( nId, SfxItemType::SvxOrientationItemType, SvxCellOrientation::Standard ) { if( bStacked ) { @@ -143,7 +143,7 @@ Degree100 SvxOrientationItem::GetRotation( Degree100 nStdAngle ) const SvxMarginItem::SvxMarginItem( const TypedWhichId<SvxMarginItem> nId ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxMarginItemType ), nLeftMargin ( 20 ), nTopMargin ( 20 ), @@ -158,7 +158,7 @@ SvxMarginItem::SvxMarginItem( sal_Int16 nLeft, sal_Int16 nRight, sal_Int16 nBottom, const TypedWhichId<SvxMarginItem> nId ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SvxMarginItemType ), nLeftMargin ( nLeft ), nTopMargin ( nTop ), diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index 6fb6e85236fc..7001c37c30a9 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -31,7 +31,7 @@ SfxPoolItem* SvxDoubleItem::CreateDefault() { return new SvxDoubleItem(0.0, Typ SvxChartTextOrderItem::SvxChartTextOrderItem(SvxChartTextOrder eOrder, TypedWhichId<SvxChartTextOrderItem> nId) : - SfxEnumItem(nId, eOrder) + SfxEnumItem(nId, SfxItemType::SvxChartTextOrderItemType, eOrder) { } @@ -99,7 +99,7 @@ bool SvxChartTextOrderItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMe } SvxDoubleItem::SvxDoubleItem(double fValue, TypedWhichId<SvxDoubleItem> nId) : - SfxPoolItem(nId), + SfxPoolItem(nId, SfxItemType::SvxDoubleItemType), fVal(fValue) { } @@ -144,7 +144,7 @@ bool SvxDoubleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) SvxChartKindErrorItem::SvxChartKindErrorItem(SvxChartKindError eOrient, TypedWhichId<SvxChartKindErrorItem> nId) : - SfxEnumItem(nId, eOrient) + SfxEnumItem(nId, SfxItemType::SvxChartKindErrorItemType, eOrient) { } @@ -155,7 +155,7 @@ SvxChartKindErrorItem* SvxChartKindErrorItem::Clone(SfxItemPool* /*pPool*/) cons SvxChartIndicateItem::SvxChartIndicateItem(SvxChartIndicate eOrient, TypedWhichId<SvxChartIndicateItem> nId) : - SfxEnumItem(nId, eOrient) + SfxEnumItem(nId, SfxItemType::SvxChartIndicateItemType, eOrient) { } @@ -166,7 +166,7 @@ SvxChartIndicateItem* SvxChartIndicateItem::Clone(SfxItemPool* /*pPool*/) const SvxChartRegressItem::SvxChartRegressItem(SvxChartRegress eOrient, TypedWhichId<SvxChartRegressItem> nId) : - SfxEnumItem(nId, eOrient) + SfxEnumItem(nId, SfxItemType::SvxChartRegressItemType, eOrient) { } diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index caae609f6204..2fa7e3d89ff2 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -35,7 +35,7 @@ struct SvxClipboardFormatItem_Impl SfxPoolItem* SvxClipboardFormatItem::CreateDefault() { return new SvxClipboardFormatItem(TypedWhichId<SvxClipboardFormatItem>(0)); }; SvxClipboardFormatItem::SvxClipboardFormatItem( TypedWhichId<SvxClipboardFormatItem> nId ) - : SfxPoolItem( nId ), pImpl( new SvxClipboardFormatItem_Impl ) + : SfxPoolItem( nId, SfxItemType::SvxClipboardFormatItemType ), pImpl( new SvxClipboardFormatItem_Impl ) { } diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index 84e9af4de2b8..d563eb62d89f 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -30,11 +30,11 @@ using namespace com::sun::star; SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem() -: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) +: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY, SfxItemType::SdrCustomShapeGeometryItemType ) {} SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( const uno::Sequence< beans::PropertyValue >& rVal ) -: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) +: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY, SfxItemType::SdrCustomShapeGeometryItemType ) { SetPropSeq( rVal ); } diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx index 8274c2d23ab7..dbc1428a3a4f 100644 --- a/svx/source/items/drawitem.cxx +++ b/svx/source/items/drawitem.cxx @@ -33,12 +33,13 @@ SfxPoolItem* SvxDashListItem::CreateDefault() { return new SvxDashListItem ;} SfxPoolItem* SvxLineEndListItem::CreateDefault() { return new SvxLineEndListItem ;} SvxColorListItem::SvxColorListItem() + : SfxPoolItem( 0, SfxItemType::SvxColorListItemType) { } SvxColorListItem::SvxColorListItem( XColorListRef pTable, TypedWhichId<SvxColorListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxColorListItemType ), pColorList(std::move( pTable )) { } @@ -94,11 +95,12 @@ bool svtype::PutValue( const css::uno::Any& rVal, sal_uInt8 ) \ QUERY_PUT_IMPL( SvxColorListItem, ColorList ) SvxGradientListItem::SvxGradientListItem() + : SfxPoolItem( 0, SfxItemType::SvxGradientListItemType) { } SvxGradientListItem::SvxGradientListItem( XGradientListRef pList, TypedWhichId<SvxGradientListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxGradientListItemType ), pGradientList(std::move( pList )) { } @@ -138,12 +140,13 @@ SvxGradientListItem* SvxGradientListItem::Clone( SfxItemPool * ) const QUERY_PUT_IMPL( SvxGradientListItem, GradientList ) SvxHatchListItem::SvxHatchListItem() + : SfxPoolItem( 0, SfxItemType::SvxHatchListItemType) { } SvxHatchListItem::SvxHatchListItem( XHatchListRef pList, TypedWhichId<SvxHatchListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxHatchListItemType ), pHatchList(std::move( pList )) { } @@ -183,11 +186,12 @@ SvxHatchListItem* SvxHatchListItem::Clone( SfxItemPool * ) const QUERY_PUT_IMPL( SvxHatchListItem, HatchList ) SvxBitmapListItem::SvxBitmapListItem() + : SfxPoolItem( 0, SfxItemType::SvxBitmapListItemType ) { } SvxBitmapListItem::SvxBitmapListItem( XBitmapListRef pList, TypedWhichId<SvxBitmapListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxBitmapListItemType ), pBitmapList(std::move( pList )) { } @@ -224,11 +228,12 @@ SvxBitmapListItem* SvxBitmapListItem::Clone( SfxItemPool * ) const QUERY_PUT_IMPL( SvxBitmapListItem, BitmapList ) SvxPatternListItem::SvxPatternListItem() + : SfxPoolItem( 0, SfxItemType::SvxPatternListItemType ) { } SvxPatternListItem::SvxPatternListItem( XPatternListRef pList, TypedWhichId<SvxPatternListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxPatternListItemType ), pPatternList(std::move( pList )) { } @@ -265,11 +270,12 @@ SvxPatternListItem* SvxPatternListItem::Clone( SfxItemPool * ) const QUERY_PUT_IMPL( SvxPatternListItem, PatternList ) SvxDashListItem::SvxDashListItem() + : SfxPoolItem( 0, SfxItemType::SvxDashListItemType ) { } SvxDashListItem::SvxDashListItem( XDashListRef pList, TypedWhichId<SvxDashListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxDashListItemType ), pDashList(std::move( pList )) { } @@ -306,11 +312,12 @@ SvxDashListItem* SvxDashListItem::Clone( SfxItemPool * ) const QUERY_PUT_IMPL( SvxDashListItem, DashList ) SvxLineEndListItem::SvxLineEndListItem() + : SfxPoolItem( 0, SfxItemType::SvxLineEndListItemType ) { } SvxLineEndListItem::SvxLineEndListItem( XLineEndListRef pList, TypedWhichId<SvxLineEndListItem> nW ) : - SfxPoolItem( nW ), + SfxPoolItem( nW, SfxItemType::SvxLineEndListItemType ), pLineEndList(std::move( pList )) { } diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx index 135c7efaf370..d2cd113b16bf 100644 --- a/svx/source/items/e3ditem.cxx +++ b/svx/source/items/e3ditem.cxx @@ -31,7 +31,7 @@ SvxB3DVectorItem::~SvxB3DVectorItem() SvxB3DVectorItem::SvxB3DVectorItem( TypedWhichId<SvxB3DVectorItem> _nWhich, const basegfx::B3DVector& rVal ) : - SfxPoolItem( _nWhich ), + SfxPoolItem( _nWhich, SfxItemType::SvxB3DVectorItemType ), aVal( rVal ) { } diff --git a/svx/source/items/galleryitem.cxx b/svx/source/items/galleryitem.cxx index 5e50c5efbe3c..0085d2137cd7 100644 --- a/svx/source/items/galleryitem.cxx +++ b/svx/source/items/galleryitem.cxx @@ -32,7 +32,8 @@ SfxPoolItem* SvxGalleryItem::CreateDefault() { return new SvxGalleryItem; } SvxGalleryItem::SvxGalleryItem() - : m_nType( css::gallery::GalleryItemType::EMPTY ) + : SfxPoolItem( 0, SfxItemType::SvxGalleryItemType ) + , m_nType( css::gallery::GalleryItemType::EMPTY ) { } diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx index 30c0977a034d..fcc06e2b39be 100644 --- a/svx/source/items/grfitem.cxx +++ b/svx/source/items/grfitem.cxx @@ -25,14 +25,15 @@ using namespace ::com::sun::star; -SvxGrfCrop::SvxGrfCrop( TypedWhichId<SvxGrfCrop> nItemId ) - : SfxPoolItem( nItemId ), +SvxGrfCrop::SvxGrfCrop( TypedWhichId<SvxGrfCrop> nItemId, SfxItemType eType ) + : SfxPoolItem( nItemId, eType ), nLeft( 0 ), nRight( 0 ), nTop( 0 ), nBottom( 0 ) {} SvxGrfCrop::SvxGrfCrop( sal_Int32 nL, sal_Int32 nR, - sal_Int32 nT, sal_Int32 nB, TypedWhichId<SvxGrfCrop> nItemId ) - : SfxPoolItem( nItemId ), + sal_Int32 nT, sal_Int32 nB, TypedWhichId<SvxGrfCrop> nItemId, + SfxItemType eItemType ) + : SfxPoolItem( nItemId, eItemType ), nLeft( nL ), nRight( nR ), nTop( nT ), nBottom( nB ) {} diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index 93ef9f6d6da5..7d893decd37a 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -44,7 +44,7 @@ SvxHyperlinkItem::SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ): SvxHyperlinkItem::SvxHyperlinkItem( TypedWhichId<SvxHyperlinkItem> _nWhich, OUString aName, OUString aURL, OUString aTarget, OUString aIntName, SvxLinkInsertMode eTyp, HyperDialogEvent nEvents, SvxMacroTableDtor const *pMacroTbl, OUString aReplacementText): - SfxPoolItem (_nWhich), + SfxPoolItem (_nWhich, SfxItemType::SvxHyperlinkItemType ), sName (std::move(aName)), sURL (std::move(aURL)), sTarget (std::move(aTarget)), diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx index a7b834c78658..432a5dcb9db8 100644 --- a/svx/source/items/numinf.cxx +++ b/svx/source/items/numinf.cxx @@ -22,7 +22,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( const TypedWhichId<SvxNumberInfoItem> nId ) : - SfxPoolItem ( nId ), + SfxPoolItem ( nId, SfxItemType::SvxNumberInfoItemType ), pFormatter ( nullptr ), eValueType ( SvxNumberValueType::Undefined ), aStringVal ( "" ), @@ -33,7 +33,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( const TypedWhichId<SvxNumberInfoItem> nId SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const TypedWhichId<SvxNumberInfoItem> nId ) : - SfxPoolItem ( nId ), + SfxPoolItem ( nId, SfxItemType::SvxNumberInfoItemType ), pFormatter ( pNumFormatter ), eValueType ( SvxNumberValueType::Undefined ), aStringVal ( "" ), @@ -44,7 +44,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, OUString aVal, const TypedWhichId<SvxNumberInfoItem> nId ) : - SfxPoolItem ( nId ), + SfxPoolItem ( nId, SfxItemType::SvxNumberInfoItemType ), pFormatter ( pNumFormatter ), eValueType ( SvxNumberValueType::String ), aStringVal (std::move( aVal )), @@ -55,7 +55,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal, const TypedWhichId<SvxNumberInfoItem> nId ) : - SfxPoolItem ( nId ), + SfxPoolItem ( nId, SfxItemType::SvxNumberInfoItemType ), pFormatter ( pNumFormatter ), eValueType ( SvxNumberValueType::Number ), aStringVal ( "" ), @@ -67,7 +67,7 @@ SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const double& rVal, OUString aValueStr, const TypedWhichId<SvxNumberInfoItem> nId ) : - SfxPoolItem ( nId ), + SfxPoolItem ( nId, SfxItemType::SvxNumberInfoItemType ), pFormatter ( pNumFormatter ), eValueType ( SvxNumberValueType::Number ), aStringVal (std::move( aValueStr )), diff --git a/svx/source/items/ofaitem.cxx b/svx/source/items/ofaitem.cxx index 1d5ef696b740..c65a86a643a7 100644 --- a/svx/source/items/ofaitem.cxx +++ b/svx/source/items/ofaitem.cxx @@ -23,7 +23,8 @@ #include <utility> OfaPtrItem::OfaPtrItem( sal_uInt16 _nWhich, void *_pPtr ) - : SfxPoolItem( _nWhich ), pPtr( _pPtr ) + : SfxPoolItem( _nWhich, SfxItemType::OfaPtrItemType ) + , pPtr( _pPtr ) { } @@ -40,7 +41,8 @@ OfaPtrItem* OfaPtrItem::Clone( SfxItemPool * ) const } OfaXColorListItem::OfaXColorListItem( sal_uInt16 _nWhich, rtl::Reference<XColorList> xRef ) - : SfxPoolItem( _nWhich ), mxRef(std::move( xRef )) + : SfxPoolItem( _nWhich, SfxItemType::OfaXColorListItemType ) + , mxRef(std::move( xRef )) {} bool OfaXColorListItem::operator==( const SfxPoolItem& rItem ) const diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 65e016f741a6..e273f26d6876 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -40,7 +40,8 @@ using namespace ::com::sun::star; SfxPoolItem* SvxPageItem::CreateDefault() { return new SvxPageItem(TypedWhichId<SvxPageItem>(0));} -SvxPageItem::SvxPageItem( const TypedWhichId<SvxPageItem> nId ) : SfxPoolItem( nId ), +SvxPageItem::SvxPageItem( const TypedWhichId<SvxPageItem> nId ) + : SfxPoolItem( nId, SfxItemType::SvxPageItemType ), eNumType ( SVX_NUM_ARABIC ), bLandscape ( false ), diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx index eb559fdaeb62..cb9adf051148 100644 --- a/svx/source/items/rotmodit.cxx +++ b/svx/source/items/rotmodit.cxx @@ -33,7 +33,7 @@ SfxPoolItem* SvxRotateModeItem::CreateDefault() { return new SvxRotateModeItem( SvxRotateModeItem::SvxRotateModeItem( SvxRotateMode eMode, TypedWhichId<SvxRotateModeItem> _nWhich ) - : SfxEnumItem( _nWhich, eMode ) + : SfxEnumItem( _nWhich, SfxItemType::SvxRotateModeItemType, eMode ) { } diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 5f5c51655f3e..b300a241e0a8 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -98,13 +98,13 @@ using namespace ::com::sun::star; typedef std::map<OUString, OUString> StringMap; NameOrIndex::NameOrIndex(TypedWhichId<NameOrIndex> _nWhich, sal_Int32 nIndex) : - SfxStringItem(_nWhich, OUString()), + SfxStringItem(_nWhich, OUString(), SfxItemType::NameOrIndexType), m_nPalIndex(nIndex) { } NameOrIndex::NameOrIndex(TypedWhichId<NameOrIndex> _nWhich, const OUString& rName) : - SfxStringItem(_nWhich, rName), + SfxStringItem(_nWhich, rName, SfxItemType::NameOrIndexType), m_nPalIndex(-1) { } @@ -416,7 +416,7 @@ void XColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const SfxPoolItem* XLineStyleItem::CreateDefault() { return new XLineStyleItem; } XLineStyleItem::XLineStyleItem(css::drawing::LineStyle eTheLineStyle) : - SfxEnumItem(XATTR_LINESTYLE, eTheLineStyle) + SfxEnumItem(XATTR_LINESTYLE, SfxItemType::XLineStyleItemType, eTheLineStyle) { } @@ -972,7 +972,7 @@ std::unique_ptr<XLineDashItem> XLineDashItem::checkForUniqueItem( SdrModel* pMod SfxPoolItem* XLineWidthItem::CreateDefault() {return new XLineWidthItem;} XLineWidthItem::XLineWidthItem(tools::Long nWidth) : - SfxMetricItem(XATTR_LINEWIDTH, nWidth) + SfxMetricItem(XATTR_LINEWIDTH, nWidth, SfxItemType::XLineWidthItemType) { } @@ -1706,7 +1706,7 @@ bool XLineEndItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) } XLineStartWidthItem::XLineStartWidthItem(tools::Long nWidth) : - SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth) + SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth, SfxItemType::XLineStartWidthItemType) { } @@ -1744,7 +1744,7 @@ bool XLineStartWidthItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemb } XLineEndWidthItem::XLineEndWidthItem(tools::Long nWidth) : - SfxMetricItem(XATTR_LINEENDWIDTH, nWidth) + SfxMetricItem(XATTR_LINEENDWIDTH, nWidth, SfxItemType::XLineEndWidthItemType) { } @@ -1782,7 +1782,7 @@ bool XLineEndWidthItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMember } XLineStartCenterItem::XLineStartCenterItem(bool bStartCenter) : - SfxBoolItem(XATTR_LINESTARTCENTER, bStartCenter) + SfxBoolItem(XATTR_LINESTARTCENTER, bStartCenter, SfxItemType::XLineStartCenterItem) { } @@ -1821,7 +1821,7 @@ bool XLineStartCenterItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMem } XLineEndCenterItem::XLineEndCenterItem(bool bEndCenter) : - SfxBoolItem(XATTR_LINEENDCENTER, bEndCenter) + SfxBoolItem(XATTR_LINEENDCENTER, bEndCenter, SfxItemType::XLineEndCenterItemType) { } @@ -1865,7 +1865,7 @@ bool XLineEndCenterItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMembe SfxPoolItem* XFillStyleItem::CreateDefault() { return new XFillStyleItem; } XFillStyleItem::XFillStyleItem(drawing::FillStyle eFillStyle) : - SfxEnumItem(XATTR_FILLSTYLE, eFillStyle) + SfxEnumItem(XATTR_FILLSTYLE, SfxItemType::XFillStyleItemType, eFillStyle) { } @@ -2875,7 +2875,7 @@ std::unique_ptr<XFillHatchItem> XFillHatchItem::checkForUniqueItem( SdrModel* pM SfxPoolItem* XFormTextStyleItem::CreateDefault() { return new XFormTextStyleItem; } XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) : - SfxEnumItem(XATTR_FORMTXTSTYLE, eTheStyle) + SfxEnumItem(XATTR_FORMTXTSTYLE, SfxItemType::XFormTextStyleItemType, eTheStyle) { } @@ -2908,7 +2908,7 @@ bool XFormTextStyleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ SfxPoolItem* XFormTextAdjustItem::CreateDefault() { return new XFormTextAdjustItem; } XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) : - SfxEnumItem(XATTR_FORMTXTADJUST, eTheAdjust) + SfxEnumItem(XATTR_FORMTXTADJUST, SfxItemType::XFormTextAdjustItemType, eTheAdjust) { } @@ -2941,7 +2941,7 @@ bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId* SfxPoolItem* XFormTextDistanceItem::CreateDefault() { return new XFormTextDistanceItem; } XFormTextDistanceItem::XFormTextDistanceItem(tools::Long nDist) : - SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist) + SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist, SfxItemType::XFormTextDistanceItemType) { } @@ -2953,7 +2953,7 @@ XFormTextDistanceItem* XFormTextDistanceItem::Clone(SfxItemPool* /*pPool*/) cons SfxPoolItem* XFormTextStartItem::CreateDefault() { return new XFormTextStartItem; } XFormTextStartItem::XFormTextStartItem(tools::Long nStart) : - SfxMetricItem(XATTR_FORMTXTSTART, nStart) + SfxMetricItem(XATTR_FORMTXTSTART, nStart, SfxItemType::XFormTextStartItemType) { } @@ -2965,7 +2965,7 @@ XFormTextStartItem* XFormTextStartItem::Clone(SfxItemPool* /*pPool*/) const SfxPoolItem* XFormTextMirrorItem::CreateDefault() { return new XFormTextMirrorItem; } XFormTextMirrorItem::XFormTextMirrorItem(bool bMirror) : - SfxBoolItem(XATTR_FORMTXTMIRROR, bMirror) + SfxBoolItem(XATTR_FORMTXTMIRROR, bMirror, SfxItemType::XFormTextMirrorItem) { } @@ -2977,7 +2977,7 @@ XFormTextMirrorItem* XFormTextMirrorItem::Clone(SfxItemPool* /*pPool*/) const SfxPoolItem* XFormTextOutlineItem::CreateDefault() { return new XFormTextOutlineItem; } XFormTextOutlineItem::XFormTextOutlineItem(bool bOutline) : - SfxBoolItem(XATTR_FORMTXTOUTLINE, bOutline) + SfxBoolItem(XATTR_FORMTXTOUTLINE, bOutline, SfxItemType::XFormTextOutlineItemType) { } @@ -2989,7 +2989,7 @@ XFormTextOutlineItem* XFormTextOutlineItem::Clone(SfxItemPool* /*pPool*/) const SfxPoolItem* XFormTextShadowItem::CreateDefault() { return new XFormTextShadowItem; } XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) : - SfxEnumItem(XATTR_FORMTXTSHADOW, eFormTextShadow) + SfxEnumItem(XATTR_FORMTXTSHADOW, SfxItemType::XFormTextShadowItemType, eFormTextShadow) { } @@ -3035,7 +3035,7 @@ XFormTextShadowColorItem* XFormTextShadowColorItem::Clone(SfxItemPool* /*pPool*/ SfxPoolItem* XFormTextShadowXValItem::CreateDefault() { return new XFormTextShadowXValItem; } XFormTextShadowXValItem::XFormTextShadowXValItem(tools::Long nVal) : - SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal) + SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal, SfxItemType::XFormTextShadowXValItemType) { } @@ -3047,7 +3047,7 @@ XFormTextShadowXValItem* XFormTextShadowXValItem::Clone(SfxItemPool* /*pPool*/) SfxPoolItem* XFormTextShadowYValItem::CreateDefault() { return new XFormTextShadowYValItem; } XFormTextShadowYValItem::XFormTextShadowYValItem(tools::Long nVal) : - SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal) + SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal, SfxItemType::XFormTextShadowYValItemType) { } @@ -3059,7 +3059,7 @@ XFormTextShadowYValItem* XFormTextShadowYValItem::Clone(SfxItemPool* /*pPool*/) SfxPoolItem* XFormTextHideFormItem::CreateDefault() { return new XFormTextHideFormItem; } XFormTextHideFormItem::XFormTextHideFormItem(bool bHide) : - SfxBoolItem(XATTR_FORMTXTHIDEFORM, bHide) + SfxBoolItem(XATTR_FORMTXTHIDEFORM, bHide, SfxItemType::XFormTextHideFormItemType) { } @@ -3073,13 +3073,14 @@ XFormTextHideFormItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) cons /// a line attribute set item XLineAttrSetItem::XLineAttrSetItem( SfxItemSet&& pItemSet ) : - SfxSetItem( XATTRSET_LINE, std::move(pItemSet)) + SfxSetItem( XATTRSET_LINE, std::move(pItemSet), SfxItemType::XLineAttrSetItemType) { } XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) : SfxSetItem( XATTRSET_LINE, - SfxItemSetFixed<XATTR_LINE_FIRST, XATTR_LINE_LAST>( *pItemPool )) + SfxItemSetFixed<XATTR_LINE_FIRST, XATTR_LINE_LAST>( *pItemPool ), + SfxItemType::XLineAttrSetItemType) { } @@ -3101,13 +3102,14 @@ XLineAttrSetItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const /// fill attribute set item XFillAttrSetItem::XFillAttrSetItem( SfxItemSet&& pItemSet ) : - SfxSetItem( XATTRSET_FILL, std::move(pItemSet)) + SfxSetItem( XATTRSET_FILL, std::move(pItemSet), SfxItemType::XFillAttrSetItemType) { } XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) : SfxSetItem( XATTRSET_FILL, - SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>( *pItemPool )) + SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>( *pItemPool ), + SfxItemType::XFillAttrSetItemType) { } diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index ad1b3b2959e5..0f8553575159 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -51,7 +51,7 @@ #include <libxml/xmlwriter.h> XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) : - SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence) + SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence, SfxItemType::XLineTransparenceItemType) { } @@ -88,7 +88,7 @@ bool XLineTransparenceItem::GetPresentation SfxPoolItem* XLineJointItem::CreateDefault() { return new XLineJointItem; } XLineJointItem::XLineJointItem( css::drawing::LineJoint eLineJoint ) : - SfxEnumItem(XATTR_LINEJOINT, eLineJoint) + SfxEnumItem(XATTR_LINEJOINT, SfxItemType::XLineJointItemType, eLineJoint) { } @@ -170,7 +170,7 @@ sal_uInt16 XLineJointItem::GetValueCount() const AffineMatrixItem::AffineMatrixItem(const css::geometry::AffineMatrix2D* pMatrix) -: SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX) +: SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX, SfxItemType::AffineMatrixItemType) { if(pMatrix) { @@ -245,7 +245,7 @@ bool AffineMatrixItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberI SfxPoolItem* XLineCapItem::CreateDefault() { return new XLineCapItem; } XLineCapItem::XLineCapItem(css::drawing::LineCap eLineCap) -: SfxEnumItem(XATTR_LINECAP, eLineCap) +: SfxEnumItem(XATTR_LINECAP, SfxItemType::XLineCapItemType, eLineCap) { } @@ -329,7 +329,7 @@ css::drawing::LineCap XLineCapItem::GetValue() const } XFillTransparenceItem::XFillTransparenceItem(sal_uInt16 nFillTransparence) : - SfxUInt16Item(XATTR_FILLTRANSPARENCE, nFillTransparence) + SfxUInt16Item(XATTR_FILLTRANSPARENCE, nFillTransparence, SfxItemType::XFillTransparenceItemType) { } @@ -372,7 +372,7 @@ void XFillTransparenceItem::dumpAsXml(xmlTextWriterPtr pWriter) const XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence) : - SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence) + SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence, SfxItemType::XFormTextShadowTranspItemType) { } @@ -383,7 +383,7 @@ XFormTextShadowTranspItem* XFormTextShadowTranspItem::Clone(SfxItemPool* /*pPool XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 nStepCount ) : - SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount ) + SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount, SfxItemType::XGradientStepCountItemType ) { } @@ -408,7 +408,7 @@ bool XGradientStepCountItem::GetPresentation XFillBmpTileItem::XFillBmpTileItem( bool bTile ) : - SfxBoolItem( XATTR_FILLBMP_TILE, bTile ) + SfxBoolItem( XATTR_FILLBMP_TILE, bTile, SfxItemType::XFillBmpTileItemType ) { } @@ -440,7 +440,7 @@ void XFillBmpTileItem::dumpAsXml(xmlTextWriterPtr pWriter) const XFillBmpPosItem::XFillBmpPosItem( RectPoint eRP ) : - SfxEnumItem( XATTR_FILLBMP_POS, eRP ) + SfxEnumItem( XATTR_FILLBMP_POS, SfxItemType::XFillBmpPosItemType, eRP ) { } @@ -476,7 +476,7 @@ void XFillBmpPosItem::dumpAsXml(xmlTextWriterPtr pWriter) const XFillBmpSizeXItem::XFillBmpSizeXItem( tools::Long nSizeX ) : - SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX ) + SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX, SfxItemType::XFillBmpSizeXItemType ) { } @@ -505,7 +505,7 @@ bool XFillBmpSizeXItem::HasMetrics() const XFillBmpSizeYItem::XFillBmpSizeYItem( tools::Long nSizeY ) : - SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY ) + SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY, SfxItemType::XFillBmpSizeYItemType ) { } @@ -533,7 +533,7 @@ bool XFillBmpSizeYItem::HasMetrics() const XFillBmpSizeLogItem::XFillBmpSizeLogItem( bool bLog ) : - SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog ) + SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog, SfxItemType::XFillBmpSizeLogItemType ) { } @@ -557,7 +557,7 @@ bool XFillBmpSizeLogItem::GetPresentation XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( sal_uInt16 nOffX ) : - SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX ) + SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX, SfxItemType::XFillBmpTileOffsetXItemType ) { } @@ -580,7 +580,7 @@ bool XFillBmpTileOffsetXItem::GetPresentation XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( sal_uInt16 nOffY ) : - SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY ) + SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY, SfxItemType::XFillBmpTileOffsetYItemType ) { } @@ -602,7 +602,7 @@ bool XFillBmpTileOffsetYItem::GetPresentation } XFillBmpStretchItem::XFillBmpStretchItem( bool bStretch ) : - SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch ) + SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch, SfxItemType::XFillBmpStretchItemType ) { } @@ -631,9 +631,8 @@ void XFillBmpStretchItem::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterEndElement(pWriter); } - XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX ) : - SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX ) + SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX, SfxItemType::XFillBmpPosOffsetXItemType ) { } @@ -654,9 +653,8 @@ bool XFillBmpPosOffsetXItem::GetPresentation return true; } - XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY ) : - SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY ) + SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY, SfxItemType::XFillBmpPosOffsetYItemType ) { } @@ -678,7 +676,7 @@ bool XFillBmpPosOffsetYItem::GetPresentation } XFillBackgroundItem::XFillBackgroundItem( bool bFill ) : - SfxBoolItem( XATTR_FILLBACKGROUND, bFill ) + SfxBoolItem( XATTR_FILLBACKGROUND, bFill, SfxItemType::XFillBackgroundItemType ) { } @@ -703,7 +701,7 @@ void XFillBackgroundItem::dumpAsXml(xmlTextWriterPtr pWriter) const } XFillUseSlideBackgroundItem::XFillUseSlideBackgroundItem( bool bFill ) : - SfxBoolItem( XATTR_FILLUSESLIDEBACKGROUND, bFill ) + SfxBoolItem( XATTR_FILLUSESLIDEBACKGROUND, bFill, SfxItemType::XFillUseSlideBackgroundItemType ) { } diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx index 56184ab96b34..2d16e5e22a00 100644 --- a/sw/inc/fmtcnct.hxx +++ b/sw/inc/fmtcnct.hxx @@ -34,7 +34,7 @@ class SW_DLLPUBLIC SwFormatChain final : public SfxPoolItem m_aNext; ///< Next SwFlyFrameFormat (if existent). public: - SwFormatChain() : SfxPoolItem( RES_CHAIN ) {} + SwFormatChain() : SfxPoolItem( RES_CHAIN, SfxItemType::SwFormatChainType ) {} SwFormatChain( const SwFormatChain &rCpy ); inline SwFormatChain &operator=( const SwFormatChain& ); diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx index a5de432ccad7..241db0b9a1a4 100644 --- a/sw/inc/fmtftntx.hxx +++ b/sw/inc/fmtftntx.hxx @@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwFormatFootnoteEndAtTextEnd : public SfxEnumItem<SwFootnoteE protected: SwFormatFootnoteEndAtTextEnd( sal_uInt16 nWhichL, SwFootnoteEndPosEnum ePos ) - : SfxEnumItem( nWhichL, ePos ), m_nOffset( 0 ) + : SfxEnumItem( nWhichL, SfxItemType::SwFormatFootnoteEndAtTextEndType, ePos ), m_nOffset( 0 ) {} public: diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index 34c9454d83b5..fa3991d4aa8f 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -42,7 +42,7 @@ class SW_DLLPUBLIC SwMirrorGrf final : public SfxEnumItem<MirrorGraph> public: SwMirrorGrf( MirrorGraph eMiro = MirrorGraph::Dont ) - : SfxEnumItem( RES_GRFATR_MIRRORGRF, eMiro ), m_bGrfToggle( false ) + : SfxEnumItem( RES_GRFATR_MIRRORGRF, SfxItemType::SwMirrorGrfType, eMiro ), m_bGrfToggle( false ) {} // pure virtual methods of SfxPoolItem @@ -88,7 +88,7 @@ private: public: SwRotationGrf() - : SfxUInt16Item( RES_GRFATR_ROTATION, 0 ) + : SfxUInt16Item( RES_GRFATR_ROTATION, 0, SfxItemType::SwRotationGrfType ) {} SwRotationGrf( Degree10 nVal, const Size& rSz ); @@ -187,11 +187,11 @@ class SW_DLLPUBLIC SwGammaGrf final : public SfxPoolItem { double m_nValue; public: - SwGammaGrf() : SfxPoolItem( RES_GRFATR_GAMMA ), m_nValue( 1.0 ) + SwGammaGrf() : SfxPoolItem( RES_GRFATR_GAMMA, SfxItemType::SwGammaGrfType ), m_nValue( 1.0 ) {} SwGammaGrf( const double& rVal ) - : SfxPoolItem( RES_GRFATR_GAMMA ), m_nValue( rVal ) + : SfxPoolItem( RES_GRFATR_GAMMA, SfxItemType::SwGammaGrfType ), m_nValue( rVal ) {} // pure virtual methods from SfxEnumItem @@ -215,7 +215,7 @@ class SwInvertGrf final : public SfxBoolItem { public: SwInvertGrf( bool bVal = false ) - : SfxBoolItem( RES_GRFATR_INVERT, bVal ) + : SfxBoolItem( RES_GRFATR_INVERT, bVal, SfxItemType::SwInvertGrfType ) {} // pure virtual methods from SfxInt16Item @@ -231,7 +231,7 @@ class SwTransparencyGrf final : public SfxByteItem { public: SwTransparencyGrf( sal_Int8 nVal = 0 ) - : SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal ) + : SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal, SfxItemType::SwTransparencyGrfType ) {} // pure virtual methods from SfxInt16Item @@ -251,7 +251,7 @@ public: class SwDrawModeGrf_Base: public SfxEnumItem<GraphicDrawMode> { protected: SwDrawModeGrf_Base(GraphicDrawMode nMode): - SfxEnumItem(RES_GRFATR_DRAWMODE, nMode) {} + SfxEnumItem(RES_GRFATR_DRAWMODE, SfxItemType::SwDrawModeGrf_BaseType, nMode) {} }; class SW_DLLPUBLIC SwDrawModeGrf final : public SwDrawModeGrf_Base diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 69eb6b1dd314..1cc7cde2c5f7 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -54,7 +54,7 @@ SwTableBoxNumFormat* SwTableBoxNumFormat::Clone( SfxItemPool* ) const } SwTableBoxFormula::SwTableBoxFormula( const OUString& rFormula ) - : SfxPoolItem( RES_BOXATR_FORMULA ), + : SfxPoolItem( RES_BOXATR_FORMULA, SfxItemType::SwTableFormulaType ), SwTableFormula( rFormula ), m_pDefinedIn( nullptr ) { @@ -155,12 +155,12 @@ void SwTableBoxFormula::Calc( SwTableCalcPara& rCalcPara, double& rValue ) } SwTableBoxValue::SwTableBoxValue() - : SfxPoolItem( RES_BOXATR_VALUE ), m_nValue( 0 ) + : SfxPoolItem( RES_BOXATR_VALUE, SfxItemType::SwTableBoxValueType ), m_nValue( 0 ) { } SwTableBoxValue::SwTableBoxValue( const double nVal ) - : SfxPoolItem( RES_BOXATR_VALUE ), m_nValue( nVal ) + : SfxPoolItem( RES_BOXATR_VALUE, SfxItemType::SwTableBoxValueType ), m_nValue( nVal ) { } diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx index 8f9abd96c775..1ad109279a19 100644 --- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx +++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star::uno; SwFormatWrapInfluenceOnObjPos::SwFormatWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition ) - : SfxPoolItem( RES_WRAP_INFLUENCE_ON_OBJPOS ), + : SfxPoolItem( RES_WRAP_INFLUENCE_ON_OBJPOS, SfxItemType::SwFormatWrapInfluenceOnOjPosType ), mnWrapInfluenceOnPosition( _nWrapInfluenceOnPosition ) { } diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx index 641d7380312f..95dbfcb112a5 100644 --- a/sw/source/core/attr/hints.cxx +++ b/sw/source/core/attr/hints.cxx @@ -136,7 +136,7 @@ void SwAttrSetChg::ClearItem( sal_uInt16 nWhch ) #endif SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch ) - : SfxPoolItem( nWhch ) + : SfxPoolItem( nWhch, SfxItemType::SwMsgPoolItemType ) { } diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx index bf7ff665bc47..549d2d67da3b 100644 --- a/sw/source/core/graphic/grfatr.cxx +++ b/sw/source/core/graphic/grfatr.cxx @@ -134,11 +134,11 @@ bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } SwCropGrf::SwCropGrf() - : SvxGrfCrop( RES_GRFATR_CROPGRF ) + : SvxGrfCrop( RES_GRFATR_CROPGRF, SfxItemType::SwCropGrfType ) {} SwCropGrf::SwCropGrf(sal_Int32 nL, sal_Int32 nR, sal_Int32 nT, sal_Int32 nB ) - : SvxGrfCrop( nL, nR, nT, nB, RES_GRFATR_CROPGRF ) + : SvxGrfCrop( nL, nR, nT, nB, RES_GRFATR_CROPGRF, SfxItemType::SwCropGrfType ) {} SwCropGrf* SwCropGrf::Clone( SfxItemPool* ) const @@ -166,7 +166,7 @@ Degree10 SwRotationGrf::checkAndCorrectValue(Degree10 nValue) SwRotationGrf::SwRotationGrf( Degree10 nVal, const Size& rSz ) // tdf#115529 check and evtl. correct value -: SfxUInt16Item( RES_GRFATR_ROTATION, checkAndCorrectValue(nVal).get() ), +: SfxUInt16Item( RES_GRFATR_ROTATION, checkAndCorrectValue(nVal).get(), SfxItemType::SwRotationGrfType ), m_aUnrotatedSize( rSz ) { } diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 5e95d1aaf787..b0b4e0a1d4c9 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -472,7 +472,7 @@ void SwFormatFrameSize::dumpAsXml(xmlTextWriterPtr pWriter) const // Partially implemented inline in hxx SwFormatFillOrder::SwFormatFillOrder( SwFillOrder nFO ) - : SfxEnumItem( RES_FILL_ORDER, nFO ) + : SfxEnumItem( RES_FILL_ORDER, SfxItemType::SwFormatFillOrderType, nFO ) {} SwFormatFillOrder* SwFormatFillOrder::Clone( SfxItemPool* ) const @@ -487,21 +487,21 @@ sal_uInt16 SwFormatFillOrder::GetValueCount() const // Partially implemented inline in hxx SwFormatHeader::SwFormatHeader( SwFrameFormat *pHeaderFormat ) - : SfxPoolItem( RES_HEADER ), + : SfxPoolItem( RES_HEADER, SfxItemType::SwFormatHeaderType ), SwClient( pHeaderFormat ), m_bActive( pHeaderFormat ) { } SwFormatHeader::SwFormatHeader( const SwFormatHeader &rCpy ) - : SfxPoolItem( RES_HEADER ), + : SfxPoolItem( RES_HEADER, SfxItemType::SwFormatHeaderType ), SwClient( const_cast<sw::BroadcastingModify*>(static_cast<const sw::BroadcastingModify*>(rCpy.GetRegisteredIn())) ), m_bActive( rCpy.IsActive() ) { } SwFormatHeader::SwFormatHeader( bool bOn ) - : SfxPoolItem( RES_HEADER ), + : SfxPoolItem( RES_HEADER, SfxItemType::SwFormatHeaderType ), SwClient( nullptr ), m_bActive( bOn ) { @@ -532,21 +532,21 @@ void SwFormatHeader::RegisterToFormat( SwFormat& rFormat ) // Partially implemented inline in hxx SwFormatFooter::SwFormatFooter( SwFrameFormat *pFooterFormat ) - : SfxPoolItem( RES_FOOTER ), + : SfxPoolItem( RES_FOOTER, SfxItemType::SwFormatFooterType ), SwClient( pFooterFormat ), m_bActive( pFooterFormat ) { } SwFormatFooter::SwFormatFooter( const SwFormatFooter &rCpy ) - : SfxPoolItem( RES_FOOTER ), + : SfxPoolItem( RES_FOOTER, SfxItemType::SwFormatFooterType ), SwClient( const_cast<sw::BroadcastingModify*>(static_cast<const sw::BroadcastingModify*>(rCpy.GetRegisteredIn())) ), m_bActive( rCpy.IsActive() ) { } SwFormatFooter::SwFormatFooter( bool bOn ) - : SfxPoolItem( RES_FOOTER ), + : SfxPoolItem( RES_FOOTER, SfxItemType::SwFormatFooterType ), SwClient( nullptr ), m_bActive( bOn ) { @@ -577,13 +577,13 @@ SwFormatFooter* SwFormatFooter::Clone( SfxItemPool* ) const // Partially implemented inline in hxx SwFormatContent::SwFormatContent( const SwFormatContent &rCpy ) - : SfxPoolItem( RES_CNTNT ) + : SfxPoolItem( RES_CNTNT, SfxItemType::SwFormatContentType ) , m_oStartNode( rCpy.m_oStartNode ) { } SwFormatContent::SwFormatContent( const SwStartNode *pStartNd ) - : SfxPoolItem( RES_CNTNT ) + : SfxPoolItem( RES_CNTNT, SfxItemType::SwFormatContentType ) { if (pStartNd) m_oStartNode = *pStartNd; @@ -629,7 +629,7 @@ void SwFormatContent::dumpAsXml(xmlTextWriterPtr pWriter) const // Partially implemented inline in hxx SwFormatPageDesc::SwFormatPageDesc( const SwFormatPageDesc &rCpy ) - : SfxPoolItem( RES_PAGEDESC ), + : SfxPoolItem( RES_PAGEDESC, SfxItemType::SwFormatPageDescType ), SwClient( const_cast<SwPageDesc*>(rCpy.GetPageDesc()) ), m_oNumOffset( rCpy.m_oNumOffset ), m_pDefinedIn( nullptr ) @@ -637,7 +637,7 @@ SwFormatPageDesc::SwFormatPageDesc( const SwFormatPageDesc &rCpy ) } SwFormatPageDesc::SwFormatPageDesc( const SwPageDesc *pDesc ) - : SfxPoolItem( RES_PAGEDESC ), + : SfxPoolItem( RES_PAGEDESC, SfxItemType::SwFormatPageDescType ), SwClient( const_cast<SwPageDesc*>(pDesc) ), m_pDefinedIn( nullptr ) { @@ -838,7 +838,7 @@ void SwColumn::dumpAsXml(xmlTextWriterPtr pWriter) const } SwFormatCol::SwFormatCol( const SwFormatCol& rCpy ) - : SfxPoolItem( RES_COL ), + : SfxPoolItem( RES_COL, SfxItemType::SwFormatColType ), m_eLineStyle( rCpy.m_eLineStyle ), m_nLineWidth( rCpy.m_nLineWidth), m_aLineColor( rCpy.m_aLineColor), @@ -880,7 +880,7 @@ SwFormatCol& SwFormatCol::operator=( const SwFormatCol& rCpy ) } SwFormatCol::SwFormatCol() - : SfxPoolItem( RES_COL ) + : SfxPoolItem( RES_COL, SfxItemType::SwFormatColType ) , m_eLineStyle( SvxBorderLineStyle::NONE) , m_nLineWidth(0), @@ -1268,7 +1268,7 @@ void SwFormatCol::dumpAsXml(xmlTextWriterPtr pWriter) const // Partially implemented inline in hxx SwFormatSurround::SwFormatSurround( css::text::WrapTextMode eFly ) : - SfxEnumItem( RES_SURROUND, eFly ) + SfxEnumItem( RES_SURROUND, SfxItemType::SwFormatSurroundType, eFly ) { m_bAnchorOnly = m_bContour = m_bOutside = false; } @@ -1374,7 +1374,7 @@ void SwFormatSurround::dumpAsXml(xmlTextWriterPtr pWriter) const // Partially implemented inline in hxx SwFormatVertOrient::SwFormatVertOrient( SwTwips nY, sal_Int16 eVert, sal_Int16 eRel ) - : SfxPoolItem( RES_VERT_ORIENT ), + : SfxPoolItem( RES_VERT_ORIENT, SfxItemType::SwFormatVertOrientType ), m_nYPos( nY ), m_eOrient( eVert ), m_eRelation( eRel ) @@ -1466,7 +1466,7 @@ void SwFormatVertOrient::dumpAsXml(xmlTextWriterPtr pWriter) const // Partially implemented inline in hxx SwFormatHoriOrient::SwFormatHoriOrient( SwTwips nX, sal_Int16 eHori, sal_Int16 eRel, bool bPos ) - : SfxPoolItem( RES_HORI_ORIENT ), + : SfxPoolItem( RES_HORI_ORIENT, SfxItemType::SwFormatHoriOrientType ), m_nXPos( nX ), m_eOrient( eHori ), m_eRelation( eRel ), @@ -1566,7 +1566,7 @@ void SwFormatHoriOrient::dumpAsXml(xmlTextWriterPtr pWriter) const } SwFormatAnchor::SwFormatAnchor( RndStdIds nRnd, sal_uInt16 nPage ) - : SfxPoolItem( RES_ANCHOR ), + : SfxPoolItem( RES_ANCHOR, SfxItemType::SwFormatAnchorType ), m_eAnchorId( nRnd ), m_nPageNumber( nPage ), // OD 2004-05-05 #i28701# - get always new increased order number @@ -1582,7 +1582,7 @@ SwFormatAnchor::SwFormatAnchor( RndStdIds nRnd, sal_uInt16 nPage ) } SwFormatAnchor::SwFormatAnchor( const SwFormatAnchor &rCpy ) - : SfxPoolItem( RES_ANCHOR ) + : SfxPoolItem( RES_ANCHOR, SfxItemType::SwFormatAnchorType ) , m_oContentAnchor( rCpy.m_oContentAnchor ) , m_eAnchorId( rCpy.m_eAnchorId ) , m_nPageNumber( rCpy.m_nPageNumber ) @@ -1833,13 +1833,13 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const // Partially implemented inline in hxx SwFormatURL::SwFormatURL() : - SfxPoolItem( RES_URL ), + SfxPoolItem( RES_URL, SfxItemType::SwFormatURLType ), m_bIsServerMap( false ) { } SwFormatURL::SwFormatURL( const SwFormatURL &rURL) : - SfxPoolItem( RES_URL ), + SfxPoolItem( RES_URL, SfxItemType::SwFormatURLType ), m_sTargetFrameName( rURL.GetTargetFrameName() ), m_sURL( rURL.GetURL() ), m_sName( rURL.GetName() ), @@ -2159,7 +2159,7 @@ bool SwFormatChain::operator==( const SfxPoolItem &rAttr ) const } SwFormatChain::SwFormatChain( const SwFormatChain &rCpy ) : - SfxPoolItem( RES_CHAIN ) + SfxPoolItem( RES_CHAIN, SfxItemType::SwFormatChainType ) { SetPrev( rCpy.GetPrev() ); SetNext( rCpy.GetNext() ); @@ -2214,7 +2214,7 @@ bool SwFormatChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const } SwFormatLineNumber::SwFormatLineNumber() : - SfxPoolItem( RES_LINENUMBER ) + SfxPoolItem( RES_LINENUMBER, SfxItemType::SwFormatLineNumberType ) { m_nStartValue = 0; m_bCountLines = true; @@ -2284,7 +2284,8 @@ bool SwFormatLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } SwTextGridItem::SwTextGridItem() - : SfxPoolItem( RES_TEXTGRID ), m_aColor( COL_LIGHTGRAY ), m_nLines( 20 ) + : SfxPoolItem( RES_TEXTGRID, SfxItemType::SwTextGridItemType ) + , m_aColor( COL_LIGHTGRAY ), m_nLines( 20 ) , m_nBaseHeight( 400 ), m_nRubyHeight( 200 ), m_eGridType( GRID_NONE ) , m_bRubyTextBelow( false ), m_bPrintGrid( true ), m_bDisplayGrid( true ) , m_nBaseWidth(400), m_bSnapToChars( true ), m_bSquaredMode(true) diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx index f724ac21c0fe..428171ac79e1 100644 --- a/sw/source/core/para/paratr.cxx +++ b/sw/source/core/para/paratr.cxx @@ -36,7 +36,7 @@ SfxPoolItem* SwRegisterItem::CreateDefault() { return new SwRegisterItem; } SfxPoolItem* SwNumRuleItem::CreateDefault() { return new SwNumRuleItem; } SwFormatDrop::SwFormatDrop() - : SfxPoolItem( RES_PARATR_DROP ), + : SfxPoolItem( RES_PARATR_DROP, SfxItemType::SwFormatDropType ), SwClient( nullptr ), m_pDefinedIn( nullptr ), m_nDistance( 0 ), @@ -47,7 +47,7 @@ SwFormatDrop::SwFormatDrop() } SwFormatDrop::SwFormatDrop( const SwFormatDrop &rCpy ) - : SfxPoolItem( RES_PARATR_DROP ), + : SfxPoolItem( RES_PARATR_DROP, SfxItemType::SwFormatDropType ), SwClient( rCpy.GetRegisteredInNonConst() ), m_pDefinedIn( nullptr ), m_nDistance( rCpy.GetDistance() ), diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index b29bafde11f6..e491d4a50813 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -91,7 +91,7 @@ void lcl_FillAuthPattern(SwFormTokens &rAuthTokens, sal_uInt16 nTypeId) /// pool default constructor SwTOXMark::SwTOXMark() - : SfxPoolItem(RES_TXTATR_TOXMARK) + : SfxPoolItem(RES_TXTATR_TOXMARK, SfxItemType::SwTOXMarkType) , m_pType(nullptr) , m_pTextAttr(nullptr) , m_nLevel(0) @@ -101,7 +101,7 @@ SwTOXMark::SwTOXMark() } SwTOXMark::SwTOXMark(const SwTOXType* pType) - : SfxPoolItem(RES_TXTATR_TOXMARK) + : SfxPoolItem(RES_TXTATR_TOXMARK, SfxItemType::SwTOXMarkType) , m_pType(pType) , m_pTextAttr(nullptr) , m_nLevel(0) @@ -112,7 +112,7 @@ SwTOXMark::SwTOXMark(const SwTOXType* pType) } SwTOXMark::SwTOXMark(const SwTOXMark& rCopy) - : SfxPoolItem(RES_TXTATR_TOXMARK) + : SfxPoolItem(RES_TXTATR_TOXMARK, SfxItemType::SwTOXMarkType) , SvtListener() , m_pType(rCopy.m_pType) , m_aPrimaryKey(rCopy.m_aPrimaryKey) diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 47e78ce2c95d..1d17671e0de4 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -46,14 +46,14 @@ // constructor for default item in attribute-pool SwFormatField::SwFormatField( sal_uInt16 nWhich ) - : SfxPoolItem( nWhich ) + : SfxPoolItem( nWhich, SfxItemType::SwFormatFieldType ) , SfxBroadcaster() , mpTextField( nullptr ) { } SwFormatField::SwFormatField( const SwField &rField ) - : SfxPoolItem( RES_TXTATR_FIELD ) + : SfxPoolItem( RES_TXTATR_FIELD, SfxItemType::SwFormatFieldType ) , SfxBroadcaster() , mpField( rField.CopyField() ) , mpTextField( nullptr ) diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index fbefb76fa851..bacb15aa5c01 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -37,7 +37,7 @@ #include <osl/diagnose.h> SwFormatFlyCnt::SwFormatFlyCnt( SwFrameFormat *pFrameFormat ) - : SfxPoolItem( RES_TXTATR_FLYCNT ), + : SfxPoolItem( RES_TXTATR_FLYCNT, SfxItemType::SwFormatFlyCntType ), m_pTextAttr( nullptr ), m_pFormat( pFrameFormat ) { diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 58f6a5001690..cc9dabc13fcc 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -124,7 +124,7 @@ namespace { } SwFormatFootnote::SwFormatFootnote( bool bEndNote ) - : SfxPoolItem( RES_TXTATR_FTN ) + : SfxPoolItem( RES_TXTATR_FTN, SfxItemType::SwFormatFootnoteType ) , sw::BroadcastingModify() , m_pTextAttr(nullptr) , m_nNumber(0) diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx index 1684e003309e..ccb697e30184 100644 --- a/sw/source/core/txtnode/atrref.cxx +++ b/sw/source/core/txtnode/atrref.cxx @@ -41,7 +41,7 @@ SwFormatRefMark::~SwFormatRefMark( ) } SwFormatRefMark::SwFormatRefMark( OUString aName ) - : SfxPoolItem(RES_TXTATR_REFMARK) + : SfxPoolItem(RES_TXTATR_REFMARK, SfxItemType::SwFormatRefMarkType) , sw::BroadcastingModify() , m_pTextAttr(nullptr) , m_aRefName(std::move(aName)) @@ -49,7 +49,7 @@ SwFormatRefMark::SwFormatRefMark( OUString aName ) } SwFormatRefMark::SwFormatRefMark( const SwFormatRefMark& rAttr ) - : SfxPoolItem(RES_TXTATR_REFMARK) + : SfxPoolItem(RES_TXTATR_REFMARK, SfxItemType::SwFormatRefMarkType) , sw::BroadcastingModify() , m_pTextAttr(nullptr) , m_aRefName(rAttr.m_aRefName) diff --git a/sw/source/core/txtnode/attrcontentcontrol.cxx b/sw/source/core/txtnode/attrcontentcontrol.cxx index c894615fa41d..2054318befa2 100644 --- a/sw/source/core/txtnode/attrcontentcontrol.cxx +++ b/sw/source/core/txtnode/attrcontentcontrol.cxx @@ -47,14 +47,14 @@ SwFormatContentControl* SwFormatContentControl::CreatePoolDefault(sal_uInt16 nWh } SwFormatContentControl::SwFormatContentControl(sal_uInt16 nWhich) - : SfxPoolItem(nWhich) + : SfxPoolItem(nWhich, SfxItemType::SwFormatContentControlType) , m_pTextAttr(nullptr) { } SwFormatContentControl::SwFormatContentControl( const std::shared_ptr<SwContentControl>& pContentControl, sal_uInt16 nWhich) - : SfxPoolItem(nWhich) + : SfxPoolItem(nWhich, SfxItemType::SwFormatContentControlType) , m_pContentControl(pContentControl) , m_pTextAttr(nullptr) { diff --git a/sw/source/core/txtnode/attrlinebreak.cxx b/sw/source/core/txtnode/attrlinebreak.cxx index 5ce9301820a5..5876bb8fc78b 100644 --- a/sw/source/core/txtnode/attrlinebreak.cxx +++ b/sw/source/core/txtnode/attrlinebreak.cxx @@ -33,7 +33,7 @@ using namespace com::sun::star; SwFormatLineBreak::SwFormatLineBreak(SwLineBreakClear eClear) - : SfxEnumItem(RES_TXTATR_LINEBREAK, eClear) + : SfxEnumItem(RES_TXTATR_LINEBREAK, SfxItemType::SwFormatLinebreakType, eClear) , sw::BroadcastingModify() , m_pTextAttr(nullptr) { diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 3e888b660f6a..b8ff4a5e41ca 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -60,14 +60,14 @@ using namespace ::com::sun::star; SfxPoolItem* SwFormatINetFormat::CreateDefault() { return new SwFormatINetFormat; } SwFormatCharFormat::SwFormatCharFormat( SwCharFormat *pFormat ) - : SfxPoolItem( RES_TXTATR_CHARFMT ), + : SfxPoolItem( RES_TXTATR_CHARFMT, SfxItemType::SwFormatCharFormatType ), SwClient(pFormat), m_pTextAttribute( nullptr ) { } SwFormatCharFormat::SwFormatCharFormat( const SwFormatCharFormat& rAttr ) - : SfxPoolItem( RES_TXTATR_CHARFMT ), + : SfxPoolItem( RES_TXTATR_CHARFMT, SfxItemType::SwFormatCharFormatType ), SwClient( rAttr.GetCharFormat() ), m_pTextAttribute( nullptr ) { @@ -128,7 +128,7 @@ void SwFormatCharFormat::dumpAsXml(xmlTextWriterPtr pWriter) const } SwFormatAutoFormat::SwFormatAutoFormat( sal_uInt16 nInitWhich ) - : SfxPoolItem( nInitWhich ) + : SfxPoolItem( nInitWhich, SfxItemType::SwFormatAutoFormatType ) { } @@ -168,7 +168,7 @@ void SwFormatAutoFormat::dumpAsXml(xmlTextWriterPtr pWriter) const } SwFormatINetFormat::SwFormatINetFormat() - : SfxPoolItem( RES_TXTATR_INETFMT ) + : SfxPoolItem( RES_TXTATR_INETFMT, SfxItemType::SwFormatINetFormatType ) , msURL() , msTargetFrame() , msINetFormatName() @@ -180,7 +180,7 @@ SwFormatINetFormat::SwFormatINetFormat() {} SwFormatINetFormat::SwFormatINetFormat( OUString aURL, OUString aTarget ) - : SfxPoolItem( RES_TXTATR_INETFMT ) + : SfxPoolItem( RES_TXTATR_INETFMT, SfxItemType::SwFormatINetFormatType ) , msURL( std::move(aURL) ) , msTargetFrame( std::move(aTarget) ) , msINetFormatName() @@ -195,7 +195,7 @@ SwFormatINetFormat::SwFormatINetFormat( OUString aURL, OUString aTarget ) } SwFormatINetFormat::SwFormatINetFormat( const SwFormatINetFormat& rAttr ) - : SfxPoolItem( RES_TXTATR_INETFMT ) + : SfxPoolItem( RES_TXTATR_INETFMT, SfxItemType::SwFormatINetFormatType ) , sw::BroadcasterMixin() , msURL( rAttr.GetValue() ) , msTargetFrame( rAttr.msTargetFrame ) @@ -402,7 +402,7 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } SwFormatRuby::SwFormatRuby( OUString aRubyText ) - : SfxPoolItem( RES_TXTATR_CJK_RUBY ), + : SfxPoolItem( RES_TXTATR_CJK_RUBY, SfxItemType::SwFormatRubyType ), m_sRubyText( std::move(aRubyText) ), m_pTextAttr( nullptr ), m_nCharFormatId( 0 ), @@ -412,7 +412,7 @@ SwFormatRuby::SwFormatRuby( OUString aRubyText ) } SwFormatRuby::SwFormatRuby( const SwFormatRuby& rAttr ) - : SfxPoolItem( RES_TXTATR_CJK_RUBY ), + : SfxPoolItem( RES_TXTATR_CJK_RUBY, SfxItemType::SwFormatRubyType ), m_sRubyText( rAttr.m_sRubyText ), m_sCharFormatName( rAttr.m_sCharFormatName ), m_pTextAttr( nullptr ), @@ -547,7 +547,7 @@ SwFormatMeta * SwFormatMeta::CreatePoolDefault(const sal_uInt16 i_nWhich) } SwFormatMeta::SwFormatMeta(const sal_uInt16 i_nWhich) - : SfxPoolItem( i_nWhich ) + : SfxPoolItem( i_nWhich, SfxItemType::SwFormatMetaType ) , m_pMeta() , m_pTextAttr( nullptr ) { @@ -557,7 +557,7 @@ SwFormatMeta::SwFormatMeta(const sal_uInt16 i_nWhich) SwFormatMeta::SwFormatMeta( std::shared_ptr< ::sw::Meta > i_pMeta, const sal_uInt16 i_nWhich ) - : SfxPoolItem( i_nWhich ) + : SfxPoolItem( i_nWhich, SfxItemType::SwFormatMetaType ) , m_pMeta( std::move(i_pMeta) ) , m_pTextAttr( nullptr ) { diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index c8b7ac205890..dbcea439a582 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -850,14 +850,16 @@ void SwFltControlStack::Delete(const SwPaM &rPam) // methods of SwFltAnchor follow SwFltAnchor::SwFltAnchor(SwFrameFormat* pFormat) : - SfxPoolItem(RES_FLTR_ANCHOR), m_pFrameFormat(pFormat) + SfxPoolItem(RES_FLTR_ANCHOR, SfxItemType::SwFltAnchorType) + , m_pFrameFormat(pFormat) { m_pListener.reset(new SwFltAnchorListener(this)); m_pListener->StartListening(m_pFrameFormat->GetNotifier()); } SwFltAnchor::SwFltAnchor(const SwFltAnchor& rCpy) : - SfxPoolItem(RES_FLTR_ANCHOR), m_pFrameFormat(rCpy.m_pFrameFormat) + SfxPoolItem(RES_FLTR_ANCHOR, SfxItemType::SwFltAnchorType) + , m_pFrameFormat(rCpy.m_pFrameFormat) { m_pListener.reset(new SwFltAnchorListener(this)); m_pListener->StartListening(m_pFrameFormat->GetNotifier()); @@ -926,7 +928,7 @@ SwFltRedline* SwFltRedline::Clone( SfxItemPool* ) const // methods of SwFltBookmark follow SwFltBookmark::SwFltBookmark( const OUString& rNa, OUString aVa, tools::Long nHand, const bool bIsTOCBookmark ) - : SfxPoolItem( RES_FLTR_BOOKMARK ) + : SfxPoolItem( RES_FLTR_BOOKMARK, SfxItemType::SwFltBookmarkType ) , mnHandle( nHand ) , maName( rNa ) , maVal(std::move( aVa )) @@ -958,7 +960,7 @@ SwFltBookmark* SwFltBookmark::Clone(SfxItemPool*) const } SwFltRDFMark::SwFltRDFMark() - : SfxPoolItem(RES_FLTR_RDFMARK), + : SfxPoolItem(RES_FLTR_RDFMARK, SfxItemType::SwFltRDFMarkType), m_nHandle(0) { } @@ -1000,7 +1002,8 @@ const std::vector< std::pair<OUString, OUString> >& SwFltRDFMark::GetAttributes( // methods of SwFltTOX follow SwFltTOX::SwFltTOX(std::shared_ptr<SwTOXBase> xBase) - : SfxPoolItem(RES_FLTR_TOX), m_xTOXBase(std::move(xBase)), + : SfxPoolItem(RES_FLTR_TOX, SfxItemType::SwFltTOXType) + , m_xTOXBase(std::move(xBase)), m_bHadBreakItem( false ), m_bHadPageDescItem( false ) { } diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 12ec446bf081..3d1508591c50 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -200,7 +200,8 @@ public: SwFltRedline(RedlineType eType_, std::size_t nAutorNo_, const DateTime& rStamp_) - : SfxPoolItem(RES_FLTR_REDLINE), m_aStamp(rStamp_), + : SfxPoolItem(RES_FLTR_REDLINE, SfxItemType::SwFltRedlineType) + , m_aStamp(rStamp_), m_eType(eType_), m_nAutorNo(nAutorNo_) { diff --git a/sw/source/uibase/chrdlg/ccoll.cxx b/sw/source/uibase/chrdlg/ccoll.cxx index 547566c427a0..01606dc73f4f 100644 --- a/sw/source/uibase/chrdlg/ccoll.cxx +++ b/sw/source/uibase/chrdlg/ccoll.cxx @@ -118,7 +118,7 @@ const CommandStruct SwCondCollItem::s_aCmds[] = // Item for the transport of the condition table SwCondCollItem::SwCondCollItem() : - SfxPoolItem(FN_COND_COLL) + SfxPoolItem(FN_COND_COLL, SfxItemType::SwCondCollItemType) { } diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index e32c86e14c52..693837d84f10 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -24,7 +24,7 @@ SwDocDisplayItem::SwDocDisplayItem() : - SfxPoolItem(FN_PARAM_DOCDISP) + SfxPoolItem(FN_PARAM_DOCDISP, SfxItemType::SwDocDisplayItemType) { m_bParagraphEnd = m_bTab = @@ -39,7 +39,7 @@ SwDocDisplayItem::SwDocDisplayItem() : // Item for the Settings dialog, page document view SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) : - SfxPoolItem( FN_PARAM_DOCDISP ) + SfxPoolItem( FN_PARAM_DOCDISP, SfxItemType::SwDocDisplayItemType ) { m_bParagraphEnd = rVOpt.IsParagraph(true); m_bTab = rVOpt.IsTab(true); @@ -88,7 +88,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const } SwElemItem::SwElemItem() : - SfxPoolItem(FN_PARAM_ELEM) + SfxPoolItem(FN_PARAM_ELEM, SfxItemType::SwElemItemType) { m_bVertRuler = m_bVertRulerRight= @@ -107,7 +107,7 @@ SwElemItem::SwElemItem() : } SwElemItem::SwElemItem(const SwViewOption& rVOpt) : - SfxPoolItem( FN_PARAM_ELEM ) + SfxPoolItem( FN_PARAM_ELEM, SfxItemType::SwElemItemType ) { m_bVertRuler = rVOpt.IsViewVRuler(true); m_bVertRulerRight = rVOpt.IsVRulerRight(); @@ -173,13 +173,13 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const // CTOR for empty Item SwAddPrinterItem::SwAddPrinterItem(): - SfxPoolItem(FN_PARAM_ADDPRINTER) + SfxPoolItem(FN_PARAM_ADDPRINTER, SfxItemType::SwAddPrinterItemType) { } // CTOR from SwPrintOptions SwAddPrinterItem::SwAddPrinterItem( const SwPrintData& rPrtData ) : - SfxPoolItem(FN_PARAM_ADDPRINTER) + SfxPoolItem(FN_PARAM_ADDPRINTER, SfxItemType::SwAddPrinterItemType) { SwPrintData::operator=(rPrtData); } @@ -200,14 +200,14 @@ bool SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const // Item for Settings dialog, ShadowCursorPage SwShadowCursorItem::SwShadowCursorItem() - : SfxPoolItem( FN_PARAM_SHADOWCURSOR ), + : SfxPoolItem( FN_PARAM_SHADOWCURSOR, SfxItemType::SwShadowCursorItemType ), m_eMode( SwFillMode::Tab ) ,m_bOn( false ) { } SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt ) - : SfxPoolItem( FN_PARAM_SHADOWCURSOR ), + : SfxPoolItem( FN_PARAM_SHADOWCURSOR, SfxItemType::SwShadowCursorItemType ), m_eMode( rVOpt.GetShdwCursorFillMode() ) ,m_bOn( rVOpt.IsShadowCursor() ) diff --git a/sw/source/uibase/dialog/swwrtshitem.cxx b/sw/source/uibase/dialog/swwrtshitem.cxx index d64f716b1492..833b9bfb3970 100644 --- a/sw/source/uibase/dialog/swwrtshitem.cxx +++ b/sw/source/uibase/dialog/swwrtshitem.cxx @@ -21,7 +21,8 @@ #include <globals.hrc> SwWrtShellItem::SwWrtShellItem( SwWrtShell* pSh ) - : SfxPoolItem( SID_WRT_SHELL ), m_pWrtSh( pSh ) + : SfxPoolItem( SID_WRT_SHELL, SfxItemType::SwWrtShellItemType ) + , m_pWrtSh( pSh ) { } diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index b36cfdfa51f3..7fb49d88c42a 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -88,7 +88,7 @@ OUString MakeSender() } SwEnvItem::SwEnvItem() : - SfxPoolItem(FN_ENVELOP) + SfxPoolItem(FN_ENVELOP, SfxItemType::SwEnvItemType) { m_bSend = true; m_aSendText = MakeSender(); diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx index b87f9bf5fb29..d4f4b5537cf0 100644 --- a/sw/source/uibase/envelp/labimg.cxx +++ b/sw/source/uibase/envelp/labimg.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::uno; SwLabItem::SwLabItem() : - SfxPoolItem(FN_LABEL), + SfxPoolItem(FN_LABEL, SfxItemType::SwLabItemType), m_lLeft (0), m_lUpper(0), m_nCols (1), diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 34ffa2d24e12..8f7dc0bd3b72 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -153,7 +153,7 @@ class SW_DLLPUBLIC SwTestItem final : public SfxPoolItem bool m_bTest10:1; public: - SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST) {}; + SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST, SfxItemType::SwTestItemType) {}; virtual SwTestItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index b88751abdddb..7aafbfdfce16 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( SwPageFootnoteInfo const & rInfo) : - SfxPoolItem( FN_PARAM_FTN_INFO ), + SfxPoolItem( FN_PARAM_FTN_INFO, SfxItemType::SwPageFootnoteInfoItemType ), m_aFootnoteInfo(rInfo) { } @@ -191,7 +191,7 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) } SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SwPtrItemType ), m_pMisc(pPtr) { } @@ -212,7 +212,8 @@ bool SwPtrItem::operator==( const SfxPoolItem& rAttr ) const // SwUINumRuleItem for the NumTabPages of the FormatNumRule/Styleists SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul ) - : SfxPoolItem( FN_PARAM_ACT_NUMBER ), m_pRule( new SwNumRule( rRul ) ) + : SfxPoolItem( FN_PARAM_ACT_NUMBER, SfxItemType::SwUINumRuleItemType ) + , m_pRule( new SwNumRule( rRul ) ) { } @@ -258,7 +259,7 @@ bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) } SwPaMItem::SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM ) : - SfxPoolItem( nId ), + SfxPoolItem( nId, SfxItemType::SwPaMItemType ), m_pPaM(pPaM) { } |