summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 12:56:36 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 12:56:36 +0000
commitbb2f854559e0e90bf9c1afa4ce89bb46038e5bd2 (patch)
tree4505113d417db41f282ccf68b9370b74a93cbcf1 /basic
parentf5b3576d56ed77732baec0474399759ed3462ef2 (diff)
INTEGRATION: CWS aquavcl02 (1.12.16); FILE MERGED
2007/07/11 10:48:51 pjanik 1.12.16.2: RESYNC: (1.12-1.13); FILE MERGED 2007/07/04 14:12:13 hdu 1.12.16.1: #i79212# apply GH's patch to fix testtool crashes on Aqua
Diffstat (limited to 'basic')
-rw-r--r--basic/source/app/appwin.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index aea8aa96e1c2..e86a79fe2301 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: appwin.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 14:13:14 $
+ * last change: $Author: hr $ $Date: 2007-08-03 13:56:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -250,8 +250,14 @@ long AppWin::InitMenu( Menu* pMenu )
{
::rtl::OUString aTemp;
- TextSelection r = pDataEdit->GetSelection();
- BOOL bMarked = r.HasRange();
+ BOOL bMarked;
+ if( pDataEdit )
+ {
+ TextSelection r = pDataEdit->GetSelection();
+ bMarked = r.HasRange();
+ }
+ else
+ bMarked = FALSE;
pMenu->EnableItem( RID_EDITREPEAT, (aFind.Len() != 0 ) );
pMenu->EnableItem( RID_EDITCUT, bMarked );
pMenu->EnableItem( RID_EDITCOPY, bMarked );
@@ -259,7 +265,11 @@ long AppWin::InitMenu( Menu* pMenu )
pMenu->EnableItem( RID_EDITDEL, bMarked );
// pMenu->EnableItem( RID_HELPTOPIC, bMarked );
- BOOL bHasText = pDataEdit->HasText();
+ BOOL bHasText;
+ if( pDataEdit )
+ bHasText = pDataEdit->HasText();
+ else
+ bHasText = FALSE;
BOOL bRunning = pFrame->Basic().IsRunning();
BOOL bCanExecute = BOOL( (!bRunning && bHasText) || pFrame->bInBreak );
pMenu->EnableItem( RID_RUNSTART, bCanExecute );