summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-05-22 12:26:46 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-06-18 01:07:42 +0200
commitc39e4f6b8a942680bc7250177c34fd034a0605e0 (patch)
treee7fb5be56a6f3a391ab420bede1d2ea714901777 /sfx2/source
parent8ef9573f087b86f93860c8d07d04b60a40512836 (diff)
Add SfxItemType to SfxPoolItem
The SfxPoolItem has a new member SfxItemType m_eItemType to compare types based on enums instead of typeinfo() which consumes a lot of time e.g. while AutoFormat is running Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/minfitem.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--sfx2/source/dialog/tplpitem.cxx2
-rw-r--r--sfx2/source/doc/objitem.cxx2
-rw-r--r--sfx2/source/doc/watermarkitem.cxx2
-rw-r--r--sfx2/source/doc/zoomitem.cxx2
-rw-r--r--sfx2/source/view/frame.cxx9
7 files changed, 11 insertions, 10 deletions
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 80387eacd85e..5778ceb37980 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -192,7 +192,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Sequence<document::CmisProperty>& i_cmisProps,
bool bIs, bool _bIs, sal_Int64 _nFileSize )
- : 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 b5a2846cec36..3e11ef6e569d 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( u""_ustr )
, m_aFont( u"Liberation Sans"_ustr )
, m_nAngle( 45 )
diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx
index 049cfa39f951..d346363b3f92 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 cfbdbaa706ff..1e565338fc59 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -378,13 +378,13 @@ 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 )
{
}
@@ -440,7 +440,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;
}
@@ -469,11 +469,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 ))
{
}