diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2013-05-09 05:59:52 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2013-05-09 06:00:42 +0900 |
commit | 5f4d89425f81f765c0699153f06cf6577080f4ba (patch) | |
tree | f986e254c0721430fe12b053c1a10f6c63d9899e /vcl | |
parent | bbd0c8eb921114d3a313284ccdc05d5de1fd995b (diff) |
sal_Bool to bool
Change-Id: I4835adb15e2a9494d0080eeee80158c98981d7cc
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/dbggui.cxx | 57 | ||||
-rw-r--r-- | vcl/source/app/idlemgr.cxx | 8 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 10 |
4 files changed, 38 insertions, 39 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 629f10133f80..86b0d7a9f3ba 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -335,7 +335,7 @@ void ImplWindowAutoMnemonic( Window* pWindow ); void ImplUpdateSystemProcessWindow(); Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); -sal_Bool ImplCallHotKey( const KeyCode& rKeyCode ); +bool ImplCallHotKey( const KeyCode& rKeyCode ); void ImplFreeHotKeyData(); void ImplFreeEventHookData(); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 00e3d031dd07..a61cdea25004 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -427,10 +427,10 @@ class DbgInfoDialog : public ModalDialog private: ListBox maListBox; OKButton maOKButton; - sal_Bool mbHelpText; + bool mbHelpText; public: - DbgInfoDialog( Window* pParent, sal_Bool bHelpText = sal_False ); + DbgInfoDialog( Window* pParent, bool bHelpText = false ); void SetInfoText( const OUString& rStr ); }; @@ -619,7 +619,7 @@ void DbgWindow::InsertLine( const OUString& rLine ) { OUString aStr = convertLineEnd(rLine, LINEEND_LF); sal_Int32 nPos = aStr.indexOf( _LF ); - sal_Bool bFirstEntry = sal_True; + bool bFirstEntry = true; while ( nPos != -1 ) { if ( maLstBox.GetEntryCount() >= DBGWIN_MAXLINES ) @@ -628,7 +628,7 @@ void DbgWindow::InsertLine( const OUString& rLine ) sal_uInt16 nInsertionPos = maLstBox.InsertEntry( aStr.copy( 0, nPos ) ); if ( bFirstEntry ) maLstBox.SetEntryData( nInsertionPos, reinterpret_cast< void* >( 1 ) ); - bFirstEntry = sal_False; + bFirstEntry = false; aStr = aStr.replaceAt( 0, nPos+1, "" ); nPos = aStr.indexOf( _LF ); @@ -1094,7 +1094,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & HELPMODE_CONTEXT ) { - DbgInfoDialog aInfoDialog( this, sal_True ); + DbgInfoDialog aInfoDialog( this, true ); OUString aHelpText; const sal_Char** pHelpStrs = pDbgHelpText; while ( *pHelpStrs ) @@ -1110,7 +1110,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt ) // ======================================================================= -DbgInfoDialog::DbgInfoDialog( Window* pParent, sal_Bool bHelpText ) : +DbgInfoDialog::DbgInfoDialog( Window* pParent, bool bHelpText ) : ModalDialog( pParent, WB_STDMODAL ), maListBox( this, WB_BORDER | WB_AUTOHSCROLL ), maOKButton( this, WB_DEFBUTTON ) @@ -1187,7 +1187,7 @@ void DbgInfoDialog::SetInfoText( const OUString& rStr ) void DbgDialogTest( Window* pWindow ) { - sal_Bool aAccelBuf[65536]; + bool aAccelBuf[65536] = {0}; sal_uInt16 nChildCount = pWindow->GetChildCount(); Window* pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); Window* pChild; @@ -1197,14 +1197,13 @@ void DbgDialogTest( Window* pWindow ) return; Rectangle* pRectAry = (Rectangle*)new long[(sizeof(Rectangle)*nChildCount)/sizeof(long)]; - memset( aAccelBuf, 0, sizeof( aAccelBuf ) ); memset( pRectAry, 0, sizeof(Rectangle)*nChildCount ); if ( pWindow->IsDialog() ) { - sal_Bool bOKCancelButton = sal_False; - sal_Bool bDefPushButton = sal_False; - sal_Bool bButton = sal_False; + bool bOKCancelButton = false; + bool bDefPushButton = false; + bool bButton = false; pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); while ( pGetChild ) { @@ -1212,11 +1211,11 @@ void DbgDialogTest( Window* pWindow ) if ( pChild->ImplIsPushButton() ) { - bButton = sal_True; + bButton = true; if ( (pChild->GetType() == WINDOW_OKBUTTON) || (pChild->GetType() == WINDOW_CANCELBUTTON) ) - bOKCancelButton = sal_True; + bOKCancelButton = true; if ( pChild->GetStyle() & WB_DEFBUTTON ) - bDefPushButton = sal_True; + bDefPushButton = true; } pGetChild = pGetChild->GetWindow( WINDOW_NEXT ); @@ -1266,7 +1265,7 @@ void DbgDialogTest( Window* pWindow ) if ( aAccelBuf[cAccel] ) DbgOutTypef( DBG_OUT_ERROR, "Double mnemonic char: %c", cAccel ); else - aAccelBuf[cAccel] = sal_True; + aAccelBuf[cAccel] = true; } } } @@ -1416,66 +1415,66 @@ void DbgDialogTest( Window* pWindow ) if ( pChild->IsVisible() ) { - sal_Bool bMaxWarning = sal_False; + bool bMaxWarning = false; if ( pChild->GetType() == WINDOW_NUMERICFIELD ) { NumericField* pField = (NumericField*)pChild; if ( pField->GetMax() == LONG_MAX ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_METRICFIELD ) { MetricField* pField = (MetricField*)pChild; if ( pField->GetMax() == LONG_MAX ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_CURRENCYFIELD ) { CurrencyField* pField = (CurrencyField*)pChild; if ( pField->GetMax() == LONG_MAX ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_TIMEFIELD ) { TimeField* pField = (TimeField*)pChild; if ( pField->GetMax() == Time( 23, 59, 59, 99 ) ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_DATEFIELD ) { DateField* pField = (DateField*)pChild; if ( pField->GetMax() == Date( 31, 12, 9999 ) ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_NUMERICBOX ) { NumericBox* pBox = (NumericBox*)pChild; if ( pBox->GetMax() == LONG_MAX ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_METRICBOX ) { MetricBox* pBox = (MetricBox*)pChild; if ( pBox->GetMax() == LONG_MAX ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_CURRENCYBOX ) { CurrencyBox* pBox = (CurrencyBox*)pChild; if ( pBox->GetMax() == LONG_MAX ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_TIMEBOX ) { TimeBox* pBox = (TimeBox*)pChild; if ( pBox->GetMax() == Time( 23, 59, 59, 99 ) ) - bMaxWarning = sal_True; + bMaxWarning = true; } else if ( pChild->GetType() == WINDOW_DATEBOX ) { DateBox* pBox = (DateBox*)pChild; if ( pBox->GetMax() == Date( 31, 12, 9999 ) ) - bMaxWarning = sal_True; + bMaxWarning = true; } if ( bMaxWarning ) { @@ -1716,12 +1715,12 @@ long SolarWindowPrinter::doIt() void DbgPrintWindow( const char* pLine ) { - static sal_Bool bIn = sal_False; + static bool bIn = false; // keine rekursiven Traces if ( bIn ) return; - bIn = sal_True; + bIn = true; SolarWindowPrinter aPrinter( String( pLine, RTL_TEXTENCODING_UTF8 ) ); TimeValue aTimeout; aTimeout.Seconds = 2; aTimeout.Nanosec = 0; @@ -1730,7 +1729,7 @@ void DbgPrintWindow( const char* pLine ) if ( aPrinter.didTimeout() ) DbgPrintShell( pLine ); - bIn = sal_False; + bIn = false; } // ----------------------------------------------------------------------- diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx index a9d0429cdf09..419b5d05f4ef 100644 --- a/vcl/source/app/idlemgr.cxx +++ b/vcl/source/app/idlemgr.cxx @@ -27,7 +27,7 @@ struct ImplIdleData { Link maIdleHdl; sal_uInt16 mnPriority; - sal_Bool mbTimeout; + bool mbTimeout; }; #define IMPL_IDLETIMEOUT 350 @@ -73,7 +73,7 @@ sal_Bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ) ImplIdleData* pIdleData = new ImplIdleData; pIdleData->maIdleHdl = rLink; pIdleData->mnPriority = nPriority; - pIdleData->mbTimeout = sal_False; + pIdleData->mbTimeout = false; if ( nPos < mpIdleList->size() ) { ImplIdleList::iterator it = mpIdleList->begin(); @@ -114,12 +114,12 @@ IMPL_LINK_NOARG(ImplIdleMgr, TimeoutHdl) for ( size_t i = 0; i < mpIdleList->size(); ++i ) { ImplIdleData* pIdleData = (*mpIdleList)[ i ]; if ( !pIdleData->mbTimeout ) { - pIdleData->mbTimeout = sal_True; + pIdleData->mbTimeout = true; pIdleData->maIdleHdl.Call( GetpApp() ); // May have been removed in the handler for ( size_t j = 0; j < mpIdleList->size(); ++j ) { if ( (*mpIdleList)[ j ] == pIdleData ) { - pIdleData->mbTimeout = sal_False; + pIdleData->mbTimeout = false; break; } } diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 9792f14b483e..d04d1e2baf7a 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1598,7 +1598,7 @@ extern "C" { static void SAL_CALL thisModule() {} } UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist ) { ImplSVData* pSVData = ImplGetSVData(); - static sal_Bool bAlreadyTriedToCreate = sal_False; + static bool bAlreadyTriedToCreate = false; if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate ) { #ifndef DISABLE_DYNLOADING @@ -1624,7 +1624,7 @@ UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist ) #else pSVData->mpUnoWrapper = CreateUnoWrapper(); #endif - bAlreadyTriedToCreate = sal_True; + bAlreadyTriedToCreate = true; } return pSVData->mpUnoWrapper; } @@ -1662,7 +1662,7 @@ void Application::SetFilterHdl( const Link& rLink ) // ----------------------------------------------------------------------- -sal_Bool ImplCallHotKey( const KeyCode& rKeyCode ) +bool ImplCallHotKey( const KeyCode& rKeyCode ) { ImplSVData* pSVData = ImplGetSVData(); ImplHotKey* pHotKeyData = pSVData->maAppData.mpFirstHotKey; @@ -1671,13 +1671,13 @@ sal_Bool ImplCallHotKey( const KeyCode& rKeyCode ) if ( pHotKeyData->maKeyCode.IsDefinedKeyCodeEqual( rKeyCode ) ) { pHotKeyData->maLink.Call( pHotKeyData->mpUserData ); - return sal_True; + return true; } pHotKeyData = pHotKeyData->mpNext; } - return sal_False; + return false; } // ----------------------------------------------------------------------- |