Kaydet (Commit) 193e8751 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS dba30b (1.88.64); FILE MERGED

2008/04/15 22:02:37 fs 1.88.64.3: RESYNC: (1.88-1.89); FILE MERGED
2008/03/06 14:47:46 fs 1.88.64.2: #i10000#
2008/02/26 08:38:40 fs 1.88.64.1: #i86263# #i85993# +OnFormsCreated: be notified when the page creates (delayed) the forms collection
üst 4e251c5e
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite * OpenOffice.org - a multi-platform office productivity suite
* *
* $RCSfile: fmshimp.cxx,v $ * $RCSfile: fmshimp.cxx,v $
* $Revision: 1.89 $ * $Revision: 1.90 $
* *
* This file is part of OpenOffice.org. * This file is part of OpenOffice.org.
* *
...@@ -3740,6 +3740,13 @@ void FmXFormShell::viewDeactivated( FmFormView* _pCurrentView, sal_Bool _bDeacti ...@@ -3740,6 +3740,13 @@ void FmXFormShell::viewDeactivated( FmFormView* _pCurrentView, sal_Bool _bDeacti
} }
m_aLoadingPages = aNewEvents; m_aLoadingPages = aNewEvents;
} }
// remove callbacks at the page
if ( pPage && pPage->GetImpl() )
{
pPage->GetImpl()->SetFormsCreationHdl( Link() );
}
UpdateForms( sal_True );
} }
} }
...@@ -3762,16 +3769,24 @@ IMPL_LINK( FmXFormShell, OnFirstTimeActivation, void*, /*NOTINTERESTEDIN*/ ) ...@@ -3762,16 +3769,24 @@ IMPL_LINK( FmXFormShell, OnFirstTimeActivation, void*, /*NOTINTERESTEDIN*/ )
return 0L; return 0L;
} }
//------------------------------------------------------------------------
IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ )
{
UpdateForms( sal_True );
return 0L;
}
//------------------------------------------------------------------------ //------------------------------------------------------------------------
void FmXFormShell::viewActivated( FmFormView* _pCurrentView, sal_Bool _bSyncAction /* = sal_False */ ) void FmXFormShell::viewActivated( FmFormView* _pCurrentView, sal_Bool _bSyncAction /* = sal_False */ )
{ {
SdrPageView* pCurPageView = _pCurrentView ? _pCurrentView->GetSdrPageView() : NULL;
FmFormPage* pPage = pCurPageView ? PTR_CAST( FmFormPage, pCurPageView->GetPage() ) : NULL;
// activate our view if we are activated ourself // activate our view if we are activated ourself
// FS - 30.06.99 - 67308 // FS - 30.06.99 - 67308
if ( _pCurrentView && _pCurrentView->GetImpl() && !_pCurrentView->IsDesignMode() ) if ( _pCurrentView && _pCurrentView->GetImpl() && !_pCurrentView->IsDesignMode() )
{ {
// load forms for the page the current view belongs to // load forms for the page the current view belongs to
SdrPageView* pCurPageView = _pCurrentView->GetSdrPageView();
FmFormPage* pPage = pCurPageView ? PTR_CAST( FmFormPage, pCurPageView->GetPage() ) : NULL;
if ( pPage ) if ( pPage )
{ {
if ( !pPage->GetImpl()->hasEverBeenActivated() ) if ( !pPage->GetImpl()->hasEverBeenActivated() )
...@@ -3790,6 +3805,13 @@ void FmXFormShell::viewActivated( FmFormView* _pCurrentView, sal_Bool _bSyncActi ...@@ -3790,6 +3805,13 @@ void FmXFormShell::viewActivated( FmFormView* _pCurrentView, sal_Bool _bSyncActi
_pCurrentView->GetImpl()->Activate( _bSyncAction ); _pCurrentView->GetImpl()->Activate( _bSyncAction );
} }
// set callbacks at the page
if ( pPage && pPage->GetImpl() )
{
pPage->GetImpl()->SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) );
}
UpdateForms( sal_True );
if ( !hasEverBeenActivated() ) if ( !hasEverBeenActivated() )
{ {
m_nActivationEvent = Application::PostUserEvent( LINK( this, FmXFormShell, OnFirstTimeActivation ) ); m_nActivationEvent = Application::PostUserEvent( LINK( this, FmXFormShell, OnFirstTimeActivation ) );
......
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