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 /basctl/source/basicide/basides1.cxx | |
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>
Diffstat (limited to 'basctl/source/basicide/basides1.cxx')
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
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; |