diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2009-03-24 14:11:39 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2009-03-24 14:11:39 +0000 |
commit | fc0fb20e720aad1dae43e3fe2966fe5a496f6ae7 (patch) | |
tree | a5bf24a7177722fbeace11a9450635fee259ea93 | |
parent | 0f78bc7306481fd75cdf3069f3b047745dcfaeea (diff) |
CWS-TOOLING: integrate CWS gh16
2009-03-24 11:26:56 +0100 gh r269930 : #i100151#
2009-03-24 11:26:18 +0100 gh r269928 : #i100151#fix a renaming issue
2009-03-20 12:31:00 +0100 gh r269795 : #i100356# some fixes required
2009-03-19 17:20:02 +0100 gh r269760 : #i100151# generate UserFeedback names
2009-03-19 17:17:49 +0100 gh r269759 : #i100151# deliver *.win files
2009-03-19 17:15:10 +0100 gh r269758 : #i100151# generate UserFeedback names and deliver them
2009-03-19 11:38:53 +0100 gh r269737 : #i100356# write logs to stdout. enable with switch -printlog
2009-03-12 14:15:48 +0100 gh r269408 : #i98580# build failed when debug enabled
2009-03-12 13:55:50 +0100 gh r269404 : #i61192#fix lineendings in hid.lst
-rw-r--r-- | basic/source/app/brkpnts.cxx | 8 | ||||
-rw-r--r-- | basic/source/app/msgedit.cxx | 37 | ||||
-rw-r--r-- | basic/source/app/msgedit.hxx | 2 |
3 files changed, 43 insertions, 4 deletions
diff --git a/basic/source/app/brkpnts.cxx b/basic/source/app/brkpnts.cxx index fd889deeef..3982b66f44 100644 --- a/basic/source/app/brkpnts.cxx +++ b/basic/source/app/brkpnts.cxx @@ -111,7 +111,7 @@ void BreakpointWindow::SetBPsInModule() { pModule->SetBP( (USHORT)pBrk->nLine ); #if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" ) + DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" ); #endif pBrk = Next(); } @@ -152,7 +152,7 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine ) if ( pModule->SetBP( nLine ) ) { #if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" ) + DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" ); #endif if ( StarBASIC::IsRunning() ) { @@ -165,7 +165,7 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine ) } } #if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" ) + DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" ); #endif } @@ -282,7 +282,7 @@ void BreakpointWindow::Paint( const Rectangle& ) while ( pBrk ) { #if OSL_DEBUG_LEVEL > 1 - DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" ) + DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" ); #endif ULONG nLine = pBrk->nLine-1; ULONG nY = nLine*nLineHeight - nCurYOffset; diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx index 79fb34d7fb..4de5f13591 100644 --- a/basic/source/app/msgedit.cxx +++ b/basic/source/app/msgedit.cxx @@ -37,6 +37,7 @@ Version 2 changed order of entries(New Entries at the end) Version 3 Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8 *************************************************************************/ +#include <cstdio> #include <tools/time.hxx> #include <tools/stream.hxx> #ifndef _MSGBOX_HXX //autogen @@ -61,6 +62,8 @@ Version 3 Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8 USHORT MsgEdit::nMaxLogLen = 0; BOOL MsgEdit::bLimitLogLen = FALSE; +BOOL MsgEdit::bPrintLogToStdout = FALSE; +BOOL MsgEdit::bPrintLogToStdoutSet = FALSE; #define WARNING_PREFIX String( SttResId( S_WARNING_PREFIX ) ) #define VERSION_STRING CUniString("File Format Version: ") @@ -85,6 +88,20 @@ MsgEdit::MsgEdit( AppError* pParent, BasicFrame *pBF, const WinBits& aBits ) aEditTree.SetSelectionMode( MULTIPLE_SELECTION ); if ( aEditTree.GetModel()->GetSortMode() != SortNone ) aEditTree.GetModel()->SetSortMode( SortNone ); + + if ( !bPrintLogToStdoutSet ) + { + bPrintLogToStdoutSet = TRUE; + for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) + { + if ( Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("-printlog") == COMPARE_EQUAL + #ifndef UNX + || Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("/printlog") == COMPARE_EQUAL + #endif + ) + bPrintLogToStdout = TRUE; + } + } } MsgEdit::~MsgEdit() @@ -177,6 +194,7 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg ) } String aLogMsg = Impl_MakeSaveText( LogMsg->aDebugData ).AppendAscii("\n"); + if( aStrm.IsOpen() ) { aLogMsg.ConvertLineEnd(LINEEND_CRLF); @@ -186,8 +204,27 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg ) } if ( !bFileWasChanged ) pAppError->UpdateFileInfo( HAS_BEEN_LOADED ); + + + // now write to stdout + if ( bPrintLogToStdout ) + { + String aPrintMsg, aOriginalMsg; + + aOriginalMsg = LogMsg->aDebugData.aMsg; + // converting to human readable string for adding errors to list in testobject + LogMsg->aDebugData.aMsg = pBasicFrame->GenRealString( LogMsg->aDebugData.aMsg ); + + aPrintMsg = Impl_MakeSaveText( LogMsg->aDebugData ).AppendAscii("\n"); + + // restore Original Msg + LogMsg->aDebugData.aMsg = aOriginalMsg; + + printf( ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer() ); + } } } + // converting to human readable string for adding errors to list in testobject LogMsg->aDebugData.aMsg = pBasicFrame->GenRealString( LogMsg->aDebugData.aMsg ); } diff --git a/basic/source/app/msgedit.hxx b/basic/source/app/msgedit.hxx index 394c4e2738..ec93d1fdce 100644 --- a/basic/source/app/msgedit.hxx +++ b/basic/source/app/msgedit.hxx @@ -94,6 +94,8 @@ class MsgEdit : public DataEdit static USHORT nMaxLogLen; static BOOL bLimitLogLen; + static BOOL bPrintLogToStdout; + static BOOL bPrintLogToStdoutSet; // has it been initialized yet public: MsgEdit( AppError*, BasicFrame *pBF, const WinBits& ); ~MsgEdit(); |