Kaydet (Commit) cf3d6757 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix macro assign dialog

Which was empty of contents e.g. from autotext->macro...

because of 5d84af7e
"fdo#57553: Picture dialog Macro tab page: lazily init"

which was because of bd2c14ec
"we have to have all tabpages in all modes now"

which was because we need to create all tabpages in order to determine their
size for layout.

    Change-Id: I01fe03abf3e4582e87927729286a21d0bac7037c

Change-Id: Ic662f6a927225b56820ccebf135b82ab1631974d
üst 742e6745
...@@ -69,6 +69,7 @@ public: ...@@ -69,6 +69,7 @@ public:
virtual void PageCreated (SfxAllItemSet aSet); virtual void PageCreated (SfxAllItemSet aSet);
using TabPage::ActivatePage; // FIXME WTF is this nonsense? using TabPage::ActivatePage; // FIXME WTF is this nonsense?
virtual void ActivatePage( const SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& );
void LaunchFillGroup();
// --------- inherit from the base ------------- // --------- inherit from the base -------------
virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual sal_Bool FillItemSet( SfxItemSet& rSet );
......
...@@ -213,6 +213,16 @@ sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) ...@@ -213,6 +213,16 @@ sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet )
return sal_False; 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& ) void _SfxMacroTabPage::ActivatePage( const SfxItemSet& )
{ {
// fdo#57553 lazily init script providers, because it is annoying if done // fdo#57553 lazily init script providers, because it is annoying if done
...@@ -220,13 +230,9 @@ void _SfxMacroTabPage::ActivatePage( const SfxItemSet& ) ...@@ -220,13 +230,9 @@ void _SfxMacroTabPage::ActivatePage( const SfxItemSet& )
if (!mpImpl->m_bDummyActivated) if (!mpImpl->m_bDummyActivated)
{ {
mpImpl->m_bDummyActivated = true; mpImpl->m_bDummyActivated = true;
return;
} }
else if (!mpImpl->maFillGroupTimer.GetTimeoutHdl().IsSet()) LaunchFillGroup();
{
mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
mpImpl->maFillGroupTimer.SetTimeout( 0 );
mpImpl->maFillGroupTimer.Start();
}
} }
void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet)
...@@ -477,17 +483,26 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re ...@@ -477,17 +483,26 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re
ScriptChanged(); 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 ) 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 ) SfxMacroAssignDlg::SfxMacroAssignDlg( Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
: SfxNoLayoutSingleTabDialog( pParent, rSet, 0 ) : SfxNoLayoutSingleTabDialog( pParent, rSet, 0 )
{ {
SfxTabPage* pPage = SfxMacroTabPage::Create( this, rSet ); SfxMacroTabPage* pPage = CreateSfxMacroTabPage(this, rSet);
pPage->SetFrame( rxDocumentFrame ); pPage->SetFrame( rxDocumentFrame );
SetTabPage( pPage ); SetTabPage( pPage );
pPage->LaunchFillGroup();
} }
SfxMacroAssignDlg::~SfxMacroAssignDlg() SfxMacroAssignDlg::~SfxMacroAssignDlg()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment