summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/moduldlg.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-24 13:05:44 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-24 13:05:44 +0000
commitece1ee95f729878707d42c2eccf425161828b9e4 (patch)
tree6d9e69ba3ce5acd649f437e8284ac4b108dc2748 /basctl/source/basicide/moduldlg.cxx
parent9786ab7afbb58e5acfc4fe467efc7af4d947e232 (diff)
INTEGRATION: CWS uno3 (1.21.56); FILE MERGED
2003/04/16 14:55:15 tbe 1.21.56.1: #108974# Office crashes when creating new Basic library in backing component
Diffstat (limited to 'basctl/source/basicide/moduldlg.cxx')
-rw-r--r--basctl/source/basicide/moduldlg.cxx19
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;