diff options
-rw-r--r-- | cui/source/inc/macroass.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/macroass.cxx | 31 |
2 files changed, 24 insertions, 8 deletions
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 133d88fc1d84..72ccce65b6b8 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -69,6 +69,7 @@ public: virtual void PageCreated (SfxAllItemSet aSet); using TabPage::ActivatePage; // FIXME WTF is this nonsense? virtual void ActivatePage( const SfxItemSet& ); + void LaunchFillGroup(); // --------- inherit from the base ------------- virtual sal_Bool FillItemSet( SfxItemSet& rSet ); diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 6c127c4541e7..92db6ddac044 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -213,6 +213,16 @@ sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) return sal_False; } +void _SfxMacroTabPage::LaunchFillGroup() +{ + if (!mpImpl->maFillGroupTimer.GetTimeoutHdl().IsSet()) + { + mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) ); + mpImpl->maFillGroupTimer.SetTimeout( 0 ); + mpImpl->maFillGroupTimer.Start(); + } +} + void _SfxMacroTabPage::ActivatePage( const SfxItemSet& ) { // fdo#57553 lazily init script providers, because it is annoying if done @@ -220,13 +230,9 @@ void _SfxMacroTabPage::ActivatePage( const SfxItemSet& ) if (!mpImpl->m_bDummyActivated) { mpImpl->m_bDummyActivated = true; + return; } - else if (!mpImpl->maFillGroupTimer.GetTimeoutHdl().IsSet()) - { - mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) ); - mpImpl->maFillGroupTimer.SetTimeout( 0 ); - mpImpl->maFillGroupTimer.Start(); - } + LaunchFillGroup(); } void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) @@ -477,17 +483,26 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re ScriptChanged(); } +namespace +{ + SfxMacroTabPage* CreateSfxMacroTabPage( Window* pParent, const SfxItemSet& rAttrSet ) + { + return new SfxMacroTabPage( pParent, CUI_RES( RID_SVXPAGE_EVENTASSIGN ), NULL, rAttrSet ); + } +} + SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) { - return new SfxMacroTabPage( pParent, CUI_RES( RID_SVXPAGE_EVENTASSIGN ), NULL, rAttrSet ); + return CreateSfxMacroTabPage(pParent, rAttrSet); } SfxMacroAssignDlg::SfxMacroAssignDlg( Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) : SfxNoLayoutSingleTabDialog( pParent, rSet, 0 ) { - SfxTabPage* pPage = SfxMacroTabPage::Create( this, rSet ); + SfxMacroTabPage* pPage = CreateSfxMacroTabPage(this, rSet); pPage->SetFrame( rxDocumentFrame ); SetTabPage( pPage ); + pPage->LaunchFillGroup(); } SfxMacroAssignDlg::~SfxMacroAssignDlg() |