summaryrefslogtreecommitdiff
path: root/basctl/source/basicide
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2000-10-10 08:38:57 +0000
committerMalte Timmermann <mt@openoffice.org>2000-10-10 08:38:57 +0000
commite31066bf4987865b76772ec0109589e284828532 (patch)
treecfc9572811fe93bd6f8f1aaabe479424ee6eb775 /basctl/source/basicide
parent95a9eabb6d4d5b41c7294c6b1fe5e3daf60e18c2 (diff)
#79126# SfxViewFrame::Current() may be NULL
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r--basctl/source/basicide/baside3.cxx6
-rw-r--r--basctl/source/basicide/basidesh.cxx68
2 files changed, 38 insertions, 36 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 2482f23e3a1c..20e8298ca76f 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside3.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mh $ $Date: 2000-09-29 11:02:36 $
+ * last change: $Author: mt $ $Date: 2000-10-10 09:38:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -501,7 +501,6 @@ void DialogWindow::RenameDialog( const String& rNewName )
void DialogWindow::DisableBrowser()
{
SfxViewFrame* pCurFrame = SfxViewFrame::Current();
- DBG_ASSERT( pCurFrame != NULL, "No current view frame!" );
SfxChildWindow* pChildWin = pCurFrame ? pCurFrame->GetChildWindow(SID_SHOW_BROWSER) : NULL;
if( pChildWin )
((VCBrowser*)(pChildWin->GetWindow()))->Update( 0 );
@@ -513,7 +512,6 @@ void DialogWindow::DisableBrowser()
void DialogWindow::UpdateBrowser()
{
SfxViewFrame* pCurFrame = SfxViewFrame::Current();
- DBG_ASSERT( pCurFrame != NULL, "No current view frame!" );
SfxChildWindow* pChildWin = pCurFrame ? pCurFrame->GetChildWindow(SID_SHOW_BROWSER) : NULL;
if( pChildWin )
((VCBrowser*)(pChildWin->GetWindow()))->Update(GetEditor()->GetView());
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index c02fec385742..ea7cc4daa77c 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basidesh.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mh $ $Date: 2000-09-29 11:02:36 $
+ * last change: $Author: mt $ $Date: 2000-10-10 09:38:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -783,36 +783,40 @@ USHORT BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin )
void BasicIDEShell::InvalidateBasicIDESlots()
{
// Nur die, die eine optische Auswirkung haben...
- SfxBindings& rBindings = BasicIDE::GetBindings();
- rBindings.Invalidate( SID_UNDO );
- rBindings.Invalidate( SID_REDO );
- rBindings.Invalidate( SID_SAVEDOC );
- rBindings.Invalidate( SID_BASICIDE_CHOOSEMACRO );
- rBindings.Invalidate( SID_BASICIDE_MODULEDLG );
- rBindings.Invalidate( SID_BASICIDE_OBJCAT );
- rBindings.Invalidate( SID_BASICSTOP );
- rBindings.Invalidate( SID_BASICRUN );
- rBindings.Invalidate( SID_BASICCOMPILE );
- rBindings.Invalidate( SID_BASICLOAD );
- rBindings.Invalidate( SID_BASICSAVEAS );
- rBindings.Invalidate( SID_BASICIDE_MATCHGROUP );
- rBindings.Invalidate( SID_BASICSTEPINTO );
- rBindings.Invalidate( SID_BASICSTEPOVER );
- rBindings.Invalidate( SID_BASICSTEPOUT );
- rBindings.Invalidate( SID_BASICIDE_TOGGLEBRKPNT );
- rBindings.Invalidate( SID_BASICIDE_ADDWATCH );
- rBindings.Invalidate( SID_BASICIDE_REMOVEWATCH );
- rBindings.Invalidate( SID_CHOOSE_CONTROLS );
- rBindings.Invalidate( SID_PRINTDOC );
- rBindings.Invalidate( SID_PRINTDOCDIRECT );
- rBindings.Invalidate( SID_SETUPPRINTER );
- rBindings.Invalidate( SID_DIALOG_TESTMODE );
-
- rBindings.Invalidate( SID_DOC_MODIFIED );
- rBindings.Invalidate( SID_BASICIDE_STAT_TITLE );
- rBindings.Invalidate( SID_BASICIDE_STAT_POS );
- rBindings.Invalidate( SID_ATTR_INSERT );
- rBindings.Invalidate( SID_ATTR_SIZE );
+
+ if ( IDE_DLL()->GetShell() )
+ {
+ SfxBindings& rBindings = BasicIDE::GetBindings();
+ rBindings.Invalidate( SID_UNDO );
+ rBindings.Invalidate( SID_REDO );
+ rBindings.Invalidate( SID_SAVEDOC );
+ rBindings.Invalidate( SID_BASICIDE_CHOOSEMACRO );
+ rBindings.Invalidate( SID_BASICIDE_MODULEDLG );
+ rBindings.Invalidate( SID_BASICIDE_OBJCAT );
+ rBindings.Invalidate( SID_BASICSTOP );
+ rBindings.Invalidate( SID_BASICRUN );
+ rBindings.Invalidate( SID_BASICCOMPILE );
+ rBindings.Invalidate( SID_BASICLOAD );
+ rBindings.Invalidate( SID_BASICSAVEAS );
+ rBindings.Invalidate( SID_BASICIDE_MATCHGROUP );
+ rBindings.Invalidate( SID_BASICSTEPINTO );
+ rBindings.Invalidate( SID_BASICSTEPOVER );
+ rBindings.Invalidate( SID_BASICSTEPOUT );
+ rBindings.Invalidate( SID_BASICIDE_TOGGLEBRKPNT );
+ rBindings.Invalidate( SID_BASICIDE_ADDWATCH );
+ rBindings.Invalidate( SID_BASICIDE_REMOVEWATCH );
+ rBindings.Invalidate( SID_CHOOSE_CONTROLS );
+ rBindings.Invalidate( SID_PRINTDOC );
+ rBindings.Invalidate( SID_PRINTDOCDIRECT );
+ rBindings.Invalidate( SID_SETUPPRINTER );
+ rBindings.Invalidate( SID_DIALOG_TESTMODE );
+
+ rBindings.Invalidate( SID_DOC_MODIFIED );
+ rBindings.Invalidate( SID_BASICIDE_STAT_TITLE );
+ rBindings.Invalidate( SID_BASICIDE_STAT_POS );
+ rBindings.Invalidate( SID_ATTR_INSERT );
+ rBindings.Invalidate( SID_ATTR_SIZE );
+ }
}
void BasicIDEShell::EnableScrollbars( BOOL bEnable )