summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/macroass.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/tabpages/macroass.cxx')
-rw-r--r--cui/source/tabpages/macroass.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index f2abc5ae2d74..e91d3fbde5ec 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -64,6 +64,7 @@ public:
sal_Bool bReadOnly;
Timer maFillGroupTimer;
sal_Bool bGotEvents;
+ bool m_bDummyActivated; ///< has this tab page already been activated
};
_SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) :
@@ -79,6 +80,7 @@ _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) :
pMacroStr( NULL ),
bReadOnly( sal_False ),
bGotEvents( sal_False )
+ , m_bDummyActivated(false)
{
}
@@ -214,6 +216,22 @@ sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet )
return sal_False;
}
+void _SfxMacroTabPage::ActivatePage( const SfxItemSet& )
+{
+ // fdo#57553 lazily init script providers, because it is annoying if done
+ // on dialog open (SfxTabDialog::Start_Impl activates all tab pages once!)
+ if (!mpImpl->m_bDummyActivated)
+ {
+ mpImpl->m_bDummyActivated = true;
+ }
+ else if (!mpImpl->maFillGroupTimer.GetTimeoutHdl().IsSet())
+ {
+ mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
+ mpImpl->maFillGroupTimer.SetTimeout( 0 );
+ mpImpl->maFillGroupTimer.Start();
+ }
+}
+
void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet)
{
const SfxPoolItem* pEventsItem;
@@ -398,9 +416,6 @@ void _SfxMacroTabPage::InitAndSetHandler()
mpImpl->pGroupLB->SetFunctionListBox( mpImpl->pMacroLB );
- mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
- mpImpl->maFillGroupTimer.SetTimeout( 0 );
- mpImpl->maFillGroupTimer.Start();
}
void _SfxMacroTabPage::FillMacroList()