diff options
Diffstat (limited to 'basctl/source/basicide/moduldlg.cxx')
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 0e2997b61d67..203d44887e4e 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: moduldlg.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: ab $ $Date: 2002-08-06 09:12:20 $ + * last change: $Author: vg $ $Date: 2003-04-24 14:05:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,6 +61,10 @@ #include <memory> +#ifndef _SFX_IPFRM_HXX +#include <sfx2/ipfrm.hxx> +#endif + #include <ide_pch.hxx> #pragma hdrstop @@ -776,12 +780,17 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton ) if ( pButton == &aEditButton ) { SfxViewFrame* pViewFrame = SfxViewFrame::Current(); - DBG_ASSERT( pViewFrame != NULL, "No current view frame!" ); - SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; - if( pDispatcher ) + SfxDispatcher* pDispatcher = ( pViewFrame && !pViewFrame->ISA( SfxInPlaceFrame ) ) ? pViewFrame->GetDispatcher() : NULL; + if ( pDispatcher ) { pDispatcher->Execute( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON ); } + else + { + SfxAllItemSet aArgs( SFX_APP()->GetPool() ); + SfxRequest aRequest( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON, aArgs ); + SFX_APP()->ExecuteSlot( aRequest ); + } BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL; pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; |