Change-Id: I7b48d8b9e162f9e4447bfcfcc0bbd1158bd35f5b
This commit is contained in:
Stephan Bergmann 2014-01-10 12:41:20 +01:00
parent 6eeee04bad
commit 3abb11b346
2 changed files with 16 additions and 25 deletions

View File

@ -76,11 +76,11 @@ typedef void (*DbgTestSolarMutexProc)();
struct DbgData struct DbgData
{ {
sal_uIntPtr nTestFlags; sal_uIntPtr nTestFlags;
sal_uIntPtr bOverwrite; bool bOverwrite;
sal_uIntPtr nTraceOut; sal_uIntPtr nTraceOut;
sal_uIntPtr nWarningOut; sal_uIntPtr nWarningOut;
sal_uIntPtr nErrorOut; sal_uIntPtr nErrorOut;
sal_uIntPtr bHookOSLAssert; bool bHookOSLAssert;
sal_Char aDebugName[260]; sal_Char aDebugName[260];
sal_Char aInclFilter[512]; sal_Char aInclFilter[512];
sal_Char aExclFilter[512]; sal_Char aExclFilter[512];
@ -187,7 +187,7 @@ inline bool DbgFilterMessage( const char* pMsg )
return (bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg ); return (bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
} }
inline int DbgIsAllErrorOut() inline bool DbgIsAllErrorOut()
{ {
return (DbgFunc( DBG_FUNC_ALLERROROUT ) != 0); return (DbgFunc( DBG_FUNC_ALLERROROUT ) != 0);
} }
@ -202,31 +202,22 @@ inline void DbgSaveData( const DbgData& rData )
DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData ); DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData );
} }
inline sal_uIntPtr DbgIsTraceOut() inline bool DbgIsTraceOut()
{ {
DbgData* pData = DbgGetData(); DbgData* pData = DbgGetData();
if ( pData ) return pData && pData->nTraceOut != DBG_OUT_NULL;
return (pData->nTraceOut != DBG_OUT_NULL);
else
return sal_False;
} }
inline sal_uIntPtr DbgIsWarningOut() inline bool DbgIsWarningOut()
{ {
DbgData* pData = DbgGetData(); DbgData* pData = DbgGetData();
if ( pData ) return pData && pData->nWarningOut != DBG_OUT_NULL;
return (pData->nWarningOut != DBG_OUT_NULL);
else
return sal_False;
} }
inline sal_uIntPtr DbgIsErrorOut() inline bool DbgIsErrorOut()
{ {
DbgData* pData = DbgGetData(); DbgData* pData = DbgGetData();
if ( pData ) return pData && pData->nErrorOut != DBG_OUT_NULL;
return (pData->nErrorOut != DBG_OUT_NULL);
else
return sal_False;
} }
inline sal_uIntPtr DbgGetErrorOut() // Testtool: test whether to collect OSL_ASSERTions as well inline sal_uIntPtr DbgGetErrorOut() // Testtool: test whether to collect OSL_ASSERTions as well
@ -238,12 +229,12 @@ inline sal_uIntPtr DbgGetErrorOut() // Testtool: test whether to collect OSL_A
return DBG_OUT_NULL; return DBG_OUT_NULL;
} }
inline sal_uIntPtr DbgIsAssertWarning() inline bool DbgIsAssertWarning()
{ {
return DbgIsWarningOut(); return DbgIsWarningOut();
} }
inline sal_uIntPtr DbgIsAssert() inline bool DbgIsAssert()
{ {
return DbgIsErrorOut(); return DbgIsErrorOut();
} }

View File

@ -108,7 +108,7 @@ struct XtorType
struct DebugData struct DebugData
{ {
DbgData aDbgData; DbgData aDbgData;
sal_uInt16 bInit; bool bInit;
DbgPrintLine pDbgPrintMsgBox; DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow; DbgPrintLine pDbgPrintWindow;
DbgPrintLine pDbgPrintTestTool; DbgPrintLine pDbgPrintTestTool;
@ -160,7 +160,7 @@ struct DebugData
static DebugData aDebugData; static DebugData aDebugData;
static sal_Char aCurPath[260]; static sal_Char aCurPath[260];
static int bDbgImplInMain = false; static bool bDbgImplInMain = false;
#if defined( WNT ) #if defined( WNT )
static CRITICAL_SECTION aImplCritDbgSection; static CRITICAL_SECTION aImplCritDbgSection;
@ -372,7 +372,7 @@ namespace
return strlen( _pValue ); return strlen( _pValue );
} }
void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue ) void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, bool* _out_pnValue )
{ {
sal_Char aBuf[2]; sal_Char aBuf[2];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) ); size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
@ -784,8 +784,8 @@ static int ImplStrSearch( const sal_Char* pSearchStr, int nSearchLen,
return 0; return 0;
} }
static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg, static bool ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
int bEmpty ) bool bEmpty )
{ {
int nStrLen = strlen( pFilter ); int nStrLen = strlen( pFilter );
if ( !nStrLen ) if ( !nStrLen )