summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx6
-rw-r--r--basctl/source/basicide/basobj3.cxx67
-rw-r--r--basctl/source/basicide/iderdll.cxx56
-rw-r--r--basctl/source/basicide/iderdll2.hxx5
4 files changed, 71 insertions, 63 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 87873111a..41c8f6a4a 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside2.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: tbe $ $Date: 2001-09-06 12:48:14 $
+ * last change: $Author: tbe $ $Date: 2001-09-11 15:40:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -674,7 +674,7 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic )
aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, TRUE );
// ErrorBox( this, WB_OK | WB_DEF_OK, String( aErrorTextPrefix + aErrorText ) ).Execute();
// ErrorHandler::HandleError( pBasic->GetErrorCode() );
- BasicIDE::HandleBasicError();
+ ErrorHandler::HandleError( StarBASIC::GetErrorCode() );
if ( bMarkError )
aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER );
return FALSE;
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 993b0c6e7..33492f4ae 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basobj3.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: tbe $ $Date: 2001-09-06 09:17:41 $
+ * last change: $Author: tbe $ $Date: 2001-09-11 15:40:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,7 +70,13 @@
#endif
#define _SVSTDARR_STRINGS
#include <svtools/svstdarr.hxx>
+
+#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
+#include <svtools/moduleoptions.hxx>
+#endif
+
#include <iderdll.hxx>
+#include <iderdll2.hxx>
#include <iderid.hxx>
#include <basobj.hxx>
#include <basidesh.hxx>
@@ -81,6 +87,7 @@
#include <baside2.hxx>
#include <baside3.hxx>
+#include <basicmod.hxx>
#ifndef _BASCTL_DLGED_HXX
#include "dlged.hxx"
@@ -109,6 +116,15 @@ using namespace ::com::sun::star::container;
//----------------------------------------------------------------------------
+extern "C" {
+ long basicide_handle_basic_error( void* pPtr )
+ {
+ return BasicIDE::HandleBasicError( (StarBASIC*)pPtr );
+ }
+}
+
+//----------------------------------------------------------------------------
+
SbMethod* BasicIDE::CreateMacro( SbModule* pModule, const String& rMacroName )
{
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
@@ -855,9 +871,52 @@ void BasicIDE::InvalidateDebuggerSlots()
//----------------------------------------------------------------------------
-void BasicIDE::HandleBasicError()
+long BasicIDE::HandleBasicError( StarBASIC* pBasic )
{
- ErrorHandler::HandleError( StarBASIC::GetErrorCode() );
+ BASIC_MOD()->Load();
+
+ BasicIDE::BasicStopped();
+
+ // no error output during macro choosing
+ if ( IDE_DLL()->GetExtraData()->ChoosingMacro() )
+ return 1;
+ if ( IDE_DLL()->GetExtraData()->ShellInCriticalSection() )
+ return 2;
+
+ long nRet = 0;
+ BasicIDEShell* pShell = 0;
+ if ( SvtModuleOptions().IsBasicIDE() )
+ {
+ BasicManager* pBasicManager = BasicIDE::FindBasicManager( pBasic );
+ if ( pBasicManager )
+ {
+ USHORT nLib = pBasicManager->GetLibId( pBasic );
+ // TODO: check password
+ //if ( !pBasicManager->HasPassword( nLib ) ||
+ // pBasicManager->IsPasswordVerified( nLib ) )
+ //{
+ pShell = IDE_DLL()->GetShell();
+ if ( !pShell )
+ {
+ SfxViewFrame* pCurFrame = SfxViewFrame::Current();
+ DBG_ASSERT( pCurFrame != NULL, "No current view frame!" );
+ SfxDispatcher* pDispatcher = pCurFrame ? pCurFrame->GetDispatcher() : NULL;
+ if( pDispatcher )
+ {
+ pDispatcher->Execute( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON );
+ }
+ pShell = IDE_DLL()->GetShell();
+ }
+ //}
+ }
+ }
+
+ if ( pShell )
+ nRet = pShell->CallBasicErrorHdl( pBasic );
+ else
+ ErrorHandler::HandleError( StarBASIC::GetErrorCode() );
+
+ return nRet;
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index 4ac902311..0e517b86c 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: iderdll.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: tbe $ $Date: 2001-09-03 11:51:39 $
+ * last change: $Author: tbe $ $Date: 2001-09-11 15:40:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,9 +81,6 @@
#pragma hdrstop
#include <svtools/solar.hrc>
-#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
-#include <svtools/moduleoptions.hxx>
-#endif
#include <iderdll.hxx>
#include <iderdll2.hxx>
#include <iderid.hxx>
@@ -192,7 +189,7 @@ BasicIDEData::BasicIDEData() : aObjCatPos( INVPOSITION, INVPOSITION )
bChoosingMacro = FALSE;
bShellInCriticalSection = FALSE;
pSearchItem = new SvxSearchItem( SID_SEARCH_ITEM );
- StarBASIC::SetGlobalErrorHdl( LINK( this, BasicIDEData, GlobalBasicErrorHdl ) );
+
StarBASIC::SetGlobalBreakHdl( LINK( this, BasicIDEData, GlobalBasicBreakHdl ) );
pAccelerator = 0;
@@ -238,53 +235,6 @@ void BasicIDEData::SetSearchItem( const SvxSearchItem& rItem )
pSearchItem = (SvxSearchItem*)rItem.Clone();
}
-IMPL_LINK( BasicIDEData, GlobalBasicErrorHdl, StarBASIC *, pBasic )
-{
- BasicIDE::BasicStopped();
-
- // Waerend der Macroauswahl keine Fehler ausgeben:
- if ( bChoosingMacro )
- return 1;
- if ( bShellInCriticalSection )
- return 2;
-
- long nRet = 0;
- BasicIDEShell* pShell = 0;
- if ( SvtModuleOptions().IsBasicIDE() )
- {
- BasicManager* pBasicManager = BasicIDE::FindBasicManager( pBasic );
- if ( pBasicManager )
- {
- USHORT nLib = pBasicManager->GetLibId( pBasic );
- // TODO: check password
- //if ( !pBasicManager->HasPassword( nLib ) ||
- // pBasicManager->IsPasswordVerified( nLib ) )
- //{
- pShell = IDE_DLL()->GetShell();
- if ( !pShell )
- {
- SfxViewFrame* pCurFrame = SfxViewFrame::Current();
- DBG_ASSERT( pCurFrame != NULL, "No current view frame!" );
- SfxDispatcher* pDispatcher = pCurFrame ? pCurFrame->GetDispatcher() : NULL;
- if( pDispatcher )
- {
- pDispatcher->Execute( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON );
- }
- pShell = IDE_DLL()->GetShell();
- }
- //}
- }
- }
-
- if ( pShell )
- nRet = pShell->CallBasicErrorHdl( pBasic );
- else
- BasicIDE::HandleBasicError();
-
- return nRet;
-}
-
-
IMPL_LINK( BasicIDEData, GlobalBasicBreakHdl, StarBASIC *, pBasic )
{
BasicIDEShell* pShell = IDE_DLL()->GetShell();
diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx
index aae75d640..0d12ca3d9 100644
--- a/basctl/source/basicide/iderdll2.hxx
+++ b/basctl/source/basicide/iderdll2.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: iderdll2.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mh $ $Date: 2000-09-29 11:02:37 $
+ * last change: $Author: tbe $ $Date: 2001-09-11 15:40:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -107,7 +107,6 @@ private:
void InitAccelerator();
protected:
- DECL_LINK( GlobalBasicErrorHdl, StarBASIC * );
DECL_LINK( GlobalBasicBreakHdl, StarBASIC * );
public: