summaryrefslogtreecommitdiff
path: root/basctl/source/basicide
diff options
context:
space:
mode:
authorAndreas Bregas <ab@openoffice.org>2002-11-01 10:36:29 +0000
committerAndreas Bregas <ab@openoffice.org>2002-11-01 10:36:29 +0000
commit4be92958146c3d27f798b748da995ac395d2dc05 (patch)
tree178741e4f68de6d01d001330f603ff9eb8fe0e94 /basctl/source/basicide
parent037606027cd4d86ff45941c58f9c3d9bc19cfb0d (diff)
#104204# New method BasicIDE::GetBindingsPtr()
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r--basctl/source/basicide/basobj3.cxx29
1 files changed, 24 insertions, 5 deletions
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 3823f63a22b3..7f804a9fdf64 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basobj3.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: tbe $ $Date: 2001-11-02 13:45:09 $
+ * last change: $Author: ab $ $Date: 2002-11-01 11:36:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -748,9 +748,12 @@ void BasicIDE::MarkDocShellModified( StarBASIC* pBasic )
pIDEShell->SetAppBasicModified();
}
- SfxBindings& rBindings = BasicIDE::GetBindings();
- rBindings.Invalidate( SID_SAVEDOC );
- rBindings.Update( SID_SAVEDOC );
+ SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
+ if( pBindings )
+ {
+ pBindings->Invalidate( SID_SAVEDOC );
+ pBindings->Update( SID_SAVEDOC );
+ }
}
// Objectcatalog updaten...
@@ -1015,6 +1018,22 @@ SfxBindings& BasicIDE::GetBindings()
return pCurFrame->GetBindings();
}
+SfxBindings* BasicIDE::GetBindingsPtr()
+{
+ SfxViewFrame* pFrame;
+ BasicIDEDLL* pIDEDLL = IDE_DLL();
+ if ( pIDEDLL && pIDEDLL->GetShell() )
+ pFrame = pIDEDLL->GetShell()->GetFrame();
+ else
+ pFrame = SfxViewFrame::Current();
+
+ SfxBindings* pBindings = NULL;
+ if( pFrame != NULL )
+ pBindings = &pFrame->GetBindings();
+ return pBindings;
+}
+
+
//----------------------------------------------------------------------------