summaryrefslogtreecommitdiff
path: root/basic/source/classes/sbxmod.cxx
diff options
context:
space:
mode:
authorAndreas Bregas <ab@openoffice.org>2010-07-26 14:20:03 +0200
committerAndreas Bregas <ab@openoffice.org>2010-07-26 14:20:03 +0200
commit570d392b903ed6e7eec5f02dcd9daf4791dd5f06 (patch)
tree15ccd2a80588bb6f6417f57172e86691603573ed /basic/source/classes/sbxmod.cxx
parentee037ef2a47c947339ee8fa42e59fde773a1de39 (diff)
mib17: #163025# Basic Trace functionality for debugging (inactive by default)
Diffstat (limited to 'basic/source/classes/sbxmod.cxx')
-rw-r--r--basic/source/classes/sbxmod.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index ca23411929..1dbf8e4763 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -45,6 +45,7 @@
#include "runtime.hxx"
#include "token.hxx"
#include "sbunoobj.hxx"
+#include "sbtrace.hxx"
//#include <basic/hilight.hxx>
@@ -1044,6 +1045,9 @@ USHORT SbModule::Run( SbMethod* pMeth )
StarBASICRef xBasic;
if( bDelInst )
{
+#ifdef DBG_TRACE_BASIC
+ dbg_InitTrace();
+#endif
// #32779: Basic waehrend der Ausfuehrung festhalten
xBasic = (StarBASIC*) GetParent();
@@ -1122,18 +1126,28 @@ USHORT SbModule::Run( SbMethod* pMeth )
SbModule* pOldMod = pMOD;
pMOD = this;
SbiRuntime* pRt = new SbiRuntime( this, pMeth, pMeth->nStart );
+
+#ifdef DBG_TRACE_BASIC
+ dbg_traceNotifyCall( this, pMeth, pINST->nCallLvl );
+#endif
+
pRt->pNext = pINST->pRun;
if( pRt->pNext )
pRt->pNext->block();
pINST->pRun = pRt;
if ( mbVBACompat )
- {
+ {
pINST->EnableCompatibility( TRUE );
- }
+ }
while( pRt->Step() ) {}
if( pRt->pNext )
pRt->pNext->unblock();
+#ifdef DBG_TRACE_BASIC
+ bool bLeave = true;
+ dbg_traceNotifyCall( this, pMeth, pINST->nCallLvl, bLeave );
+#endif
+
// #63710 Durch ein anderes Thread-Handling bei Events kann es passieren,
// dass show-Aufruf an einem Dialog zurueckkehrt (durch schliessen des
// Dialogs per UI), BEVOR ein per Event ausgeloester weitergehender Call,
@@ -1227,9 +1241,20 @@ void SbModule::RunInit()
pMOD = this;
// Der Init-Code beginnt immer hier
SbiRuntime* pRt = new SbiRuntime( this, NULL, 0 );
+
+#ifdef DBG_TRACE_BASIC
+ dbg_traceNotifyCall( this, NULL, 0 );
+#endif
+
pRt->pNext = pINST->pRun;
pINST->pRun = pRt;
while( pRt->Step() ) {}
+
+#ifdef DBG_TRACE_BASIC
+ bool bLeave = true;
+ dbg_traceNotifyCall( this, NULL, 0, bLeave );
+#endif
+
pINST->pRun = pRt->pNext;
delete pRt;
pMOD = pOldMod;