Kaydet (Commit) 3afc2760 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

DBG_OUT_WARNING is unused

...and thus DgbData::nWarningOut is unused, too.

Change-Id: I388d2be7dafbfdc173a731dc7daf1c8b5efcd61d
üst bb27014e
...@@ -78,7 +78,6 @@ struct DbgData ...@@ -78,7 +78,6 @@ struct DbgData
sal_uIntPtr nTestFlags; sal_uIntPtr nTestFlags;
bool bOverwrite; bool bOverwrite;
sal_uIntPtr nTraceOut; sal_uIntPtr nTraceOut;
sal_uIntPtr nWarningOut;
sal_uIntPtr nErrorOut; sal_uIntPtr nErrorOut;
bool bHookOSLAssert; bool bHookOSLAssert;
sal_Char aDebugName[260]; sal_Char aDebugName[260];
...@@ -163,8 +162,8 @@ typedef sal_uInt16 DbgChannelId; ...@@ -163,8 +162,8 @@ typedef sal_uInt16 DbgChannelId;
@param pProc @param pProc
the function for emitting the diagnostic messages the function for emitting the diagnostic messages
@return @return
a unique number for this channel, which can be used for ->DbgData::nErrorOut, a unique number for this channel, which can be used for ->DbgData::nErrorOut
->DbgData::nWarningOut and ->DbgData::nTraceOut and ->DbgData::nTraceOut
@see DBG_OUT_USER_CHANNEL_0 @see DBG_OUT_USER_CHANNEL_0
(In theory, this function could replace the other hard-coded channels. Well, at least (In theory, this function could replace the other hard-coded channels. Well, at least
...@@ -250,8 +249,7 @@ inline void DbgPrintFile( const sal_Char* pLine ) ...@@ -250,8 +249,7 @@ inline void DbgPrintFile( const sal_Char* pLine )
// Dbg output // Dbg output
#define DBG_OUT_TRACE 1 #define DBG_OUT_TRACE 1
#define DBG_OUT_WARNING 2 #define DBG_OUT_ERROR 2
#define DBG_OUT_ERROR 3
TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, sal_uInt16 nOutType = DBG_OUT_TRACE, TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, sal_uInt16 nOutType = DBG_OUT_TRACE,
const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 ); const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 );
...@@ -384,12 +382,6 @@ do \ ...@@ -384,12 +382,6 @@ do \
DbgGetData()->nTraceOut = nOut; \ DbgGetData()->nTraceOut = nOut; \
} while(false) } while(false)
#define DBG_INSTOUTWARNING( nOut ) \
do \
{ \
DbgGetData()->nWarningOut = nOut; \
} while(false)
#define DBG_INSTOUTERROR( nOut ) \ #define DBG_INSTOUTERROR( nOut ) \
do \ do \
{ \ { \
...@@ -434,7 +426,6 @@ typedef const sal_Char* (*DbgUsr)(const void* pThis ); ...@@ -434,7 +426,6 @@ typedef const sal_Char* (*DbgUsr)(const void* pThis );
#define DBG_TESTSOLARMUTEX() ((void)0) #define DBG_TESTSOLARMUTEX() ((void)0)
#define DBG_INSTOUTTRACE( nOut ) ((void)0) #define DBG_INSTOUTTRACE( nOut ) ((void)0)
#define DBG_INSTOUTWARNING( nOut ) ((void)0)
#define DBG_INSTOUTERROR( nOut ) ((void)0) #define DBG_INSTOUTERROR( nOut ) ((void)0)
#endif #endif
......
...@@ -137,7 +137,6 @@ struct DebugData ...@@ -137,7 +137,6 @@ struct DebugData
aDbgData.nTestFlags = DBG_TEST_RESOURCE; aDbgData.nTestFlags = DBG_TEST_RESOURCE;
aDbgData.bOverwrite = true; aDbgData.bOverwrite = true;
aDbgData.nTraceOut = DBG_OUT_NULL; aDbgData.nTraceOut = DBG_OUT_NULL;
aDbgData.nWarningOut = DBG_OUT_NULL;
#ifdef UNX #ifdef UNX
aDbgData.nErrorOut = DBG_OUT_SHELL; aDbgData.nErrorOut = DBG_OUT_SHELL;
#else #else
...@@ -633,7 +632,6 @@ static DebugData* GetDebugData() ...@@ -633,7 +632,6 @@ static DebugData* GetDebugData()
lcl_tryReadConfigString( pLine, nLineLength, "include_class", aDebugData.aDbgData.aInclClassFilter, sizeof( aDebugData.aDbgData.aInclClassFilter ) ); lcl_tryReadConfigString( pLine, nLineLength, "include_class", aDebugData.aDbgData.aInclClassFilter, sizeof( aDebugData.aDbgData.aInclClassFilter ) );
lcl_tryReadConfigString( pLine, nLineLength, "exclude_class", aDebugData.aDbgData.aExclClassFilter, sizeof( aDebugData.aDbgData.aExclClassFilter ) ); lcl_tryReadConfigString( pLine, nLineLength, "exclude_class", aDebugData.aDbgData.aExclClassFilter, sizeof( aDebugData.aDbgData.aExclClassFilter ) );
lcl_tryReadOutputChannel( pLine, nLineLength, "trace", &aDebugData.aDbgData.nTraceOut ); lcl_tryReadOutputChannel( pLine, nLineLength, "trace", &aDebugData.aDbgData.nTraceOut );
lcl_tryReadOutputChannel( pLine, nLineLength, "warning", &aDebugData.aDbgData.nWarningOut );
lcl_tryReadOutputChannel( pLine, nLineLength, "error", &aDebugData.aDbgData.nErrorOut ); lcl_tryReadOutputChannel( pLine, nLineLength, "error", &aDebugData.aDbgData.nErrorOut );
lcl_tryReadConfigBoolean( pLine, nLineLength, "oslhook", &aDebugData.aDbgData.bHookOSLAssert ); lcl_tryReadConfigBoolean( pLine, nLineLength, "oslhook", &aDebugData.aDbgData.bHookOSLAssert );
} }
...@@ -671,7 +669,6 @@ static DebugData* GetDebugData() ...@@ -671,7 +669,6 @@ static DebugData* GetDebugData()
else else
{ {
lcl_matchOutputChannel( getenv( "DBGSV_TRACE_OUT" ), &aDebugData.aDbgData.nTraceOut ); lcl_matchOutputChannel( getenv( "DBGSV_TRACE_OUT" ), &aDebugData.aDbgData.nTraceOut );
lcl_matchOutputChannel( getenv( "DBGSV_WARNING_OUT" ), &aDebugData.aDbgData.nWarningOut );
lcl_matchOutputChannel( getenv( "DBGSV_ERROR_OUT" ), &aDebugData.aDbgData.nErrorOut ); lcl_matchOutputChannel( getenv( "DBGSV_ERROR_OUT" ), &aDebugData.aDbgData.nErrorOut );
} }
...@@ -1073,7 +1070,6 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam ) ...@@ -1073,7 +1070,6 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
lcl_writeConfigString( pIniFile, "include_class", pData->aInclClassFilter ); lcl_writeConfigString( pIniFile, "include_class", pData->aInclClassFilter );
lcl_writeConfigString( pIniFile, "exclude_class", pData->aExclClassFilter ); lcl_writeConfigString( pIniFile, "exclude_class", pData->aExclClassFilter );
lcl_writeConfigOutChannel( pIniFile, "trace", pData->nTraceOut ); lcl_writeConfigOutChannel( pIniFile, "trace", pData->nTraceOut );
lcl_writeConfigOutChannel( pIniFile, "warning", pData->nWarningOut );
lcl_writeConfigOutChannel( pIniFile, "error", pData->nErrorOut ); lcl_writeConfigOutChannel( pIniFile, "error", pData->nErrorOut );
lcl_writeConfigBoolean( pIniFile, "oslhook", pData->bHookOSLAssert ); lcl_writeConfigBoolean( pIniFile, "oslhook", pData->bHookOSLAssert );
...@@ -1415,11 +1411,6 @@ void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sa ...@@ -1415,11 +1411,6 @@ void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sa
nOut = pData->aDbgData.nErrorOut; nOut = pData->aDbgData.nErrorOut;
pStr = "Error: "; pStr = "Error: ";
} }
else if ( nDbgOut == DBG_OUT_WARNING )
{
nOut = pData->aDbgData.nWarningOut;
pStr = "Warning: ";
}
else else
{ {
nOut = pData->aDbgData.nTraceOut; nOut = pData->aDbgData.nTraceOut;
......
...@@ -388,8 +388,6 @@ private: ...@@ -388,8 +388,6 @@ private:
Edit maExclFilter; Edit maExclFilter;
FixedText maTraceText; FixedText maTraceText;
ListBox maTraceBox; ListBox maTraceBox;
FixedText maWarningText;
ListBox maWarningBox;
FixedText maErrorText; FixedText maErrorText;
ListBox maErrorBox; ListBox maErrorBox;
CheckBox maHookOSLBox; CheckBox maHookOSLBox;
...@@ -574,8 +572,6 @@ DbgDialog::DbgDialog() : ...@@ -574,8 +572,6 @@ DbgDialog::DbgDialog() :
maExclFilter( this ), maExclFilter( this ),
maTraceText( this ), maTraceText( this ),
maTraceBox( this, WB_DROPDOWN ), maTraceBox( this, WB_DROPDOWN ),
maWarningText( this ),
maWarningBox( this, WB_DROPDOWN ),
maErrorText( this ), maErrorText( this ),
maErrorBox( this, WB_DROPDOWN ), maErrorBox( this, WB_DROPDOWN ),
maHookOSLBox( this ), maHookOSLBox( this ),
...@@ -794,29 +790,6 @@ DbgDialog::DbgDialog() : ...@@ -794,29 +790,6 @@ DbgDialog::DbgDialog() :
LogicToPixel( Size( 95, 80 ), aAppMap ) ); LogicToPixel( Size( 95, 80 ), aAppMap ) );
} }
{
maWarningText.Show();
maWarningText.SetText("~Warning");
maWarningText.SetPosSizePixel( LogicToPixel( Point( 115, 210 ), aAppMap ),
LogicToPixel( Size( 95, 9 ), aAppMap ) );
}
{
maWarningBox.InsertEntry(OUString("None"));
maWarningBox.InsertEntry(OUString("File"));
maWarningBox.InsertEntry(OUString("Window"));
maWarningBox.InsertEntry(OUString("Shell"));
maWarningBox.InsertEntry(OUString("MessageBox"));
maWarningBox.InsertEntry(OUString("TestTool"));
maWarningBox.InsertEntry(OUString("Debugger"));
maWarningBox.InsertEntry(OUString("Abort"));
ImplAppendUserDefinedChannels( maWarningBox );
ImplSelectChannel( maWarningBox, pData->nWarningOut, 0 );
maWarningBox.Show();
maWarningBox.SetPosSizePixel( LogicToPixel( Point( 115, 220 ), aAppMap ),
LogicToPixel( Size( 95, 80 ), aAppMap ) );
}
{ {
maErrorText.Show(); maErrorText.Show();
maErrorText.SetText("~Error"); maErrorText.SetText("~Error");
...@@ -893,7 +866,6 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton ) ...@@ -893,7 +866,6 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
aData.nTestFlags = 0; aData.nTestFlags = 0;
aData.nTraceOut = ImplGetChannelId( maTraceBox, 0 ); aData.nTraceOut = ImplGetChannelId( maTraceBox, 0 );
aData.nWarningOut = ImplGetChannelId( maWarningBox, 0 );
aData.nErrorOut = ImplGetChannelId( maErrorBox, mnErrorOff ); aData.nErrorOut = ImplGetChannelId( maErrorBox, mnErrorOff );
strncpy( aData.aDebugName, OUStringToOString(maDebugName.GetText(), RTL_TEXTENCODING_UTF8).getStr(), sizeof( aData.aDebugName ) ); strncpy( aData.aDebugName, OUStringToOString(maDebugName.GetText(), RTL_TEXTENCODING_UTF8).getStr(), sizeof( aData.aDebugName ) );
...@@ -942,7 +914,6 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton ) ...@@ -942,7 +914,6 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
// Umschalten der Laufzeitwerte // Umschalten der Laufzeitwerte
DBG_INSTOUTTRACE( aData.nTraceOut ); DBG_INSTOUTTRACE( aData.nTraceOut );
DBG_INSTOUTWARNING( aData.nWarningOut );
DBG_INSTOUTERROR( aData.nErrorOut ); DBG_INSTOUTERROR( aData.nErrorOut );
DbgUpdateOslHook( &aData ); DbgUpdateOslHook( &aData );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment