diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 12:53:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 12:53:51 +0100 |
commit | e8f8f24c8415898c787bbfb629247ed62e73a2b9 (patch) | |
tree | dae18a3acbf29c192118e7c003f80df8da8e21ae /vcl/source/window | |
parent | 1c8402465cfd4df862409dc310f5f099d044c4d8 (diff) |
vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
Diffstat (limited to 'vcl/source/window')
32 files changed, 1632 insertions, 1632 deletions
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 345b0aba8fe9..4ded993eb491 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -161,7 +161,7 @@ void Accelerator::ImplInit() { mnCurId = 0; mnCurRepeat = 0; - mbIsCancel = sal_False; + mbIsCancel = false; mpDel = NULL; } @@ -217,7 +217,7 @@ void Accelerator::ImplDeleteData() // ----------------------------------------------------------------------- void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, - sal_Bool bEnable, Accelerator* pAutoAccel ) + bool bEnable, Accelerator* pAutoAccel ) { DBG_ASSERT( nItemId, "Accelerator::InsertItem(): ItemId == 0" ); @@ -356,7 +356,7 @@ void Accelerator::Select() void Accelerator::InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode ) { - ImplInsertAccel( nItemId, rKeyCode, sal_True, NULL ); + ImplInsertAccel( nItemId, rKeyCode, true, NULL ); } // ----------------------------------------------------------------------- @@ -447,7 +447,7 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel ) maCurKeyCode = KeyCode(); mnCurId = 0; mnCurRepeat = 0; - mbIsCancel = sal_False; + mbIsCancel = false; // delete and copy tables ImplDeleteData(); diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index 8c0cb32888a0..5fe29c0e3341 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -37,20 +37,20 @@ ImplAccelManager::~ImplAccelManager() // ----------------------------------------------------------------------- -sal_Bool ImplAccelManager::InsertAccel( Accelerator* pAccel ) +bool ImplAccelManager::InsertAccel( Accelerator* pAccel ) { if ( !mpAccelList ) { mpAccelList = new ImplAccelList; } else { for ( size_t i = 0, n = mpAccelList->size(); i < n; ++i ) { if ( (*mpAccelList)[ i ] == pAccel ) { - return sal_False; + return false; } } } mpAccelList->insert( mpAccelList->begin(), pAccel ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -92,7 +92,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel ) // ----------------------------------------------------------------------- -void ImplAccelManager::EndSequence( sal_Bool bCancel ) +void ImplAccelManager::EndSequence( bool bCancel ) { // are we in a list ? if ( !mpSequenceList ) @@ -108,7 +108,7 @@ void ImplAccelManager::EndSequence( sal_Bool bCancel ) pTempAccel->Deactivate(); if ( !bDel ) { - pTempAccel->mbIsCancel = sal_False; + pTempAccel->mbIsCancel = false; pTempAccel->mpDel = NULL; } } @@ -120,15 +120,15 @@ void ImplAccelManager::EndSequence( sal_Bool bCancel ) // ----------------------------------------------------------------------- -sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) +bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) { Accelerator* pAccel; // do we have accelerators ?? if ( !mpAccelList ) - return sal_False; + return false; if ( mpAccelList->empty() ) - return sal_False; + return false; // are we in a sequence ? if ( mpSequenceList ) @@ -140,7 +140,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe { // abort sequence FlushAccel(); - return sal_False; + return false; } // can the entry be found ? @@ -157,7 +157,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe // call Activate-Handler of the new one pNextAccel->Activate(); - return sal_True; + return true; } else { @@ -185,14 +185,14 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe pAccel->mpDel = NULL; } - return sal_True; + return true; } else { // stop sequence as the accelerator was disbled // transfer the key (to the system) FlushAccel(); - return sal_False; + return false; } } } @@ -200,7 +200,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe { // wrong key => stop sequence FlushAccel(); - return sal_False; + return false; } } @@ -227,7 +227,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe // call activate-Handler of the new one pNextAccel->Activate(); - return sal_True; + return true; } else { @@ -256,15 +256,15 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe pAccel->mpDel = NULL; } - return sal_True; + return true; } else - return sal_False; + return false; } } } - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index c9ead5972c9b..b68b4ab9ae51 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star::uno; // ======================================================================= -static void ImplGetPinImage( sal_uInt16 nStyle, sal_Bool bPinIn, Image& rImage ) +static void ImplGetPinImage( sal_uInt16 nStyle, bool bPinIn, Image& rImage ) { // load ImageList if not available yet ImplSVData* pSVData = ImplGetSVData(); @@ -132,7 +132,7 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev, pWin->SetLineColor(); pWin->DrawRect( rRect ); pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? sal_True : sal_False, - sal_True, sal_False ); + true, false ); } aTempRect = rRect; aTempRect.Left()+=3; @@ -161,23 +161,23 @@ ImplBorderWindowView::~ImplBorderWindowView() // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::MouseMove( const MouseEvent& ) +bool ImplBorderWindowView::MouseMove( const MouseEvent& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::MouseButtonDown( const MouseEvent& ) +bool ImplBorderWindowView::MouseButtonDown( const MouseEvent& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::Tracking( const TrackingEvent& ) +bool ImplBorderWindowView::Tracking( const TrackingEvent& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -311,7 +311,7 @@ sal_uInt16 ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { sal_uInt16 oldCloseState = pData->mnCloseState; sal_uInt16 oldMenuState = pData->mnMenuState; @@ -348,12 +348,12 @@ sal_Bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const if( pData->mnMenuState != oldMenuState ) pData->mpBorderWindow->Invalidate( pData->maMenuRect ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; @@ -458,9 +458,9 @@ sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, if ( bTracking ) { - pData->mbDragFull = sal_False; + pData->mbDragFull = false; if ( nDragFullTest ) - pData->mbDragFull = sal_True; // always fulldrag for proper docking, ignore system settings + pData->mbDragFull = true; // always fulldrag for proper docking, ignore system settings pBorderWindow->StartTracking(); } else if ( bHitTest ) @@ -468,12 +468,12 @@ sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, } } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ) +bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; @@ -921,7 +921,7 @@ sal_Bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const T } } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1167,16 +1167,16 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei if( mnWidth && mnHeight ) { - mpBorderWindow->SetPaintTransparent( sal_True ); + mpBorderWindow->SetPaintTransparent( true ); mpBorderWindow->SetBackground(); - pCtrl->SetPaintTransparent( sal_True ); + pCtrl->SetPaintTransparent( true ); Window* pCompoundParent = NULL; if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() ) pCompoundParent = pWin->GetParent(); if( pCompoundParent ) - pCompoundParent->SetPaintTransparent( sal_True ); + pCompoundParent->SetPaintTransparent( true ); if( mnWidth < aBounds.GetWidth() || mnHeight < aBounds.GetHeight() ) { @@ -1260,7 +1260,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* if ( nBorderStyle & WINDOW_BORDER_NOBORDER ) return; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; // for native widget drawing we must find out what // control this border belongs to Window *pWin = NULL, *pCtrl = NULL; @@ -1352,9 +1352,9 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* nState |= CTRL_STATE_FOCUSED; } - sal_Bool bMouseOver = sal_False; + bool bMouseOver = false; Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD ); - while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == sal_False ) + while( pCtrlChild && !(bMouseOver = pCtrlChild->IsMouseOver()) ) pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT ); if( bMouseOver ) @@ -1423,7 +1423,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ) { maFrameData.mpBorderWindow = pBorderWindow; - maFrameData.mbDragFull = sal_False; + maFrameData.mbDragFull = false; maFrameData.mnHitTest = 0; maFrameData.mnPinState = 0; maFrameData.mnCloseState = 0; @@ -1432,7 +1432,7 @@ ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindo maFrameData.mnMenuState = 0; maFrameData.mnHideState = 0; maFrameData.mnHelpState = 0; - maFrameData.mbTitleClipped = 0; + maFrameData.mbTitleClipped = false; mpATitleVirDev = NULL; mpDTitleVirDev = NULL; @@ -1448,21 +1448,21 @@ ImplStdBorderWindowView::~ImplStdBorderWindowView() // ----------------------------------------------------------------------- -sal_Bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) +bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) { return ImplMouseMove( &maFrameData, rMEvt ); } // ----------------------------------------------------------------------- -sal_Bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) +bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) { return ImplMouseButtonDown( &maFrameData, rMEvt ); } // ----------------------------------------------------------------------- -sal_Bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) +bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) { return ImplTracking( &maFrameData, rTEvt ); } @@ -1545,7 +1545,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh if ( pBorderWindow->GetStyle() & WB_PINABLE ) { Image aImage; - ImplGetPinImage( 0, 0, aImage ); + ImplGetPinImage( 0, false, aImage ); pData->maPinRect.Top() = nItemTop; pData->maPinRect.Bottom() = nItemBottom; pData->maPinRect.Left() = nLeft; @@ -1868,14 +1868,14 @@ void ImplBorderWindow::ImplInit( Window* pParent, nStyle &= nTestStyle; mpWindowImpl->mbBorderWin = true; - mbSmallOutBorder = sal_False; + mbSmallOutBorder = false; if ( nTypeStyle & BORDERWINDOW_STYLE_FRAME ) { if( (nStyle & WB_SYSTEMCHILDWINDOW) ) { mpWindowImpl->mbOverlapWin = true; mpWindowImpl->mbFrame = true; - mbFrameBorder = sal_False; + mbFrameBorder = false; } else if( (nStyle & (WB_OWNERDRAWDECORATION | WB_POPUP)) ) { @@ -1887,24 +1887,24 @@ void ImplBorderWindow::ImplInit( Window* pParent, { mpWindowImpl->mbOverlapWin = true; mpWindowImpl->mbFrame = true; - mbFrameBorder = sal_False; + mbFrameBorder = false; // closeable windows may have a border as well, eg. system floating windows without caption if ( (nOrgStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE/* | WB_CLOSEABLE*/)) == WB_BORDER ) - mbSmallOutBorder = sal_True; + mbSmallOutBorder = true; } } else if ( nTypeStyle & BORDERWINDOW_STYLE_OVERLAP ) { mpWindowImpl->mbOverlapWin = true; - mbFrameBorder = sal_True; + mbFrameBorder = true; } else - mbFrameBorder = sal_False; + mbFrameBorder = false; if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) - mbFloatWindow = sal_True; + mbFloatWindow = true; else - mbFloatWindow = sal_False; + mbFloatWindow = false; Window::ImplInit( pParent, nStyle, pSystemParentData ); SetBackground(); @@ -1917,12 +1917,12 @@ void ImplBorderWindow::ImplInit( Window* pParent, mnMaxHeight = SHRT_MAX; mnRollHeight = 0; mnOrgMenuHeight = 0; - mbPined = sal_False; - mbRollUp = sal_False; - mbMenuHide = sal_False; - mbDockBtn = sal_False; - mbMenuBtn = sal_False; - mbHideBtn = sal_False; + mbPined = false; + mbRollUp = false; + mbMenuHide = false; + mbDockBtn = false; + mbMenuBtn = false; + mbHideBtn = false; mbDisplayActive = IsActive(); if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) @@ -1996,7 +1996,7 @@ void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Poin void ImplBorderWindow::Activate() { - SetDisplayActive( sal_True ); + SetDisplayActive( true ); Window::Activate(); } @@ -2007,7 +2007,7 @@ void ImplBorderWindow::Deactivate() // remove active windows from the ruler, also ignore the Deactivate // if a menu becomes active if ( GetActivateMode() && !ImplGetSVData()->maWinData.mbNoDeactivate ) - SetDisplayActive( sal_False ); + SetDisplayActive( false ); Window::Deactivate(); } @@ -2121,7 +2121,7 @@ void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { if ( !mpWindowImpl->mbFrame || (GetStyle() & (WB_OWNERDRAWDECORATION | WB_POPUP)) ) - UpdateView( sal_True, ImplGetWindow()->GetOutputSizePixel() ); + UpdateView( true, ImplGetWindow()->GetOutputSizePixel() ); } Window::DataChanged( rDCEvt ); @@ -2150,7 +2150,7 @@ void ImplBorderWindow::InitView() // ----------------------------------------------------------------------- -void ImplBorderWindow::UpdateView( sal_Bool bNewView, const Size& rNewOutSize ) +void ImplBorderWindow::UpdateView( bool bNewView, const Size& rNewOutSize ) { sal_Int32 nLeftBorder; sal_Int32 nTopBorder; @@ -2226,7 +2226,7 @@ void ImplBorderWindow::InvalidateBorder() // ----------------------------------------------------------------------- -void ImplBorderWindow::SetDisplayActive( sal_Bool bActive ) +void ImplBorderWindow::SetDisplayActive( bool bActive ) { if ( mbDisplayActive != bActive ) { @@ -2241,7 +2241,7 @@ void ImplBorderWindow::SetDisplayActive( sal_Bool bActive ) void ImplBorderWindow::SetTitleType( sal_uInt16 nTitleType, const Size& rSize ) { mnTitleType = nTitleType; - UpdateView( sal_False, rSize ); + UpdateView( false, rSize ); } // ----------------------------------------------------------------------- @@ -2251,13 +2251,13 @@ void ImplBorderWindow::SetBorderStyle( sal_uInt16 nStyle ) if ( !mbFrameBorder && (mnBorderStyle != nStyle) ) { mnBorderStyle = nStyle; - UpdateView( sal_False, ImplGetWindow()->GetOutputSizePixel() ); + UpdateView( false, ImplGetWindow()->GetOutputSizePixel() ); } } // ----------------------------------------------------------------------- -void ImplBorderWindow::SetPin( sal_Bool bPin ) +void ImplBorderWindow::SetPin( bool bPin ) { mbPined = bPin; InvalidateBorder(); @@ -2265,11 +2265,11 @@ void ImplBorderWindow::SetPin( sal_Bool bPin ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetRollUp( sal_Bool bRollUp, const Size& rSize ) +void ImplBorderWindow::SetRollUp( bool bRollUp, const Size& rSize ) { mbRollUp = bRollUp; mnRollHeight = rSize.Height(); - UpdateView( sal_False, rSize ); + UpdateView( false, rSize ); } // ----------------------------------------------------------------------- @@ -2284,7 +2284,7 @@ void ImplBorderWindow::SetCloser() // ----------------------------------------------------------------------- -void ImplBorderWindow::SetDockButton( sal_Bool bDockButton ) +void ImplBorderWindow::SetDockButton( bool bDockButton ) { mbDockBtn = bDockButton; Size aSize = GetOutputSizePixel(); @@ -2294,7 +2294,7 @@ void ImplBorderWindow::SetDockButton( sal_Bool bDockButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetHideButton( sal_Bool bHideButton ) +void ImplBorderWindow::SetHideButton( bool bHideButton ) { mbHideBtn = bHideButton; Size aSize = GetOutputSizePixel(); @@ -2304,7 +2304,7 @@ void ImplBorderWindow::SetHideButton( sal_Bool bHideButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetMenuButton( sal_Bool bMenuButton ) +void ImplBorderWindow::SetMenuButton( bool bMenuButton ) { mbMenuBtn = bMenuButton; Size aSize = GetOutputSizePixel(); @@ -2331,7 +2331,7 @@ void ImplBorderWindow::SetMenuBarWindow( Window* pWindow ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetMenuBarMode( sal_Bool bHide ) +void ImplBorderWindow::SetMenuBarMode( bool bHide ) { mbMenuHide = bHide; UpdateMenuHeight(); diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index af5bead656c2..9bc6a3eedccf 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -42,7 +42,7 @@ void ButtonDialog::ImplInitButtonDialogData() mnButtonSize = 0; mnCurButtonId = 0; mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND; - mbFormat = sal_True; + mbFormat = true; } ButtonDialog::ButtonDialog( WindowType nType ) : @@ -204,7 +204,7 @@ void ButtonDialog::ImplPosControls() SetOutputSizePixel( aDlgSize ); - mbFormat = sal_False; + mbFormat = false; } IMPL_LINK( ButtonDialog, ImplClickHdl, PushButton*, pBtn ) @@ -285,7 +285,7 @@ void ButtonDialog::AddButton( const OUString& rText, sal_uInt16 nId, if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON ) mnFocusButtonId = nId; - mbFormat = sal_True; + mbFormat = true; } void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId, @@ -318,7 +318,7 @@ void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId, maItemList.push_back(pItem); - mbFormat = sal_True; + mbFormat = true; } void ButtonDialog::RemoveButton( sal_uInt16 nId ) @@ -353,7 +353,7 @@ void ButtonDialog::Clear() } maItemList.clear(); - mbFormat = sal_True; + mbFormat = true; } sal_uInt16 ButtonDialog::GetButtonId( sal_uInt16 nButton ) const @@ -381,7 +381,7 @@ void ButtonDialog::SetButtonText( sal_uInt16 nId, const OUString& rText ) if ( pItem ) { pItem->mpPushButton->SetText( rText ); - mbFormat = sal_True; + mbFormat = true; } } diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 37c6b8c4b5da..169aeb2dea96 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -841,7 +841,7 @@ void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType, const Color aOldFillColor = mpOutDev->GetFillColor(); const bool bOldMapMode = mpOutDev->IsMapModeEnabled(); Color nColor(rColor); - mpOutDev->EnableMapMode( sal_False ); + mpOutDev->EnableMapMode( false ); if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) || (mpOutDev->GetOutDevType() == OUTDEV_PRINTER) ) @@ -945,11 +945,11 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect, Rectangle DecorationView::DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle ) { Rectangle aRect = rRect; - sal_Bool bOldMap = mpOutDev->IsMapModeEnabled(); + bool bOldMap = mpOutDev->IsMapModeEnabled(); if ( bOldMap ) { aRect = mpOutDev->LogicToPixel( aRect ); - mpOutDev->EnableMapMode( sal_False ); + mpOutDev->EnableMapMode( false ); } if ( !rRect.IsEmpty() ) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index d9b66f3053c3..e2a18ba7f977 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -356,10 +356,10 @@ void Dialog::ImplInitDialogData() mpWindowImpl->mbDialog = true; mpDialogParent = NULL; mpPrevExecuteDlg = NULL; - mbInExecute = sal_False; - mbOldSaveBack = sal_False; - mbInClose = sal_False; - mbModalMode = sal_False; + mbInExecute = false; + mbOldSaveBack = false; + mbInClose = false; + mbModalMode = false; mpContentArea = NULL; mpActionArea = NULL; mbIsCalculatingInitialLayoutSize = false; @@ -401,7 +401,7 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle ) while ( pExeDlg ) { // only if visible and enabled - if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, sal_True ) && + if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, true ) && pExeDlg->IsReallyVisible() && pExeDlg->IsEnabled() && pExeDlg->IsInputEnabled() && !pExeDlg->IsInModalMode() ) { @@ -467,7 +467,7 @@ void Dialog::ImplInitSettings() else if( IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG ) ) { mpWindowImpl->mnNativeBackground = PART_BACKGROUND_DIALOG; - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); } // fallback to settings color else @@ -627,8 +627,8 @@ bool Dialog::Notify( NotifyEvent& rNEvt ) if( mbInExecute && mbModalMode ) { // do not change modal counter (pSVData->maAppData.mnModalDialog) - SetModalInputMode( sal_False ); - SetModalInputMode( sal_True ); + SetModalInputMode( false ); + SetModalInputMode( true ); // #93022# def-button might have changed after show if( !mnMousePositioned ) @@ -753,23 +753,23 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -sal_Bool Dialog::Close() +bool Dialog::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDead() ) - return sal_False; + return false; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() ) - return sal_False; + return false; - mbInClose = sal_True; + mbInClose = true; if ( !(GetStyle() & WB_CLOSEABLE) ) { - sal_Bool bRet = sal_True; + bool bRet = true; ImplAddDel( &aDelData ); PushButton* pButton = ImplGetCancelButton( this ); if ( pButton ) @@ -780,10 +780,10 @@ sal_Bool Dialog::Close() if ( pButton ) pButton->Click(); else - bRet = sal_False; + bRet = false; } if ( aDelData.IsDead() ) - return sal_True; + return true; ImplRemoveDel( &aDelData ); return bRet; } @@ -791,19 +791,19 @@ sal_Bool Dialog::Close() if ( IsInExecute() ) { EndDialog( sal_False ); - mbInClose = sal_False; - return sal_True; + mbInClose = false; + return true; } else { - mbInClose = sal_False; + mbInClose = false; return SystemWindow::Close(); } } // ----------------------------------------------------------------------- -sal_Bool Dialog::ImplStartExecuteModal() +bool Dialog::ImplStartExecuteModal() { if ( mbInExecute ) { @@ -813,7 +813,7 @@ sal_Bool Dialog::ImplStartExecuteModal() aErrorStr.append(ImplGetDialogText(this)); OSL_FAIL(aErrorStr.getStr()); #endif - return sal_False; + return false; } switch ( Application::GetDialogCancelMode() ) @@ -825,7 +825,7 @@ sal_Bool Dialog::ImplStartExecuteModal() "vcl", "Dialog \"" << ImplGetDialogText(this).getStr() << "\"cancelled in silent mode"); - return sal_False; + return false; default: assert(false); // this cannot happen // fall through @@ -859,15 +859,15 @@ sal_Bool Dialog::ImplStartExecuteModal() pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL ); if ( pSVData->maWinData.mpCaptureWin ) pSVData->maWinData.mpCaptureWin->ReleaseMouse(); - EnableInput( true, sal_True ); + EnableInput( true, true ); if ( GetParent() ) { NotifyEvent aNEvt( EVENT_EXECUTEDIALOG, this ); GetParent()->Notify( aNEvt ); } - mbInExecute = sal_True; - SetModalInputMode( sal_True ); + mbInExecute = true; + SetModalInputMode( true ); mbOldSaveBack = IsSaveBackgroundEnabled(); EnableSaveBackground(); @@ -877,7 +877,7 @@ sal_Bool Dialog::ImplStartExecuteModal() Show(); pSVData->maAppData.mnModalMode++; - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1007,7 +1007,7 @@ void Dialog::EndDialog( long nResult ) { if ( mbInExecute ) { - SetModalInputMode( sal_False ); + SetModalInputMode( false ); // remove dialog from the list of dialogs which are being executed ImplSVData* pSVData = ImplGetSVData(); @@ -1055,7 +1055,7 @@ void Dialog::EndDialog( long nResult ) mpDialogImpl->mbStartedModal = false; mpDialogImpl->mnResult = -1; } - mbInExecute = sal_False; + mbInExecute = false; } } @@ -1076,7 +1076,7 @@ void Dialog::EndAllDialogs( Window* pParent ) while ( pModDialog ) { pTempModDialog = pModDialog->mpPrevExecuteDlg; - if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, sal_True ) ) ) + if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, true ) ) ) { pModDialog->EndDialog( sal_False ); pModDialog->PostUserEvent( Link() ); @@ -1087,7 +1087,7 @@ void Dialog::EndAllDialogs( Window* pParent ) // ----------------------------------------------------------------------- -void Dialog::SetModalInputMode( sal_Bool bModal ) +void Dialog::SetModalInputMode( bool bModal ) { if ( bModal == mbModalMode ) return; @@ -1101,8 +1101,8 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) // Diable the prev Modal Dialog, because our dialog must close at first, // before the other dialog can be closed (because the other dialog // is on stack since our dialog returns) - if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) ) - mpPrevExecuteDlg->EnableInput( false, sal_True, sal_True, this ); + if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, true ) ) + mpPrevExecuteDlg->EnableInput( false, true, true, this ); // determine next overlap dialog parent Window* pParent = GetParent(); @@ -1129,9 +1129,9 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) } // Enable the prev Modal Dialog - if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) ) + if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, true ) ) { - mpPrevExecuteDlg->EnableInput( true, sal_True, sal_True, this ); + mpPrevExecuteDlg->EnableInput( true, true, true, this ); // ensure continued modality of prev dialog // do not change modality counter @@ -1144,10 +1144,10 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) if( pPrevModalDlg && ( pPrevModalDlg == mpPrevExecuteDlg - || !pPrevModalDlg->IsWindowOrChild( this, sal_True ) ) ) + || !pPrevModalDlg->IsWindowOrChild( this, true ) ) ) { - mpPrevExecuteDlg->SetModalInputMode( sal_False ); - mpPrevExecuteDlg->SetModalInputMode( sal_True ); + mpPrevExecuteDlg->SetModalInputMode( false ); + mpPrevExecuteDlg->SetModalInputMode( true ); } } } @@ -1155,7 +1155,7 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) // ----------------------------------------------------------------------- -void Dialog::SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs ) +void Dialog::SetModalInputMode( bool bModal, bool bSubModalDialogs ) { if ( bSubModalDialogs ) { @@ -1164,7 +1164,7 @@ void Dialog::SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs ) while ( pOverlap ) { if ( pOverlap->IsDialog() ) - ((Dialog*)pOverlap)->SetModalInputMode( bModal, sal_True ); + ((Dialog*)pOverlap)->SetModalInputMode( bModal, true ); pOverlap = pOverlap->mpWindowImpl->mpNext; } } @@ -1237,7 +1237,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); aImplWin.SetText( GetText() ); aImplWin.setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() ); - aImplWin.SetDisplayActive( sal_True ); + aImplWin.SetDisplayActive( true ); aImplWin.InitView(); aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos ); diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index b4ac50f920e4..0fc9c9617f89 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -151,7 +151,7 @@ static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& // ----------------------------------------------------------------------- -static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable ) +static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) { pParent = ImplGetTopParentOfTabHierarchy( pParent ); @@ -185,7 +185,7 @@ static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nI // ----------------------------------------------------------------------- -static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable ) +static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) { Window* pWindow = ImplGetChildWindow( pParent, n+1, nIndex, bTestEnable ); if ( n == nIndex ) @@ -219,7 +219,7 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, i--; else i = nFormEnd; - pWindow = ImplGetChildWindow( this, i, nTemp, sal_True ); + pWindow = ImplGetChildWindow( this, i, nTemp, true ); if ( !pWindow ) break; if ( (i == nTemp) && (pWindow->GetStyle() & WB_TABSTOP) ) @@ -239,12 +239,12 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, { if ( i < nFormEnd ) { - pWindow = ImplGetNextWindow( this, i, i, sal_True ); + pWindow = ImplGetNextWindow( this, i, i, true ); if ( (i > nFormEnd) || (i < nFormStart) ) - pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( this, nFormStart, i, true ); } else - pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( this, nFormStart, i, true ); } if ( i <= nFormEnd ) @@ -264,9 +264,9 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, } nOldIndex = i; if ( (i > nFormEnd) || (i < nFormStart) ) - pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( this, nFormStart, i, true ); else - pWindow = ImplGetNextWindow( this, i, i, sal_True ); + pWindow = ImplGetNextWindow( this, i, i, true ); } while ( (i != nStartIndex) && (i != nStartIndex2) ); @@ -317,7 +317,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt sal_uInt16 nFormEnd; // Focus-Fenster in der Child-Liste suchen - Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, sal_False ); + Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, false ); if( pWindow == NULL ) pWindow = pSWindow; @@ -340,7 +340,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt break; } - pSWindow = ImplGetNextWindow( pParent, i, i, sal_False ); + pSWindow = ImplGetNextWindow( pParent, i, i, false ); if ( !i ) pSWindow = NULL; } @@ -370,7 +370,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt do { nFormEnd = i; - pTempWindow = ImplGetNextWindow( pParent, i, i, sal_False ); + pTempWindow = ImplGetNextWindow( pParent, i, i, false ); // the DialogControlStart mark is only accepted for the direct children if ( !i @@ -403,7 +403,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt // ----------------------------------------------------------------------- static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cCharCode, - sal_uInt16 nFormStart, sal_uInt16 nFormEnd, sal_Bool bCheckEnable = sal_True ) + sal_uInt16 nFormStart, sal_uInt16 nFormEnd, bool bCheckEnable = true ) { DBG_ASSERT( (rIndex >= nFormStart) && (rIndex <= nFormEnd), "Window::ImplFindAccelWindow() - rIndex not in Form" ); @@ -422,9 +422,9 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni cCharCode = xCharClass->toUpper( OUString(cCharCode), 0, 1, rLocale )[0]; if ( i < nFormEnd ) - pWindow = ImplGetNextWindow( pParent, i, i, sal_True ); + pWindow = ImplGetNextWindow( pParent, i, i, true ); else - pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( pParent, nFormStart, i, true ); while( pWindow ) { const OUString aStr = pWindow->GetText(); @@ -501,7 +501,7 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) if ( GetType() == WINDOW_RADIOBUTTON ) { if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( sal_True, nFlags ); + ((RadioButton*)this)->ImplCallClick( true, nFlags ); else ImplGrabFocus( nFlags ); } @@ -514,8 +514,8 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) ((CheckBox*)this)->ImplCheck(); else if ( mpWindowImpl->mbPushButton ) { - ((PushButton*)this)->SetPressed( sal_True ); - ((PushButton*)this)->SetPressed( sal_False ); + ((PushButton*)this)->SetPressed( true ); + ((PushButton*)this)->SetPressed( false ); ((PushButton*)this)->Click(); } } @@ -526,7 +526,7 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) if ( GetType() == WINDOW_RADIOBUTTON ) { if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( sal_True, nFlags ); + ((RadioButton*)this)->ImplCallClick( true, nFlags ); else ImplGrabFocus( nFlags ); } @@ -600,7 +600,7 @@ namespace } } -sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) +bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKeyCode = aKeyCode.GetCode(); @@ -619,13 +619,13 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) // Ohne Focus-Window koennen wir auch keine Steuerung uebernehmen Window* pFocusWindow = Application::GetFocusWindow(); if ( !pFocusWindow || !ImplIsWindowOrChild( pFocusWindow ) ) - return sal_False; + return false; // Focus-Fenster in der Child-Liste suchen pSWindow = ::ImplFindDlgCtrlWindow( this, pFocusWindow, nIndex, nFormStart, nFormEnd ); if ( !pSWindow ) - return sal_False; + return false; i = nIndex; nDlgCtrlFlags = 0; @@ -644,7 +644,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( nKeyCode == KEY_RETURN ) { // Wir suchen zuerst nach einem DefPushButton/CancelButton - pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True ); + pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, true ); iButtonStart = iButton; while ( pButtonWindow ) { @@ -652,7 +652,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) pButtonWindow->mpWindowImpl->mbPushButton ) break; - pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True ); + pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true ); if ( (iButton <= iButtonStart) || (iButton > nFormEnd) ) pButtonWindow = NULL; } @@ -691,7 +691,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) nGetFocusFlags |= GETFOCUS_AROUND; } pTempWindow->ImplControlFocus( nGetFocusFlags ); - return sal_True; + return true; } else { @@ -713,21 +713,21 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->GetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = 0; - return sal_True; + return true; } } } else if ( nKeyCode == KEY_ESCAPE ) { // Wir suchen zuerst nach einem DefPushButton/CancelButton - pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True ); + pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, true ); iButtonStart = iButton; while ( pButtonWindow ) { if ( pButtonWindow->GetType() == WINDOW_CANCELBUTTON ) break; - pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True ); + pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true ); if ( (iButton <= iButtonStart) || (iButton > nFormEnd) ) pButtonWindow = NULL; } @@ -736,9 +736,9 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; - return sal_True; + return true; } } } @@ -761,7 +761,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) // Gruppe suchen Window* pFormularFirstWindow = NULL; Window* pLastFormularFirstWindow = NULL; - pTempWindow = ImplGetChildWindow( this, 0, iTemp, sal_False ); + pTempWindow = ImplGetChildWindow( this, 0, iTemp, false ); Window* pPrevFirstFormularFirstWindow = NULL; Window* pFirstFormularFirstWindow = pTempWindow; while ( pTempWindow ) @@ -784,7 +784,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) pLastFormularFirstWindow = pTempWindow; } - pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, sal_False ); + pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, false ); if ( !iTemp ) pTempWindow = NULL; } @@ -810,7 +810,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( pFormularFirstWindow ) { pFormularFirstWindow->ImplControlFocus(); - return sal_True; + return true; } } } @@ -846,7 +846,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->GetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = 0; - return sal_True; + return true; } else if ( pWindow ) { @@ -862,7 +862,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) nGetFocusFlags |= GETFOCUS_AROUND; } pWindow->ImplControlFocus( nGetFocusFlags ); - return sal_True; + return true; } } } @@ -888,7 +888,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { if ( pWindow != pSWindow ) pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD ); - return sal_True; + return true; } if ( nStyle & WB_GROUP ) @@ -918,7 +918,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if (isSuitableDestination(pWindow)) { pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD ); - return sal_True; + return true; } pWindow = nextLogicalChildOfParent(this, pWindow); @@ -937,7 +937,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( pSWindow == ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ) ) nGetFocusFlags |= GETFOCUS_UNIQUEMNEMONIC; pSWindow->ImplControlFocus( nGetFocusFlags ); - return sal_True; + return true; } } } @@ -949,30 +949,30 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow) ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } - ((PushButton*)pButtonWindow)->SetPressed( sal_True ); + ((PushButton*)pButtonWindow)->SetPressed( true ); mpWindowImpl->mpDlgCtrlDownWindow = pButtonWindow; } else if ( mpWindowImpl->mpDlgCtrlDownWindow == pButtonWindow ) { mpWindowImpl->mpDlgCtrlDownWindow = NULL; - ((PushButton*)pButtonWindow)->SetPressed( sal_False ); + ((PushButton*)pButtonWindow)->SetPressed( false ); ((PushButton*)pButtonWindow)->Click(); } - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- // checks if this window has dialog control -sal_Bool Window::ImplHasDlgCtrl() +bool Window::ImplHasDlgCtrl() { Window* pDlgCtrlParent; @@ -984,9 +984,9 @@ sal_Bool Window::ImplHasDlgCtrl() pDlgCtrlParent = pDlgCtrlParent->ImplGetParent(); if ( !pDlgCtrlParent || ((pDlgCtrlParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) != WB_DIALOGCONTROL) ) - return sal_False; + return false; else - return sal_True; + return true; } void Window::ImplDlgCtrlNextWindow() @@ -1023,7 +1023,7 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G // ----------------------------------------------------------------------- static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, - sal_Bool bGetFocus ) + bool bGetFocus ) { PushButton* pOldDefButton = NULL; PushButton* pNewDefButton = NULL; @@ -1040,7 +1040,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, nFormEnd = 0xFFFF; } - pSWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_False ); + pSWindow = ImplGetChildWindow( pParent, nFormStart, i, false ); while ( pSWindow ) { if ( pSWindow->ImplIsPushButton() ) @@ -1054,7 +1054,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, pNewDefButton = pPushButton; } - pSWindow = ImplGetNextWindow( pParent, i, i, sal_False ); + pSWindow = ImplGetNextWindow( pParent, i, i, false ); if ( !i || (i > nFormEnd) ) pSWindow = NULL; } @@ -1073,19 +1073,19 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, if ( pOldDefButton != pNewDefButton ) { if ( pOldDefButton ) - pOldDefButton->ImplSetDefButton( sal_False ); + pOldDefButton->ImplSetDefButton( false ); if ( pNewDefButton ) - pNewDefButton->ImplSetDefButton( sal_True ); + pNewDefButton->ImplSetDefButton( true ); } } // ----------------------------------------------------------------------- -void Window::ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus ) +void Window::ImplDlgCtrlFocusChanged( Window* pWindow, bool bGetFocus ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } @@ -1162,7 +1162,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window nAccel, nFormStart, nFormEnd, - sal_False ); + false ); } else { @@ -1174,7 +1174,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window pSWindow = ::ImplGetChildWindow( pFrameWindow, nIndex, nIndex, - sal_False ); + false ); if( pSWindow && isVisibleInLayout(pSWindow) && ! (pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); @@ -1257,7 +1257,7 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo pSWindow = ::ImplGetChildWindow( pFrameWindow, nSearchIndex, nFoundIndex, - sal_False ); + false ); if( pSWindow && isVisibleInLayout(pSWindow) && !(pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); @@ -1348,7 +1348,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const pSWindow = ::ImplGetChildWindow( pFrameWindow, nSearchIndex, nFoundIndex, - sal_False ); + false ); if( pSWindow && pSWindow->IsVisible() && ( pSWindow->GetType() == WINDOW_FIXEDLINE || pSWindow->GetType() == WINDOW_GROUPBOX ) ) @@ -1390,7 +1390,7 @@ KeyEvent Window::GetActivationKey() const nCode = KEY_POINT; else if( nAccel == '-' ) nCode = KEY_SUBTRACT; - KeyCode aKeyCode( nCode, sal_False, sal_False, sal_True, sal_False ); + KeyCode aKeyCode( nCode, false, false, true, false ); aKeyEvent = KeyEvent( nAccel, aKeyCode ); } return aKeyEvent; diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx index cb79e140e7b4..130ee3d774b9 100644 --- a/vcl/source/window/dndlcon.cxx +++ b/vcl/source/window/dndlcon.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::datatransfer::dnd; DNDListenerContainer::DNDListenerContainer( sal_Int8 nDefaultActions ) : WeakComponentImplHelper4< XDragGestureRecognizer, XDropTargetDragContext, XDropTargetDropContext, XDropTarget >(GetMutex()) { - m_bActive = sal_True; + m_bActive = true; m_nDefaultActions = nDefaultActions; } diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index a1a18dbd8254..13bca4abecd9 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -140,7 +140,7 @@ void DockingAreaWindow::StateChanged( StateChangedType nType ) // ----------------------------------------------------------------------- -sal_Bool DockingAreaWindow::IsHorizontal() const +bool DockingAreaWindow::IsHorizontal() const { return ( mpImplData->meAlign == WINDOWALIGN_TOP || mpImplData->meAlign == WINDOWALIGN_BOTTOM ); } @@ -164,7 +164,7 @@ WindowAlign DockingAreaWindow::GetAlign() const void DockingAreaWindow::Paint( const Rectangle& ) { - EnableNativeWidget( sal_True ); // only required because the toolkit curently switches this flag off + EnableNativeWidget( true ); // only required because the toolkit curently switches this flag off if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) ) { ToolbarValue aControlValue; @@ -173,7 +173,7 @@ void DockingAreaWindow::Paint( const Rectangle& ) { // give NWF a hint that this dockingarea is adjacent to the menubar // useful for special gradient effects that should cover both windows - aControlValue.mbIsTopDockingArea = sal_True; + aControlValue.mbIsTopDockingArea = true; } ControlState nState = CTRL_STATE_ENABLED; diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 6fd6295a2c7b..cb5fd3334170 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -73,7 +73,7 @@ public: virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); @@ -96,8 +96,8 @@ ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits, { SetSettings( pDockingWin->GetWindow()->GetSettings() ); Enable( pDockingWin->GetWindow()->IsEnabled(), false ); - EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), sal_False ); - AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), sal_False ); + EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), false ); + AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), false ); EnableAlwaysOnTop( pDockingWin->GetWindow()->IsAlwaysOnTopEnabled() ); SetActivateMode( pDockingWin->GetWindow()->GetActivateMode() ); } @@ -137,7 +137,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl) else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, sal_False ); + mpDockWin->EndDocking( maDockRect, false ); } else { @@ -157,7 +157,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl) if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, sal_True ); + mpDockWin->EndDocking( maDockRect, true ); } else { @@ -219,7 +219,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) if( ! mpDockWin->IsDocking() ) mpDockWin->StartDocking( aMousePos, maDockRect ); - sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); + bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { @@ -327,7 +327,7 @@ void ImplDockFloatWin2::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -sal_Bool ImplDockFloatWin2::Close() +bool ImplDockFloatWin2::Close() { return mpDockWin->Close(); } @@ -363,7 +363,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window return NULL; } -sal_Bool DockingManager::IsDockable( const Window *pWindow ) +bool DockingManager::IsDockable( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); @@ -374,22 +374,22 @@ sal_Bool DockingManager::IsDockable( const Window *pWindow ) return (pWrapper != NULL); } -sal_Bool DockingManager::IsFloating( const Window *pWindow ) +bool DockingManager::IsFloating( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) return pWrapper->IsFloatingMode(); else - return sal_False; + return false; } -sal_Bool DockingManager::IsLocked( const Window *pWindow ) +bool DockingManager::IsLocked( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsLocked() ) - return sal_True; + return true; else - return sal_False; + return false; } void DockingManager::Lock( const Window *pWindow ) @@ -406,7 +406,7 @@ void DockingManager::Unlock( const Window *pWindow ) pWrapper->Unlock(); } -void DockingManager::SetFloatingMode( const Window *pWindow, sal_Bool bFloating ) +void DockingManager::SetFloatingMode( const Window *pWindow, bool bFloating ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -428,13 +428,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ); } -sal_Bool DockingManager::IsInPopupMode( const Window *pWindow ) +bool DockingManager::IsInPopupMode( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsInPopupMode() ) - return sal_True; + return true; else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -669,9 +669,9 @@ void ImplPopupFloatWin::DrawBorder() void ImplPopupFloatWin::DrawGrip() { - sal_Bool bLinecolor = IsLineColor(); + bool bLinecolor = IsLineColor(); Color aLinecolor = GetLineColor(); - sal_Bool bFillcolor = IsFillColor(); + bool bFillcolor = IsFillColor(); Color aFillcolor = GetFillColor(); // draw background @@ -684,7 +684,7 @@ void ImplPopupFloatWin::DrawGrip() if( mbHighlight ) { Erase( aRect ); - DrawSelectionBackground( aRect, 2, sal_False, sal_True, sal_False ); + DrawSelectionBackground( aRect, 2, false, true, false ); } else { @@ -846,15 +846,15 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow ) mpDockingWindow = (Window*) pWindow; mpParent = pWindow->GetParent(); - mbDockable = sal_True; - mbLocked = sal_False; + mbDockable = true; + mbLocked = false; mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES); DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow ); if( pDockWin ) mnFloatBits = pDockWin->GetFloatStyle(); // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = sal_False; + mbStartDockingEnabled = false; } ImplDockingWindowWrapper::~ImplDockingWindowWrapper() @@ -862,23 +862,23 @@ ImplDockingWindowWrapper::~ImplDockingWindowWrapper() if ( IsFloatingMode() ) { GetWindow()->Show( false, SHOW_NOFOCUSCHANGE ); - SetFloatingMode( sal_False ); + SetFloatingMode( false ); } } // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) +bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return sal_False; + return false; if( !mbStartDockingEnabled ) - return sal_False; + return false; maMouseOff = rPos; maMouseStart = maMouseOff; - mbDocking = sal_True; + mbDocking = true; mbLastFloatMode = IsFloatingMode(); mbStartFloat = mbLastFloatMode; @@ -922,7 +922,7 @@ sal_Bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) GetWindow()->ImplGetFrameWindow()->ImplUpdateAll(); GetWindow()->StartTracking( STARTTRACK_KEYMOD ); - return sal_True; + return true; } // ======================================================================= @@ -933,13 +933,13 @@ void ImplDockingWindowWrapper::ImplInitData() //GetWindow()->mpWindowImpl->mbDockWin = sal_True; // TODO: must be eliminated mpFloatWin = NULL; - mbDockCanceled = sal_False; - mbFloatPrevented = sal_False; - mbDocking = sal_False; - mbPined = sal_False; - mbRollUp = sal_False; - mbDockBtn = sal_False; - mbHideBtn = sal_False; + mbDockCanceled = false; + mbFloatPrevented = false; + mbDocking = false; + mbPined = false; + mbRollUp = false; + mbDockBtn = false; + mbHideBtn = false; maMaxOutSize = Size( SHRT_MAX, SHRT_MAX ); } @@ -952,13 +952,13 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbDocking = sal_False; + mbDocking = false; GetWindow()->HideTracking(); if ( rTEvt.IsTrackingCanceled() ) { - mbDockCanceled = sal_True; + mbDockCanceled = true; EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); - mbDockCanceled = sal_False; + mbDockCanceled = false; } else EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); @@ -986,9 +986,9 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) aPos.X() += maMouseOff.X(); aPos.Y() += maMouseOff.Y(); - sal_Bool bFloatMode = Docking( aPos, aTrackRect ); + bool bFloatMode = Docking( aPos, aTrackRect ); - mbFloatPrevented = sal_False; + mbFloatPrevented = false; if ( mbLastFloatMode != bFloatMode ) { if ( bFloatMode ) @@ -1042,12 +1042,12 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe DockingData data( rPoint, rRect, IsFloatingMode() ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_STARTDOCKING, &data ); - mbDocking = sal_True; + mbDocking = true; } // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) +bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) { DockingData data( rPoint, rRect, IsFloatingMode() ); @@ -1058,7 +1058,7 @@ sal_Bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRec // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) +void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMode ) { Rectangle aRect( rRect ); @@ -1091,15 +1091,15 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFlo EndDockingData data( aRect, IsFloatingMode(), IsDockingCanceled() ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_ENDDOCKING, &data ); - mbDocking = sal_False; + mbDocking = false; // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = sal_False; + mbStartDockingEnabled = false; } // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() +bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() { sal_Bool bFloating = sal_True; GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_PREPARETOGGLEFLOATING, &bFloating ); @@ -1108,10 +1108,10 @@ sal_Bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::Close() +bool ImplDockingWindowWrapper::Close() { // TODO: send event - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1128,7 +1128,7 @@ void ImplDockingWindowWrapper::ToggleFloatingMode() GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_TOGGLEFLOATING ); // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = sal_False; + mbStartDockingEnabled = false; } // ----------------------------------------------------------------------- @@ -1182,7 +1182,7 @@ void ImplDockingWindowWrapper::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) +void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) { if ( mpFloatWin ) mpFloatWin->ShowTitleButton( nButton, bVisible ); @@ -1291,17 +1291,17 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd) } -sal_Bool ImplDockingWindowWrapper::IsInPopupMode() const +bool ImplDockingWindowWrapper::IsInPopupMode() const { if( GetFloatingWindow() ) return GetFloatingWindow()->IsInPopupMode(); else - return sal_False; + return false; } // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::SetFloatingMode( sal_Bool bFloatMode ) +void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) { // do nothing if window is docked and locked if( !IsFloatingMode() && IsLocked() ) @@ -1311,7 +1311,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( sal_Bool bFloatMode ) { if ( PrepareToggleFloatingMode() ) { - sal_Bool bVisible = GetWindow()->IsVisible(); + bool bVisible = GetWindow()->IsVisible(); if ( bFloatMode ) { @@ -1478,7 +1478,7 @@ void ImplDockingWindowWrapper::SetMaxOutputSizePixel( const Size& rSize ) maMaxOutSize = rSize; } -sal_Bool ImplDockingWindowWrapper::IsFloatingMode() const +bool ImplDockingWindowWrapper::IsFloatingMode() const { return (mpFloatWin != NULL); } @@ -1496,7 +1496,7 @@ Rectangle ImplDockingWindowWrapper::GetDragArea() const void ImplDockingWindowWrapper::Lock() { - mbLocked = sal_True; + mbLocked = true; // only toolbars support locking ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() ); if( pToolBox ) @@ -1505,14 +1505,14 @@ void ImplDockingWindowWrapper::Lock() void ImplDockingWindowWrapper::Unlock() { - mbLocked = sal_False; + mbLocked = false; // only toolbars support locking ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() ); if( pToolBox ) pToolBox->Lock( mbLocked ); } -sal_Bool ImplDockingWindowWrapper::IsLocked() const +bool ImplDockingWindowWrapper::IsLocked() const { return mbLocked; } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 4d852f7c86c4..3346751b751c 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -90,7 +90,7 @@ public: virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); sal_uLong GetLastTicks() const { return mnLastTicks; } }; @@ -109,8 +109,8 @@ ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits, { SetSettings( pDockingWin->GetSettings() ); Enable( pDockingWin->IsEnabled(), false ); - EnableInput( pDockingWin->IsInputEnabled(), sal_False ); - AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), sal_False ); + EnableInput( pDockingWin->IsInputEnabled(), false ); + AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), false ); EnableAlwaysOnTop( pDockingWin->IsAlwaysOnTopEnabled() ); SetActivateMode( pDockingWin->GetActivateMode() ); } @@ -180,7 +180,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) // mouse pos also in screen pixels Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos ); - sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); + bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW ); @@ -271,21 +271,21 @@ void ImplDockFloatWin::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -sal_Bool ImplDockFloatWin::Close() +bool ImplDockFloatWin::Close() { return mpDockWin->Close(); } // ======================================================================= -sal_Bool DockingWindow::ImplStartDocking( const Point& rPos ) +bool DockingWindow::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return sal_False; + return false; maMouseOff = rPos; maMouseStart = maMouseOff; - mbDocking = sal_True; + mbDocking = true; mbLastFloatMode = IsFloatingMode(); mbStartFloat = mbLastFloatMode; @@ -318,17 +318,17 @@ sal_Bool DockingWindow::ImplStartDocking( const Point& rPos ) if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_DOCKING && !( mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) ) // no full drag when migrating to system window - mbDragFull = sal_True; + mbDragFull = true; else { StartDocking(); - mbDragFull = sal_False; + mbDragFull = false; ImplUpdateAll(); ImplGetFrameWindow()->ImplUpdateAll(); } StartTracking( STARTTRACK_KEYMOD ); - return sal_True; + return true; } // ======================================================================= @@ -339,14 +339,14 @@ void DockingWindow::ImplInitDockingWindowData() mpWindowImpl->mbDockWin = true; mpFloatWin = NULL; - mbDockCanceled = sal_False; - mbDockPrevented = sal_False; - mbFloatPrevented = sal_False; - mbDocking = sal_False; - mbPined = sal_False; - mbRollUp = sal_False; - mbDockBtn = sal_False; - mbHideBtn = sal_False; + mbDockCanceled = false; + mbDockPrevented = false; + mbFloatPrevented = false; + mbDocking = false; + mbPined = false; + mbRollUp = false; + mbDockBtn = false; + mbHideBtn = false; } // ----------------------------------------------------------------------- @@ -424,8 +424,8 @@ void DockingWindow::ImplLoadRes( const ResId& rResId ) if ( nMask & RSC_DOCKINGWINDOW_FLOATING ) { - if ( (sal_Bool)ReadShortRes() ) - SetFloatingMode( sal_True ); + if ( ReadShortRes() != 0 ) + SetFloatingMode( true ); } } @@ -468,7 +468,7 @@ DockingWindow::~DockingWindow() if ( IsFloatingMode() ) { Show( false, SHOW_NOFOCUSCHANGE ); - SetFloatingMode( sal_False ); + SetFloatingMode( false ); } delete mpImplData; } @@ -484,7 +484,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbDocking = sal_False; + mbDocking = false; if ( mbDragFull ) { // Bei Abbruch alten Zustand wieder herstellen @@ -500,9 +500,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) HideTracking(); if ( rTEvt.IsTrackingCanceled() ) { - mbDockCanceled = sal_True; + mbDockCanceled = true; EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); - mbDockCanceled = sal_False; + mbDockCanceled = false; } else EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); @@ -532,9 +532,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) aFramePos.Y() += maMouseOff.Y(); if ( mbDragFull ) StartDocking(); - sal_Bool bFloatMode = Docking( aFramePos, aTrackRect ); - mbDockPrevented = sal_False; - mbFloatPrevented = sal_False; + bool bFloatMode = Docking( aFramePos, aTrackRect ); + mbDockPrevented = false; + mbFloatPrevented = false; if ( mbLastFloatMode != bFloatMode ) { if ( bFloatMode ) @@ -653,12 +653,12 @@ bool DockingWindow::Notify( NotifyEvent& rNEvt ) void DockingWindow::StartDocking() { - mbDocking = sal_True; + mbDocking = true; } // ----------------------------------------------------------------------- -sal_Bool DockingWindow::Docking( const Point&, Rectangle& ) +bool DockingWindow::Docking( const Point&, Rectangle& ) { return IsFloatingMode(); } @@ -670,7 +670,7 @@ void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) if ( !IsDockingCanceled() ) { bool bShow = false; - if ( bFloatMode != IsFloatingMode() ) + if ( bool(bFloatMode) != IsFloatingMode() ) { Show( false, SHOW_NOFOCUSCHANGE ); SetFloatingMode( bFloatMode ); @@ -688,32 +688,32 @@ void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) if ( bShow ) Show(); } - mbDocking = sal_False; + mbDocking = false; } // ----------------------------------------------------------------------- -sal_Bool DockingWindow::PrepareToggleFloatingMode() +bool DockingWindow::PrepareToggleFloatingMode() { - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool DockingWindow::Close() +bool DockingWindow::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDead() ) - return sal_False; + return false; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return sal_False; + return false; Show( false, SHOW_NOFOCUSCHANGE ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -790,7 +790,7 @@ void DockingWindow::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -void DockingWindow::SetFloatingMode( sal_Bool bFloatMode ) +void DockingWindow::SetFloatingMode( bool bFloatMode ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) @@ -802,7 +802,7 @@ void DockingWindow::SetFloatingMode( sal_Bool bFloatMode ) { if ( PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed { - sal_Bool bVisible = IsVisible(); + bool bVisible = IsVisible(); if ( bFloatMode ) { @@ -1053,7 +1053,7 @@ Point DockingWindow::GetFloatingPos() const return maFloatPos; } -sal_Bool DockingWindow::IsFloatingMode() const +bool DockingWindow::IsFloatingMode() const { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index c91cfea9a3a4..8aa30f8bf7fc 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -67,8 +67,8 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) mpImplData = new ImplData; mpWindowImpl->mbFloatWin = true; - mbInCleanUp = sal_False; - mbGrabFocus = sal_False; + mbInCleanUp = false; + mbGrabFocus = false; DBG_ASSERT( pParent, "FloatWindow::FloatingWindow(): - pParent == NULL!" ); @@ -116,7 +116,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL ); pBorderWin->mpWindowImpl->mpClientWindow = this; pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); - pBorderWin->SetDisplayActive( sal_True ); + pBorderWin->SetDisplayActive( true ); mpWindowImpl->mpBorderWindow = pBorderWin; mpWindowImpl->mpRealParent = pParent; } @@ -129,11 +129,11 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE; mnOldTitle = mnTitle; mnPopupModeFlags = 0; - mbInPopupMode = sal_False; - mbPopupMode = sal_False; - mbPopupModeCanceled = sal_False; - mbPopupModeTearOff = sal_False; - mbMouseDown = sal_False; + mbInPopupMode = false; + mbPopupMode = false; + mbPopupModeCanceled = false; + mbPopupModeTearOff = false; + mbMouseDown = false; ImplInitSettings(); } @@ -253,7 +253,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, Rectangle normRect( rRect ); // rRect is already relative to top-level window normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) ); - sal_Bool bRTL = Application::GetSettings().GetLayoutRTL(); + bool bRTL = Application::GetSettings().GetLayoutRTL(); Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ), pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) ); @@ -526,20 +526,20 @@ FloatingWindow* FloatingWindow::ImplFindLastLevelFloat() // ----------------------------------------------------------------------- -sal_Bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) +bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) { FloatingWindow* pWin = this; do { if ( pWin->mpFirstPopupModeWin == pWindow ) - return sal_True; + return true; pWin = pWin->mpNextFloat; } while ( pWin ); - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -548,7 +548,7 @@ IMPL_LINK_NOARG(FloatingWindow, ImplEndPopupModeHdl) { mnPostId = 0; mnPopupModeFlags = 0; - mbPopupMode = sal_False; + mbPopupMode = false; PopupModeEnd(); return 0; } @@ -610,7 +610,7 @@ void FloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) void FloatingWindow::ImplCallPopupModeEnd() { // PopupMode wurde beendet - mbInPopupMode = sal_False; + mbInPopupMode = false; // Handler asyncron rufen if ( !mnPostId ) @@ -708,11 +708,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) maFloatRect.Right() += 2; maFloatRect.Bottom() += 2; mnPopupModeFlags = nFlags; - mbInPopupMode = sal_True; - mbPopupMode = sal_True; - mbPopupModeCanceled = sal_False; - mbPopupModeTearOff = sal_False; - mbMouseDown = sal_False; + mbInPopupMode = true; + mbPopupMode = true; + mbPopupModeCanceled = false; + mbPopupModeTearOff = false; + mbMouseDown = false; mbOldSaveBackMode = IsSaveBackgroundEnabled(); EnableSaveBackground(); @@ -724,7 +724,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) if( nFlags & FLOATWIN_POPUPMODE_GRABFOCUS ) { // force key input even without focus (useful for menus) - mbGrabFocus = sal_True; + mbGrabFocus = true; } Show( true, SHOW_NOACTIVATE ); } @@ -739,7 +739,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, sal_uLong nFlags ) return; mpImplData->mpBox = pBox; - pBox->ImplFloatControl( sal_True, this ); + pBox->ImplFloatControl( true, this ); // retrieve some data from the ToolBox Rectangle aRect = pBox->GetItemRect( nItemId ); @@ -785,7 +785,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) ImplSVData* pSVData = ImplGetSVData(); - mbInCleanUp = sal_True; // prevent killing this window due to focus change while working with it + mbInCleanUp = true; // prevent killing this window due to focus change while working with it // Bei allen nachfolgenden PopupMode-Fenster den Modus auch beenden while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this ) @@ -810,13 +810,13 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) else if ( pSVData->maWinData.mpFocusWin && pSVData->maWinData.mpFirstFloat && ImplIsWindowOrChild( pSVData->maWinData.mpFocusWin ) ) pSVData->maWinData.mpFirstFloat->GrabFocus(); - mbPopupModeTearOff = sal_False; + mbPopupModeTearOff = false; } else { - mbPopupModeTearOff = sal_True; + mbPopupModeTearOff = true; if ( nFocusId ) - Window::EndSaveFocus( nFocusId, sal_False ); + Window::EndSaveFocus( nFocusId, false ); } EnableSaveBackground( mbOldSaveBackMode ); @@ -828,7 +828,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) // ToolBox wieder auf normal schalten if ( mpImplData->mpBox ) { - mpImplData->mpBox->ImplFloatControl( sal_False, this ); + mpImplData->mpBox->ImplFloatControl( false, this ); mpImplData->mpBox = NULL; } @@ -849,7 +849,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) } } - mbInCleanUp = sal_False; + mbInCleanUp = false; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index bf0f1911be44..e4b1998d445f 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -123,11 +123,11 @@ struct MenuItemData sal_uLong nUserValue; // User value Image aImage; // Image KeyCode aAccelKey; // Accelerator-Key - sal_Bool bChecked; // Checked - sal_Bool bEnabled; // Enabled - sal_Bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) + bool bChecked; // Checked + bool bEnabled; // Enabled + bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) bool bIsTemporary; // Temporary inserted ('No selection possible') - sal_Bool bMirrorMode; + bool bMirrorMode; long nItemImageAngle; Size aSz; // only temporarily valid OUString aAccessibleName; // accessible name @@ -267,11 +267,11 @@ MenuItemData* MenuItemList::Insert( pData->pSubMenu = NULL; pData->pAutoSubMenu = NULL; pData->nUserValue = 0; - pData->bChecked = sal_False; - pData->bEnabled = sal_True; - pData->bVisible = sal_True; + pData->bChecked = false; + pData->bEnabled = true; + pData->bVisible = true; pData->bIsTemporary = false; - pData->bMirrorMode = sal_False; + pData->bMirrorMode = false; pData->nItemImageAngle = 0; SalItemParams aSalMIData; @@ -303,11 +303,11 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos) pData->pSubMenu = NULL; pData->pAutoSubMenu = NULL; pData->nUserValue = 0; - pData->bChecked = sal_False; - pData->bEnabled = sal_True; - pData->bVisible = sal_True; + pData->bChecked = false; + pData->bEnabled = true; + pData->bVisible = true; pData->bIsTemporary = false; - pData->bMirrorMode = sal_False; + pData->bMirrorMode = false; pData->nItemImageAngle = 0; SalItemParams aSalMIData; @@ -502,9 +502,9 @@ private: sal_uInt16 nPosInParent; bool bInExecute; - sal_Bool bScrollMenu; - sal_Bool bScrollUp; - sal_Bool bScrollDown; + bool bScrollMenu; + bool bScrollUp; + bool bScrollDown; bool bIgnoreFirstMove; bool bKeyInput; @@ -517,14 +517,14 @@ private: void StateChanged( StateChangedType nType ); void DataChanged( const DataChangedEvent& rDCEvt ); protected: - Region ImplCalcClipRegion( sal_Bool bIncludeLogo = sal_True ) const; + Region ImplCalcClipRegion( bool bIncludeLogo = true ) const; void ImplInitClipRegion(); - void ImplDrawScroller( sal_Bool bUp ); + void ImplDrawScroller( bool bUp ); using Window::ImplScroll; void ImplScroll( const Point& rMousePos ); - void ImplScroll( sal_Bool bUp ); - void ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd = sal_False ); - void ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown ); + void ImplScroll( bool bUp ); + void ImplCursorUpDown( bool bUp, bool bHomeEnd = false ); + void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown ); long ImplGetStartY() const; Rectangle ImplGetItemRect( sal_uInt16 nPos ); @@ -546,8 +546,8 @@ public: void SetFocusId( sal_uLong nId ) { nSaveFocusId = nId; } sal_uLong GetFocusId() const { return nSaveFocusId; } - void EnableScrollMenu( sal_Bool b ); - sal_Bool IsScrollMenu() const { return bScrollMenu; } + void EnableScrollMenu( bool b ); + bool IsScrollMenu() const { return bScrollMenu; } sal_uInt16 GetScrollerHeight() const { return nScrollerHeight; } void Execute(); @@ -558,8 +558,8 @@ public: PopupMenu* GetActivePopup() const { return pActivePopup; } void KillActivePopup( PopupMenu* pThisOnly = NULL ); - void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ); - void ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer ); + void HighlightItem( sal_uInt16 nPos, bool bHighlight ); + void ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTimer ); sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } void SetPosInParent( sal_uInt16 nPos ) { nPosInParent = nPos; } @@ -704,7 +704,7 @@ private: sal_uInt16 nHighlightedItem; sal_uInt16 nRolloveredItem; sal_uLong nSaveFocusId; - sal_Bool mbAutoPopup; + bool mbAutoPopup; bool bIgnoreFirstMove; bool bStayActive; @@ -714,12 +714,12 @@ private: std::map< sal_uInt16, AddButtonEntry > m_aAddButtons; - void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ); - void ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectPopupEntry, sal_Bool bAllowRestoreFocus = sal_True, sal_Bool bDefaultToDocument = sal_True ); + void HighlightItem( sal_uInt16 nPos, bool bHighlight ); + void ChangeHighlightItem( sal_uInt16 n, bool bSelectPopupEntry, bool bAllowRestoreFocus = true, bool bDefaultToDocument = true ); sal_uInt16 ImplFindEntry( const Point& rMousePos ) const; - void ImplCreatePopup( sal_Bool bPreSelectFirst ); - sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu = sal_True ); + void ImplCreatePopup( bool bPreSelectFirst ); + bool ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu = true ); Rectangle ImplGetItemRect( sal_uInt16 nPos ); void ImplInitStyleSettings(); @@ -739,7 +739,7 @@ public: MenuBarWindow( Window* pParent ); ~MenuBarWindow(); - void ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ); + void ShowButtons( bool bClose, bool bFloat, bool bHide ); virtual void MouseMove( const MouseEvent& rMEvt ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -759,7 +759,7 @@ public: sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - void SetAutoPopup( sal_Bool bAuto ) { mbAutoPopup = bAuto; } + void SetAutoPopup( bool bAuto ) { mbAutoPopup = bAuto; } void ImplLayoutChanged(); Size MinCloseButtonSize(); @@ -916,13 +916,13 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) Menu::Menu() { - bIsMenuBar = sal_False; + bIsMenuBar = false; ImplInit(); } // this constructor makes sure we're creating the native menu // with the correct type (ie, MenuBar vs. PopupMenu) -Menu::Menu( sal_Bool bMenubar ) +Menu::Menu( bool bMenubar ) { bIsMenuBar = bMenubar; ImplInit(); @@ -964,7 +964,7 @@ Menu::~Menu() pDelData = pDelData->mpNext; } - bKilled = sal_True; + bKilled = true; delete pItemList; delete pLogo; @@ -987,9 +987,9 @@ void Menu::ImplInit() pStartedFrom = NULL; pWindow = NULL; nEventId = 0; - bCanceled = sal_False; - bInCallback = sal_False; - bKilled = sal_False; + bCanceled = false; + bInCallback = false; + bKilled = false; mpLayoutData = NULL; mpFirstDel = NULL; // Dtor notification list // Native-support: returns NULL if not supported @@ -1049,7 +1049,7 @@ void Menu::CreateAutoMnemonics() void Menu::Activate() { - bInCallback = sal_True; + bInCallback = true; ImplMenuDelData aDelData( this ); @@ -1064,14 +1064,14 @@ void Menu::Activate() Menu* pStartMenu = ImplGetStartMenu(); if ( pStartMenu && ( pStartMenu != this ) ) { - pStartMenu->bInCallback = sal_True; + pStartMenu->bInCallback = true; // MT 11/01: Call EventListener here? I don't know... pStartMenu->aActivateHdl.Call( this ); - pStartMenu->bInCallback = sal_False; + pStartMenu->bInCallback = false; } } } - bInCallback = sal_False; + bInCallback = false; } } @@ -1084,7 +1084,7 @@ void Menu::Deactivate() pItemList->Remove( n ); } - bInCallback = sal_True; + bInCallback = true; ImplMenuDelData aDelData( this ); @@ -1099,9 +1099,9 @@ void Menu::Deactivate() { if ( pStartMenu && ( pStartMenu != this ) ) { - pStartMenu->bInCallback = sal_True; + pStartMenu->bInCallback = true; pStartMenu->aDeactivateHdl.Call( this ); - pStartMenu->bInCallback = sal_False; + pStartMenu->bInCallback = false; } } } @@ -1109,7 +1109,7 @@ void Menu::Deactivate() if( !aDelData.isDeleted() ) { - bInCallback = sal_False; + bInCallback = false; } } @@ -1130,11 +1130,11 @@ void Menu::ImplSelect() MenuItemData* pData = GetItemList()->GetData( nSelectedId ); if ( pData && (pData->nBits & MIB_AUTOCHECK) ) { - sal_Bool bChecked = IsItemChecked( nSelectedId ); + bool bChecked = IsItemChecked( nSelectedId ); if ( pData->nBits & MIB_RADIOCHECK ) { if ( !bChecked ) - CheckItem( nSelectedId, sal_True ); + CheckItem( nSelectedId, true ); } else CheckItem( nSelectedId, !bChecked ); @@ -1278,9 +1278,9 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) GetRes( rResId.SetRT( RSC_MENUITEM ) ); nObjMask = ReadLongRes(); - sal_Bool bSep = sal_False; + bool bSep = false; if ( nObjMask & RSC_MENUITEM_SEPARATOR ) - bSep = (sal_Bool)ReadShortRes(); + bSep = ReadShortRes() != 0; sal_uInt16 nItemId = 1; if ( nObjMask & RSC_MENUITEM_ID ) @@ -1340,12 +1340,12 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) if( nObjMask & RSC_MENUITEM_CHECKED ) { if ( !bSep ) - CheckItem( nItemId, (sal_Bool)ReadShortRes() ); + CheckItem( nItemId, ReadShortRes() != 0 ); } if ( nObjMask & RSC_MENUITEM_DISABLE ) { if ( !bSep ) - EnableItem( nItemId, !(sal_Bool)ReadShortRes() ); + EnableItem( nItemId, ReadShortRes() == 0 ); } if ( nObjMask & RSC_MENUITEM_COMMAND ) { @@ -1450,9 +1450,9 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 n pThis->InsertItem( nId, pData->aImage, pData->nBits, pData->sIdent, nNewPos ); if ( rMenu.IsItemChecked( nId ) ) - pThis->CheckItem( nId, sal_True ); + pThis->CheckItem( nId, true ); if ( !rMenu.IsItemEnabled( nId ) ) - pThis->EnableItem( nId, sal_False ); + pThis->EnableItem( nId, false ); pThis->SetHelpId( nId, pData->aHelpId ); pThis->SetHelpText( nId, pData->aHelpText ); pThis->SetAccelKey( nId, pData->aAccelKey ); @@ -1594,14 +1594,14 @@ OUString Menu::GetItemAccKeyStrFromPos(sal_uInt16 nPos) const return OUString(); } -sal_Bool Menu::IsTemporaryItemFromPos(sal_uInt16 nPos ) const +bool Menu::IsTemporaryItemFromPos(sal_uInt16 nPos ) const { MenuItemData* pData = pItemList->GetDataFromPos( nPos ); if (pData) { return pData->bIsTemporary; } - return sal_False; + return false; } sal_uInt16 Menu::GetCurItemId() const @@ -1745,7 +1745,7 @@ KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const return aRet; } -void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) +void Menu::CheckItem( sal_uInt16 nItemId, bool bCheck ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -1760,7 +1760,7 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) MenuItemData* pGroupData; sal_uInt16 nGroupPos; sal_uInt16 nItemCount = GetItemCount(); - sal_Bool bFound = sal_False; + bool bFound = false; nGroupPos = nPos; while ( nGroupPos ) @@ -1770,8 +1770,8 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) { if ( IsItemChecked( pGroupData->nId ) ) { - CheckItem( pGroupData->nId, sal_False ); - bFound = sal_True; + CheckItem( pGroupData->nId, false ); + bFound = true; break; } } @@ -1790,7 +1790,7 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) { if ( IsItemChecked( pGroupData->nId ) ) { - CheckItem( pGroupData->nId, sal_False ); + CheckItem( pGroupData->nId, false ); break; } } @@ -1810,18 +1810,18 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) ImplCallEventListeners( bCheck ? VCLEVENT_MENU_ITEMCHECKED : VCLEVENT_MENU_ITEMUNCHECKED, nPos ); } -sal_Bool Menu::IsItemChecked( sal_uInt16 nItemId ) const +bool Menu::IsItemChecked( sal_uInt16 nItemId ) const { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) - return sal_False; + return false; return pData->bChecked; } -void Menu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) +void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable ) { size_t nPos; MenuItemData* pItemData = pItemList->GetData( nItemId, nPos ); @@ -1855,18 +1855,18 @@ void Menu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) } } -sal_Bool Menu::IsItemEnabled( sal_uInt16 nItemId ) const +bool Menu::IsItemEnabled( sal_uInt16 nItemId ) const { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) - return sal_False; + return false; return pData->bEnabled; } -void Menu::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible ) +void Menu::ShowItem( sal_uInt16 nItemId, bool bVisible ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -1981,7 +1981,7 @@ static inline Image ImplMirrorImage( const Image& rImage ) return Image( aBmpEx ); } -void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ) +void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -2143,19 +2143,19 @@ Menu& Menu::operator=( const Menu& rMenu ) return *this; } -sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const +bool Menu::ImplIsVisible( sal_uInt16 nPos ) const { - sal_Bool bVisible = sal_True; + bool bVisible = true; MenuItemData* pData = pItemList->GetDataFromPos( nPos ); // check general visibility first if( pData && !pData->bVisible ) - bVisible = sal_False; + bVisible = false; if ( bVisible && pData && pData->eType == MENUITEM_SEPARATOR ) { if( nPos == 0 ) // no separator should be shown at the very beginning - bVisible = sal_False; + bVisible = false; else { // always avoid adjacent separators @@ -2173,10 +2173,10 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const } } if( n == nCount ) // no next visible item - bVisible = sal_False; + bVisible = false; // check for separator if( pNextData && pNextData->bVisible && pNextData->eType == MENUITEM_SEPARATOR ) - bVisible = sal_False; + bVisible = false; if( bVisible ) { @@ -2190,7 +2190,7 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const } } if( n == 0 ) // no previous visible item - bVisible = sal_False; + bVisible = false; } } } @@ -2201,7 +2201,7 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const !( nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ) ) { if( !pData ) // e.g. nPos == ITEMPOS_INVALID - bVisible = sal_False; + bVisible = false; else if ( pData->eType != MENUITEM_SEPARATOR ) // separators handled above { // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( sal_True ) ); @@ -2212,24 +2212,24 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const return bVisible; } -sal_Bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const +bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const { return IsMenuVisible() && ImplIsVisible( nItemPos ); } -sal_Bool Menu::IsMenuVisible() const +bool Menu::IsMenuVisible() const { return pWindow && pWindow->IsReallyVisible(); } -sal_Bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const +bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const { - sal_Bool bSelectable = sal_True; + bool bSelectable = true; MenuItemData* pData = pItemList->GetDataFromPos( nPos ); // check general visibility first if ( pData && ( pData->nBits & MIB_NOSELECT ) ) - bSelectable = sal_False; + bSelectable = false; return bSelectable; } @@ -2327,7 +2327,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize( const Window* pWin, long& rCheckHeigh return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight)); } -sal_Bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const +bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const { ImplControlValue aVal; Rectangle aNativeBounds; @@ -2352,10 +2352,10 @@ sal_Bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, lo rArrowSize = aSize; rArrowSpacing = aNativeBounds.GetWidth() - aNativeContent.GetWidth(); - return sal_True; + return true; } } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -2601,7 +2601,7 @@ Size Menu::ImplCalcSize( const Window* pWin ) static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) { - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -2619,7 +2619,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec { const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings(); Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() ); - i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor ); + i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, true, false, 2, NULL, &aColor ); } } @@ -2643,7 +2643,7 @@ static OUString getShortenedString( const OUString& i_rLong, Window* i_pWin, lon return aNonMnem; } -void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, sal_Bool bHighlighted, bool bLayout, bool bRollover ) const +void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, bool bHighlighted, bool bLayout, bool bRollover ) const { // for symbols: nFontHeight x nFontHeight long nFontHeight = pWin->GetTextHeight(); @@ -3065,7 +3065,7 @@ Menu* Menu::ImplFindMenu( sal_uInt16 nItemId ) return pSelMenu; } -void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPopups ) +void Menu::RemoveDisabledEntries( bool bCheckPopups, bool bRemoveEmptyPopups ) { for ( sal_uInt16 n = 0; n < GetItemCount(); n++ ) { @@ -3081,7 +3081,7 @@ void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPo if ( bCheckPopups && pItem->pSubMenu ) { - pItem->pSubMenu->RemoveDisabledEntries( sal_True ); + pItem->pSubMenu->RemoveDisabledEntries( true ); if ( bRemoveEmptyPopups && !pItem->pSubMenu->GetItemCount() ) bRemove = true; } @@ -3100,9 +3100,9 @@ void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPo delete mpLayoutData, mpLayoutData = NULL; } -sal_Bool Menu::HasValidEntries( sal_Bool bCheckPopups ) +bool Menu::HasValidEntries( bool bCheckPopups ) { - sal_Bool bValidEntries = sal_False; + bool bValidEntries = false; sal_uInt16 nCount = GetItemCount(); for ( sal_uInt16 n = 0; !bValidEntries && ( n < nCount ); n++ ) { @@ -3110,9 +3110,9 @@ sal_Bool Menu::HasValidEntries( sal_Bool bCheckPopups ) if ( pItem->bEnabled && ( pItem->eType != MENUITEM_SEPARATOR ) ) { if ( bCheckPopups && pItem->pSubMenu ) - bValidEntries = pItem->pSubMenu->HasValidEntries( sal_True ); + bValidEntries = pItem->pSubMenu->HasValidEntries( true ); else - bValidEntries = sal_True; + bValidEntries = true; } } return bValidEntries; @@ -3130,12 +3130,12 @@ void Menu::ImplFillLayoutData() const mpLayoutData = new MenuLayoutData(); if( bIsMenuBar ) { - ImplPaint( pWindow, 0, 0, 0, sal_False, true ); + ImplPaint( pWindow, 0, 0, 0, false, true ); } else { MenuFloatingWindow* pFloat = (MenuFloatingWindow*)pWindow; - ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, sal_False, true ); + ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, false, true ); } } } @@ -3228,16 +3228,16 @@ void Menu::ImplSetSalMenu( SalMenu *pSalMenu ) mpSalMenu = pSalMenu; } -sal_Bool Menu::GetSystemMenuData( SystemMenuData* pData ) const +bool Menu::GetSystemMenuData( SystemMenuData* pData ) const { Menu* pMenu = (Menu*)this; if( pData && pMenu->ImplGetSalMenu() ) { pMenu->ImplGetSalMenu()->GetSystemMenuData( pData ); - return sal_True; + return true; } else - return sal_False; + return false; } bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const @@ -3262,12 +3262,12 @@ void Menu::HighlightItem( sal_uInt16 nItemPos ) if ( bIsMenuBar ) { MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow ); - pMenuWin->SetAutoPopup( sal_False ); - pMenuWin->ChangeHighlightItem( nItemPos, sal_False ); + pMenuWin->SetAutoPopup( false ); + pMenuWin->ChangeHighlightItem( nItemPos, false ); } else { - static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, sal_False ); + static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, false ); } } } @@ -3277,35 +3277,35 @@ void Menu::HighlightItem( sal_uInt16 nItemPos ) // - MenuBar - // ----------- -MenuBar::MenuBar() : Menu( sal_True ) +MenuBar::MenuBar() : Menu( true ) { - mbDisplayable = sal_True; - mbCloserVisible = sal_False; - mbFloatBtnVisible = sal_False; - mbHideBtnVisible = sal_False; + mbDisplayable = true; + mbCloserVisible = false; + mbFloatBtnVisible = false; + mbHideBtnVisible = false; } -MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( sal_True ) +MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( true ) { - mbDisplayable = sal_True; - mbCloserVisible = sal_False; - mbFloatBtnVisible = sal_False; - mbHideBtnVisible = sal_False; + mbDisplayable = true; + mbCloserVisible = false; + mbFloatBtnVisible = false; + mbHideBtnVisible = false; *this = rMenu; - bIsMenuBar = sal_True; + bIsMenuBar = true; } MenuBar::~MenuBar() { - ImplDestroy( this, sal_True ); + ImplDestroy( this, true ); } -void MenuBar::ShowCloser( sal_Bool bShow ) +void MenuBar::ShowCloser( bool bShow ) { ShowButtons( bShow, mbFloatBtnVisible, mbHideBtnVisible ); } -void MenuBar::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) +void MenuBar::ShowButtons( bool bClose, bool bFloat, bool bHide ) { if ( (bClose != mbCloserVisible) || (bFloat != mbFloatBtnVisible) || @@ -3319,7 +3319,7 @@ void MenuBar::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) } } -void MenuBar::SetDisplayable( sal_Bool bDisplayable ) +void MenuBar::SetDisplayable( bool bDisplayable ) { if( bDisplayable != mbDisplayable ) { @@ -3350,7 +3350,7 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu ) return pWindow; } -void MenuBar::ImplDestroy( MenuBar* pMenu, sal_Bool bDelete ) +void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete ) { MenuBarWindow* pWindow = (MenuBarWindow*) pMenu->ImplGetWindow(); if ( pWindow && bDelete ) @@ -3361,9 +3361,9 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, sal_Bool bDelete ) pMenu->pWindow = NULL; } -sal_Bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu ) +bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) { - sal_Bool bDone = sal_False; + bool bDone = false; // No keyboard processing when system handles the menu or our menubar is invisible if( !IsDisplayable() || @@ -3389,14 +3389,14 @@ void MenuBar::SelectEntry( sal_uInt16 nId ) nId = GetItemPos( nId ); // #99705# popup the selected menu - pMenuWin->SetAutoPopup( sal_True ); + pMenuWin->SetAutoPopup( true ); if( ITEMPOS_INVALID != pMenuWin->nHighlightedItem ) { pMenuWin->KillActivePopup(); - pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, false ); } if( nId != ITEMPOS_INVALID ) - pMenuWin->ChangeHighlightItem( nId, sal_False ); + pMenuWin->ChangeHighlightItem( nId, false ); } } @@ -3404,38 +3404,38 @@ void MenuBar::SelectEntry( sal_uInt16 nId ) // handler for native menu selection and command events -sal_Bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const +bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const { if( pMenu ) { ImplMenuDelData aDelData( this ); pMenu->pStartedFrom = (Menu*)this; - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Activate(); if( !aDelData.isDeleted() ) - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; } - return sal_True; + return true; } -sal_Bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const +bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const { if( pMenu ) { ImplMenuDelData aDelData( this ); pMenu->pStartedFrom = (Menu*)this; - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Deactivate(); if( !aDelData.isDeleted() ) - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; } - return sal_True; + return true; } -sal_Bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventId ) const +bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventId ) const { if( !pMenu ) pMenu = ((Menu*) this)->ImplFindMenu( nHighlightEventId ); @@ -3453,13 +3453,13 @@ sal_Bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEv pMenu->pStartedFrom = (Menu*)this; pMenu->ImplCallHighlight( pMenu->mnHighlightedItemPos ); } - return sal_True; + return true; } else - return sal_False; + return false; } -sal_Bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const +bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const { if( !pMenu ) pMenu = ((Menu*) this)->ImplFindMenu( nCommandEventId ); @@ -3468,10 +3468,10 @@ sal_Bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventI pMenu->nSelectedId = nCommandEventId; pMenu->pStartedFrom = (Menu*)this; pMenu->ImplSelect(); - return sal_True; + return true; } else - return sal_False; + return false; } sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const OUString& i_rToolTip, sal_uInt16 i_nPos ) @@ -3496,7 +3496,7 @@ void MenuBar::RemoveMenuBarButton( sal_uInt16 nId ) static_cast<MenuBarWindow*>(pWindow)->RemoveMenuBarButton( nId ); } -sal_Bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) const +bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) const { return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId ); } @@ -3528,7 +3528,7 @@ PopupMenu::~PopupMenu() *pRefAutoSubMenu = NULL; // #111060# avoid second delete in ~MenuItemData } -sal_Bool PopupMenu::IsInExecute() +bool PopupMenu::IsInExecute() { return GetActivePopupMenu() ? sal_True : sal_False; } @@ -3554,7 +3554,7 @@ void PopupMenu::SelectEntry( sal_uInt16 nId ) size_t nPos = 0; MenuItemData* pData = GetItemList()->GetData( nId, nPos ); if ( pData->pSubMenu ) - ImplGetFloatingWindow()->ChangeHighlightItem( nPos, sal_True ); + ImplGetFloatingWindow()->ChangeHighlightItem( nPos, true ); else ImplGetFloatingWindow()->EndExecute( nId ); } @@ -3571,7 +3571,7 @@ void PopupMenu::SelectEntry( sal_uInt16 nId ) pFloat->KillActivePopup(); } } - pFloat->ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + pFloat->ChangeHighlightItem( ITEMPOS_INVALID, false ); } } } @@ -3608,10 +3608,10 @@ sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, sal_ if (nFlags & POPUPMENU_NOHORZ_PLACEMENT) nPopupModeFlags |= FLOATWIN_POPUPMODE_NOHORZPLACEMENT; - return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, sal_False ); + return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, false ); } -sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nPopupModeFlags, Menu* pSFrom, sal_Bool bPreSelectFirst ) +sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) { if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -3622,13 +3622,13 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong pStartedFrom = pSFrom; nSelectedId = 0; - bCanceled = sal_False; + bCanceled = false; sal_uLong nFocusId = 0; bool bRealExecute = false; if ( !pStartedFrom ) { - pSVData->maWinData.mbNoDeactivate = sal_True; + pSVData->maWinData.mbNoDeactivate = true; nFocusId = Window::SaveFocus(); bRealExecute = true; } @@ -3657,9 +3657,9 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong ImplDelData aDelData; pW->ImplAddDel( &aDelData ); - bInCallback = sal_True; // set it here, if Activate overloaded + bInCallback = true; // set it here, if Activate overloaded Activate(); - bInCallback = sal_False; + bInCallback = false; if ( aDelData.IsDead() ) return 0; // Error @@ -3753,7 +3753,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nMaxHeight -= nTop+nBottom; if ( aSz.Height() > nMaxHeight ) { - pWin->EnableScrollMenu( sal_True ); + pWin->EnableScrollMenu( true ); sal_uInt16 nStart = ImplGetFirstVisible(); sal_uInt16 nEntries = ImplCalcVisEntries( nMaxHeight, nStart ); aSz.Height() = ImplCalcHeight( nEntries ); @@ -3808,7 +3808,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong && ImplIsSelectable( n ) ) { - pWin->ChangeHighlightItem( n, sal_False ); + pWin->ChangeHighlightItem( n, false ); break; } } @@ -3838,7 +3838,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong if ( nFocusId ) { pWin->SetFocusId( 0 ); - pSVData->maWinData.mbNoDeactivate = sal_False; + pSVData->maWinData.mbNoDeactivate = false; } pWin->ImplEndPopupMode( 0, nFocusId ); @@ -3934,7 +3934,7 @@ static void ImplInitMenuWindow( Window* pWin, bool bFont, bool bMenuBar ) aWallpaper.SetColor( Application::GetSettings().GetStyleSettings().GetWorkspaceColor() ); pWin->SetBackground( aWallpaper ); - pWin->SetPaintTransparent( sal_False ); + pWin->SetPaintTransparent( false ); pWin->SetParentClipMode( 0 ); } else if ( pWin->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) ) @@ -3946,7 +3946,7 @@ static void ImplInitMenuWindow( Window* pWin, bool bFont, bool bMenuBar ) Wallpaper aWallpaper; aWallpaper.SetStyle( WALLPAPER_APPLICATIONGRADIENT ); pWin->SetBackground( aWallpaper ); - pWin->SetPaintTransparent( sal_False ); + pWin->SetPaintTransparent( false ); pWin->SetParentClipMode( 0 ); } } @@ -3976,15 +3976,15 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt pActivePopup = 0; nSaveFocusId = 0; bInExecute = false; - bScrollMenu = sal_False; + bScrollMenu = false; nHighlightedItem = ITEMPOS_INVALID; nMBDownPos = ITEMPOS_INVALID; nPosInParent = ITEMPOS_INVALID; nScrollerHeight = 0; nBorder = EXTRASPACEY; nFirstEntry = 0; - bScrollUp = sal_False; - bScrollDown = sal_False; + bScrollUp = false; + bScrollDown = false; bIgnoreFirstMove = true; bKeyInput = false; @@ -4026,7 +4026,7 @@ void MenuFloatingWindow::doShutdown() { MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow(); if( pPWin ) - pPWin->HighlightItem( i, sal_False ); + pPWin->HighlightItem( i, false ); } } @@ -4068,7 +4068,7 @@ long MenuFloatingWindow::ImplGetStartY() const return -nY; } -Region MenuFloatingWindow::ImplCalcClipRegion( sal_Bool bIncludeLogo ) const +Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const { Size aOutSz = GetOutputSizePixel(); Point aPos; @@ -4098,7 +4098,7 @@ void MenuFloatingWindow::ImplInitClipRegion() } } -void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown ) +void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown ) { if( ! pMenu ) return; @@ -4120,7 +4120,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM nY += pItemData->aSz.Height(); if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) && pMenu->ImplIsSelectable( n ) ) { - sal_Bool bPopupArea = sal_True; + bool bPopupArea = true; if ( pItemData->nBits & MIB_POPUPSELECT ) { // only when clicked over the arrow... @@ -4133,10 +4133,10 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM { if ( n != nHighlightedItem ) { - ChangeHighlightItem( (sal_uInt16)n, sal_False ); + ChangeHighlightItem( (sal_uInt16)n, false ); } - sal_Bool bAllowNewPopup = sal_True; + bool bAllowNewPopup = true; if ( pActivePopup ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); @@ -4154,7 +4154,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM { if ( n != nHighlightedItem ) { - ChangeHighlightItem( (sal_uInt16)n, sal_True ); + ChangeHighlightItem( (sal_uInt16)n, true ); } else if ( pItemData->nBits & MIB_POPUPSELECT ) { @@ -4167,12 +4167,12 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM } } if ( !bHighlighted ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); + ChangeHighlightItem( ITEMPOS_INVALID, true ); } else { ImplScroll( rMEvt.GetPosPixel() ); - ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); + ChangeHighlightItem( ITEMPOS_INVALID, true ); } } @@ -4189,9 +4189,9 @@ IMPL_LINK_NOARG(MenuFloatingWindow, PopupEnd) //pActivePopup->bCanceled = sal_True; } bInExecute = false; - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Deactivate(); - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; } else { @@ -4317,11 +4317,11 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent*, pEvent ) return 0; } -void MenuFloatingWindow::EnableScrollMenu( sal_Bool b ) +void MenuFloatingWindow::EnableScrollMenu( bool b ) { bScrollMenu = b; nScrollerHeight = b ? (sal_uInt16) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0; - bScrollDown = sal_True; + bScrollDown = true; ImplInitClipRegion(); } @@ -4346,12 +4346,12 @@ void MenuFloatingWindow::StopExecute( sal_uLong nFocusId ) // (could have been restored in Select) if ( nSaveFocusId ) { - Window::EndSaveFocus( nFocusId, sal_False ); + Window::EndSaveFocus( nFocusId, false ); nFocusId = nSaveFocusId; if ( nFocusId ) { nSaveFocusId = 0; - ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; + ImplGetSVData()->maWinData.mbNoDeactivate = false; } } ImplEndPopupMode( 0, nFocusId ); @@ -4375,15 +4375,15 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly ) if( ((FloatingWindow *) pActivePopup->pWindow)->IsInCleanUp() ) return; // kill it later if ( pActivePopup->bInCallback ) - pActivePopup->bCanceled = sal_True; + pActivePopup->bCanceled = true; // For all actions pActivePopup = 0, if e.g. // PopupModeEndHdl the popups to destroy were called synchronous PopupMenu* pPopup = pActivePopup; pActivePopup = NULL; - pPopup->bInCallback = sal_True; + pPopup->bInCallback = true; pPopup->Deactivate(); - pPopup->bInCallback = sal_False; + pPopup->bInCallback = false; if ( pPopup->ImplGetWindow() ) { pPopup->ImplGetFloatingWindow()->StopExecute(); @@ -4406,7 +4406,7 @@ void MenuFloatingWindow::EndExecute() if ( nFocusId ) { ((MenuBarWindow*)((MenuBar*)pStart)->ImplGetWindow())->SetFocusId( 0 ); - ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; + ImplGetSVData()->maWinData.mbNoDeactivate = false; } } @@ -4460,7 +4460,7 @@ void MenuFloatingWindow::MouseButtonDown( const MouseEvent& rMEvt ) //if ( pActivePopup && pActivePopup->ImplGetWindow() && !pActivePopup->ImplGetFloatingWindow()->pActivePopup ) // pActivePopup->ImplGetFloatingWindow()->ToTop( TOTOP_NOGRABFOCUS ); - ImplHighlightItem( rMEvt, sal_True ); + ImplHighlightItem( rMEvt, true ); nMBDownPos = nHighlightedItem; } @@ -4504,7 +4504,7 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt ) pActivePopup->ImplGetFloatingWindow()->aSubmenuCloseTimer.Start(); if( !pActivePopup || (pData && pData->pSubMenu != pActivePopup ) ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); if ( IsScrollMenu() ) ImplScroll( rMEvt.GetPosPixel() ); @@ -4515,11 +4515,11 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt ) if( bIgnoreFirstMove ) bIgnoreFirstMove = false; else - ImplHighlightItem( rMEvt, sal_False ); + ImplHighlightItem( rMEvt, false ); } } -void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) +void MenuFloatingWindow::ImplScroll( bool bUp ) { KillActivePopup(); Update(); @@ -4527,7 +4527,7 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) if( ! pMenu ) return; - HighlightItem( nHighlightedItem, sal_False ); + HighlightItem( nHighlightedItem, false ); pMenu->ImplKillLayoutData(); @@ -4540,17 +4540,17 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) if ( !bScrollDown ) { - bScrollDown = sal_True; - ImplDrawScroller( sal_False ); + bScrollDown = true; + ImplDrawScroller( false ); } if ( pMenu->ImplGetPrevVisible( nFirstEntry ) == ITEMPOS_INVALID ) { - bScrollUp = sal_False; - ImplDrawScroller( sal_True ); + bScrollUp = false; + ImplDrawScroller( true ); } - Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP ); + Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP ); } else if ( bScrollDown && !bUp ) { @@ -4562,8 +4562,8 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) if ( !bScrollUp ) { - bScrollUp = sal_True; - ImplDrawScroller( sal_True ); + bScrollUp = true; + ImplDrawScroller( true ); } long nHeight = GetOutputSizePixel().Height(); @@ -4571,14 +4571,14 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) ((PopupMenu*)pMenu)->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible ); if ( pMenu->ImplGetNextVisible( nLastVisible ) == ITEMPOS_INVALID ) { - bScrollDown = sal_False; - ImplDrawScroller( sal_False ); + bScrollDown = false; + ImplDrawScroller( false ); } - Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP ); + Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP ); } - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); } void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) @@ -4591,12 +4591,12 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) if ( bScrollUp && ( nMouseY < nY ) ) { - ImplScroll( sal_True ); + ImplScroll( true ); nDelta = nY - nMouseY; } else if ( bScrollDown && ( nMouseY > ( aOutSz.Height() - nY ) ) ) { - ImplScroll( sal_False ); + ImplScroll( false ); nDelta = nMouseY - ( aOutSz.Height() - nY ); } @@ -4618,7 +4618,7 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) aScrollTimer.Start(); } } -void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer ) +void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTimer ) { // #57934# ggf. immediately close the active, as TH's backgroundstorage works. // #65750# we prefer to refrain from the background storage of small lines. @@ -4633,7 +4633,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup if ( nHighlightedItem != ITEMPOS_INVALID ) { - HighlightItem( nHighlightedItem, sal_False ); + HighlightItem( nHighlightedItem, false ); pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } @@ -4657,12 +4657,12 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow(); if( pPWin && pPWin->nHighlightedItem != i ) { - pPWin->HighlightItem( i, sal_True ); + pPWin->HighlightItem( i, true ); pPWin->nHighlightedItem = i; } } } - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); pMenu->SetHightlightItem(nHighlightedItem); pMenu->ImplCallHighlight( nHighlightedItem ); } @@ -4682,7 +4682,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup } } -void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) +void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight ) { if( ! pMenu ) return; @@ -4733,7 +4733,7 @@ void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) ) { bDrawItemRect = false; - if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, + if( !DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect, CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ), aVal, @@ -4814,7 +4814,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) } -void MenuFloatingWindow::ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd ) +void MenuFloatingWindow::ImplCursorUpDown( bool bUp, bool bHomeEnd ) { if( ! pMenu ) return; @@ -4878,21 +4878,21 @@ void MenuFloatingWindow::ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd ) // Is selection in visible area? if ( IsScrollMenu() ) { - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); while ( n < nFirstEntry ) - ImplScroll( sal_True ); + ImplScroll( true ); Size aOutSz = GetOutputSizePixel(); sal_uInt16 nLastVisible; ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); while ( n > nLastVisible ) { - ImplScroll( sal_False ); + ImplScroll( false ); ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); } } - ChangeHighlightItem( n, sal_False ); + ChangeHighlightItem( n, false ); break; } } while ( n != nLoop ); @@ -4916,7 +4916,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) case KEY_END: case KEY_HOME: { - ImplCursorUpDown( nCode == KEY_END, sal_True ); + ImplCursorUpDown( nCode == KEY_END, true ); } break; case KEY_F6: @@ -4965,7 +4965,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) pFloat->GrabFocus(); pFloat->KillActivePopup(); sal_uInt16 highlightItem = pFloat->GetHighlightedItem(); - pFloat->ChangeHighlightItem(highlightItem, sal_False); + pFloat->ChangeHighlightItem(highlightItem, false); } } } @@ -5036,7 +5036,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) { if ( pData->pSubMenu || nDuplicates > 1 ) { - ChangeHighlightItem( nPos, sal_False ); + ChangeHighlightItem( nPos, false ); HighlightChanged( 0 ); } else @@ -5078,16 +5078,16 @@ void MenuFloatingWindow::Paint( const Rectangle& ) } if ( IsScrollMenu() ) { - ImplDrawScroller( sal_True ); - ImplDrawScroller( sal_False ); + ImplDrawScroller( true ); + ImplDrawScroller( false ); } SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); pMenu->ImplPaint( this, nScrollerHeight, ImplGetStartY() ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); } -void MenuFloatingWindow::ImplDrawScroller( sal_Bool bUp ) +void MenuFloatingWindow::ImplDrawScroller( bool bUp ) { if( ! pMenu ) return; @@ -5192,7 +5192,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : nSaveFocusId = 0; nHighlightedItem = ITEMPOS_INVALID; nRolloveredItem = ITEMPOS_INVALID; - mbAutoPopup = sal_True; + mbAutoPopup = true; nSaveFocusId = 0; bIgnoreFirstMove = true; bStayActive = false; @@ -5206,7 +5206,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : aCloser.SetOutStyle( TOOLBOX_STYLE_FLAT ); aCloser.SetBackground(); - aCloser.SetPaintTransparent( sal_True ); + aCloser.SetPaintTransparent( true ); aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP ); aCloser.InsertItem( IID_DOCUMENTCLOSE, aCloser.maImage, 0 ); @@ -5259,7 +5259,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen ) } } -void MenuBarWindow::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) +void MenuBarWindow::ShowButtons( bool bClose, bool bFloat, bool bHide ) { aCloser.ShowItem( IID_DOCUMENTCLOSE, bClose ); aCloser.Show( bClose || ! m_aAddButtons.empty() ); @@ -5346,7 +5346,7 @@ IMPL_LINK_NOARG(MenuBarWindow, HideHdl) return pMenu ? ((MenuBar*)pMenu)->GetHideButtonClickHdl().Call( pMenu ) : 0; } -void MenuBarWindow::ImplCreatePopup( sal_Bool bPreSelectFirst ) +void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst ) { MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL; if ( pItemData ) @@ -5406,11 +5406,11 @@ void MenuBarWindow::KillActivePopup() return; // kill it later if ( pActivePopup->bInCallback ) - pActivePopup->bCanceled = sal_True; + pActivePopup->bCanceled = true; - pActivePopup->bInCallback = sal_True; + pActivePopup->bInCallback = true; pActivePopup->Deactivate(); - pActivePopup->bInCallback = sal_False; + pActivePopup->bInCallback = false; // check for pActivePopup, if stopped by deactivate... if ( pActivePopup->ImplGetWindow() ) { @@ -5428,22 +5428,22 @@ void MenuBarWindow::PopupClosed( Menu* pPopup ) if ( pPopup == pActivePopup ) { KillActivePopup(); - ChangeHighlightItem( ITEMPOS_INVALID, sal_False, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, false ); } } void MenuBarWindow::MouseButtonDown( const MouseEvent& rMEvt ) { - mbAutoPopup = sal_True; + mbAutoPopup = true; sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); if ( ( nEntry != ITEMPOS_INVALID ) && !pActivePopup ) { - ChangeHighlightItem( nEntry, sal_False ); + ChangeHighlightItem( nEntry, false ); } else { KillActivePopup(); - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); } } @@ -5459,7 +5459,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if ( rMEvt.IsLeaveWindow() ) { if ( nRolloveredItem != ITEMPOS_INVALID && nRolloveredItem != nHighlightedItem ) - HighlightItem( nRolloveredItem, sal_False ); + HighlightItem( nRolloveredItem, false ); nRolloveredItem = ITEMPOS_INVALID; return; @@ -5471,10 +5471,10 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if ( nRolloveredItem != nEntry ) { if ( nRolloveredItem != ITEMPOS_INVALID ) - HighlightItem( nRolloveredItem, sal_False ); + HighlightItem( nRolloveredItem, false ); nRolloveredItem = nEntry; - HighlightItem( nRolloveredItem, sal_True ); + HighlightItem( nRolloveredItem, true ); } return; } @@ -5488,10 +5488,10 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if ( ( nEntry != ITEMPOS_INVALID ) && ( nEntry != nHighlightedItem ) ) - ChangeHighlightItem( nEntry, sal_False ); + ChangeHighlightItem( nEntry, false ); } -void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sal_Bool bAllowRestoreFocus, sal_Bool bDefaultToDocument) +void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool bAllowRestoreFocus, bool bDefaultToDocument) { if( ! pMenu ) return; @@ -5505,7 +5505,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa bool bJustActivated = false; if ( ( nHighlightedItem == ITEMPOS_INVALID ) && ( n != ITEMPOS_INVALID ) ) { - ImplGetSVData()->maWinData.mbNoDeactivate = sal_True; + ImplGetSVData()->maWinData.mbNoDeactivate = true; if( !bStayActive ) { // #105406# avoid saving the focus when we already have the focus @@ -5516,7 +5516,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa if( !ImplGetSVData()->maWinData.mbNoSaveFocus ) { // we didn't clean up last time - Window::EndSaveFocus( nSaveFocusId, sal_False ); // clean up + Window::EndSaveFocus( nSaveFocusId, false ); // clean up nSaveFocusId = 0; if( !bNoSaveFocus ) nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated @@ -5533,17 +5533,17 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa } else bStayActive = false; - pMenu->bInCallback = sal_True; // set here if Activate overloaded + pMenu->bInCallback = true; // set here if Activate overloaded pMenu->Activate(); - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; bJustActivated = true; } else if ( ( nHighlightedItem != ITEMPOS_INVALID ) && ( n == ITEMPOS_INVALID ) ) { - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Deactivate(); - pMenu->bInCallback = sal_False; - ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; + pMenu->bInCallback = false; + ImplGetSVData()->maWinData.mbNoDeactivate = false; if( !ImplGetSVData()->maWinData.mbNoSaveFocus ) { sal_uLong nTempFocusId = nSaveFocusId; @@ -5558,7 +5558,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa if ( nHighlightedItem != ITEMPOS_INVALID ) { if ( nHighlightedItem != nRolloveredItem ) - HighlightItem( nHighlightedItem, sal_False ); + HighlightItem( nHighlightedItem, false ); pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } @@ -5566,9 +5566,9 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa nHighlightedItem = (sal_uInt16)n; DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu->ImplIsVisible( nHighlightedItem ), "ChangeHighlightItem: Not visible!" ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); else if ( nRolloveredItem != ITEMPOS_INVALID ) - HighlightItem( nRolloveredItem, sal_True ); + HighlightItem( nRolloveredItem, true ); pMenu->SetHightlightItem(nHighlightedItem); pMenu->ImplCallHighlight(nHighlightedItem); @@ -5580,7 +5580,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa GrabFocus(); } -void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) +void MenuBarWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight ) { if( ! pMenu ) return; @@ -5709,15 +5709,15 @@ void MenuBarWindow::KeyInput( const KeyEvent& rKEvent ) Window::KeyInput( rKEvent ); } -sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu ) +bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) { if( ! pMenu ) - return sal_False; + return false; if ( pMenu->bInCallback ) - return sal_True; // swallow + return true; // swallow - sal_Bool bDone = sal_False; + bool bDone = false; sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); if( GetParent() ) @@ -5727,7 +5727,7 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF SystemWindow *pSysWin = (SystemWindow*)GetParent()->GetWindow( WINDOW_CLIENT ); if( pSysWin->GetTaskPaneList() ) if( pSysWin->GetTaskPaneList()->HandleKeyEvent( rKEvent ) ) - return sal_True; + return true; } } @@ -5736,15 +5736,15 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF mbAutoPopup = ImplGetSVData()->maNWFData.mbOpenMenuOnF10; if ( nHighlightedItem == ITEMPOS_INVALID ) { - ChangeHighlightItem( 0, sal_False ); + ChangeHighlightItem( 0, false ); GrabFocus(); } else { - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); nSaveFocusId = 0; } - bDone = sal_True; + bDone = true; } else if ( bFromMenu ) { @@ -5797,14 +5797,14 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF MenuItemData* pData = (MenuItemData*)pMenu->GetItemList()->GetDataFromPos( n ); if ( ( pData->eType != MENUITEM_SEPARATOR ) && pMenu->ImplIsVisible( n ) ) { - sal_Bool bDoSelect = sal_True; + bool bDoSelect = true; if( ImplGetSVData()->maNWFData.mbOpenMenuOnF10 ) bDoSelect = bWasHighlight; ChangeHighlightItem( n, bDoSelect ); break; } } while ( n != nLoop ); - bDone = sal_True; + bDone = true; } else if ( nCode == KEY_RETURN ) { @@ -5812,36 +5812,36 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF else if ( !mbAutoPopup ) { - ImplCreatePopup( sal_True ); - mbAutoPopup = sal_True; + ImplCreatePopup( true ); + mbAutoPopup = true; } - bDone = sal_True; + bDone = true; } else if ( ( nCode == KEY_UP ) || ( nCode == KEY_DOWN ) ) { if ( !mbAutoPopup ) { - ImplCreatePopup( sal_True ); - mbAutoPopup = sal_True; + ImplCreatePopup( true ); + mbAutoPopup = true; } - bDone = sal_True; + bDone = true; } else if ( nCode == KEY_ESCAPE || ( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) ) { if( pActivePopup ) { // bring focus to menu bar without any open popup - mbAutoPopup = sal_False; + mbAutoPopup = false; sal_uInt16 n = nHighlightedItem; nHighlightedItem = ITEMPOS_INVALID; bStayActive = true; - ChangeHighlightItem( n, sal_False ); + ChangeHighlightItem( n, false ); bStayActive = false; KillActivePopup(); GrabFocus(); } else - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); if( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) { @@ -5849,7 +5849,7 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF GrabFocusToDocument(); } - bDone = sal_True; + bDone = true; } } @@ -5862,9 +5862,9 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF MenuItemData* pData = pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nEntry, nDuplicates, nHighlightedItem ); if ( pData && (nEntry != ITEMPOS_INVALID) ) { - mbAutoPopup = sal_True; - ChangeHighlightItem( nEntry, sal_True ); - bDone = sal_True; + mbAutoPopup = true; + ChangeHighlightItem( nEntry, true ); + bDone = true; } } } @@ -5903,7 +5903,7 @@ void MenuBarWindow::Paint( const Rectangle& ) SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); pMenu->ImplPaint( this, 0 ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); // in high contrast mode draw a separating line on the lower edge if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) && @@ -5979,7 +5979,7 @@ void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt ) { sal_uInt16 nId = nHighlightedItem; if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); + ChangeHighlightItem( ITEMPOS_INVALID, true ); Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) ) @@ -6057,16 +6057,16 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) void MenuBarWindow::LoseFocus() { - if ( !HasChildPathFocus( sal_True ) ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_False, sal_False ); + if ( !HasChildPathFocus( true ) ) + ChangeHighlightItem( ITEMPOS_INVALID, false, false ); } void MenuBarWindow::GetFocus() { if ( nHighlightedItem == ITEMPOS_INVALID ) { - mbAutoPopup = sal_False; // do not open menu when activated by focus handling like taskpane cycling - ChangeHighlightItem( 0, sal_False ); + mbAutoPopup = false; // do not open menu when activated by focus handling like taskpane cycling + ChangeHighlightItem( 0, false ); } } diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index fe45ae8928cd..2fe22fbee90c 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -137,7 +137,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) OUString aKey = xCharClass->toUpper( _rKey, 0, _rKey.getLength(), rLocale ); - sal_Bool bChanged = sal_False; + bool bChanged = false; sal_Int32 nLen = aKey.getLength(); bool bCJK = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType()); @@ -202,7 +202,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) { maMnemonics[nMnemonicIndex] = 0; rKey = rKey.replaceAt( nIndex, 0, OUString(MNEMONIC_CHAR) ); - bChanged = sal_True; + bChanged = true; break; } } @@ -254,7 +254,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) { maMnemonics[nBestMnemonicIndex] = 0; rKey = rKey.replaceAt( nBestIndex, 0, OUString(MNEMONIC_CHAR) ); - bChanged = sal_True; + bChanged = true; } } } @@ -299,7 +299,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) nIndex--; } rKey = rKey.replaceAt( nIndex, 0, aStr ); - bChanged = sal_True; + bChanged = true; break; } } diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx index b903c31837d8..3fbf5923c4d1 100644 --- a/vcl/source/window/mnemonicengine.cxx +++ b/vcl/source/window/mnemonicengine.cxx @@ -81,7 +81,7 @@ namespace vcl bool MnemonicEngine::HandleKeyEvent( const KeyEvent& _rKEvt ) { - sal_Bool bAccelKey = _rKEvt.GetKeyCode().IsMod2(); + bool bAccelKey = _rKEvt.GetKeyCode().IsMod2(); if ( !bAccelKey ) return false; diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 1f3019a09fc5..3a700f10e711 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -60,9 +60,9 @@ void MessBox::ImplInitMessBoxData() { mpVCLMultiLineEdit = NULL; mpFixedImage = NULL; - mbHelpBtn = sal_False; + mbHelpBtn = false; mpCheckBox = NULL; - mbCheck = sal_False; + mbCheck = false; } // ----------------------------------------------------------------------- @@ -209,7 +209,7 @@ void MessBox::ImplPosControls() if ( !mbHelpBtn ) { AddButton( BUTTON_HELP, RET_HELP, BUTTONDIALOG_HELPBUTTON, 3 ); - mbHelpBtn = sal_True; + mbHelpBtn = true; } } else @@ -217,7 +217,7 @@ void MessBox::ImplPosControls() if ( mbHelpBtn ) { RemoveButton( RET_HELP ); - mbHelpBtn = sal_False; + mbHelpBtn = false; } } @@ -393,8 +393,8 @@ void MessBox::ImplPosControls() mpVCLMultiLineEdit->SetText( aMessText ); mpVCLMultiLineEdit->SetPosSizePixel( aTextPos, aMEditSize ); mpVCLMultiLineEdit->Show(); - mpVCLMultiLineEdit->SetPaintTransparent(sal_True); - mpVCLMultiLineEdit->EnableCursor(sal_False); + mpVCLMultiLineEdit->SetPaintTransparent(true); + mpVCLMultiLineEdit->EnableCursor(false); SetPageSizePixel( aPageSize ); } @@ -411,14 +411,14 @@ void MessBox::StateChanged( StateChangedType nType ) // ----------------------------------------------------------------------- -sal_Bool MessBox::GetCheckBoxState() const +bool MessBox::GetCheckBoxState() const { return mpCheckBox ? mpCheckBox->IsChecked() : mbCheck; } // ----------------------------------------------------------------------- -void MessBox::SetCheckBoxState( sal_Bool bCheck ) +void MessBox::SetCheckBoxState( bool bCheck ) { if( mpCheckBox ) mpCheckBox->Check( bCheck ); mbCheck = bCheck; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index ff5121212b39..371fceab8a6d 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -70,7 +70,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent ) , maHorzDim( this, WB_HORZ | WB_CENTER ) , maVertDim( this, WB_VERT | WB_VCENTER ) { - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); maPageVDev.SetBackground( Color( COL_WHITE ) ); maHorzDim.Show(); @@ -140,7 +140,7 @@ void PrintDialog::PrintPreviewWindow::Resize() aScaledSize.Width() = PREVIEW_BITMAP_WIDTH; aScaledSize.Height() = PREVIEW_BITMAP_WIDTH * aAspectRatio; - maPageVDev.SetOutputSizePixel( aScaledSize, sal_False ); + maPageVDev.SetOutputSizePixel( aScaledSize, false ); // position dimension lines Point aRef( nTextHeight + (aNewSize.Width() - maPreviewSize.Width())/2, @@ -219,7 +219,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi maReplacementString = i_rReplacement; mbGreyscale = i_bGreyscale; maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY ); - maPageVDev.EnableOutput( sal_True ); + maPageVDev.EnableOutput( true ); // use correct measurements const LocaleDataWrapper& rLocWrap( GetSettings().GetLocaleDataWrapper() ); @@ -436,7 +436,7 @@ void PrintDialog::NUpTabPage::showAdvancedControls( bool i_bShow ) void PrintDialog::NUpTabPage::initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& i_rMPS ) { mpNupOrderWin->Show(); - mpPagesBtn->Check( sal_True ); + mpPagesBtn->Check( true ); mpBrochureBtn->Show( false ); // setup field units for metric fields @@ -509,7 +509,7 @@ void PrintDialog::JobTabPage::readFromSettings() if( aValue.equalsIgnoreAsciiCase("alwaysoff") ) { mnCollateUIMode = 1; - mpCollateBox->Check( sal_False ); + mpCollateBox->Check( false ); mpCollateBox->Enable( false ); } else @@ -548,11 +548,11 @@ void PrintDialog::OutputOptPage::readFromSettings() OUString( "CollateSingleJobs" ) ); if ( aValue.equalsIgnoreAsciiCase("true") ) { - mpCollateSingleJobsBox->Check( sal_True ); + mpCollateSingleJobsBox->Check( true ); } else { - mpCollateSingleJobsBox->Check( sal_False ); + mpCollateSingleJobsBox->Check( false ); } } @@ -581,7 +581,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont , mnCachedPages( 0 ) , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ).toString() ) , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ).toString() ) - , mbShowLayoutPage( sal_True ) + , mbShowLayoutPage( true ) { get(mpOKButton, "ok"); get(mpCancelButton, "cancel"); @@ -710,7 +710,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont // setup dependencies checkControlDependencies(); - if ( maPController->getBoolProperty( OUString( "HideHelpButton" ), sal_False ) ) + if ( maPController->getBoolProperty( OUString( "HideHelpButton" ), false ) ) mpHelpButton->Hide(); // set initial focus to "Number of copies" maJobPage.mpCopyCountField->GrabFocus(); @@ -846,7 +846,7 @@ void PrintDialog::setupOptionalUI() OUString aGroupingHint; OUString aDependsOnName; sal_Int32 nDependsOnValue = 0; - sal_Bool bUseDependencyRow = sal_False; + bool bUseDependencyRow = false; for( int n = 0; n < aOptProp.getLength(); n++ ) { @@ -880,7 +880,7 @@ void PrintDialog::setupOptionalUI() } else if ( rEntry.Name == "Enabled" ) { - sal_Bool bValue = sal_True; + bool bValue = true; rEntry.Value >>= bValue; } else if ( rEntry.Name == "GroupingHint" ) @@ -933,7 +933,7 @@ void PrintDialog::setupOptionalUI() } else if ( rEntry.Name == "HintNoLayoutPage" ) { - sal_Bool bNoLayoutPage = sal_False; + bool bNoLayoutPage = false; rEntry.Value >>= bNoLayoutPage; mbShowLayoutPage = ! bNoLayoutPage; } @@ -979,7 +979,7 @@ void PrintDialog::setupOptionalUI() maNUpPage.mpBrochureBtn->SetText( aText ); maNUpPage.mpBrochureBtn->Show(); - sal_Bool bVal = sal_False; + bool bVal = false; PropertyValue* pVal = maPController->getValue( aPropertyName ); if( pVal ) pVal->Value >>= bVal; @@ -1005,7 +1005,7 @@ void PrintDialog::setupOptionalUI() pNewBox->SetText( aText ); pNewBox->Show(); - sal_Bool bVal = sal_False; + bool bVal = false; PropertyValue* pVal = maPController->getValue( aPropertyName ); if( pVal ) pVal->Value >>= bVal; @@ -1543,7 +1543,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) } else if( pButton == maOptionsPage.mpPapersizeFromSetup ) { - sal_Bool bChecked = maOptionsPage.mpPapersizeFromSetup->IsChecked(); + bool bChecked = maOptionsPage.mpPapersizeFromSetup->IsChecked(); maPController->setPapersizeFromSetup( bChecked ); maPController->setValue( OUString( "PapersizeFromSetup" ), makeAny( bChecked ) ); @@ -1554,7 +1554,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) PropertyValue* pVal = getValueForWindow( pButton ); if( pVal ) { - sal_Bool bVal = maNUpPage.mpBrochureBtn->IsChecked(); + bool bVal = maNUpPage.mpBrochureBtn->IsChecked(); pVal->Value <<= bVal; checkOptionalControlDependencies(); @@ -1578,12 +1578,12 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) else if( pButton == maJobPage.mpCollateBox ) { maPController->setValue( OUString( "Collate" ), - makeAny( sal_Bool(isCollate()) ) ); + makeAny( isCollate() ) ); checkControlDependencies(); } else if( pButton == maJobPage.mpReverseOrderBox ) { - sal_Bool bChecked = maJobPage.mpReverseOrderBox->IsChecked(); + bool bChecked = maJobPage.mpReverseOrderBox->IsChecked(); maPController->setReversePrint( bChecked ); maPController->setValue( OUString( "PrintReverse" ), makeAny( bChecked ) ); @@ -1624,7 +1624,7 @@ IMPL_LINK( PrintDialog, ModifyHdl, Edit*, pEdit ) maPController->setValue( OUString( "CopyCount" ), makeAny( sal_Int32(maJobPage.mpCopyCountField->GetValue()) ) ); maPController->setValue( OUString( "Collate" ), - makeAny( sal_Bool(isCollate()) ) ); + makeAny( isCollate() ) ); } return 0; } @@ -1660,7 +1660,7 @@ void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty ) const std::vector< Window* >& rWindows( it->second ); if( ! rWindows.empty() ) { - sal_Bool bVal = sal_False; + bool bVal = false; sal_Int32 nVal = -1; if( pValue->Value >>= bVal ) { @@ -1721,7 +1721,7 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox ) { makeEnabled( i_pBox ); - sal_Bool bVal = i_pBox->IsChecked(); + bool bVal = i_pBox->IsChecked(); pVal->Value <<= bVal; checkOptionalControlDependencies(); diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index f07ccaa203d6..77448d15f921 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -27,7 +27,7 @@ FunctionSet::~FunctionSet() } -inline sal_Bool SelectionEngine::ShouldDeselect( sal_Bool bModifierKey1 ) const +inline bool SelectionEngine::ShouldDeselect( bool bModifierKey1 ) const { // return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 ); return eSelMode != MULTIPLE_SELECTION || !bModifierKey1; @@ -97,7 +97,7 @@ void SelectionEngine::SetSelectionMode( SelectionMode eMode ) |* *************************************************************************/ -void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ) +void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) { if ( !pFunctionSet ) return; @@ -151,15 +151,15 @@ void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ) |* *************************************************************************/ -sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) +bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_CMDEVT); if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) - return sal_False; + return false; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; if ( nModifier & KEY_MOD2 ) - return sal_False; + return false; // in SingleSelection: Control-Taste filtern (damit auch // mit Ctrl-Click ein D&D gestartet werden kann) if ( nModifier == KEY_MOD1 && eSelMode == SINGLE_SELECTION ) @@ -182,14 +182,14 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { case 0: // KEY_NO_KEY { - sal_Bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); + bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); nFlags &= (~SELENG_IN_ADD); if ( (nFlags & SELENG_DRG_ENAB) && bSelAtPoint ) { nFlags |= SELENG_WAIT_UPEVT; nFlags &= ~(SELENG_IN_SEL); pWin->ReleaseMouse(); - return sal_True; //auf STARTDRAG-Command-Event warten + return true; //auf STARTDRAG-Command-Event warten } if ( eSelMode != SINGLE_SELECTION ) { @@ -204,7 +204,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) // in einem Zug moeglich ist if (eSelMode == SINGLE_SELECTION && (nFlags & SELENG_DRG_ENAB)) nFlags |= SELENG_WAIT_UPEVT; - return sal_True; + return true; } case KEY_SHIFT: @@ -212,7 +212,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { pWin->ReleaseMouse(); nFlags &= (~SELENG_IN_SEL); - return sal_False; + return false; } if ( nFlags & SELENG_ADD_ALW ) nFlags |= SELENG_IN_ADD; @@ -227,7 +227,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) nFlags |= SELENG_HAS_ANCH; } pFunctionSet->SetCursorAtPoint( aPos ); - return sal_True; + return true; case KEY_MOD1: // Control nur bei Mehrfachselektion erlaubt @@ -235,7 +235,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_IN_SEL); pWin->ReleaseMouse(); - return sal_True; // Mausclick verschlucken + return true; // Mausclick verschlucken } if ( nFlags & SELENG_HAS_ANCH ) { @@ -252,14 +252,14 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { pFunctionSet->SetCursorAtPoint( aPos ); } - return sal_True; + return true; case KEY_SHIFT + KEY_MOD1: if ( eSelMode != MULTIPLE_SELECTION ) { pWin->ReleaseMouse(); nFlags &= (~SELENG_IN_SEL); - return sal_False; + return false; } nFlags |= SELENG_IN_ADD; //bIsInAddMode = sal_True; if ( !(nFlags & SELENG_HAS_ANCH) ) @@ -268,10 +268,10 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) nFlags |= SELENG_HAS_ANCH; } pFunctionSet->SetCursorAtPoint( aPos ); - return sal_True; + return true; } - return sal_False; + return false; } /************************************************************************* @@ -280,14 +280,14 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) |* *************************************************************************/ -sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) +bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) { aWTimer.Stop(); //DbgOut("Up"); if( !pFunctionSet || !pWin ) { nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL); - return sal_False; + return false; } if( !rMEvt.IsRight() ) @@ -321,7 +321,7 @@ sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) } nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL); - return sal_True; + return true; } /************************************************************************* @@ -330,21 +330,21 @@ sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) |* *************************************************************************/ -sal_Bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) +bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) { if ( !pFunctionSet || !(nFlags & SELENG_IN_SEL) || (nFlags & (SELENG_CMDEVT | SELENG_WAIT_UPEVT)) ) - return sal_False; + return false; if( !(nFlags & SELENG_EXPANDONMOVE) ) - return sal_False; // auf DragEvent warten! + return false; // auf DragEvent warten! aLastMove = rMEvt; // wenn die Maus ausserhalb der Area steht, dann wird die // Frequenz des SetCursorAtPoint() nur durch den Timer bestimmt if( aWTimer.IsActive() && !aArea.IsInside( rMEvt.GetPosPixel() )) - return sal_True; + return true; aWTimer.SetTimeout( nUpdateInterval ); aWTimer.Start(); @@ -361,7 +361,7 @@ sal_Bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) //DbgOut("Move:SetCursor"); pFunctionSet->SetCursorAtPoint( rMEvt.GetPosPixel() ); - return sal_True; + return true; } /************************************************************************* diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 4cb24ee0e702..5b2480e50747 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -58,8 +58,8 @@ void Splitter::ImplInitSplitterData() mnSplitPos = 0; mnLastSplitPos = 0; mnStartSplitPos = 0; - mbDragFull = sal_False; - mbKbdSplitting = sal_False; + mbDragFull = false; + mbKbdSplitting = false; mbInKeyEvent = 0; mnKeyboardStepSize = SPLITTER_DEFAULTSTEPSIZE; } @@ -226,11 +226,11 @@ Splitter* Splitter::ImplFindSibling() // ----------------------------------------------------------------------- -sal_Bool Splitter::ImplSplitterActive() +bool Splitter::ImplSplitterActive() { // is splitter in document or at scrollbar handle ? - sal_Bool bActive = sal_True; + bool bActive = true; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); long nA = rSettings.GetScrollBarSize(); long nB = rSettings.GetSplitSize(); @@ -239,12 +239,12 @@ sal_Bool Splitter::ImplSplitterActive() if ( mbHorzSplit ) { if( aSize.Width() == nB && aSize.Height() == nA ) - bActive = sal_False; + bActive = false; } else { if( aSize.Width() == nA && aSize.Height() == nB ) - bActive = sal_False; + bActive = false; } return bActive; } @@ -366,7 +366,7 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode ) if( !mbKbdSplitting ) return; else - mbKbdSplitting = sal_False; + mbKbdSplitting = false; if ( nCode != KEY_ESCAPE ) { @@ -554,7 +554,7 @@ void Splitter::ImplStartKbdSplitting() if( mbKbdSplitting ) return; - mbKbdSplitting = sal_True; + mbKbdSplitting = true; StartSplit(); @@ -626,7 +626,7 @@ void Splitter::LoseFocus() { KeyCode aReturnKey( KEY_RETURN ); ImplKbdTracking( aReturnKey ); - mbKbdSplitting = sal_False; + mbKbdSplitting = false; } Invalidate(); } diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 55b934382fc4..d5fc03b5d16a 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -108,7 +108,7 @@ namespace { #define SPLIT_WINDOW ((sal_uInt16)0x0004) #define SPLIT_NOSPLIT ((sal_uInt16)0x8000) -static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, +static void ImplCalcBorder( WindowAlign eAlign, bool bNoAlign, long& rLeft, long& rTop, long& rRight, long& rBottom ) { @@ -310,7 +310,7 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) } static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, - sal_Bool bRows, sal_Bool bDown = sal_True ) + bool bRows, bool bDown = true ) { sal_uInt16 i; sal_uInt16 nItems = pSet->mnItems; @@ -379,7 +379,7 @@ static void ImplDeleteSet( ImplSplitSet* pSet ) static void ImplCalcSet( ImplSplitSet* pSet, long nSetLeft, long nSetTop, long nSetWidth, long nSetHeight, - sal_Bool bRows, sal_Bool bDown = sal_True ) + bool bRows, bool bDown = true ) { if ( !pSet->mpItems ) return; @@ -753,8 +753,8 @@ static void ImplCalcSet( ImplSplitSet* pSet, } } -void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide, - sal_Bool bRows, sal_Bool /*bDown*/ ) +void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide, + bool bRows, bool /*bDown*/ ) { sal_uInt16 i; sal_uInt16 nItems = pSet->mnItems; @@ -827,9 +827,9 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bo { if ( pItems[i].mpSet ) { - sal_Bool bTempHide = bHide; + bool bTempHide = bHide; if ( !pItems[i].mnWidth || !pItems[i].mnHeight ) - bTempHide = sal_True; + bTempHide = true; ImplCalcSet2( pWindow, pItems[i].mpSet, bTempHide, ((pItems[i].mnBits & SWIB_COLSET) == 0) ); } @@ -958,7 +958,7 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ) } static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, - sal_Bool bRows, sal_Bool bDown = sal_True ) + bool bRows, bool bDown = true ) { if ( !pSet->mpItems ) return; @@ -1052,7 +1052,7 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, - sal_Bool bRows, sal_Bool /*bDown*/ ) + bool bRows, bool /*bDown*/ ) { if ( !pSet->mpItems ) return 0; @@ -1258,29 +1258,29 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) mnMouseModifier = 0; mnMStartPos = 0; mnMSplitPos = 0; - mbDragFull = sal_False; - mbHorz = sal_True; - mbBottomRight = sal_False; - mbCalc = sal_False; - mbRecalc = sal_True; - mbInvalidate = sal_True; - mbAutoHide = sal_False; - mbFadeIn = sal_False; - mbFadeOut = sal_False; - mbAutoHideIn = sal_False; - mbAutoHideDown = sal_False; - mbFadeInDown = sal_False; - mbFadeOutDown = sal_False; - mbAutoHidePressed = sal_False; - mbFadeInPressed = sal_False; - mbFadeOutPressed = sal_False; - mbFadeNoButtonMode = sal_False; - mbNoAlign = sal_False; + mbDragFull = false; + mbHorz = true; + mbBottomRight = false; + mbCalc = false; + mbRecalc = true; + mbInvalidate = true; + mbAutoHide = false; + mbFadeIn = false; + mbFadeOut = false; + mbAutoHideIn = false; + mbAutoHideDown = false; + mbFadeInDown = false; + mbFadeOutDown = false; + mbAutoHidePressed = false; + mbFadeInPressed = false; + mbFadeOutPressed = false; + mbFadeNoButtonMode = false; + mbNoAlign = false; if ( nStyle & WB_NOSPLITDRAW ) { pNewSet->mnSplitSize -= 2; - mbInvalidate = sal_False; + mbInvalidate = false; } if ( nStyle & WB_BORDER ) @@ -1479,9 +1479,9 @@ void SplitWindow::ImplCalcLayout() nCurSize -= nSplitSize; nCurSize -= (mpMainSet->mnItems-1)*mpMainSet->mnSplitSize; - mbRecalc = sal_False; + mbRecalc = false; ImplSetWindowSize( nCalcSize-nCurSize ); - mbRecalc = sal_True; + mbRecalc = true; } } @@ -1522,13 +1522,13 @@ void SplitWindow::ImplCalcLayout() // Sets rekursiv berechnen ImplCalcSet( mpMainSet, nL, nT, nW, nH, mbHorz, !mbBottomRight ); - ImplCalcSet2( this, mpMainSet, sal_False, mbHorz, !mbBottomRight ); - mbCalc = sal_False; + ImplCalcSet2( this, mpMainSet, false, mbHorz, !mbBottomRight ); + mbCalc = false; } void SplitWindow::ImplUpdate() { - mbCalc = sal_True; + mbCalc = true; if ( IsReallyShown() && IsUpdateMode() && mbRecalc ) { @@ -1562,7 +1562,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) } } -void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const +void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const { long nSplitSize = mpMainSet->mnSplitSize-1; if ( mbAutoHide || mbFadeOut || mbFadeIn ) @@ -1632,7 +1632,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest } } -void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const +void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, bool bTest ) const { Rectangle aRect; @@ -1647,7 +1647,7 @@ void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const rRect = aRect; } -void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const +void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const { Rectangle aRect; @@ -1657,12 +1657,12 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const rRect = aRect; } -void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, sal_Bool ) const +void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const { Rectangle aRect; if ( mbFadeOut ) - ImplGetButtonRect( aRect, 0, sal_False ); + ImplGetButtonRect( aRect, 0, false ); rRect = aRect; } @@ -1733,7 +1733,7 @@ void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize ) } } -void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) +void SplitWindow::ImplDrawAutoHide( bool bInPaint ) { if ( mbAutoHide ) { @@ -1808,7 +1808,7 @@ void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) } } -void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft ) +void SplitWindow::ImplDrawFadeArrow( const Point& rPt, bool bHorz, bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1864,14 +1864,14 @@ void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool } } -void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool bLeft ) +void SplitWindow::ImplDrawGrip( const Rectangle& rRect, bool bHorz, bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( rRect.IsInside( GetPointerPosPixel() ) ) { DrawWallpaper( rRect, Wallpaper( Color( COL_WHITE ) ) ); - DrawSelectionBackground( rRect, 2, sal_False, sal_False, sal_False ); + DrawSelectionBackground( rRect, 2, false, false, false ); } if( bHorz ) @@ -1922,24 +1922,24 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool } } -void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint ) +void SplitWindow::ImplDrawFadeIn( bool bInPaint ) { if ( mbFadeIn ) { Rectangle aTempRect; ImplGetFadeInRect( aTempRect ); - sal_Bool bLeft = sal_True; + bool bLeft = true; switch ( meAlign ) { case WINDOWALIGN_TOP: case WINDOWALIGN_LEFT: - bLeft = sal_False; + bLeft = false; break; case WINDOWALIGN_BOTTOM: case WINDOWALIGN_RIGHT: default: - bLeft = sal_True; + bLeft = true; break; } @@ -1950,24 +1950,24 @@ void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint ) } } -void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint ) +void SplitWindow::ImplDrawFadeOut( bool bInPaint ) { if ( mbFadeOut ) { Rectangle aTempRect; ImplGetFadeOutRect( aTempRect ); - sal_Bool bLeft = sal_True; + bool bLeft = true; switch ( meAlign ) { case WINDOWALIGN_BOTTOM: case WINDOWALIGN_RIGHT: - bLeft = sal_False; + bLeft = false; break; case WINDOWALIGN_TOP: case WINDOWALIGN_LEFT: default: - bLeft = sal_True; + bLeft = true; break; } @@ -2208,35 +2208,35 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) Point aMousePosPixel = rMEvt.GetPosPixel(); Rectangle aTestRect; - mbFadeNoButtonMode = sal_False; - ImplGetAutoHideRect( aTestRect, sal_True ); + mbFadeNoButtonMode = false; + ImplGetAutoHideRect( aTestRect, true ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbAutoHideDown = sal_True; - mbAutoHidePressed = sal_True; - ImplDrawAutoHide( sal_False ); + mbAutoHideDown = true; + mbAutoHidePressed = true; + ImplDrawAutoHide( false ); } else { - ImplGetFadeOutRect( aTestRect, sal_True ); + ImplGetFadeOutRect( aTestRect, true ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbFadeOutDown = sal_True; - mbFadeOutPressed = sal_True; - ImplDrawFadeOut( sal_False ); + mbFadeOutDown = true; + mbFadeOutPressed = true; + ImplDrawFadeOut( false ); } else { - ImplGetFadeInRect( aTestRect, sal_True ); + ImplGetFadeInRect( aTestRect, true ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbFadeInDown = sal_True; - mbFadeInPressed = sal_True; - ImplDrawFadeIn( sal_False ); + mbFadeInDown = true; + mbFadeInPressed = true; + ImplDrawFadeIn( false ); } else if ( !aTestRect.IsEmpty() && !(mnWinStyle & WB_SIZEABLE) ) { - mbFadeNoButtonMode = sal_True; + mbFadeNoButtonMode = true; FadeIn(); return; } @@ -2292,30 +2292,30 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbAutoHideDown = sal_False; + mbAutoHideDown = false; if ( mbAutoHidePressed ) { - mbAutoHidePressed = sal_False; + mbAutoHidePressed = false; if ( !rTEvt.IsTrackingCanceled() ) { mbAutoHideIn = !mbAutoHideIn; - ImplDrawAutoHide( sal_False ); + ImplDrawAutoHide( false ); AutoHide(); } else - ImplDrawAutoHide( sal_False ); + ImplDrawAutoHide( false ); } } else { Rectangle aTestRect; - ImplGetAutoHideRect( aTestRect, sal_True ); - sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + ImplGetAutoHideRect( aTestRect, true ); + bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbAutoHidePressed ) { mbAutoHidePressed = bNewPressed; - ImplDrawAutoHide( sal_False ); + ImplDrawAutoHide( false ); } } } @@ -2323,11 +2323,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbFadeInDown = sal_False; + mbFadeInDown = false; if ( mbFadeInPressed ) { - mbFadeInPressed = sal_False; - ImplDrawFadeIn( sal_False ); + mbFadeInPressed = false; + ImplDrawFadeIn( false ); if ( !rTEvt.IsTrackingCanceled() ) FadeIn(); @@ -2336,12 +2336,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { Rectangle aTestRect; - ImplGetFadeInRect( aTestRect, sal_True ); - sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + ImplGetFadeInRect( aTestRect, true ); + bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbFadeInPressed ) { mbFadeInPressed = bNewPressed; - ImplDrawFadeIn( sal_False ); + ImplDrawFadeIn( false ); } } } @@ -2349,11 +2349,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbFadeOutDown = sal_False; + mbFadeOutDown = false; if ( mbFadeOutPressed ) { - mbFadeOutPressed = sal_False; - ImplDrawFadeOut( sal_False ); + mbFadeOutPressed = false; + ImplDrawFadeOut( false ); if ( !rTEvt.IsTrackingCanceled() ) FadeOut(); @@ -2362,12 +2362,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { Rectangle aTestRect; - ImplGetFadeOutRect( aTestRect, sal_True ); - sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); - if ( bNewPressed == sal_False ) + ImplGetFadeOutRect( aTestRect, true ); + bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + if ( !bNewPressed ) { mbFadeOutPressed = bNewPressed; - ImplDrawFadeOut( sal_False ); + ImplDrawFadeOut( false ); // We need a mouseevent with a position inside the button for the // ImplStartSplit function! @@ -2377,7 +2377,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) aOrgMEvt.GetModifier() ); ImplStartSplit( aNewMEvt ); - mbFadeOutDown = sal_False; + mbFadeOutDown = false; } } } @@ -2420,8 +2420,8 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) if ( bSplit ) { - sal_Bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? sal_True : sal_False; - sal_Bool bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True : sal_False; + bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? sal_True : sal_False; + bool bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True : sal_False; long nDelta = mnMSplitPos-mnMStartPos; if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems ) @@ -2500,9 +2500,9 @@ void SplitWindow::Paint( const Rectangle& ) ImplDrawBorder( this ); ImplDrawBorderLine( this ); - ImplDrawFadeOut( sal_True ); - ImplDrawFadeIn( sal_True ); - ImplDrawAutoHide( sal_True ); + ImplDrawFadeOut( true ); + ImplDrawFadeIn( true ); + ImplDrawAutoHide( true ); // FrameSet-Hintergruende zeichnen ImplDrawBack( this, mpMainSet ); @@ -2536,7 +2536,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) Rectangle aHelpRect; sal_uInt16 nHelpResId = 0; - ImplGetAutoHideRect( aHelpRect, sal_True ); + ImplGetAutoHideRect( aHelpRect, true ); if ( aHelpRect.IsInside( aMousePosPixel ) ) { if ( mbAutoHideIn ) @@ -2546,12 +2546,12 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) } else { - ImplGetFadeInRect( aHelpRect, sal_True ); + ImplGetFadeInRect( aHelpRect, true ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEIN; else { - ImplGetFadeOutRect( aHelpRect, sal_True ); + ImplGetFadeOutRect( aHelpRect, true ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEOUT; } @@ -2690,7 +2690,7 @@ void SplitWindow::InsertItem( sal_uInt16 nId, long nSize, InsertItem( nId, NULL, nSize, nPos, nSetId, nBits ); } -void SplitWindow::RemoveItem( sal_uInt16 nId, sal_Bool bHide ) +void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide ) { #ifdef DBG_UTIL sal_uInt16 nDbgDummy; @@ -2760,7 +2760,7 @@ void SplitWindow::Clear() } void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, - sal_Bool bPropSmall, sal_Bool bPropGreat ) + bool bPropSmall, bool bPropGreat ) { sal_uInt16 nItems; sal_uInt16 nPos; @@ -2841,7 +2841,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, { nPos--; nDelta *= -1; - sal_Bool bTemp = bPropSmall; + bool bTemp = bPropSmall; bPropSmall = bPropGreat; bPropGreat = bTemp; } @@ -3101,15 +3101,15 @@ sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const return 0; } -sal_Bool SplitWindow::IsItemValid( sal_uInt16 nId ) const +bool SplitWindow::IsItemValid( sal_uInt16 nId ) const { sal_uInt16 nPos; ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : NULL; if ( pSet ) - return sal_True; + return true; else - return sal_False; + return false; } sal_uInt16 SplitWindow::GetItemId( Window* pWindow ) const @@ -3164,28 +3164,28 @@ void SplitWindow::ImplNewAlign() { if ( mbNoAlign ) { - mbHorz = sal_False; - mbBottomRight = sal_False; + mbHorz = false; + mbBottomRight = false; } else { switch ( meAlign ) { case WINDOWALIGN_TOP: - mbHorz = sal_True; - mbBottomRight = sal_False; + mbHorz = true; + mbBottomRight = false; break; case WINDOWALIGN_BOTTOM: - mbHorz = sal_True; - mbBottomRight = sal_True; + mbHorz = true; + mbBottomRight = true; break; case WINDOWALIGN_LEFT: - mbHorz = sal_False; - mbBottomRight = sal_False; + mbHorz = false; + mbBottomRight = false; break; case WINDOWALIGN_RIGHT: - mbHorz = sal_False; - mbBottomRight = sal_True; + mbHorz = false; + mbBottomRight = true; break; } } @@ -3210,25 +3210,25 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign ) } } -void SplitWindow::ShowAutoHideButton( sal_Bool bShow ) +void SplitWindow::ShowAutoHideButton( bool bShow ) { mbAutoHide = bShow; ImplUpdate(); } -void SplitWindow::ShowFadeInHideButton( sal_Bool bShow ) +void SplitWindow::ShowFadeInHideButton( bool bShow ) { mbFadeIn = bShow; ImplUpdate(); } -void SplitWindow::ShowFadeOutButton( sal_Bool bShow ) +void SplitWindow::ShowFadeOutButton( bool bShow ) { mbFadeOut = bShow; ImplUpdate(); } -void SplitWindow::SetAutoHideState( sal_Bool bAutoHide ) +void SplitWindow::SetAutoHideState( bool bAutoHide ) { mbAutoHideIn = bAutoHide; if ( IsReallyVisible() ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 81ee2495d9e6..5cac8f0da7ff 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -79,7 +79,7 @@ struct ImplStatusItem OUString maQuickHelpText; OString maHelpId; void* mpUserData; - sal_Bool mbVisible; + bool mbVisible; OUString maAccessibleName; OUString maCommand; }; @@ -114,12 +114,12 @@ static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize, // ----------------------------------------------------------------------- -sal_Bool StatusBar::ImplIsItemUpdate() +bool StatusBar::ImplIsItemUpdate() { if ( !mbProgressMode && mbVisibleItems && IsReallyVisible() && IsUpdateMode() ) - return sal_True; + return true; else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -138,10 +138,10 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) mpItemList = new ImplStatusItemList; mpImplData->mpVirDev = new VirtualDevice( *this ); mnCurItemId = 0; - mbFormat = sal_True; - mbVisibleItems = sal_True; - mbProgressMode = sal_False; - mbInUserDraw = sal_False; + mbFormat = true; + mbVisibleItems = true; + mbProgressMode = false; + mbInUserDraw = false; mnItemsWidth = STATUSBAR_OFFSET_X; mnDX = 0; mnDY = 0; @@ -149,7 +149,7 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) mnItemY = STATUSBAR_OFFSET_Y; mnTextY = STATUSBAR_OFFSET_TEXTY; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); SetLineColor(); SetOutputSizePixel( CalcWindowSizePixel() ); @@ -180,8 +180,8 @@ StatusBar::~StatusBar() // ----------------------------------------------------------------------- -void StatusBar::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void StatusBar::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -228,7 +228,7 @@ void StatusBar::ImplInitSettings( sal_Bool bFont, IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_WINDOW ) ) { ImplGetWindowImpl()->mnNativeBackground = PART_BACKGROUND_WINDOW; - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); } } } @@ -306,7 +306,7 @@ void StatusBar::ImplFormat() } } - mbFormat = sal_False; + mbFormat = false; } // ----------------------------------------------------------------------- @@ -351,7 +351,7 @@ sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const // ----------------------------------------------------------------------- -void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth ) +void StatusBar::ImplDrawText( bool bOffScreen, long nOldTextWidth ) { // prevent item box from being overwritten Rectangle aTextRect; @@ -388,7 +388,7 @@ void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth ) // ----------------------------------------------------------------------- -void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDrawText, sal_Bool bDrawFrame ) +void StatusBar::ImplDrawItem( bool bOffScreen, sal_uInt16 nPos, bool bDrawText, bool bDrawFrame ) { Rectangle aRect = ImplGetItemRectPos( nPos ); @@ -430,12 +430,12 @@ void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDr { if ( bOffScreen ) { - mbInUserDraw = sal_True; + mbInUserDraw = true; mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() ); UserDrawEvent aODEvt( mpImplData->mpVirDev, Rectangle( Point(), aTextRectSize ), pItem->mnId ); UserDraw( aODEvt ); - mpImplData->mpVirDev->EnableRTL( sal_False ); - mbInUserDraw = sal_False; + mpImplData->mpVirDev->EnableRTL( false ); + mbInUserDraw = false; } else { @@ -529,7 +529,7 @@ void DrawProgress( Window* pWindow, const Point& rPos, pWindow->Push( PUSH_CLIPREGION ); pWindow->IntersectClipRegion( rFramePosSize ); } - sal_Bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, + bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, OUString() ); if( bNeedErase ) pWindow->Pop(); @@ -607,7 +607,7 @@ void DrawProgress( Window* pWindow, const Point& rPos, // ----------------------------------------------------------------------- -void StatusBar::ImplDrawProgress( sal_Bool bPaint, +void StatusBar::ImplDrawProgress( bool bPaint, sal_uInt16 nPercent1, sal_uInt16 nPercent2 ) { bool bNative = IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ); @@ -664,7 +664,7 @@ void StatusBar::ImplCalcProgressRect() // save the divisor for later mnPercentCount = 10000 / nMaxPercent; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) ) { ImplControlValue aValue; @@ -672,7 +672,7 @@ void StatusBar::ImplCalcProgressRect() Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, OUString(), - aNativeControlRegion, aNativeContentRegion ) ) != sal_False ) + aNativeControlRegion, aNativeContentRegion ) ) ) { long nProgressHeight = aNativeControlRegion.GetHeight(); if( nProgressHeight > maPrgsFrameRect.GetHeight() ) @@ -737,18 +737,18 @@ void StatusBar::Paint( const Rectangle& ) sal_uInt16 nItemCount = sal_uInt16( mpItemList->size() ); if ( mbProgressMode ) - ImplDrawProgress( sal_True, 0, mnPercent ); + ImplDrawProgress( true, 0, mnPercent ); else { // draw text if ( !mbVisibleItems || (GetStyle() & WB_RIGHT) ) - ImplDrawText( sal_False, 0 ); + ImplDrawText( false, 0 ); // draw items if ( mbVisibleItems ) { for ( sal_uInt16 i = 0; i < nItemCount; i++ ) - ImplDrawItem( sal_False, i, sal_True, sal_True ); + ImplDrawItem( false, i, true, true ); } } @@ -780,7 +780,7 @@ void StatusBar::Resize() mnTextY = (mnCalcHeight-GetTextHeight())/2; // provoke re-formatting - mbFormat = sal_True; + mbFormat = true; if ( mbProgressMode ) ImplCalcProgressRect(); @@ -868,18 +868,18 @@ void StatusBar::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - mbFormat = sal_True; - ImplInitSettings( sal_True, sal_False, sal_False ); + mbFormat = true; + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -898,8 +898,8 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt ) ) ) { - mbFormat = sal_True; - ImplInitSettings( sal_True, sal_True, sal_True ); + mbFormat = true; + ImplInitSettings( true, true, true ); long nFudge = GetTextHeight() / 4; for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { @@ -963,7 +963,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth, pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET; pItem->mnOffset = nOffset; pItem->mpUserData = 0; - pItem->mbVisible = sal_True; + pItem->mbVisible = true; // add item to list if ( nPos < mpItemList->size() ) { @@ -972,7 +972,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth, mpItemList->push_back( pItem ); } - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -989,7 +989,7 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId ) delete (*mpItemList)[ nPos ]; mpItemList->erase( mpItemList->begin() + nPos ); - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1008,9 +1008,9 @@ void StatusBar::ShowItem( sal_uInt16 nItemId ) ImplStatusItem* pItem = (*mpItemList)[ nPos ]; if ( !pItem->mbVisible ) { - pItem->mbVisible = sal_True; + pItem->mbVisible = true; - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1030,9 +1030,9 @@ void StatusBar::HideItem( sal_uInt16 nItemId ) ImplStatusItem* pItem = (*mpItemList)[ nPos ]; if ( pItem->mbVisible ) { - pItem->mbVisible = sal_False; + pItem->mbVisible = false; - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1043,14 +1043,14 @@ void StatusBar::HideItem( sal_uInt16 nItemId ) // ----------------------------------------------------------------------- -sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const +bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->mbVisible; else - return sal_False; + return false; } void StatusBar::Clear() @@ -1061,7 +1061,7 @@ void StatusBar::Clear() } mpItemList->clear(); - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1237,7 +1237,7 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText ) if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( sal_True, nPos, sal_True, sal_False ); + ImplDrawItem( true, nPos, true, false ); Flush(); } } @@ -1298,7 +1298,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) !mbFormat && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( sal_True, nPos, sal_False, sal_False ); + ImplDrawItem( true, nPos, false, false ); Flush(); } } @@ -1328,7 +1328,7 @@ void StatusBar::RedrawItem( sal_uInt16 nItemId ) pItem->mbVisible && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( sal_True, nPos, sal_False, sal_False ); + ImplDrawItem( true, nPos, false, false ); Flush(); } } @@ -1422,7 +1422,7 @@ void StatusBar::StartProgressMode( const OUString& rText ) { DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" ); - mbProgressMode = sal_True; + mbProgressMode = true; mnPercent = 0; maPrgsTxt = rText; @@ -1457,7 +1457,7 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent ) { Update(); SetLineColor(); - ImplDrawProgress( sal_False, mnPercent, nNewPercent ); + ImplDrawProgress( false, mnPercent, nNewPercent ); Flush(); } mnPercent = nNewPercent; @@ -1469,7 +1469,7 @@ void StatusBar::EndProgressMode() { DBG_ASSERT( mbProgressMode, "StatusBar::EndProgressMode(): no progress mode" ); - mbProgressMode = sal_False; + mbProgressMode = false; maPrgsTxt = ""; // re-trigger Paint to recreate StatusBar @@ -1499,7 +1499,7 @@ void StatusBar::SetText( const OUString& rText ) Update(); long nOldTextWidth = GetTextWidth( GetText() ); Window::SetText( rText ); - ImplDrawText( sal_True, nOldTextWidth ); + ImplDrawText( true, nOldTextWidth ); Flush(); } } diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 0b7aa9f7dfa2..203ccc5e70c7 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -67,33 +67,33 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, // Focus holen und zwar so, das alle Handler gerufen // werden, als ob dieses Fenster den Focus bekommt, // ohne das der Frame den Focus wieder klaut - pWindow->ImplGetFrameData()->mbSysObjFocus = sal_True; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True; + pWindow->ImplGetFrameData()->mbSysObjFocus = true; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = true; pWindow->ToTop( TOTOP_NOGRABFOCUS ); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False; - pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_True; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = false; + pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = true; pWindow->GrabFocus(); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_False; + pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = false; break; case SALOBJ_EVENT_LOSEFOCUS: // Hintenrum einen LoseFocus ausloesen, das der Status // der Fenster dem entsprechenden Activate-Status // entspricht - pWindow->ImplGetFrameData()->mbSysObjFocus = sal_False; + pWindow->ImplGetFrameData()->mbSysObjFocus = false; if ( !pWindow->ImplGetFrameData()->mnFocusId ) { - pWindow->ImplGetFrameData()->mbStartFocusState = sal_True; + pWindow->ImplGetFrameData()->mbStartFocusState = true; Application::PostUserEvent( pWindow->ImplGetFrameData()->mnFocusId, LINK( pWindow->ImplGetFrameWindow(), Window, ImplAsyncFocusHdl ) ); } break; case SALOBJ_EVENT_TOTOP: - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = true; if ( !Application::GetFocusWindow() || pWindow->HasChildPathFocus() ) pWindow->ToTop( TOTOP_NOGRABFOCUS ); else @@ -103,7 +103,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, pWindow->GrabFocus(); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = false; break; } @@ -112,7 +112,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, // ======================================================================= -void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) +void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) { mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow ); @@ -137,7 +137,7 @@ SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle ) : // ----------------------------------------------------------------------- -SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) : +SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) : Window( WINDOW_SYSTEMCHILDWINDOW ) { ImplInitSysChild( pParent, nStyle, pData, bShow ); @@ -167,7 +167,7 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const // ----------------------------------------------------------------------- -void SystemChildWindow::EnableEraseBackground( sal_Bool bEnable ) +void SystemChildWindow::EnableEraseBackground( bool bEnable ) { if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->EnableEraseBackground( bEnable ); @@ -207,7 +207,7 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv ) #endif // HAVE_FEATURE_JAVA } -void SystemChildWindow::SetForwardKey( sal_Bool bEnable ) +void SystemChildWindow::SetForwardKey( bool bEnable ) { if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->SetForwardKey( bEnable ); @@ -215,7 +215,7 @@ void SystemChildWindow::SetForwardKey( sal_Bool bEnable ) // ----------------------------------------------------------------------- -sal_IntPtr SystemChildWindow::GetParentWindowHandle( sal_Bool bUseJava ) +sal_IntPtr SystemChildWindow::GetParentWindowHandle( bool bUseJava ) { sal_IntPtr nRet = 0; diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6b03cf7115a8..94ae46949227 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -71,12 +71,12 @@ SystemWindow::SystemWindow( WindowType nType ) : mpWindowImpl->mnActivateMode = ACTIVATE_MODE_GRABFOCUS; mpMenuBar = NULL; - mbPined = sal_False; - mbRollUp = sal_False; - mbRollFunc = sal_False; - mbDockBtn = sal_False; - mbHideBtn = sal_False; - mbSysChild = sal_False; + mbPined = false; + mbRollUp = false; + mbRollFunc = false; + mbDockBtn = false; + mbHideBtn = false; + mbSysChild = false; mnMenuBarMode = MENUBAR_MODE_NORMAL; mnIcon = 0; } @@ -101,7 +101,7 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt ) if( pWin && pWin->IsSystemWindow() ) pMBar = ((SystemWindow*)pWin)->GetMenuBar(); } - if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), sal_False ) ) + if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), false ) ) return true; } @@ -176,17 +176,17 @@ TaskPaneList* SystemWindow::GetTaskPaneList() // ----------------------------------------------------------------------- -sal_Bool SystemWindow::Close() +bool SystemWindow::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDead() ) - return sal_False; + return false; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return sal_False; + return false; // Is Window not closeable, ignore close Window* pBorderWin = ImplGetBorderWindow(); @@ -196,11 +196,11 @@ sal_Bool SystemWindow::Close() else nStyle = GetStyle(); if ( !(nStyle & WB_CLOSEABLE) ) - return sal_False; + return false; Hide(); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -266,7 +266,7 @@ void SystemWindow::SetIcon( sal_uInt16 nIcon ) // ----------------------------------------------------------------------- -void SystemWindow::EnableSaveBackground( sal_Bool bSave ) +void SystemWindow::EnableSaveBackground( bool bSave ) { if( ImplGetSVData()->maWinData.mbNoSaveBackground ) bSave = false; @@ -284,7 +284,7 @@ void SystemWindow::EnableSaveBackground( sal_Bool bSave ) // ----------------------------------------------------------------------- -sal_Bool SystemWindow::IsSaveBackgroundEnabled() const +bool SystemWindow::IsSaveBackgroundEnabled() const { const Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) @@ -292,12 +292,12 @@ sal_Bool SystemWindow::IsSaveBackgroundEnabled() const if ( pWindow->mpWindowImpl->mpOverlapData ) return pWindow->mpWindowImpl->mpOverlapData->mbSaveBack; else - return sal_False; + return false; } // ----------------------------------------------------------------------- -void SystemWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) +void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) { if ( nButton == TITLE_BUTTON_DOCKING ) { @@ -328,7 +328,7 @@ void SystemWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) // ----------------------------------------------------------------------- -sal_Bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const +bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const { if ( nButton == TITLE_BUTTON_DOCKING ) return mbDockBtn; @@ -338,7 +338,7 @@ sal_Bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const // ----------------------------------------------------------------------- -void SystemWindow::SetPin( sal_Bool bPin ) +void SystemWindow::SetPin( bool bPin ) { if ( bPin != mbPined ) { @@ -355,16 +355,16 @@ void SystemWindow::RollUp() if ( !mbRollUp ) { maOrgSize = GetOutputSizePixel(); - mbRollFunc = sal_True; + mbRollFunc = true; Size aSize = maRollUpOutSize; if ( !aSize.Width() ) aSize.Width() = GetOutputSizePixel().Width(); - mbRollUp = sal_True; + mbRollUp = true; if ( mpWindowImpl->mpBorderWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_True, aSize ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( true, aSize ); else SetOutputSizePixel( aSize ); - mbRollFunc = sal_False; + mbRollFunc = false; } } @@ -374,9 +374,9 @@ void SystemWindow::RollDown() { if ( mbRollUp ) { - mbRollUp = sal_False; + mbRollUp = false; if ( mpWindowImpl->mpBorderWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_False, maOrgSize ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( false, maOrgSize ); else SetOutputSizePixel( maOrgSize ); } @@ -707,7 +707,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) Rectangle aDesktop = GetDesktopRectPixel(); ImplSVData *pSVData = ImplGetSVData(); Window *pWin = pSVData->maWinData.mpFirstFrame; - sal_Bool bWrapped = sal_False; + bool bWrapped = false; while( pWin ) { if( !pWin->ImplIsRealParentPath( this ) && ( pWin != this ) && @@ -728,7 +728,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() ) break; // further displacement not possible -> break // avoid endless testing - bWrapped = sal_True; + bWrapped = true; } else { @@ -949,7 +949,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar ) ImplToBottomChild(); if ( pOldMenuBar ) { - sal_Bool bDelete = (pMenuBar == 0) ? sal_True : sal_False; + bool bDelete = (pMenuBar == 0) ? sal_True : sal_False; if( bDelete && pOldWindow ) { if( mpImplData->mpTaskPaneList ) @@ -990,20 +990,20 @@ void SystemWindow::SetMenuBarMode( sal_uInt16 nMode ) if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) ) { if ( nMode == MENUBAR_MODE_HIDE ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_True ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( true ); else - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_False ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( false ); } } } // ----------------------------------------------------------------------- -sal_Bool SystemWindow::ImplIsInTaskPaneList( Window* pWin ) +bool SystemWindow::ImplIsInTaskPaneList( Window* pWin ) { if( mpImplData && mpImplData->mpTaskPaneList ) return mpImplData->mpTaskPaneList->IsInList( pWin ); - return sal_False; + return false; } unsigned int SystemWindow::GetScreenNumber() const diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index c0b4d9ead371..9bb2f242abc8 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -32,7 +32,7 @@ void TabDialog::ImplInitTabDialogData() mpFixedLine = NULL; mpViewWindow = NULL; meViewAlign = WINDOWALIGN_LEFT; - mbPosControls = sal_True; + mbPosControls = true; } // ----------------------------------------------------------------------- @@ -149,7 +149,7 @@ void TabDialog::ImplPosControls() pTabControl->SetPosPixel( aTabOffset ); // Alle anderen Children positionieren - sal_Bool bTabCtrl = sal_False; + bool bTabCtrl = false; int nLines = 0; long nX; long nY = aDlgSize.Height(); @@ -167,7 +167,7 @@ void TabDialog::ImplPosControls() if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) ) { if ( pChild2 == pTabControl ) - bTabCtrl = sal_True; + bTabCtrl = true; else if ( bTabCtrl ) { if ( !nLines ) @@ -209,7 +209,7 @@ void TabDialog::ImplPosControls() mpFixedLine->Show(); } - mbPosControls = sal_False; + mbPosControls = false; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 5a59ac6506b5..8c64ba7e20e2 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -46,7 +46,7 @@ void TabPage::ImplInit( Window* pParent, WinBits nStyle ) // if the tabpage is drawn (ie filled) by a native widget, make sure all contols will have transparent background // otherwise they will paint with a wrong background if( IsNativeControlSupported(CTRL_TAB_BODY, PART_ENTIRE_CONTROL) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) ) - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); } // ----------------------------------------------------------------------- @@ -56,16 +56,16 @@ void TabPage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index 459f557272d0..b111106dac21 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -132,7 +132,7 @@ void TaskPaneList::AddWindow( Window *pWindow ) } mTaskPanes.insert( insertionPos, pWindow ); - pWindow->ImplIsInTaskPaneList( sal_True ); + pWindow->ImplIsInTaskPaneList( true ); } } @@ -145,25 +145,25 @@ void TaskPaneList::RemoveWindow( Window *pWindow ) if( p != mTaskPanes.end() ) { mTaskPanes.erase( p ); - pWindow->ImplIsInTaskPaneList( sal_False ); + pWindow->ImplIsInTaskPaneList( false ); } } // -------------------------------------------------- -sal_Bool TaskPaneList::IsInList( Window *pWindow ) +bool TaskPaneList::IsInList( Window *pWindow ) { ::std::vector< Window* >::iterator p; p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow ); if( p != mTaskPanes.end() ) - return sal_True; + return true; else - return sal_False; + return false; } // -------------------------------------------------- -sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) +bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { // F6 cycles through everything and works always @@ -175,10 +175,10 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) // // Since the design of Ctrl-Tab looks to be inconsistent ( non-modal dialogs are not reachable // and the shortcut conflicts with tab-control shortcut ), it is no more supported - sal_Bool bSplitterOnly = sal_False; - sal_Bool bFocusInList = sal_False; + bool bSplitterOnly = false; + bool bFocusInList = false; KeyCode aKeyCode = aKeyEvent.GetKeyCode(); - sal_Bool bForward = !aKeyCode.IsShift(); + bool bForward = !aKeyCode.IsShift(); if( aKeyCode.GetCode() == KEY_F6 && ! aKeyCode.IsMod2() ) // F6 { bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift(); @@ -188,43 +188,43 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) while( p != mTaskPanes.end() ) { Window *pWin = *p; - if( pWin->HasChildPathFocus( sal_True ) ) + if( pWin->HasChildPathFocus( true ) ) { - bFocusInList = sal_True; + bFocusInList = true; // Ctrl-F6 goes directly to the document if( !pWin->IsDialog() && aKeyCode.IsMod1() && !aKeyCode.IsShift() ) { pWin->ImplGrabFocusToDocument( GETFOCUS_F6 ); - return sal_True; + return true; } // activate next task pane Window *pNextWin = NULL; if( bSplitterOnly ) - pNextWin = FindNextSplitter( *p, sal_True ); + pNextWin = FindNextSplitter( *p, true ); else pNextWin = FindNextFloat( *p, bForward ); if( pNextWin != pWin ) { - ImplGetSVData()->maWinData.mbNoSaveFocus = sal_True; + ImplGetSVData()->maWinData.mbNoSaveFocus = true; ImplTaskPaneListGrabFocus( pNextWin, bForward ); - ImplGetSVData()->maWinData.mbNoSaveFocus = sal_False; + ImplGetSVData()->maWinData.mbNoSaveFocus = false; } else { // forward key if no splitter found if( bSplitterOnly ) - return sal_False; + return false; // we did not find another taskpane, so // put focus back into document pWin->ImplGrabFocusToDocument( GETFOCUS_F6 | (bForward ? GETFOCUS_FORWARD : GETFOCUS_BACKWARD)); } - return sal_True; + return true; } else ++p; @@ -235,24 +235,24 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { Window *pWin; if( bSplitterOnly ) - pWin = FindNextSplitter( NULL, sal_True ); + pWin = FindNextSplitter( NULL, true ); else pWin = FindNextFloat( NULL, bForward ); if( pWin ) { ImplTaskPaneListGrabFocus( pWin, bForward ); - return sal_True; + return true; } } } - return sal_False; + return false; } // -------------------------------------------------- // returns next splitter -Window* TaskPaneList::FindNextSplitter( Window *pWindow, sal_Bool bForward ) +Window* TaskPaneList::FindNextSplitter( Window *pWindow, bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); @@ -291,7 +291,7 @@ Window* TaskPaneList::FindNextSplitter( Window *pWindow, sal_Bool bForward ) // -------------------------------------------------- // returns first valid item (regardless of type) if pWindow==0, otherwise returns next valid float -Window* TaskPaneList::FindNextFloat( Window *pWindow, sal_Bool bForward ) +Window* TaskPaneList::FindNextFloat( Window *pWindow, bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 509de9750fa2..c89bb59c9298 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -92,7 +92,7 @@ // ----------------------------------------------------------------------- -static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow ); +static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow ); // ----------------------------------------------------------------------- typedef ::std::vector< ToolBox* > ImplTBList; @@ -111,9 +111,9 @@ private: sal_uInt16 mnLineMode; sal_uInt16 mnStartLines; void* mpCustomizeData; - sal_Bool mbCustomizeMode; - sal_Bool mbResizeMode; - sal_Bool mbShowDragRect; + bool mbCustomizeMode; + bool mbResizeMode; + bool mbShowDragRect; public: ImplTBDragMgr(); @@ -137,16 +137,16 @@ public: void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, - sal_uInt16 nLineMode, sal_Bool bResizeItem, + sal_uInt16 nLineMode, bool bResizeItem, void* pData = NULL ); void Dragging( const Point& rPos ); - void EndDragging( sal_Bool bOK = sal_True ); + void EndDragging( bool bOK = true ); void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); } void UpdateDragRect(); DECL_LINK( SelectHdl, Accelerator* ); - sal_Bool IsCustomizeMode() { return mbCustomizeMode; } - sal_Bool IsResizeMode() { return mbResizeMode; } + bool IsCustomizeMode() { return mbCustomizeMode; } + bool IsResizeMode() { return mbResizeMode; } }; // ----------------------------------------------------------------------- @@ -291,7 +291,7 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis ) // execute pending paint requests ImplCheckUpdate( pThis ); - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( pThis->IsNativeControlSupported( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_HORZ : PART_THUMB_VERT ) ) { ToolbarValue aToolbarValue; @@ -375,7 +375,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp g.SetStartColor( startCol ); g.SetEndColor( endCol ); - sal_Bool bLineColor = pThis->IsLineColor(); + bool bLineColor = pThis->IsLineColor(); Color aOldCol = pThis->GetLineColor(); pThis->SetLineColor( pThis->GetSettings().GetStyleSettings().GetShadowColor() ); @@ -480,7 +480,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp } -sal_Bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) +bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) { // use NWF Point aPt; @@ -504,7 +504,7 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi pThis->mpData->mbIsPaintLocked = bOldPaintLock; } -void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, sal_Bool bIsInPopupMode ) +void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, bool bIsInPopupMode ) { // draw a constant color if( !bIsInPopupMode ) @@ -525,7 +525,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) ImplCheckUpdate( pThis ); ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( pThis ); - sal_Bool bIsInPopupMode = pThis->ImplIsInPopupMode(); + bool bIsInPopupMode = pThis->ImplIsInPopupMode(); Region aPaintRegion( rRect ); @@ -550,7 +550,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) // toolbars known to the dockingmanager will be drawn using NWF or a gradient // docked toolbars are transparent and NWF is already used in the docking area which is their common background // so NWF is used here for floating toolbars only - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( pThis->ImplIsFloatingMode() && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL) ) bNativeOk = ImplDrawNativeBackground( pThis, aPaintRegion ); @@ -571,7 +571,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) pThis->Pop(); } -void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, sal_Bool bHighlight, sal_Bool bHasOpenPopup ) +void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, bool bHighlight, bool bHasOpenPopup ) { // the background of non NWF buttons is painted in a constant color // to have the same highlight color (transparency in DrawSelectionBackground()) @@ -700,19 +700,19 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn Size aSize; WindowAlign eOldAlign = pThis->meAlign; bool bOldHorz = pThis->mbHorz; - sal_Bool bOldAssumeDocked = pThis->mpData->mbAssumeDocked; - sal_Bool bOldAssumeFloating = pThis->mpData->mbAssumeFloating; + bool bOldAssumeDocked = pThis->mpData->mbAssumeDocked; + bool bOldAssumeFloating = pThis->mpData->mbAssumeFloating; if ( nCalcMode ) { - sal_Bool bOldFloatingMode = pThis->ImplIsFloatingMode(); + bool bOldFloatingMode = pThis->ImplIsFloatingMode(); - pThis->mpData->mbAssumeDocked = sal_False; - pThis->mpData->mbAssumeFloating = sal_False; + pThis->mpData->mbAssumeDocked = false; + pThis->mpData->mbAssumeFloating = false; if ( nCalcMode == TB_CALCMODE_HORZ ) { - pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation + pThis->mpData->mbAssumeDocked = true; // force non-floating mode during calculation ImplCalcBorder( WINDOWALIGN_TOP, nLeft, nTop, nRight, nBottom, pThis ); ((ToolBox*)pThis)->mbHorz = true; if ( pThis->mbHorz != bOldHorz ) @@ -720,7 +720,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn } else if ( nCalcMode == TB_CALCMODE_VERT ) { - pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation + pThis->mpData->mbAssumeDocked = true; // force non-floating mode during calculation ImplCalcBorder( WINDOWALIGN_LEFT, nLeft, nTop, nRight, nBottom, pThis ); ((ToolBox*)pThis)->mbHorz = false; if ( pThis->mbHorz != bOldHorz ) @@ -728,7 +728,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn } else if ( nCalcMode == TB_CALCMODE_FLOAT ) { - pThis->mpData->mbAssumeFloating = sal_True; // force non-floating mode during calculation + pThis->mpData->mbAssumeFloating = true; // force non-floating mode during calculation nLeft = nTop = nRight = nBottom = 0; ((ToolBox*)pThis)->mbHorz = true; if ( pThis->mbHorz != bOldHorz ) @@ -844,7 +844,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) sal_uInt16 nCalcLines; sal_uInt16 nTempLines; long nMaxLineWidth; - nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True ); + nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, true ); pThis->maFloatSizes.reserve( nCalcLines ); @@ -864,7 +864,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) do { nCalcSize += pThis->mnMaxItemWidth; - nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True ); + nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, true ); } while ( (nCalcSize < upperBoundWidth) && (nLines < nTempLines) && (nTempLines != 1) ); if ( nTempLines < nLines ) @@ -1015,7 +1015,7 @@ sal_uInt16 ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos ) void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode ) { - sal_Bool mbHorz; + bool mbHorz; long nOneLineSize; long nCurSize; long nMaxSize; @@ -1025,27 +1025,27 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec if ( nLineMode & DOCK_LINERIGHT ) { nCurSize = rPos.X() - rRect.Left(); - mbHorz = sal_False; + mbHorz = false; } else if ( nLineMode & DOCK_LINEBOTTOM ) { nCurSize = rPos.Y() - rRect.Top(); - mbHorz = sal_True; + mbHorz = true; } else if ( nLineMode & DOCK_LINELEFT ) { nCurSize = rRect.Right() - rPos.X(); - mbHorz = sal_False; + mbHorz = false; } else if ( nLineMode & DOCK_LINETOP ) { nCurSize = rRect.Bottom() - rPos.Y(); - mbHorz = sal_True; + mbHorz = true; } else { OSL_FAIL( "ImplLineSizing: Trailing else" ); nCurSize = 0; - mbHorz = sal_False; + mbHorz = false; } Size aWinSize = pThis->GetSizePixel(); @@ -1177,9 +1177,9 @@ ImplTBDragMgr::ImplTBDragMgr() mpBoxList = new ImplTBList(); mnLineMode = 0; mnStartLines = 0; - mbCustomizeMode = sal_False; - mbResizeMode = sal_False; - mbShowDragRect = sal_False; + mbCustomizeMode = false; + mbResizeMode = false; + mbShowDragRect = false; mpDragBox = NULL; maAccel.InsertItem( KEY_RETURN, KeyCode( KEY_RETURN ) ); @@ -1229,7 +1229,7 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect ) void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, const Point& rPos, const Rectangle& rRect, - sal_uInt16 nDragLineMode, sal_Bool bResizeItem, + sal_uInt16 nDragLineMode, bool bResizeItem, void* pData ) { mpDragBox = pToolBox; @@ -1266,7 +1266,7 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, maMouseOff.Y() = rRect.Top() - rPos.Y(); maRect = rRect; maStartRect = rRect; - mbShowDragRect = sal_True; + mbShowDragRect = true; pToolBox->ShowTracking( maRect ); } @@ -1306,12 +1306,12 @@ void ImplTBDragMgr::Dragging( const Point& rPos ) // ----------------------------------------------------------------------- -void ImplTBDragMgr::EndDragging( sal_Bool bOK ) +void ImplTBDragMgr::EndDragging( bool bOK ) { mpDragBox->HideTracking(); mpDragBox->ReleaseMouse(); mpDragBox->mbDragging = false; - mbShowDragRect = sal_False; + mbShowDragRect = false; Application::RemoveAccel( &maAccel ); if ( mnLineMode ) @@ -1346,7 +1346,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK ) pItem->mpWindow->SetSizePixel( aSize ); // re-calculate and show ToolBox - mpDragBox->ImplInvalidate( sal_True ); + mpDragBox->ImplInvalidate( true ); mpDragBox->Customize( ToolBoxCustomizeEvent( mpDragBox, nTempItem, TOOLBOX_CUSTOMIZE_RESIZE, mpCustomizeData ) ); @@ -1385,7 +1385,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK ) } } mpCustomizeData = NULL; - mbResizeMode = sal_False; + mbResizeMode = false; mpDragBox->Deactivate(); } @@ -1408,9 +1408,9 @@ void ImplTBDragMgr::UpdateDragRect() IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator*, pAccel ) { if ( pAccel->GetCurItemId() == KEY_ESCAPE ) - EndDragging( sal_False ); + EndDragging( false ); else - EndDragging( sal_True ); + EndDragging( true ); return sal_True; } @@ -1493,13 +1493,13 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle ) ImplGetWindowImpl()->mnStyle &= ~WB_DIALOGCONTROL; } - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- -void ToolBox::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void ToolBox::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { mpData->mbNativeButtons = IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ); @@ -1533,7 +1533,7 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, { aColor = GetControlBackground(); SetBackground( aColor ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); SetParentClipMode( 0 ); } else @@ -1542,7 +1542,7 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, ( GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() ) ) { SetBackground(); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); mpData->maDisplayBackground = Wallpaper( rStyleSettings.GetFaceColor() ); } @@ -1554,7 +1554,7 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, aColor = rStyleSettings.GetWindowColor(); SetBackground( aColor ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); SetParentClipMode( 0 ); ImplUpdateImageList(); @@ -1704,7 +1704,7 @@ ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const } // ----------------------------------------------------------------------- -static void ImplAddButtonBorder( long &rWidth, long& rHeight, sal_Bool bNativeButtons ) +static void ImplAddButtonBorder( long &rWidth, long& rHeight, bool bNativeButtons ) { rWidth += SMALLBUTTON_HSIZE; rHeight += SMALLBUTTON_VSIZE; @@ -1719,12 +1719,12 @@ static void ImplAddButtonBorder( long &rWidth, long& rHeight, sal_Bool bNativeBu // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplCalcItem() +bool ToolBox::ImplCalcItem() { // recalc required ? if ( !mbCalc ) - return sal_False; + return false; ImplDisableFlatButtons(); @@ -1815,8 +1815,8 @@ sal_Bool ToolBox::ImplCalcItem() std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while ( it != mpData->m_aItems.end() ) { - sal_Bool bImage; - sal_Bool bText; + bool bImage; + bool bText; it->mbVisibleText = false; // indicates if text will definitely be drawn, influences dropdown pos @@ -1824,13 +1824,13 @@ sal_Bool ToolBox::ImplCalcItem() { // check if image and/or text exists if ( !(it->maImage) ) - bImage = sal_False; + bImage = false; else - bImage = sal_True; + bImage = true; if ( it->maText.isEmpty() ) - bText = sal_False; + bText = false; else - bText = sal_True; + bText = true; ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting if ( bImage || bText ) { @@ -1999,15 +1999,15 @@ sal_Bool ToolBox::ImplCalcItem() mnMaxItemWidth = nMaxWidth; mnMaxItemHeight = nMaxHeight; - return sal_True; + return true; } else - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz ) +sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz ) { sal_uLong nLineStart = 0; sal_uLong nGroupStart = 0; @@ -2016,8 +2016,8 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b long nLastGroupLineWidth = 0; long nMaxLineWidth = 0; sal_uInt16 nLines = 1; - sal_Bool bWindow; - sal_Bool bBreak = sal_False; + bool bWindow; + bool bBreak = false; long nWidthTotal = nWidth; long nMenuWidth = 0; @@ -2038,12 +2038,12 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b while ( it != mpData->m_aItems.end() ) { it->mbBreak = bBreak; - bBreak = sal_False; + bBreak = false; if ( it->mbVisible ) { - bWindow = sal_False; - bBreak = sal_False; + bWindow = false; + bBreak = false; nCurWidth = 0; if ( it->meType == TOOLBOXITEM_BUTTON || it->meType == TOOLBOXITEM_SPACE ) @@ -2059,7 +2059,7 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b if ( !mbScroll || (nWinItemWidth <= nWidthTotal) ) { nCurWidth = nWinItemWidth; - bWindow = sal_True; + bWindow = true; } else { @@ -2074,17 +2074,17 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b // to show the toolbar's menu; otherwise yes if ( ( ( it == lastVisible ) && (nLineWidth+nCurWidth > nWidthTotal) && mbScroll ) || ( ( it != lastVisible ) && (nLineWidth+nCurWidth+nMenuWidth > nWidthTotal) && mbScroll ) ) - bBreak = sal_True; + bBreak = true; } else if ( it->meType == TOOLBOXITEM_SEPARATOR ) { nCurWidth = it->mnSepSize; if ( !ImplIsFloatingMode() && ( it != lastVisible ) && (nLineWidth+nCurWidth+nMenuWidth > nWidthTotal) ) - bBreak = sal_True; + bBreak = true; } // treat breaks as separators, except when using old style toolbars (ie. no menu button) else if ( (it->meType == TOOLBOXITEM_BREAK) && !IsMenuEnabled() ) - bBreak = sal_True; + bBreak = true; if ( bBreak ) { @@ -2101,7 +2101,7 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b nLineStart = it - mpData->m_aItems.begin(); nGroupStart = nLineStart; it->mbBreak = true; - bBreak = sal_False; + bBreak = false; } else { @@ -2253,7 +2253,7 @@ static void lcl_hideDoubleSeparators( std::vector< ImplToolItem >& rItems ) } } -void ToolBox::ImplFormat( sal_Bool bResize ) +void ToolBox::ImplFormat( bool bResize ) { // Has to re-formatted if ( !mbFormat ) @@ -2268,12 +2268,12 @@ void ToolBox::ImplFormat( sal_Bool bResize ) long nTop; long nMax; // width of layoutarea in pixels sal_uInt16 nFormatLine; - sal_Bool bMustFullPaint; + bool bMustFullPaint; std::vector< ImplToolItem >::iterator it; ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); - sal_Bool bIsInPopupMode = ImplIsInPopupMode(); + bool bIsInPopupMode = ImplIsInPopupMode(); maFloatSizes.clear(); @@ -2287,9 +2287,9 @@ void ToolBox::ImplFormat( sal_Bool bResize ) ImplUpdateDragArea( this ); if ( ImplCalcItem() ) - bMustFullPaint = sal_True; + bMustFullPaint = true; else - bMustFullPaint = sal_False; + bMustFullPaint = false; // calculate new size during interactive resize or @@ -2716,7 +2716,7 @@ IMPL_LINK_NOARG(ToolBox, ImplDropdownLongClickHdl) (mpData->m_aItems[ mnCurPos ].mnBits & TIB_DROPDOWN) ) { - mpData->mbDropDownByKeyboard = sal_False; + mpData->mbDropDownByKeyboard = false; GetDropdownClickHdl().Call( this ); // do not reset data if the dropdown handler opened a floating window @@ -2751,7 +2751,7 @@ IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl) } // ----------------------------------------------------------------------- -static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, sal_Bool bSetColor, sal_Bool bRotate ) +static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, bool bSetColor, bool bRotate ) { Color aOldFillColor = pBox->GetFillColor(); Color aOldLineColor = pBox->GetLineColor(); @@ -2823,10 +2823,10 @@ static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, sal_Bo pBox->SetLineColor( aOldLineColor ); } -static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, sal_Bool bSetColor, sal_Bool bRotate ) +static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, bool bSetColor, bool bRotate ) { - sal_Bool bLineColor = pBox->IsLineColor(); - sal_Bool bFillColor = pBox->IsFillColor(); + bool bLineColor = pBox->IsLineColor(); + bool bFillColor = pBox->IsFillColor(); Color aOldFillColor = pBox->GetFillColor(); Color aOldLineColor = pBox->GetLineColor(); pBox->SetLineColor(); @@ -2880,7 +2880,7 @@ static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect // ----------------------------------------------------------------------- -void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) +void ToolBox::ImplDrawMenubutton( ToolBox *pThis, bool bHighlight ) { if( !pThis->mpData->maMenubuttonItem.maRect.IsEmpty() ) { @@ -2891,8 +2891,8 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) // execute pending paint requests ImplCheckUpdate( pThis ); - sal_Bool bFillColor = pThis->IsFillColor(); - sal_Bool bLineColor = pThis->IsLineColor(); + bool bFillColor = pThis->IsFillColor(); + bool bLineColor = pThis->IsLineColor(); Color aOldFillCol = pThis->GetFillColor(); Color aOldLineCol = pThis->GetLineColor(); @@ -2900,10 +2900,10 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) ImplErase( pThis, pThis->mpData->maMenubuttonItem.maRect, bHighlight ); if( bHighlight ) - ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, sal_False, sal_True, sal_False ); + ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, false, true, false ); if( pThis->ImplHasClippedItems() ) - ImplDrawMoreIndicator( pThis, pThis->mpData->maMenubuttonItem.maRect, sal_True, !pThis->mbHorz ); + ImplDrawMoreIndicator( pThis, pThis->mpData->maMenubuttonItem.maRect, true, !pThis->mbHorz ); // store highlight state pThis->mpData->mbMenubuttonSelected = bHighlight; @@ -2922,29 +2922,29 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) // ----------------------------------------------------------------------- -void ToolBox::ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn ) +void ToolBox::ImplDrawSpin( bool bUpperIn, bool bLowerIn ) { - sal_Bool bTmpUpper; - sal_Bool bTmpLower; + bool bTmpUpper; + bool bTmpLower; if ( maUpperRect.IsEmpty() || maLowerRect.IsEmpty() ) return; if ( mnCurLine > 1 ) - bTmpUpper = sal_True; + bTmpUpper = true; else - bTmpUpper = sal_False; + bTmpUpper = false; if ( mnCurLine+mnVisLines-1 < mnCurLines ) - bTmpLower = sal_True; + bTmpLower = true; else - bTmpLower = sal_False; + bTmpLower = false; if ( !IsEnabled() ) { - bTmpUpper = sal_False; - bTmpLower = sal_False; + bTmpUpper = false; + bTmpLower = false; } ImplDrawSpinButton( this, maUpperRect, maLowerRect, @@ -3002,12 +3002,12 @@ void ToolBox::ImplDrawSeparator( sal_uInt16 nPos, Rectangle rRect ) // ----------------------------------------------------------------------- -static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow ) +static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow ) { // draws toolbar button background either native or using a coloured selection // if bIsWindow is sal_True, the corresponding item is a control and only a selection border will be drawn - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( !bIsWindow && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -3025,10 +3025,10 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 h } if( !bNativeOk ) - pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, sal_True, bIsWindow, 2, NULL, NULL ); + pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, true, bIsWindow, 2, NULL, NULL ); } -void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPaint, sal_Bool bLayout ) +void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bool bLayout ) { if( nPos >= mpData->m_aItems.size() ) @@ -3055,13 +3055,13 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); // no gradient background for items that have a popup open - sal_Bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId); + bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId); - sal_Bool bHighContrastWhite = sal_False; + bool bHighContrastWhite = false; // check the face color as highcontrast indicator // because the toolbox itself might have a gradient if( rStyleSettings.GetFaceColor() == Color( COL_WHITE ) ) - bHighContrastWhite = sal_True; + bHighContrastWhite = true; // Compute buttons area. Size aBtnSize = pItem->maRect.GetSize(); @@ -3129,18 +3129,18 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa Size aSize( GetCtrlTextWidth( pItem->maText ), GetTextHeight() ); Point aPos( pItem->maRect.Left()+2, pItem->maRect.Top() ); aPos.Y() += (pItem->maRect.GetHeight()-aSize.Height())/2; - sal_Bool bClip; + bool bClip; if ( (aSize.Width() > pItem->maRect.GetWidth()-2) || (aSize.Height() > pItem->maRect.GetHeight()-2) ) { - bClip = sal_True; + bClip = true; Rectangle aTempRect( pItem->maRect.Left()+1, pItem->maRect.Top()+1, pItem->maRect.Right()-1, pItem->maRect.Bottom()-1 ); Region aTempRegion( aTempRect ); SetClipRegion( aTempRegion ); } else - bClip = sal_False; + bClip = false; if( bLayout ) { mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.getLength() ); @@ -3192,8 +3192,8 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa nOffY += pItem->maRect.Top(); // determine what has to be drawn on the button: image, text or both - sal_Bool bImage; - sal_Bool bText; + bool bImage; + bool bText; ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText ); @@ -3212,7 +3212,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if ( bImage && ! bLayout ) { const Image* pImage; - if ( (nHighlight != 0) && (!(pItem->maHighImage)) == sal_False ) + if ( (nHighlight != 0) && !!(pItem->maHighImage) ) pImage = &(pItem->maHighImage); else pImage = &(pItem->maImage); @@ -3261,7 +3261,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa } // draw the text - sal_Bool bRotate = sal_False; + bool bRotate = false; if ( bText ) { long nTextOffX = nOffX; @@ -3272,7 +3272,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if( pItem->mbVisibleText && !ImplIsFloatingMode() && ((meAlign == WINDOWALIGN_LEFT) || (meAlign == WINDOWALIGN_RIGHT)) ) { - bRotate = sal_True; + bRotate = true; Font aRotateFont = aOldFont; aRotateFont.SetOrientation( 2700 ); @@ -3328,10 +3328,10 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if ( pItem->mnBits & TIB_DROPDOWN ) { Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) ); - sal_Bool bSetColor = sal_True; + bool bSetColor = true; if ( !pItem->mbEnabled || !IsEnabled() ) { - bSetColor = sal_False; + bSetColor = false; SetFillColor( rStyleSettings.GetShadowColor() ); } @@ -3345,7 +3345,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if( bHasOpenPopup ) ImplDrawFloatwinBorder( pItem ); else - ImplDrawButton( this, aDropDownRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), sal_False ); + ImplDrawButton( this, aDropDownRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), false ); } } ImplDrawDropdownArrow( this, aDropDownRect, bSetColor, bRotate ); @@ -3393,7 +3393,7 @@ void ToolBox::ImplDrawFloatwinBorder( ImplToolItem* pItem ) } } -void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) +void ToolBox::ImplFloatControl( bool bStart, FloatingWindow* pFloatWindow ) { if ( bStart ) @@ -3413,7 +3413,7 @@ void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) // if focus is still in this toolbox, then the floater was opened by keyboard // draw current item with highlight and keep old state - sal_Bool bWasKeyboardActivate = mpData->mbDropDownByKeyboard; + bool bWasKeyboardActivate = mpData->mbDropDownByKeyboard; if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND ) @@ -3433,7 +3433,7 @@ void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) // ----------------------------------------------------------------------- -void ToolBox::ShowLine( sal_Bool bNext ) +void ToolBox::ShowLine( bool bNext ) { mbFormat = true; @@ -3468,7 +3468,7 @@ void ToolBox::ShowLine( sal_Bool bNext ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat ) +bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat ) { Point aMousePos = rMEvt.GetPosPixel(); @@ -3500,7 +3500,7 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat } } - return sal_True; + return true; } if ( mbUpper ) @@ -3509,9 +3509,9 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat if ( bNewIn != mbIn ) { mbIn = bNewIn; - ImplDrawSpin( mbIn, sal_False ); + ImplDrawSpin( mbIn, false ); } - return sal_True; + return true; } if ( mbLower ) @@ -3520,17 +3520,17 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat if ( bNewIn != mbIn ) { mbIn = bNewIn; - ImplDrawSpin( sal_False, mbIn ); + ImplDrawSpin( false, mbIn ); } - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel ) +bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel ) { ImplDisableFlatButtons(); @@ -3559,7 +3559,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa { mbSelection = false; if ( mnCurPos == TOOLBOX_ITEM_NOTFOUND ) - return sal_True; + return true; } // has mouse been released on top of item? @@ -3597,7 +3597,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa ImplAddDel( &aDelData ); Select(); if ( aDelData.IsDead() ) - return sal_True; + return true; ImplRemoveDel( &aDelData ); } } @@ -3630,7 +3630,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa mnDownItemId = 0; mnMouseClicks = 0; mnMouseModifier = 0; - return sal_True; + return true; } else if ( mbUpper || mbLower ) { @@ -3639,11 +3639,11 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa mbUpper = false; mbLower = false; mbIn = false; - ImplDrawSpin( sal_False, sal_False ); - return sal_True; + ImplDrawSpin( false, false ); + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -3665,10 +3665,10 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) // only highlight when the focus is not inside a child window of a toolbox // eg, in a edit control // and do not hilight when focus is in a different toolbox - sal_Bool bDrawHotSpot = sal_True; + bool bDrawHotSpot = true; Window *pWin = Application::GetFocusWindow(); if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this ) - bDrawHotSpot = sal_False; + bDrawHotSpot = false; if ( mbSelection && bDrawHotSpot ) { @@ -3785,7 +3785,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( bDrawHotSpot && ( (mnOutStyle & TOOLBOX_STYLE_FLAT) || !mnOutStyle ) ) { - sal_Bool bClearHigh = sal_True; + bool bClearHigh = true; if ( !rMEvt.IsLeaveWindow() && (mnCurPos == TOOLBOX_ITEM_NOTFOUND) ) { std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -3797,7 +3797,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) { if ( !mnOutStyle || (mnOutStyle & TOOLBOX_STYLE_FLAT) ) { - bClearHigh = sal_False; + bClearHigh = false; if ( mnHighItemId != it->mnId ) { sal_uInt16 nTempPos = sal::static_int_cast<sal_uInt16>(it - mpData->m_aItems.begin()); @@ -3811,7 +3811,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); } mnHighItemId = it->mnId; ImplDrawItem( nTempPos, 2 ); @@ -3828,13 +3828,13 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) } // only clear highlight when focus is not in toolbar - sal_Bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos ) && ImplHasClippedItems(); + bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos ) && ImplHasClippedItems(); if ( bClearHigh || bMenuButtonHit ) { if ( !bMenuButtonHit && mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); } if( mnHighItemId ) @@ -3852,7 +3852,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if( bMenuButtonHit ) { - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } } } @@ -3923,12 +3923,12 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) Rectangle aItemRect = GetItemRect( it->mnId ); mnConfigItem = it->mnId; - sal_Bool bResizeItem; + bool bResizeItem; if ( mbCustomizeMode && it->mbShowWindow && (it->maRect.Right()-TB_RESIZE_OFFSET <= aMousePos.X()) ) - bResizeItem = sal_True; + bResizeItem = true; else - bResizeItem = sal_False; + bResizeItem = false; pMgr->StartDragging( this, aMousePos, aItemRect, 0, bResizeItem ); return; } @@ -3983,7 +3983,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // dropdownonly always triggers the dropdown handler, over the whole button area // the drop down arrow should not trigger the item action - mpData->mbDropDownByKeyboard = sal_False; + mpData->mbDropDownByKeyboard = false; GetDropdownClickHdl().Call( this ); // do not reset data if the dropdown handler opened a floating window @@ -4043,7 +4043,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) StartTracking(); mbUpper = true; mbIn = true; - ImplDrawSpin( sal_True, sal_False ); + ImplDrawSpin( true, false ); } return; } @@ -4054,7 +4054,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) StartTracking(); mbLower = true; mbIn = true; - ImplDrawSpin( sal_False, sal_True ); + ImplDrawSpin( false, true ); } return; } @@ -4077,7 +4077,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // start dragging pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ), - nLineMode, sal_False ); + nLineMode, false ); return; } } @@ -4156,7 +4156,7 @@ void ToolBox::Paint( const Rectangle& rPaintRect ) if ( mnWinStyle & WB_SCROLL ) { if ( mnCurLines > mnLines ) - ImplDrawSpin( sal_False, sal_False ); + ImplDrawSpin( false, false ); } // draw buttons @@ -4446,9 +4446,9 @@ bool ToolBox::Notify( NotifyEvent& rNEvt ) } else if( (GetGetFocusFlags() & (GETFOCUS_BACKWARD|GETFOCUS_TAB) ) == (GETFOCUS_BACKWARD|GETFOCUS_TAB)) // Shift-TAB was pressed in the parent - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); else - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); mnLastFocusItemId = 0; @@ -4540,10 +4540,10 @@ void ToolBox::Command( const CommandEvent& rCEvt ) if ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) { if ( (mnCurLine > 1) && (pData->GetDelta() > 0) ) - ShowLine( sal_False ); + ShowLine( false ); else if ( (mnCurLine+mnVisLines-1 < mnCurLines) && (pData->GetDelta() < 0) ) - ShowLine( sal_True ); - ImplDrawSpin( sal_False, sal_False ); + ShowLine( true ); + ImplDrawSpin( false, false ); return; } } @@ -4572,17 +4572,17 @@ void ToolBox::StateChanged( StateChangedType nType ) { mbCalc = true; mbFormat = true; - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); // font, foreground, background + ImplInitSettings( false, false, true ); // font, foreground, background Invalidate(); } @@ -4604,7 +4604,7 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { mbCalc = true; mbFormat = true; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } @@ -4614,7 +4614,7 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::PrepareToggleFloatingMode() +bool ToolBox::PrepareToggleFloatingMode() { return DockingWindow::PrepareToggleFloatingMode(); } @@ -4656,7 +4656,7 @@ void ToolBox::ToggleFloatingMode() // if orientation changes, the toolbox has to be initialized again // to update the direction of the gradient mbCalc = true; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } mbFormat = true; @@ -4675,13 +4675,13 @@ void ToolBox::StartDocking() // ----------------------------------------------------------------------- -sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) +bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) { // do nothing during dragging, it was calculated before if ( mbDragging ) - return sal_False; + return false; - sal_Bool bFloatMode = sal_False; + bool bFloatMode = false; DockingWindow::Docking( rPos, rRect ); @@ -4728,7 +4728,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) // become a floating window Rectangle aIntersect = aInRect.GetIntersection( aDockingRect ); if ( aIntersect == aDockingRect ) - bFloatMode = sal_True; + bFloatMode = true; else { // docking rectangle is in the "sensible area" @@ -4781,7 +4781,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) } } else - bFloatMode = sal_True; + bFloatMode = true; if ( bFloatMode ) { @@ -4810,7 +4810,7 @@ void ToolBox::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) if ( meAlign != meDockAlign ) SetAlign( meDockAlign ); } - if ( bFloatMode || (bFloatMode != ImplIsFloatingMode()) ) + if ( bFloatMode || (bool(bFloatMode) != ImplIsFloatingMode()) ) DockingWindow::EndDocking( rRect, bFloatMode ); } @@ -4924,9 +4924,9 @@ Size ToolBox::CalcPopupWindowSizePixel() const nLines = (sal_uInt16) ceil( sqrt( (double) GetItemCount() ) ); } - sal_Bool bPopup = mpData->mbAssumePopupMode; + bool bPopup = mpData->mbAssumePopupMode; ToolBox *pThis = (ToolBox*) this; - pThis->mpData->mbAssumePopupMode = sal_True; + pThis->mpData->mbAssumePopupMode = true; Size aSize = CalcFloatingWindowSizePixel( nLines ); @@ -4943,13 +4943,13 @@ Size ToolBox::CalcFloatingWindowSizePixel() const Size ToolBox::CalcFloatingWindowSizePixel( sal_uInt16 nCalcLines ) const { - sal_Bool bFloat = mpData->mbAssumeFloating; - sal_Bool bDocking = mpData->mbAssumeDocked; + bool bFloat = mpData->mbAssumeFloating; + bool bDocking = mpData->mbAssumeDocked; // simulate floating mode and force reformat before calculating ToolBox *pThis = (ToolBox*) this; - pThis->mpData->mbAssumeFloating = sal_True; - pThis->mpData->mbAssumeDocked = sal_False; + pThis->mpData->mbAssumeFloating = true; + pThis->mpData->mbAssumeDocked = false; Size aSize = ImplCalcFloatSize( (ToolBox*) this, nCalcLines ); @@ -5030,7 +5030,7 @@ void ToolBox::GetFocus() void ToolBox::LoseFocus() { - ImplChangeHighlight( NULL, sal_True ); + ImplChangeHighlight( NULL, true ); DockingWindow::LoseFocus(); } @@ -5038,7 +5038,7 @@ void ToolBox::LoseFocus() // ----------------------------------------------------------------------- // performs the action associated with an item, ie simulates clicking the item -void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl ) +void ToolBox::TriggerItem( sal_uInt16 nItemId, bool bShift, bool bCtrl ) { mnHighItemId = nItemId; sal_uInt16 nModifier = 0; @@ -5054,16 +5054,16 @@ void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl ) // calls the button's action handler // returns sal_True if action was called -sal_Bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) +bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) { - sal_Bool bRet = sal_True; + bool bRet = true; if( mnHighItemId ) { ImplToolItem *pToolItem = ImplGetItem( mnHighItemId ); // #107712#, activate can also be called for disabled entries if( pToolItem && !pToolItem->mbEnabled ) - return sal_True; + return true; if( pToolItem && pToolItem->mpWindow && HasFocus() ) { @@ -5110,13 +5110,13 @@ sal_Bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) } } else - bRet = sal_False; + bRet = false; return bRet; } // ----------------------------------------------------------------------- -sal_Bool ImplCloseLastPopup( Window *pParent ) +bool ImplCloseLastPopup( Window *pParent ) { // close last popup toolbox (see also: // ImplHandleMouseFloatMode(...) in winproc.cxx ) @@ -5128,23 +5128,23 @@ sal_Bool ImplCloseLastPopup( Window *pParent ) if( pLastLevelFloat && pLastLevelFloat != pParent ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - return sal_True; + return true; } } - return sal_False; + return false; } // opens a drop down toolbox item // returns sal_True if item was opened -sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) +bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) { sal_uInt16 nCode = aKeyCode.GetCode(); - sal_Bool bRet = sal_True; + bool bRet = true; // arrow keys should work only in the opposite direction of alignment (to not break cursor travelling) if ( ((nCode == KEY_LEFT || nCode == KEY_RIGHT) && IsHorizontal()) || ((nCode == KEY_UP || nCode == KEY_DOWN) && !IsHorizontal()) ) - return sal_False; + return false; if( IsMenuEnabled() && mpData->mbMenubuttonSelected ) { @@ -5168,7 +5168,7 @@ sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) mbIsKeyEvent = true; Activate(); - mpData->mbDropDownByKeyboard = sal_True; + mpData->mbDropDownByKeyboard = true; GetDropdownClickHdl().Call( this ); mbIsKeyEvent = false; @@ -5176,7 +5176,7 @@ sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) mnMouseModifier = 0; } else - bRet = sal_False; + bRet = false; return bRet; } @@ -5193,8 +5193,8 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) bool bOldSchoolContainer = ((pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL); bool bParentIsContainer = bOldSchoolContainer || isContainerWindow(pParent); - sal_Bool bForwardKey = sal_False; - sal_Bool bGrabFocusToDocument = sal_False; + bool bForwardKey = false; + bool bGrabFocusToDocument = false; // #107776# we might be destroyed in the keyhandler ImplDelData aDelData; @@ -5208,7 +5208,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( !IsHorizontal() ) - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); else ImplOpenItem( aKeyCode ); } @@ -5218,7 +5218,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( IsHorizontal() ) - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); else ImplOpenItem( aKeyCode ); } @@ -5228,7 +5228,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( !IsHorizontal() ) - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); else ImplOpenItem( aKeyCode ); } @@ -5238,7 +5238,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( IsHorizontal() ) - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); else ImplOpenItem( aKeyCode ); } @@ -5252,7 +5252,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = 1; mbFormat = true; ImplFormat(); - ImplDrawSpin( sal_False, sal_False ); + ImplDrawSpin( false, false ); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; @@ -5265,20 +5265,20 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = mnCurLines; mbFormat = true; ImplFormat(); - ImplDrawSpin( sal_False, sal_False ); + ImplDrawSpin( false, false ); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; case KEY_END: { ImplChangeHighlight( NULL ); - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); } break; case KEY_HOME: { ImplChangeHighlight( NULL ); - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); } break; case KEY_ESCAPE: @@ -5310,7 +5310,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) ImplToolItem *pItem = ImplGetItem( mnHighItemId ); if( !pItem->mbEnabled ) { - bGrabFocusToDocument = sal_True; + bGrabFocusToDocument = true; } } if( !bGrabFocusToDocument ) @@ -5340,7 +5340,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) // while the toolbox has the focus // just forward function and special keys and combinations with Alt-key if( aKeyGroup == KEYGROUP_FKEYS || aKeyGroup == KEYGROUP_MISC || aKeyCode.IsMod2() ) - bForwardKey = sal_True; + bForwardKey = true; } } } @@ -5439,11 +5439,11 @@ void ToolBox::ChangeHighlight( sal_uInt16 nPos ) { if ( nPos < GetItemCount() ) { ImplGrabFocus( 0 ); - ImplChangeHighlight ( ImplGetItem ( GetItemId ( (sal_uInt16) nPos ) ), sal_False ); + ImplChangeHighlight ( ImplGetItem ( GetItemId ( (sal_uInt16) nPos ) ), false ); } } -void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus ) +void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus ) { // avoid recursion due to focus change if( mbChangingHighlight ) @@ -5522,17 +5522,17 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus ) // ----------------------------------------------------------------------- // check for keyboard accessible items -static sal_Bool ImplIsValidItem( const ImplToolItem* pItem, sal_Bool bNotClipped ) +static bool ImplIsValidItem( const ImplToolItem* pItem, bool bNotClipped ) { - sal_Bool bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem )); + bool bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem )); if( bValid && bNotClipped && pItem->IsClipped() ) - bValid = sal_False; + bValid = false; return bValid; } // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) +bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle ) { ImplToolItem* pToolItem = ImplGetItem( mnHighItemId ); @@ -5549,13 +5549,13 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) while( it != mpData->m_aItems.begin() ) { --it; - if ( ImplIsValidItem( &(*it), sal_True ) ) + if ( ImplIsValidItem( &(*it), true ) ) { pItem = &(*it); break; } } - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); ImplChangeHighlight( pItem ); } else @@ -5564,17 +5564,17 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - if ( ImplIsValidItem( &(*it), sal_True ) ) + if ( ImplIsValidItem( &(*it), true ) ) break; ++it; } if( it != mpData->m_aItems.end() ) { - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); ImplChangeHighlight( &(*it) ); } } - return sal_True; + return true; } if( bUp ) @@ -5583,7 +5583,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - if ( ImplIsValidItem( &(*it), sal_False ) ) + if ( ImplIsValidItem( &(*it), false ) ) break; ++it; } @@ -5592,11 +5592,11 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( (it != mpData->m_aItems.end() && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } else ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : NULL ); - return sal_True; + return true; } else { @@ -5606,7 +5606,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } else { @@ -5615,7 +5615,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) while( it != mpData->m_aItems.begin() ) { --it; - if ( ImplIsValidItem( &(*it), sal_False ) ) + if ( ImplIsValidItem( &(*it), false ) ) { pItem = &(*it); break; @@ -5623,7 +5623,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) } ImplChangeHighlight( pItem ); } - return sal_True; + return true; } } @@ -5640,14 +5640,14 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( !pos-- ) { if( bNoCycle ) - return sal_False; + return false; // highlight the menu button if it is the last item if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); - return sal_True; + ImplDrawMenubutton( this, true ); + return true; } else pos = nCount-1; @@ -5658,14 +5658,14 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( ++pos >= nCount ) { if( bNoCycle ) - return sal_False; + return false; // highlight the menu button if it is the last item if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); - return sal_True; + ImplDrawMenubutton( this, true ); + return true; } else pos = 0; @@ -5674,7 +5674,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) pToolItem = &mpData->m_aItems[pos]; - if ( ImplIsValidItem( pToolItem, sal_False ) ) + if ( ImplIsValidItem( pToolItem, false ) ) break; } while( ++i < nCount); @@ -5683,14 +5683,14 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) { // select the menu button if a clipped item would be selected ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } else if( i != nCount ) ImplChangeHighlight( pToolItem ); else - return sal_False; + return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -5727,7 +5727,7 @@ void ToolBox::ImplHideFocus() if ( mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); } } diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 277d5cf8c09f..9c5667a96209 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -76,17 +76,17 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() : mnMenuButtonWidth = TB_MENUBUTTON_SIZE; - mbIsLocked = sal_False; - mbNativeButtons = sal_False; - mbIsPaintLocked = sal_False; - mbAssumeDocked = sal_False; - mbAssumePopupMode = sal_False; - mbAssumeFloating = sal_False; - mbKeyInputDisabled = sal_False; - mbMenubuttonSelected = sal_False; - mbPageScroll = sal_False; - mbWillUsePopupMode = sal_False; - mbDropDownByKeyboard = sal_False; + mbIsLocked = false; + mbNativeButtons = false; + mbIsPaintLocked = false; + mbAssumeDocked = false; + mbAssumePopupMode = false; + mbAssumeFloating = false; + mbKeyInputDisabled = false; + mbMenubuttonSelected = false; + mbPageScroll = false; + mbWillUsePopupMode = false; + mbDropDownByKeyboard = false; } ImplToolBoxPrivateData::~ImplToolBoxPrivateData() @@ -98,7 +98,7 @@ ImplToolBoxPrivateData::~ImplToolBoxPrivateData() // ----------------------------------------------------------------------- void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, - sal_Bool bEmptyBtn) + bool bEmptyBtn) { mnId = nItemId; mpWindow = NULL; @@ -121,7 +121,7 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, ImplToolItem::ImplToolItem() { - init(0, 0, sal_True); + init(0, 0, true); } // ----------------------------------------------------------------------- @@ -130,7 +130,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nItemBits ) : maImage( rImage ) { - init(nItemId, nItemBits, sal_False); + init(nItemId, nItemBits, false); } // ----------------------------------------------------------------------- @@ -139,7 +139,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItemBits nItemBits ) : maText( rText ) { - init(nItemId, nItemBits, sal_False); + init(nItemId, nItemBits, false); } // ----------------------------------------------------------------------- @@ -149,7 +149,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, maImage( rImage ), maText( rText ) { - init(nItemId, nItemBits, sal_False); + init(nItemId, nItemBits, false); } // ----------------------------------------------------------------------- @@ -231,7 +231,7 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) // ----------------------------------------------------------------------- -Size ImplToolItem::GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) +Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) { Size aSize( rDefaultSize ); // the size of 'standard' toolbox items // non-standard items are eg windows or buttons with text @@ -285,27 +285,27 @@ Size ImplToolItem::GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWid // ----------------------------------------------------------------------- -void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const +void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbImage, bool& rbText ) const { if ( meType != TOOLBOXITEM_BUTTON ) { // no button -> draw nothing - rbImage = rbText = sal_False; + rbImage = rbText = false; return; } - sal_Bool bHasImage; - sal_Bool bHasText; + bool bHasImage; + bool bHasText; // check for image and/or text if ( !(maImage) ) - bHasImage = sal_False; + bHasImage = false; else - bHasImage = sal_True; + bHasImage = true; if ( maText.isEmpty() ) - bHasText = sal_False; + bHasText = false; else - bHasText = sal_True; + bHasText = true; // prefer images if symbolonly buttons are drawn // prefer texts if textonly buttons are dreawn @@ -314,38 +314,38 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& r { if( bHasImage || !bHasText ) { - rbImage = sal_True; - rbText = sal_False; + rbImage = true; + rbText = false; } else { - rbImage = sal_False; - rbText = sal_True; + rbImage = false; + rbText = true; } } else if ( eButtonType == BUTTON_TEXT ) // drawing text only { if( bHasText || !bHasImage ) { - rbImage = sal_False; - rbText = sal_True; + rbImage = false; + rbText = true; } else { - rbImage = sal_True; - rbText = sal_False; + rbImage = true; + rbText = false; } } else // drawing icons and text both { - rbImage = sal_True; - rbText = sal_True; + rbImage = true; + rbText = true; } } // ----------------------------------------------------------------------- -Rectangle ImplToolItem::GetDropDownRect( sal_Bool bHorz ) const +Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const { Rectangle aRect; if( (mnBits & TIB_DROPDOWN) && !maRect.IsEmpty() ) @@ -363,14 +363,14 @@ Rectangle ImplToolItem::GetDropDownRect( sal_Bool bHorz ) const // ----------------------------------------------------------------------- -sal_Bool ImplToolItem::IsClipped() const +bool ImplToolItem::IsClipped() const { return ( meType == TOOLBOXITEM_BUTTON && mbVisible && maRect.IsEmpty() ); } // ----------------------------------------------------------------------- -sal_Bool ImplToolItem::IsItemHidden() const +bool ImplToolItem::IsItemHidden() const { return ( meType == TOOLBOXITEM_BUTTON && !mbVisible ); } @@ -389,7 +389,7 @@ const OUString ToolBox::ImplConvertMenuString( const OUString& rStr ) // ----------------------------------------------------------------------- -void ToolBox::ImplInvalidate( sal_Bool bNewCalc, sal_Bool bFullPaint ) +void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) { ImplUpdateInputEnable(); @@ -529,7 +529,7 @@ void ToolBox::UserDraw( const UserDrawEvent& ) void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) { sal_uLong nObjMask; - sal_Bool bImage = sal_False; // Wurde Image gesetzt + bool bImage = false; // Wurde Image gesetzt // Item anlegen ImplToolItem aItem; @@ -564,22 +564,22 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) Bitmap aBmp = Bitmap( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); aItem.maImage = Image( aBmp, IMAGE_STDBTN_COLOR ); - bImage = sal_True; + bImage = true; } if ( nObjMask & RSC_TOOLBOXITEM_IMAGE ) { aItem.maImage = Image( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); - bImage = sal_True; + bImage = true; } if ( nObjMask & RSC_TOOLBOXITEM_DISABLE ) - aItem.mbEnabled = !(sal_Bool)ReadShortRes(); + aItem.mbEnabled = ReadShortRes() == 0; if ( nObjMask & RSC_TOOLBOXITEM_STATE ) aItem.meState = (TriState)ReadLongRes(); if ( nObjMask & RSC_TOOLBOXITEM_HIDE ) - aItem.mbVisible = !((sal_Bool)ReadShortRes()); + aItem.mbVisible = ReadShortRes() == 0; if ( nObjMask & RSC_TOOLBOXITEM_COMMAND ) aItem.maCommandStr = ReadStringRes(); @@ -590,15 +590,15 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) aItem.maImage = maImageList.GetImage( aItem.mnId ); // Wenn es sich um ein ButtonItem handelt, die ID ueberpruefen - sal_Bool bNewCalc; + bool bNewCalc; if ( aItem.meType != TOOLBOXITEM_BUTTON ) { - bNewCalc = sal_False; + bNewCalc = false; aItem.mnId = 0; } else { - bNewCalc = sal_True; + bNewCalc = true; DBG_ASSERT( aItem.mnId, "ToolBox::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( aItem.mnId ) == TOOLBOX_ITEM_NOTFOUND, @@ -631,7 +631,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, SetItemImage(nItemId, rImage); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -653,7 +653,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, SetItemImage(nItemId, rImage); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -673,7 +673,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, ImplConvertMenuString( rText ), nBits ) ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -818,7 +818,7 @@ void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, if ( pWindow ) pWindow->Hide(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -836,7 +836,7 @@ void ToolBox::InsertSpace( sal_uInt16 nPos ) mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -856,7 +856,7 @@ void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize ) mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -874,7 +874,7 @@ void ToolBox::InsertBreak( sal_uInt16 nPos ) mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -887,11 +887,11 @@ void ToolBox::RemoveItem( sal_uInt16 nPos ) { if( nPos < mpData->m_aItems.size() ) { - sal_Bool bMustCalc; + bool bMustCalc; if ( mpData->m_aItems[nPos].meType == TOOLBOXITEM_BUTTON ) - bMustCalc = sal_True; + bMustCalc = true; else - bMustCalc = sal_False; + bMustCalc = false; if ( mpData->m_aItems[nPos].mpWindow ) mpData->m_aItems[nPos].mpWindow->Hide(); @@ -937,7 +937,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId, mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem ); mpData->ImplClearLayoutData(); // ToolBox neu ausgeben - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos); @@ -956,7 +956,7 @@ void ToolBox::Clear() mnCurItemId = 0; mnHighItemId = 0; - ImplInvalidate( sal_True, sal_True ); + ImplInvalidate( true, true ); // Notify ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED ); @@ -972,7 +972,7 @@ void ToolBox::SetButtonType( ButtonType eNewType ) // Hier besser alles neu ausgeben, da es ansonsten zu Problemen // mit den per CopyBits kopierten Bereichen geben kann - ImplInvalidate( sal_True ); + ImplInvalidate( true ); } } @@ -1052,7 +1052,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) mbHorz = true; // Update the background according to Persona if necessary - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); // Hier alles neu ausgeben, da sich Border auch aendert mbCalc = true; @@ -1076,13 +1076,13 @@ void ToolBox::SetLineCount( sal_uInt16 nNewLines ) // Hier besser alles neu ausgeben, da es ansonsten zu Problemen // mit den per CopyBits kopierten Bereichen geben kann - ImplInvalidate( sal_False ); + ImplInvalidate( false ); } } // ----------------------------------------------------------------------- -void ToolBox::SetPageScroll( sal_Bool b ) +void ToolBox::SetPageScroll( bool b ) { mpData->mbPageScroll = b; } @@ -1278,16 +1278,16 @@ Size ToolBox::GetItemContentSize( sal_uInt16 nItemId ) const // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHasExternalMenubutton() +bool ToolBox::ImplHasExternalMenubutton() { // check if the borderwindow (i.e. the decoration) provides the menu button - sal_Bool bRet = sal_False; + bool bRet = false; if( ImplIsFloatingMode() ) { // custom menu is placed in the decoration ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( WINDOW_BORDER ) ); if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) - bRet = sal_True; + bRet = true; } return bRet; } @@ -1304,9 +1304,9 @@ void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits ) nBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; nOldBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; // trigger reformat when the item width has changed (dropdown arrow) - sal_Bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); + bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); if ( nBits != nOldBits ) - ImplInvalidate( sal_True, bFormat ); + ImplInvalidate( true, bFormat ); } } @@ -1401,7 +1401,7 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) Size aOldSize = pItem->maImage.GetSizePixel(); pItem->maImage = aImage; if ( aOldSize != pItem->maImage.GetSizePixel() ) - ImplInvalidate( sal_True ); + ImplInvalidate( true ); else ImplUpdateItem( nPos ); } @@ -1463,7 +1463,7 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ) if ( !mbCalc ) { if ( aOldSize != pItem->maImage.GetSizePixel() ) - ImplInvalidate( sal_True ); + ImplInvalidate( true ); else ImplUpdateItem( nPos ); } @@ -1482,7 +1482,7 @@ static Image ImplMirrorImage( const Image& rImage ) return Image( aMirrBitmapEx ); } -void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ) +void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1537,7 +1537,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText ) pItem->maText = ImplConvertMenuString( rText ); mpData->ImplClearLayoutData(); if ( nOldWidth != GetCtrlTextWidth( pItem->maText ) ) - ImplInvalidate( sal_True ); + ImplInvalidate( true ); else ImplUpdateItem( nPos ); } @@ -1576,7 +1576,7 @@ void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) pItem->mpWindow = pNewWindow; if ( pNewWindow ) pNewWindow->Hide(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED, reinterpret_cast< void* >( nPos ) ); } } @@ -1636,7 +1636,7 @@ void ToolBox::EndSelection() // ----------------------------------------------------------------------- -void ToolBox::SetItemDown( sal_uInt16 nItemId, sal_Bool bDown, sal_Bool bRelease ) +void ToolBox::SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1789,14 +1789,14 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const +bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbEnabled; else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -1812,36 +1812,36 @@ void ToolBox::ShowItem( sal_uInt16 nItemId, bool bVisible ) if ( pItem->mbVisible != bVisible ) { pItem->mbVisible = bVisible; - ImplInvalidate( sal_False ); + ImplInvalidate( false ); } } } // ----------------------------------------------------------------------- -sal_Bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const +bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbVisible; else - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const +bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const { // is the item on the visible area of the toolbox? - sal_Bool bRet = sal_False; + bool bRet = false; Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder ); ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem && pItem->mbVisible && !pItem->maRect.IsEmpty() && aRect.IsOver( pItem->maRect ) ) { - bRet = sal_True; + bRet = true; } return bRet; @@ -1958,7 +1958,7 @@ void ToolBox::SetOutStyle( sal_uInt16 nNewStyle ) mnMaxItemHeight = 1; } - ImplInvalidate( sal_True, sal_True ); + ImplInvalidate( true, true ); } } @@ -1974,11 +1974,11 @@ void ToolBox::ImplUpdateInputEnable() if( it->mbEnabled ) { // at least one useful entry - mpData->mbKeyInputDisabled = sal_False; + mpData->mbKeyInputDisabled = false; return; } } - mpData->mbKeyInputDisabled = sal_True; + mpData->mbKeyInputDisabled = true; } // ----------------------------------------------------------------------- @@ -1994,7 +1994,7 @@ void ToolBox::ImplFillLayoutData() const // Nur malen, wenn Rechteck im PaintRectangle liegt if ( !pItem->maRect.IsEmpty() ) - const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, sal_False, sal_True ); + const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, false, true ); } } @@ -2096,7 +2096,7 @@ sal_uInt16 ToolBox::GetMenuType() const return mpData->maMenuType; } -sal_Bool ToolBox::IsMenuEnabled() const +bool ToolBox::IsMenuEnabled() const { return mpData->maMenuType != TOOLBOX_MENUTYPE_NONE; } @@ -2113,7 +2113,7 @@ void ToolBox::SetMenuButtonHdl( const Link& rLink ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHasClippedItems() +bool ToolBox::ImplHasClippedItems() { // are any items currently clipped ? ImplFormat(); @@ -2121,10 +2121,10 @@ sal_Bool ToolBox::ImplHasClippedItems() while ( it != mpData->m_aItems.end() ) { if( it->IsClipped() ) - return sal_True; + return true; ++it; } - return sal_False; + return false; } void ToolBox::UpdateCustomMenu() @@ -2190,7 +2190,7 @@ IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent*, pEvent ) { sal_uInt16 id = GetMenu()->GetItemId( pEvent->GetItemPos() ); if( id >= TOOLBOX_MENUITEM_START ) - TriggerItem( id - TOOLBOX_MENUITEM_START, sal_False, sal_False ); + TriggerItem( id - TOOLBOX_MENUITEM_START, false, false ); } return 0; } @@ -2275,24 +2275,24 @@ void ToolBox::ExecuteCustomMenu() // ----------------------------------------------------------------------- // checks override first, useful during calculation of sizes -sal_Bool ToolBox::ImplIsFloatingMode() const +bool ToolBox::ImplIsFloatingMode() const { DBG_ASSERT( !(mpData->mbAssumeDocked && mpData->mbAssumeFloating), "ToolBox::ImplIsFloatingMode(): cannot assume docked and floating" ); if( mpData->mbAssumeDocked ) - return sal_False; + return false; else if( mpData->mbAssumeFloating ) - return sal_True; + return true; else return IsFloatingMode(); } // checks override first, useful during calculation of sizes -sal_Bool ToolBox::ImplIsInPopupMode() const +bool ToolBox::ImplIsInPopupMode() const { if( mpData->mbAssumePopupMode ) - return sal_True; + return true; else { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); @@ -2302,7 +2302,7 @@ sal_Bool ToolBox::ImplIsInPopupMode() const // ----------------------------------------------------------------------- -void ToolBox::Lock( sal_Bool bLock ) +void ToolBox::Lock( bool bLock ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( !pWrapper ) @@ -2322,7 +2322,7 @@ void ToolBox::Lock( sal_Bool bLock ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::AlwaysLocked() +bool ToolBox::AlwaysLocked() { // read config item to determine toolbox behaviour, used for subtoolbars @@ -2338,21 +2338,21 @@ sal_Bool ToolBox::AlwaysLocked() if ( aNode.isValid() ) { // feature enabled ? - sal_Bool bStatesEnabled = sal_Bool(); + bool bStatesEnabled = bool(); ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString("StatesEnabled") ); if( aValue >>= bStatesEnabled ) { - if( bStatesEnabled == sal_True ) + if( bStatesEnabled ) { // now read the locking state utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( comphelper::getProcessComponentContext(), OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars/States") ); // note: case sensitive ! - sal_Bool bLocked = sal_Bool(); + bool bLocked = bool(); ::com::sun::star::uno::Any aValue2 = aNode2.getNodeValue( OUString("Locked") ); if( aValue2 >>= bLocked ) - nAlwaysLocked = (bLocked == sal_True) ? 1 : 0; + nAlwaysLocked = bLocked ? 1 : 0; } } } @@ -2361,12 +2361,12 @@ sal_Bool ToolBox::AlwaysLocked() return nAlwaysLocked == 1 ? sal_True : sal_False; } -sal_Bool ToolBox::WillUsePopupMode() const +bool ToolBox::WillUsePopupMode() const { return mpData->mbWillUsePopupMode; } -void ToolBox::WillUsePopupMode( sal_Bool b ) +void ToolBox::WillUsePopupMode( bool b ) { mpData->mbWillUsePopupMode = b; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1d93c80dd9cd..ed057f78fcd5 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -450,10 +450,10 @@ bool Window::ImplCheckUIFont( const Font& rFont ) // ----------------------------------------------------------------------- -void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl ) +void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) { StyleSettings aTmpSt( rSettings.GetStyleSettings() ); - aTmpSt.SetHighContrastMode( sal_False ); + aTmpSt.SetHighContrastMode( false ); rSettings.SetStyleSettings( aTmpSt ); ImplGetFrame()->UpdateSettings( rSettings ); // reset default border width for layouters @@ -635,7 +635,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl // (see above) then accept that if( !rSettings.GetStyleSettings().GetHighContrastMode() ) { - sal_Bool bTmp = sal_False, bAutoHCMode = sal_True; + bool bTmp = false, bAutoHCMode = true; utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( comphelper::getProcessComponentContext(), OUString("org.openoffice.Office.Common/Accessibility") ); // note: case sensitive ! @@ -660,7 +660,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl if( bForceHCMode ) { aStyleSettings = rSettings.GetStyleSettings(); - aStyleSettings.SetHighContrastMode( sal_True ); + aStyleSettings.SetHighContrastMode( true ); aStyleSettings.SetSymbolsStyle( STYLE_SYMBOLS_HICONTRAST ); rSettings.SetStyleSettings( aStyleSettings ); } @@ -790,7 +790,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL; mpWindowImpl->mpOverlapData->mpNextBackWin = NULL; mpWindowImpl->mpOverlapData->mnSaveBackSize = 0; - mpWindowImpl->mpOverlapData->mbSaveBack = sal_False; + mpWindowImpl->mpOverlapData->mbSaveBack = false; mpWindowImpl->mpOverlapData->mnTopLevel = 1; } @@ -906,21 +906,21 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpFrameData->mnMouseCode = 0; mpWindowImpl->mpFrameData->mnMouseMode = 0; mpWindowImpl->mpFrameData->meMapUnit = MAP_PIXEL; - mpWindowImpl->mpFrameData->mbHasFocus = sal_False; - mpWindowImpl->mpFrameData->mbInMouseMove = sal_False; - mpWindowImpl->mpFrameData->mbMouseIn = sal_False; - mpWindowImpl->mpFrameData->mbStartDragCalled = sal_False; - mpWindowImpl->mpFrameData->mbNeedSysWindow = sal_False; - mpWindowImpl->mpFrameData->mbMinimized = sal_False; - mpWindowImpl->mpFrameData->mbStartFocusState = sal_False; - mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = sal_False; - mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = sal_False; - mpWindowImpl->mpFrameData->mbSysObjFocus = sal_False; + mpWindowImpl->mpFrameData->mbHasFocus = false; + mpWindowImpl->mpFrameData->mbInMouseMove = false; + mpWindowImpl->mpFrameData->mbMouseIn = false; + mpWindowImpl->mpFrameData->mbStartDragCalled = false; + mpWindowImpl->mpFrameData->mbNeedSysWindow = false; + mpWindowImpl->mpFrameData->mbMinimized = false; + mpWindowImpl->mpFrameData->mbStartFocusState = false; + mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = false; + mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = false; + mpWindowImpl->mpFrameData->mbSysObjFocus = false; mpWindowImpl->mpFrameData->maPaintTimer.SetTimeout( 30 ); mpWindowImpl->mpFrameData->maPaintTimer.SetTimeoutHdl( LINK( this, Window, ImplHandlePaintHdl ) ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeout( 50 ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeoutHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) ); - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_False; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = false; if ( pRealParent && IsTopWindow() ) { @@ -966,7 +966,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings ); OutputDevice::SetSettings( *pSVData->maAppData.mpSettings ); - pSVData->maAppData.mbSettingsInit = sal_True; + pSVData->maAppData.mbSettingsInit = true; } // If we create a Window with default size, query this @@ -1095,7 +1095,7 @@ void Window::ImplInsertWindow( Window* pParent ) // ----------------------------------------------------------------------- -void Window::ImplRemoveWindow( sal_Bool bRemoveFrameData ) +void Window::ImplRemoveWindow( bool bRemoveFrameData ) { // remove window from the lists if ( !mpWindowImpl->mbFrame ) @@ -1295,8 +1295,8 @@ void Window::ImplLoadRes( const ResId& rResId ) sal_uLong nObjMask = aHeader.nObjMask; - sal_Bool bPos = sal_False; - sal_Bool bSize = sal_False; + bool bPos = false; + bool bSize = false; Point aPos; Size aSize; @@ -1305,7 +1305,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // use size as per resource MapUnit ePosMap = MAP_PIXEL; - bPos = sal_True; + bPos = true; if ( nObjMask & WINDOW_XYMAPMODE ) ePosMap = (MapUnit)ReadLongRes(); @@ -1320,7 +1320,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // use size as per resource MapUnit eSizeMap = MAP_PIXEL; - bSize = sal_True; + bSize = true; if ( nObjMask & WINDOW_WHMAPMODE ) eSizeMap = (MapUnit)ReadLongRes(); @@ -1393,7 +1393,7 @@ ImplWinData* Window::ImplGetWinData() const mpWindowImpl->mpWinData->mpTrackRect = NULL; mpWindowImpl->mpWinData->mnTrackFlags = 0; mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) - mpWindowImpl->mpWinData->mbMouseOver = sal_False; + mpWindowImpl->mpWinData->mbMouseOver = false; mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? sal_False : sal_True; // sal_True: try to draw this control with native theme API } @@ -1491,22 +1491,22 @@ sal_uInt16 Window::ImplHitTest( const Point& rFramePos ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplIsRealParentPath( const Window* pWindow ) const +bool Window::ImplIsRealParentPath( const Window* pWindow ) const { pWindow = pWindow->GetParent(); while ( pWindow ) { if ( pWindow == this ) - return sal_True; + return true; pWindow = pWindow->GetParent(); } - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::ImplIsChild( const Window* pWindow, bool bSystemWindow ) const { do { @@ -1516,19 +1516,19 @@ sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) co pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return sal_True; + return true; } while ( pWindow ); - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Window::ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::ImplIsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const { if ( this == pWindow ) - return sal_True; + return true; return ImplIsChild( pWindow, bSystemWindow ); } @@ -1553,7 +1553,7 @@ int Window::ImplTestMousePointerSet() PointerStyle Window::ImplGetMousePointer() const { PointerStyle ePointerStyle; - sal_Bool bWait = sal_False; + bool bWait = false; if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() ) ePointerStyle = GetPointer().GetStyle(); @@ -1573,7 +1573,7 @@ PointerStyle Window::ImplGetMousePointer() const if ( pWindow->mpWindowImpl->mnWaitCount ) { ePointerStyle = POINTER_WAIT; - bWait = sal_True; + bWait = true; } else { @@ -1596,7 +1596,7 @@ PointerStyle Window::ImplGetMousePointer() const void Window::ImplResetReallyVisible() { - sal_Bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; + bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; mbDevOutput = false; mpWindowImpl->mbReallyVisible = false; @@ -1637,7 +1637,7 @@ void Window::ImplSetReallyVisible() if( !mpWindowImpl->mbReallyShown ) ImplCallInitShow(); - sal_Bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; + bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; mbDevOutput = true; mpWindowImpl->mbReallyVisible = true; @@ -1814,9 +1814,9 @@ void Window::ImplLogicToPoint( Font& rFont ) const // ----------------------------------------------------------------------- -sal_Bool Window::ImplSysObjClip( const Region* pOldRegion ) +bool Window::ImplSysObjClip( const Region* pOldRegion ) { - sal_Bool bUpdate = sal_True; + bool bUpdate = true; if ( mpWindowImpl->mpSysObj ) { @@ -1955,9 +1955,9 @@ void Window::ImplUpdateSysObjClip() // ----------------------------------------------------------------------- -sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) +bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller ) { - sal_Bool bUpdate = sal_True; + bool bUpdate = true; if ( mpWindowImpl->mpSysObj ) { Region* pOldRegion = NULL; @@ -1971,7 +1971,7 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } @@ -1979,7 +1979,7 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) { mbInitClipRegion = true; mpWindowImpl->mbInitWinClipRegion = true; - bUpdate = sal_False; + bUpdate = false; } delete pOldRegion; @@ -1993,7 +1993,7 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2002,15 +2002,15 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller ) +bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller ) { - sal_Bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); + bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } @@ -2019,11 +2019,11 @@ sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller ) +bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller ) { if ( !ImplIsOverlapWindow() ) { - sal_Bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); + bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); Window* pParent = ImplGetParent(); if ( pParent && @@ -2040,7 +2040,7 @@ sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2120,7 +2120,7 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion ) // ----------------------------------------------------------------------- -void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps ) +void Window::ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ) { if ( bThis ) ImplIntersectWindowClipRegion( rRegion ); @@ -2155,9 +2155,9 @@ void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOver // ----------------------------------------------------------------------- -sal_Bool Window::ImplClipChildren( Region& rRegion ) +bool Window::ImplClipChildren( Region& rRegion ) { - sal_Bool bOtherClip = sal_False; + bool bOtherClip = false; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { @@ -2169,7 +2169,7 @@ sal_Bool Window::ImplClipChildren( Region& rRegion ) ((nClipMode & PARENTCLIPMODE_CLIP) || (GetStyle() & WB_CLIPCHILDREN)) ) pWindow->ImplExcludeWindowRegion( rRegion ); else - bOtherClip = sal_True; + bOtherClip = true; } pWindow = pWindow->mpWindowImpl->mpNext; @@ -2223,7 +2223,7 @@ void Window::ImplInitWinClipRegion() ImplClipSiblings( mpWindowImpl->maWinClipRegion ); // Clip Parent Boundaries - ImplClipBoundaries( mpWindowImpl->maWinClipRegion, sal_False, sal_True ); + ImplClipBoundaries( mpWindowImpl->maWinClipRegion, false, true ); // Clip Children if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren ) @@ -2335,7 +2335,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& // ----------------------------------------------------------------------- void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, - sal_Bool bChildren, sal_Bool bParent, sal_Bool bSiblings ) + bool bChildren, bool bParent, bool bSiblings ) { Region aRegion( rSourceRect ); if ( mpWindowImpl->mbWinRegion ) @@ -2554,7 +2554,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) // #98943# draw toolbox selection if( !aSelectionRect.IsEmpty() ) - DrawSelectionBackground( aSelectionRect, 3, sal_False, sal_True, sal_False ); + DrawSelectionBackground( aSelectionRect, 3, false, true, false ); delete pChildRegion; @@ -2695,7 +2695,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) { Region aRegion = rRegion; - ImplClipBoundaries( aRegion, sal_True, sal_True ); + ImplClipBoundaries( aRegion, true, true ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); @@ -2733,7 +2733,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) ImplInvalidateAllOverlapBackgrounds(); // check what has to be redrawn - sal_Bool bInvalidateAll = !pRegion; + bool bInvalidateAll = !pRegion; // take Transparent-Invalidate into account Window* pOpaqueWindow = this; @@ -2746,7 +2746,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) { pOpaqueWindow = pTempWindow; nFlags |= INVALIDATE_CHILDREN; - bInvalidateAll = sal_False; + bInvalidateAll = false; break; } @@ -2767,7 +2767,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) nFlags |= INVALIDATE_CHILDREN; } if ( (nFlags & INVALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bInvalidateAll = sal_False; + bInvalidateAll = false; if ( bInvalidateAll ) ImplInvalidateFrameRegion( NULL, nFlags ); else @@ -2788,7 +2788,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) else aRegion.Intersect( *pRegion ); } - ImplClipBoundaries( aRegion, sal_True, sal_True ); + ImplClipBoundaries( aRegion, true, true ); if ( nFlags & INVALIDATE_NOCHILDREN ) { nFlags &= ~INVALIDATE_CHILDREN; @@ -2815,7 +2815,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - sal_Bool bChildren ) + bool bChildren ) { if ( (mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALL)) == IMPL_PAINT_PAINT ) { @@ -2830,7 +2830,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { - pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, sal_True ); + pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, true ); pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2840,7 +2840,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - sal_Bool bChildren ) + bool bChildren ) { // also shift Paint-Region when paints need processing ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, bChildren ); @@ -2924,7 +2924,7 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) { // assemble region - sal_Bool bValidateAll = !pRegion; + bool bValidateAll = !pRegion; sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (VALIDATE_CHILDREN | VALIDATE_NOCHILDREN)) ) { @@ -2934,7 +2934,7 @@ void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) nFlags |= VALIDATE_CHILDREN; } if ( (nFlags & VALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bValidateAll = sal_False; + bValidateAll = false; if ( bValidateAll ) ImplValidateFrameRegion( NULL, nFlags ); else @@ -2943,7 +2943,7 @@ void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) Region aRegion( aRect ); if ( pRegion ) aRegion.Intersect( *pRegion ); - ImplClipBoundaries( aRegion, sal_True, sal_True ); + ImplClipBoundaries( aRegion, true, true ); if ( nFlags & VALIDATE_NOCHILDREN ) { nFlags &= ~VALIDATE_CHILDREN; @@ -2991,16 +2991,16 @@ void Window::ImplScroll( const Rectangle& rRect, } Region aInvalidateRegion; - sal_Bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0; - sal_Bool bErase = (nFlags & SCROLL_NOERASE) == 0; + bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0; + bool bErase = (nFlags & SCROLL_NOERASE) == 0; if ( !mpWindowImpl->mpFirstChild ) - bScrollChildren = sal_False; + bScrollChildren = false; OutputDevice *pOutDev = GetOutDev(); // --- RTL --- check if this window requires special action - sal_Bool bReMirror = ( ImplIsAntiparallel() ); + bool bReMirror = ( ImplIsAntiparallel() ); Rectangle aRectMirror( rRect ); if( bReMirror ) @@ -3015,7 +3015,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !(nFlags & SCROLL_NOINVALIDATE) ) { - ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, sal_True, sal_False ); + ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, true, false ); // --- RTL --- // if the scrolling on the device is performed in the opposite direction @@ -3025,7 +3025,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !aInvalidateRegion.IsEmpty() ) { aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); - bErase = sal_True; + bErase = true; } if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) ) { @@ -3047,7 +3047,7 @@ void Window::ImplScroll( const Rectangle& rRect, aRegion.Exclude( aInvalidateRegion ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !bScrollChildren ) { if ( nOrgFlags & SCROLL_NOCHILDREN ) @@ -3133,19 +3133,19 @@ void Window::ImplScroll( const Rectangle& rRect, // ----------------------------------------------------------------------- -void Window::ImplUpdateAll( sal_Bool bOverlapWindows ) +void Window::ImplUpdateAll( bool bOverlapWindows ) { if ( !mpWindowImpl->mbReallyVisible ) return; - sal_Bool bFlush = sal_False; + bool bFlush = false; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = sal_True; + bFlush = true; } // an update changes the OverlapWindow, such that for later paints @@ -3204,9 +3204,9 @@ void Window::ImplUpdateWindowPtr() // ----------------------------------------------------------------------- -void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ) +void Window::ImplUpdateOverlapWindowPtr( bool bNewFrame ) { - sal_Bool bVisible = IsVisible(); + bool bVisible = IsVisible(); Show( false ); ImplRemoveWindow( bNewFrame ); Window* pRealParent = mpWindowImpl->mpRealParent; @@ -3233,9 +3233,9 @@ void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplUpdatePos() +bool Window::ImplUpdatePos() { - sal_Bool bSysChild = sal_False; + bool bSysChild = false; if ( ImplIsOverlapWindow() ) { @@ -3254,12 +3254,12 @@ sal_Bool Window::ImplUpdatePos() while ( pChild ) { if ( pChild->ImplUpdatePos() ) - bSysChild = sal_True; + bSysChild = true; pChild = pChild->mpWindowImpl->mpNext; } if ( mpWindowImpl->mpSysObj ) - bSysChild = sal_True; + bSysChild = true; return bSysChild; } @@ -3283,9 +3283,9 @@ void Window::ImplUpdateSysObjPos() void Window::ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { - sal_Bool bNewPos = sal_False; - sal_Bool bNewSize = sal_False; - sal_Bool bCopyBits = sal_False; + bool bNewPos = false; + bool bNewSize = false; + bool bCopyBits = false; long nOldOutOffX = mnOutOffX; long nOldOutOffY = mnOutOffY; long nOldOutWidth = mnOutWidth; @@ -3307,17 +3307,17 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mnOutWidth && mnOutHeight && !mpWindowImpl->mbPaintTransparent && !mpWindowImpl->mbInitWinClipRegion && !mpWindowImpl->maWinClipRegion.IsEmpty() && !HasPaintEvent() ) - bCopyBits = sal_True; + bCopyBits = true; } - sal_Bool bnXRecycled = sal_False; // avoid duplicate mirroring in RTL case + bool bnXRecycled = false; // avoid duplicate mirroring in RTL case if ( nFlags & WINDOW_POSSIZE_WIDTH ) { if(!( nFlags & WINDOW_POSSIZE_X )) { nX = mpWindowImpl->mnX; nFlags |= WINDOW_POSSIZE_X; - bnXRecycled = sal_True; // we're using a mnX which was already mirrored in RTL case + bnXRecycled = true; // we're using a mnX which was already mirrored in RTL case } if ( nWidth < 0 ) @@ -3325,8 +3325,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nWidth != mnOutWidth ) { mnOutWidth = nWidth; - bNewSize = sal_True; - bCopyBits = sal_False; + bNewSize = true; + bCopyBits = false; } } if ( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -3336,8 +3336,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nHeight != mnOutHeight ) { mnOutHeight = nHeight; - bNewSize = sal_True; - bCopyBits = sal_False; + bNewSize = true; + bCopyBits = false; } } @@ -3388,12 +3388,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, sal_False, sal_True, sal_True ); + *pOverlapRegion, false, true, true ); } mpWindowImpl->mnX = nX; mpWindowImpl->maPos.X() = nOrgX; mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos) - bNewPos = sal_True; + bNewPos = true; } } if ( nFlags & WINDOW_POSSIZE_Y ) @@ -3406,17 +3406,17 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, sal_False, sal_True, sal_True ); + *pOverlapRegion, false, true, true ); } mpWindowImpl->mnY = nY; mpWindowImpl->maPos.Y() = nY; - bNewPos = sal_True; + bNewPos = true; } } if ( bNewPos || bNewSize ) { - sal_Bool bUpdateSysObjPos = sal_False; + bool bUpdateSysObjPos = false; if ( bNewPos ) bUpdateSysObjPos = ImplUpdatePos(); @@ -3469,7 +3469,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, mpWindowImpl->mbCallResize = true; } - sal_Bool bUpdateSysObjClip = sal_False; + bool bUpdateSysObjClip = false; if ( IsReallyVisible() ) { if ( bNewPos || bNewSize ) @@ -3480,7 +3480,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); // set Clip-Flag - bUpdateSysObjClip = !ImplSetClipFlag( sal_True ); + bUpdateSysObjClip = !ImplSetClipFlag( true ); } // invalidate window content ? @@ -3488,8 +3488,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, { if ( bNewPos ) { - sal_Bool bInvalidate = sal_False; - sal_Bool bParentPaint = sal_True; + bool bInvalidate = false; + bool bParentPaint = true; if ( !ImplIsOverlapWindow() ) bParentPaint = mpWindowImpl->mpParent->IsPaintEnabled(); if ( bCopyBits && bParentPaint && !HasPaintEvent() ) @@ -3499,7 +3499,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !pOverlapRegion->IsEmpty() ) { pOverlapRegion->Move( mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY ); @@ -3511,7 +3511,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ), mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY, - sal_True ); + true ); SalGraphics* pGraphics = ImplGetFrameGraphics(); if ( pGraphics ) { @@ -3526,10 +3526,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, SAL_COPYAREA_WINDOWINVALIDATE, this ); } else - bInvalidate = sal_True; + bInvalidate = true; } else - bInvalidate = sal_True; + bInvalidate = true; if ( !bInvalidate ) { if ( !pOverlapRegion->IsEmpty() ) @@ -3537,10 +3537,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, } } else - bInvalidate = sal_True; + bInvalidate = true; } else - bInvalidate = sal_True; + bInvalidate = true; if ( bInvalidate ) ImplInvalidateFrameRegion( NULL, INVALIDATE_CHILDREN ); } @@ -3552,7 +3552,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, aRegion.Exclude( *pOldRegion ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); } @@ -3565,7 +3565,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Region aRegion( *pOldRegion ); if ( !mpWindowImpl->mbPaintTransparent ) ImplExcludeWindowRegion( aRegion ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !aRegion.IsEmpty() && !mpWindowImpl->mpBorderWindow ) ImplInvalidateParentFrameRegion( aRegion ); } @@ -3673,7 +3673,7 @@ void Window::ImplToTop( sal_uInt16 nFlags ) mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev; // take AlwaysOnTop into account - sal_Bool bOnTop = IsAlwaysOnTopEnabled(); + bool bOnTop = IsAlwaysOnTopEnabled(); Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; if ( !bOnTop ) { @@ -3781,7 +3781,7 @@ void Window::ImplStartToTop( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ) +void Window::ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible ) { // do we need to fetch the focus? if ( !(nFlags & TOTOP_NOGRABFOCUS) ) @@ -3800,7 +3800,7 @@ void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ) pFocusWindow = pFocusWindow->ImplGetParent(); } if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS) && - !pFocusWindow->HasChildPathFocus( sal_True ) ) + !pFocusWindow->HasChildPathFocus( true ) ) pFocusWindow->GrabFocus(); } @@ -3844,7 +3844,7 @@ void Window::ImplHideAllOverlaps() // ----------------------------------------------------------------------- -void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged ) +void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged ) { if ( mpWindowImpl->mpFrameData->mbMouseIn && mpWindowImpl->mpFrameWindow->mpWindowImpl->mbReallyVisible ) { @@ -3853,15 +3853,15 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged ) long nY = mpWindowImpl->mpFrameData->mnLastMouseY; sal_uInt16 nCode = nMouseCode; sal_uInt16 nMode = mpWindowImpl->mpFrameData->mnMouseMode; - sal_Bool bLeave; + bool bLeave; // check for MouseLeave if ( ((nX < 0) || (nY < 0) || (nX >= mpWindowImpl->mpFrameWindow->mnOutWidth) || (nY >= mpWindowImpl->mpFrameWindow->mnOutHeight)) && !ImplGetSVData()->maWinData.mpCaptureWin ) - bLeave = sal_True; + bLeave = true; else - bLeave = sal_False; + bLeave = false; nMode |= MOUSE_SYNTHETIC; if ( bModChanged ) nMode |= MOUSE_MODIFIERCHANGED; @@ -4051,13 +4051,13 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) // which is done using ToTop ImplSVData* pSVData = ImplGetSVData(); - sal_Bool bAsyncFocusWaiting = sal_False; + bool bAsyncFocusWaiting = false; Window *pFrame = pSVData->maWinData.mpFirstFrame; while( pFrame ) { if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId ) { - bAsyncFocusWaiting = sal_True; + bAsyncFocusWaiting = true; break; } pFrame = pFrame->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4065,7 +4065,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) bool bHasFocus = IsWindowFocused(*mpWindowImpl); - sal_Bool bMustNotGrabFocus = sal_False; + bool bMustNotGrabFocus = false; // #100242#, check parent hierarchy if some floater prohibits grab focus Window *pParent = this; @@ -4075,7 +4075,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) // otherwise we cannot set the focus in a floating toolbox if( ( (pParent->mpWindowImpl->mbFloatWin && ((FloatingWindow*)pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) ) { - bMustNotGrabFocus = sal_True; + bMustNotGrabFocus = true; break; } pParent = pParent->mpWindowImpl->mpParent; @@ -4397,7 +4397,7 @@ Window::~Window() } } - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( false ); if ( pWrapper ) pWrapper->WindowDestroyed( this ); @@ -4436,7 +4436,7 @@ Window::~Window() if ( true ) // always perform these tests in non-pro versions { OStringBuffer aErrorStr; - sal_Bool bError = sal_False; + bool bError = false; Window* pTempWin; if (mpWindowImpl->mpFrameData != 0) { @@ -4445,7 +4445,7 @@ Window::~Window() { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = sal_True; + bError = true; aErrorStr.append(lcl_createWindowInfo(*pTempWin)); } pTempWin = pTempWin->mpWindowImpl->mpNextOverlap; @@ -4465,13 +4465,13 @@ Window::~Window() } } - bError = sal_False; + bError = false; pTempWin = pSVData->maWinData.mpFirstFrame; while ( pTempWin ) { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = sal_True; + bError = true; aErrorStr.append(lcl_createWindowInfo(*pTempWin)); } pTempWin = pTempWin->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4589,11 +4589,11 @@ Window::~Window() } // check if the focus window is our child - sal_Bool bHasFocussedChild = sal_False; + bool bHasFocussedChild = false; if( pSVData->maWinData.mpFocusWin && ImplIsRealParentPath( pSVData->maWinData.mpFocusWin ) ) { // #122232#, this must not happen and is an application bug ! but we try some cleanup to hopefully avoid crashes, see below - bHasFocussedChild = sal_True; + bHasFocussedChild = true; #if OSL_DEBUG_LEVEL > 0 OStringBuffer aTempStr("Window ("); aTempStr.append(OUStringToOString(GetText(), @@ -4684,18 +4684,18 @@ Window::~Window() ImplDelData* pDelData = mpWindowImpl->mpFirstDel; while ( pDelData ) { - pDelData->mbDel = sal_True; + pDelData->mbDel = true; pDelData->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore pDelData = pDelData->mpNext; } // remove window from the lists - ImplRemoveWindow( sal_True ); + ImplRemoveWindow( true ); // de-register as "top window child" at our parent, if necessary if ( mpWindowImpl->mbFrame ) { - sal_Bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); + bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); if ( mpWindowImpl->mpRealParent && bIsTopWindow ) { ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData(); @@ -5100,11 +5100,11 @@ bool Window::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_GETFOCUS ) { - sal_Bool bCompoundFocusChanged = sal_False; + bool bCompoundFocusChanged = false; if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() ) { mpWindowImpl->mbCompoundControlHasFocus = true; - bCompoundFocusChanged = sal_True; + bCompoundFocusChanged = true; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5112,11 +5112,11 @@ bool Window::PreNotify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - sal_Bool bCompoundFocusChanged = sal_False; + bool bCompoundFocusChanged = false; if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() ) { mpWindowImpl->mbCompoundControlHasFocus = false ; - bCompoundFocusChanged = sal_True; + bCompoundFocusChanged = true; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5145,7 +5145,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) ) @@ -5165,7 +5165,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) else if ( rNEvt.GetType() == EVENT_MOUSEMOVE ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { // check if a single click initiated this sequence ( ImplStartDockingEnabled() ) @@ -5336,7 +5336,7 @@ sal_uLong Window::PostUserEvent( const Link& rLink, void* pCaller ) // ----------------------------------------------------------------------- -sal_Bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) +bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) { ImplSVEvent* pSVEvent = new ImplSVEvent; @@ -5344,17 +5344,17 @@ sal_Bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pC pSVEvent->mpData = pCaller; pSVEvent->mpLink = new Link( rLink ); pSVEvent->mpWindow = this; - pSVEvent->mbCall = sal_True; + pSVEvent->mbCall = true; ImplAddDel( &(pSVEvent->maDelData) ); rEventId = (sal_uLong)pSVEvent; if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) ) - return sal_True; + return true; else { rEventId = 0; ImplRemoveDel( &(pSVEvent->maDelData) ); delete pSVEvent; - return sal_False; + return false; } } @@ -5376,28 +5376,28 @@ void Window::RemoveUserEvent( sal_uLong nUserEvent ) pSVEvent->mpWindow = NULL; } - pSVEvent->mbCall = sal_False; + pSVEvent->mbCall = false; } // ----------------------------------------------------------------------- -sal_Bool Window::IsLocked( sal_Bool bChildren ) const +bool Window::IsLocked( bool bChildren ) const { if ( mpWindowImpl->mnLockCount != 0 ) - return sal_True; + return true; if ( bChildren || mpWindowImpl->mbChildNotify ) { Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { - if ( pChild->IsLocked( sal_True ) ) - return sal_True; + if ( pChild->IsLocked( true ) ) + return true; pChild = pChild->mpWindowImpl->mpNext; } } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -5540,7 +5540,7 @@ long Window::CalcTitleWidth() const // ----------------------------------------------------------------------- -void Window::EnableClipSiblings( sal_Bool bClipSiblings ) +void Window::EnableClipSiblings( bool bClipSiblings ) { if ( mpWindowImpl->mpBorderWindow ) @@ -5551,7 +5551,7 @@ void Window::EnableClipSiblings( sal_Bool bClipSiblings ) // ----------------------------------------------------------------------- -void Window::SetMouseTransparent( sal_Bool bTransparent ) +void Window::SetMouseTransparent( bool bTransparent ) { if ( mpWindowImpl->mpBorderWindow ) @@ -5565,7 +5565,7 @@ void Window::SetMouseTransparent( sal_Bool bTransparent ) // ----------------------------------------------------------------------- -void Window::SetPaintTransparent( sal_Bool bTransparent ) +void Window::SetPaintTransparent( bool bTransparent ) { // transparency is not useful for frames as the background would have to be provided by a different frame @@ -5643,7 +5643,7 @@ long Window::GetCursorExtTextInputWidth() const // ----------------------------------------------------------------------- -void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, sal_Bool bVertical ) { +void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical ) { ImplWinData* pWinData = ImplGetWinData(); delete[] pWinData->mpCompositionCharRects; @@ -5701,15 +5701,15 @@ void Window::SetSettings( const AllSettings& rSettings, sal_Bool bChild ) // ----------------------------------------------------------------------- -void Window::UpdateSettings( const AllSettings& rSettings, sal_Bool bChild ) +void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) { if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, sal_False ); + mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, false ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, sal_True ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, true ); } AllSettings aOldSettings(*mxSettings); @@ -5970,7 +5970,7 @@ const Region& Window::GetWindowRegionPixel() const // ----------------------------------------------------------------------- -sal_Bool Window::IsWindowRegionPixel() const +bool Window::IsWindowRegionPixel() const { if ( mpWindowImpl->mpBorderWindow ) @@ -6091,13 +6091,13 @@ void Window::SetParent( Window* pNewParent ) // check if the taskpanelist would change and move the window pointer accordingly SystemWindow *pSysWin = ImplGetLastSystemWindow(this); SystemWindow *pNewSysWin = NULL; - sal_Bool bChangeTaskPaneList = sal_False; + bool bChangeTaskPaneList = false; if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) ) { pNewSysWin = ImplGetLastSystemWindow( pNewParent ); if( pNewSysWin && pNewSysWin != pSysWin ) { - bChangeTaskPaneList = sal_True; + bChangeTaskPaneList = true; pSysWin->GetTaskPaneList()->RemoveWindow( this ); } } @@ -6126,7 +6126,7 @@ void Window::SetParent( Window* pNewParent ) if ( mpWindowImpl->mbFrame ) mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame ); - sal_Bool bVisible = IsVisible(); + bool bVisible = IsVisible(); Show( false, SHOW_NOFOCUSCHANGE ); // check if the overlap window changes @@ -6144,9 +6144,9 @@ void Window::SetParent( Window* pNewParent ) } // convert windows in the hierarchy - sal_Bool bFocusOverlapWin = HasChildPathFocus( sal_True ); - sal_Bool bFocusWin = HasChildPathFocus(); - sal_Bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; + bool bFocusOverlapWin = HasChildPathFocus( true ); + bool bFocusWin = HasChildPathFocus(); + bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; if ( bNewFrame ) { if ( mpWindowImpl->mpFrameData->mpFocusWin ) @@ -6207,7 +6207,7 @@ void Window::SetParent( Window* pNewParent ) } // update activate-status at next overlap window - if ( HasChildPathFocus( sal_True ) ) + if ( HasChildPathFocus( true ) ) ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow ); } @@ -6256,7 +6256,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) ImplDelData aDogTag( this ); - sal_Bool bRealVisibilityChanged = sal_False; + bool bRealVisibilityChanged = false; mpWindowImpl->mbVisible = bVisible; if ( !bVisible ) @@ -6284,12 +6284,12 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) if ( mpWindowImpl->mbReallyVisible ) { Region aInvRegion; - sal_Bool bSaveBack = sal_False; + bool bSaveBack = false; if ( ImplIsOverlapWindow() && !mpWindowImpl->mbFrame ) { if ( ImplRestoreOverlapBackground( aInvRegion ) ) - bSaveBack = sal_True; + bSaveBack = true; } if ( !bSaveBack ) @@ -6383,7 +6383,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) ) { ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 ); - ImplFocusToTop( 0, sal_False ); + ImplFocusToTop( 0, false ); } // save background @@ -6428,7 +6428,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) mpWindowImpl->mbSuppressAccessibilityEvents = false; mpWindowImpl->mbPaintFrame = true; - sal_Bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False; + bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False; mpWindowImpl->mpFrame->Show( sal_True, bNoActivate ); if( aDogTag.IsDead() ) return; @@ -6617,16 +6617,16 @@ bool Window::IsCallHandlersOnInputDisabled() const // ----------------------------------------------------------------------- -void Window::EnableInput( bool bEnable, sal_Bool bChild ) +void Window::EnableInput( bool bEnable, bool bChild ) { - sal_Bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled); + bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->EnableInput( bEnable, sal_False ); + mpWindowImpl->mpBorderWindow->EnableInput( bEnable, false ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, sal_True ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, true ); } if ( (! bEnable && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled) || @@ -6682,7 +6682,7 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild ) // ----------------------------------------------------------------------- -void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, +void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin, const Window* pExcludeWindow ) { @@ -6697,11 +6697,11 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, while ( pSysWin ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, sal_True ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, true ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, sal_True ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, true ) ) pSysWin->EnableInput( bEnable, bChild ); } pSysWin = pSysWin->mpWindowImpl->mpNextOverlap; @@ -6714,11 +6714,11 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, if( pFrameWin->ImplIsFloatingWindow() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, sal_True ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, true ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, sal_True ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, true ) ) pFrameWin->EnableInput( bEnable, bChild ); } } @@ -6733,11 +6733,11 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, while( p != rList.end() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), sal_True ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), true ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), sal_True ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), true ) ) (*p)->EnableInput( bEnable, bChild ); } ++p; @@ -6748,18 +6748,18 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, // ----------------------------------------------------------------------- -void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild ) +void Window::AlwaysEnableInput( bool bAlways, bool bChild ) { if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, sal_False ); + mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, false ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputEnabled; if ( bAlways ) - EnableInput( true, sal_False ); + EnableInput( true, false ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled ) { @@ -6779,18 +6779,18 @@ void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild ) // ----------------------------------------------------------------------- -void Window::AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild ) +void Window::AlwaysDisableInput( bool bAlways, bool bChild ) { if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, sal_False ); + mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, false ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputDisabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputDisabled; if ( bAlways ) - EnableInput( false, sal_False ); + EnableInput( false, false ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled ) { @@ -6824,7 +6824,7 @@ void Window::SetActivateMode( sal_uInt16 nMode ) if ( mpWindowImpl->mnActivateMode ) { if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) && - !HasChildPathFocus( sal_True ) ) + !HasChildPathFocus( true ) ) { mpWindowImpl->mbActive = false; Deactivate(); @@ -6969,7 +6969,7 @@ void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) if ( mpWindowImpl->mbInitWinClipRegion || !mpWindowImpl->maWinClipRegion.IsEmpty() ) { - sal_Bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; + bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; ImplSetClipFlag(); // When ClipRegion was not initialised, assume @@ -7027,7 +7027,7 @@ void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -void Window::EnableAlwaysOnTop( sal_Bool bEnable ) +void Window::EnableAlwaysOnTop( bool bEnable ) { mpWindowImpl->mbAlwaysOnTop = bEnable; @@ -7292,18 +7292,18 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const { // with decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, sal_False ); + return ImplGetWindowExtentsRelative( pRelativeWindow, false ); } Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const { // without decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, sal_True ); + return ImplGetWindowExtentsRelative( pRelativeWindow, true ); } // ----------------------------------------------------------------------- -Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const +Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, bool bClientOnly ) const { SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry(); // make sure we use the extent of our border window, @@ -7414,17 +7414,17 @@ void Window::Validate( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -sal_Bool Window::HasPaintEvent() const +bool Window::HasPaintEvent() const { if ( !mpWindowImpl->mbReallyVisible ) - return sal_False; + return false; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) - return sal_True; + return true; if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT ) - return sal_True; + return true; if ( !ImplIsOverlapWindow() ) { @@ -7433,12 +7433,12 @@ sal_Bool Window::HasPaintEvent() const { pTempWindow = pTempWindow->ImplGetParent(); if ( pTempWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINTCHILDREN | IMPL_PAINT_PAINTALLCHILDREN) ) - return sal_True; + return true; } while ( !pTempWindow->ImplIsOverlapWindow() ); } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -7455,14 +7455,14 @@ void Window::Update() if ( !mpWindowImpl->mbReallyVisible ) return; - sal_Bool bFlush = sal_False; + bool bFlush = false; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = sal_True; + bFlush = true; } // First we should skip all windows which are Paint-Transparent @@ -7503,7 +7503,7 @@ void Window::Update() } pUpdateWindow->ImplCallPaint( NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags ); - bFlush = sal_True; + bFlush = true; } if ( bFlush ) @@ -7529,7 +7529,7 @@ void Window::Sync() // ----------------------------------------------------------------------- -void Window::SetUpdateMode( sal_Bool bUpdate ) +void Window::SetUpdateMode( bool bUpdate ) { mpWindowImpl->mbNoUpdate = !bUpdate; @@ -7546,7 +7546,7 @@ void Window::GrabFocus() // ----------------------------------------------------------------------- -sal_Bool Window::HasFocus() const +bool Window::HasFocus() const { // #107575# the first floating window always has the keyboard focus, see also winproc.cxx: ImplGetKeyInputWindow() @@ -7578,7 +7578,7 @@ void Window::SetFakeFocus( bool bFocus ) // ----------------------------------------------------------------------- -sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const +bool Window::HasChildPathFocus( bool bSystemWindow ) const { // #107575#, the first floating window always has the keyboard focus, see also winproc.cxx: ImplGetKeyInputWindow() @@ -7593,7 +7593,7 @@ sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin; if ( pFocusWin ) return ImplIsWindowOrChild( pFocusWin, bSystemWindow ); - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -7637,7 +7637,7 @@ void Window::ReleaseMouse() // ----------------------------------------------------------------------- -sal_Bool Window::IsMouseCaptured() const +bool Window::IsMouseCaptured() const { return (this == ImplGetSVData()->maWinData.mpCaptureWin); @@ -7728,7 +7728,7 @@ Point Window::GetLastPointerPosPixel() // ----------------------------------------------------------------------- -void Window::ShowPointer( sal_Bool bVisible ) +void Window::ShowPointer( bool bVisible ) { if ( mpWindowImpl->mbNoPtrVisible != !bVisible ) @@ -7767,7 +7767,7 @@ Window::PointerState Window::GetPointerState() // ----------------------------------------------------------------------- -sal_Bool Window::IsMouseOver() +bool Window::IsMouseOver() { return ImplGetWinData()->mbMouseOver; } @@ -8069,7 +8069,7 @@ Window* Window::GetWindow( sal_uInt16 nType ) const // ----------------------------------------------------------------------- -sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::IsChild( const Window* pWindow, bool bSystemWindow ) const { do @@ -8080,20 +8080,20 @@ sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return sal_True; + return true; } while ( pWindow ); - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Window::IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::IsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const { if ( this == pWindow ) - return sal_True; + return true; return ImplIsChild( pWindow, bSystemWindow ); } @@ -8265,7 +8265,7 @@ uno::Reference< XDropTarget > Window::GetDropTarget() uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); } else - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = true; } catch (const RuntimeException&) @@ -8438,7 +8438,7 @@ uno::Reference< XClipboard > Window::GetPrimarySelection() // Accessibility // ----------------------------------------------------------------------- -::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( sal_Bool bCreate ) +::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( bool bCreate ) { // do not optimize hierarchy for the top level border win (ie, when there is no parent) /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy @@ -8468,28 +8468,28 @@ void Window::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star:: } // skip all border windows that are no top level frames -sal_Bool Window::ImplIsAccessibleCandidate() const +bool Window::ImplIsAccessibleCandidate() const { if( !mpWindowImpl->mbBorderWin ) - return sal_True; + return true; else // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) - return sal_True; + return true; else - return sal_False; + return false; } -sal_Bool Window::ImplIsAccessibleNativeFrame() const +bool Window::ImplIsAccessibleNativeFrame() const { if( mpWindowImpl->mbFrame ) // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable if( (mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE)) ) - return sal_True; + return true; else - return sal_False; + return false; else - return sal_False; + return false; } sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const @@ -8507,7 +8507,7 @@ sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirst return nChildren; } -Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel ) const +Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel ) const { if( bTopLevel ) @@ -8519,7 +8519,7 @@ Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& Window *pTmpChild = pChild; if( !pChild->ImplIsAccessibleCandidate() ) - pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, sal_False ); + pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, false ); if ( nChild == rChildCount ) return pTmpChild; @@ -9018,7 +9018,7 @@ Window* Window::GetAccessibleRelationLabeledBy() const return NULL; } -sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) +bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath ) { if( !bTraverseParentPath ) return mpWindowImpl->mbSuppressAccessibilityEvents; @@ -9028,15 +9028,15 @@ sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) while ( pParent && pParent->mpWindowImpl) { if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents ) - return sal_True; + return true; else pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames } - return sal_False; + return false; } } -void Window::SetAccessibilityEventsSuppressed(sal_Bool bSuppressed) +void Window::SetAccessibilityEventsSuppressed(bool bSuppressed) { mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed; } @@ -9057,21 +9057,21 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& // ----------------------------------------------------------------------- -void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL ); } -void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, pSelectionTextColor, NULL ); } void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, - sal_Bool bChecked, - sal_Bool bDrawBorder, - sal_Bool bDrawExtBorderOnly, + bool bChecked, + bool bDrawBorder, + bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor @@ -9089,8 +9089,8 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, Color aSelectionBorderCol( pPaintColor ? *pPaintColor : rStyles.GetHighlightColor() ); Color aSelectionFillCol( aSelectionBorderCol ); - sal_Bool bDark = rStyles.GetFaceColor().IsDark(); - sal_Bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); + bool bDark = rStyles.GetFaceColor().IsDark(); + bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); int c1 = aSelectionBorderCol.GetLuminance(); int c2 = GetDisplayBackground().GetColor().GetLuminance(); @@ -9236,7 +9236,7 @@ Window* Window::GetPreferredKeyInputWindow() } -sal_Bool Window::IsScrollable() const +bool Window::IsScrollable() const { // check for scrollbars Window *pChild = mpWindowImpl->mpFirstChild; @@ -9250,14 +9250,14 @@ sal_Bool Window::IsScrollable() const return false; } -sal_Bool Window::IsTopWindow() const +bool Window::IsTopWindow() const { if ( mpWindowImpl->mbInDtor ) - return sal_False; + return false; // topwindows must be frames or they must have a borderwindow which is a frame if( !mpWindowImpl->mbFrame && (!mpWindowImpl->mpBorderWindow || (mpWindowImpl->mpBorderWindow && !mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) ) - return sal_False; + return false; ImplGetWinData(); if( mpWindowImpl->mpWinData->mnIsTopWindow == (sal_uInt16)~0) // still uninitialized @@ -9276,7 +9276,7 @@ void Window::ImplMirrorFramePos( Point &pt ) const } // frame based modal counter (dialogs are not modal to the whole application anymore) -sal_Bool Window::IsInModalMode() const +bool Window::IsInModalMode() const { return (mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mnModalMode != 0); } @@ -9318,12 +9318,12 @@ void Window::ImplDecModalCount() } } -void Window::ImplIsInTaskPaneList( sal_Bool mbIsInTaskList ) +void Window::ImplIsInTaskPaneList( bool mbIsInTaskList ) { mpWindowImpl->mbIsInTaskPaneList = mbIsInTaskList; } -void Window::ImplNotifyIconifiedState( sal_Bool bIconified ) +void Window::ImplNotifyIconifiedState( bool bIconified ) { mpWindowImpl->mpFrameWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); // #109206# notify client window as well to have toolkit topwindow listeners notified @@ -9331,15 +9331,15 @@ void Window::ImplNotifyIconifiedState( sal_Bool bIconified ) mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); } -sal_Bool Window::HasActiveChildFrame() +bool Window::HasActiveChildFrame() { - sal_Bool bRet = sal_False; + bool bRet = false; Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; while( pFrameWin ) { if( pFrameWin != mpWindowImpl->mpFrameWindow ) { - sal_Bool bDecorated = sal_False; + bool bDecorated = false; Window *pChildFrame = pFrameWin->ImplGetWindow(); // #i15285# unfortunately WB_MOVEABLE is the same as WB_TABSTOP which can // be removed for ToolBoxes to influence the keyboard accessibility @@ -9351,9 +9351,9 @@ sal_Bool Window::HasActiveChildFrame() if( bDecorated || (pFrameWin->mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) ) if( pChildFrame && pChildFrame->IsVisible() && pChildFrame->IsActive() ) { - if( ImplIsChild( pChildFrame, sal_True ) ) + if( ImplIsChild( pChildFrame, true ) ) { - bRet = sal_True; + bRet = true; break; } } @@ -9368,11 +9368,11 @@ LanguageType Window::GetInputLanguage() const return mpWindowImpl->mpFrame->GetInputLanguage(); } -void Window::EnableNativeWidget( sal_Bool bEnable ) +void Window::EnableNativeWidget( bool bEnable ) { static const char* pNoNWF = getenv( "SAL_NO_NWF" ); if( pNoNWF && *pNoNWF ) - bEnable = sal_False; + bEnable = false; if( bEnable != ImplGetWinData()->mbEnableNativeWidget ) { @@ -9397,7 +9397,7 @@ void Window::EnableNativeWidget( sal_Bool bEnable ) } } -sal_Bool Window::IsNativeWidgetEnabled() const +bool Window::IsNativeWidgetEnabled() const { return ImplGetWinData()->mbEnableNativeWidget; } @@ -9517,9 +9517,9 @@ uno::Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rPos ) { - sal_Bool bRVisible = mpWindowImpl->mbReallyVisible; + bool bRVisible = mpWindowImpl->mbReallyVisible; mpWindowImpl->mbReallyVisible = mpWindowImpl->mbVisible; - sal_Bool bDevOutput = mbDevOutput; + bool bDevOutput = mbDevOutput; mbDevOutput = true; const OutputDevice *pOutDev = GetOutDev(); @@ -9527,7 +9527,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP long nOldDPIY = pOutDev->ImplGetDPIY(); mnDPIX = i_pTargetOutDev->ImplGetDPIX(); mnDPIY = i_pTargetOutDev->ImplGetDPIY(); - sal_Bool bOutput = IsOutputEnabled(); + bool bOutput = IsOutputEnabled(); EnableOutput(); DBG_ASSERT( GetMapMode().GetMapUnit() == MAP_PIXEL, "MapMode must be PIXEL based" ); @@ -9658,7 +9658,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& / Hide(); } - sal_Bool bVisible = mpWindowImpl->mbVisible; + bool bVisible = mpWindowImpl->mbVisible; mpWindowImpl->mbVisible = true; if( mpWindowImpl->mpBorderWindow ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 2c2a8f05f61b..05c237571eea 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -62,18 +62,18 @@ struct ImplFocusDelData : public ImplDelData // ======================================================================= -sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const +bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const { // check for overlapping window pTestWindow = pTestWindow->ImplGetFirstOverlapWindow(); const Window* pTempWindow = pTestWindow; const Window* pThisWindow = ImplGetFirstOverlapWindow(); if ( pTempWindow == pThisWindow ) - return sal_False; + return false; do { if ( pTempWindow == pThisWindow ) - return sal_True; + return true; if ( pTempWindow->mpWindowImpl->mbFrame ) break; pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow; @@ -83,7 +83,7 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const do { if ( pTempWindow == pTestWindow ) - return sal_False; + return false; if ( pTempWindow->mpWindowImpl->mbFrame ) break; pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow; @@ -141,12 +141,12 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const do { if ( pTempWindow == pThisWindow ) - return sal_True; + return true; pTempWindow = pTempWindow->mpWindowImpl->mpNext; } while ( pTempWindow ); - return sal_False; + return false; } // ======================================================================= @@ -194,7 +194,7 @@ void Window::ImplSaveOverlapBackground() // ----------------------------------------------------------------------- -sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) +bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) { if ( mpWindowImpl->mpOverlapData->mpSaveBackDev ) { @@ -227,10 +227,10 @@ sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) ImplDeleteOverlapBackground(); } - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -532,7 +532,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) Point aPoint( mnOutOffX, mnOutOffY ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - ImplClipBoundaries( aRegion, sal_False, sal_False ); + ImplClipBoundaries( aRegion, false, false ); pOutDev->ImplSelectClipRegion( aRegion, pGraphics ); } } @@ -598,7 +598,7 @@ void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags ) Point aPoint( mnOutOffX, mnOutOffY ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - ImplClipBoundaries( aRegion, sal_False, sal_False ); + ImplClipBoundaries( aRegion, false, false ); pOutDev->ImplSelectClipRegion( aRegion, pGraphics ); } } @@ -708,7 +708,7 @@ void Window::EndTracking( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -sal_Bool Window::IsTracking() const +bool Window::IsTracking() const { return (ImplGetSVData()->maWinData.mpTrackWin == this); } @@ -763,13 +763,13 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, { const Region aOldClip( rSaveDevice.GetClipRegion() ); const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) ); - const sal_Bool bMap = rSaveDevice.IsMapModeEnabled(); + const bool bMap = rSaveDevice.IsMapModeEnabled(); // move clip region to have the same distance to DestOffset aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() ); // set pixel clip region - rSaveDevice.EnableMapMode( sal_False ); + rSaveDevice.EnableMapMode( false ); rSaveDevice.SetClipRegion( aClip ); rSaveDevice.EnableMapMode( bMap ); rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this ); @@ -798,13 +798,13 @@ sal_uIntPtr Window::SaveFocus() // ----------------------------------------------------------------------- -sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore ) +bool Window::EndSaveFocus( sal_uIntPtr nSaveId, bool bRestore ) { if ( !nSaveId ) - return sal_False; + return false; else { - sal_Bool bOK = sal_True; + bool bOK = true; ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId; if ( !pDelData->IsDead() ) { @@ -1094,10 +1094,10 @@ static void lcl_HandleScrollHelper( ScrollBar* pScrl, long nN, bool isMultiplyBy } -sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, +bool Window::HandleScrollCommand( const CommandEvent& rCmd, ScrollBar* pHScrl, ScrollBar* pVScrl ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( pHScrl || pVScrl ) { @@ -1122,7 +1122,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, if ( nFlags ) { StartAutoScroll( nFlags ); - bRet = sal_True; + bRet = true; } } break; @@ -1152,7 +1152,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, 0L, pData->IsHorz() ? pHScrl : pVScrl, nLines ); - bRet = sal_True; + bRet = true; } } else @@ -1192,7 +1192,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, bool isMultiplyByLineSize = false; #endif lcl_HandleScrollHelper( pHScrl, deltaXInLogic, isMultiplyByLineSize ); - bRet = sal_True; + bRet = true; } } if(pVScrl) @@ -1224,7 +1224,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, #endif lcl_HandleScrollHelper( pVScrl, deltaYInLogic, isMultiplyByLineSize ); - bRet = sal_True; + bRet = true; } } } @@ -1239,7 +1239,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, { ImplHandleScroll( pHScrl, pData->GetDeltaX(), pVScrl, pData->GetDeltaY() ); - bRet = sal_True; + bRet = true; } } break; @@ -1274,7 +1274,7 @@ DockingManager* Window::GetDockingManager() return ImplGetDockingManager(); } -void Window::EnableDocking( sal_Bool bEnable ) +void Window::EnableDocking( bool bEnable ) { // update list of dockable windows if( bEnable ) @@ -1374,32 +1374,32 @@ Window* Window::ImplGetFrameWindow() const return mpWindowImpl->mpFrameWindow; } -sal_Bool Window::ImplIsDockingWindow() const +bool Window::ImplIsDockingWindow() const { return mpWindowImpl->mbDockWin; } -sal_Bool Window::ImplIsFloatingWindow() const +bool Window::ImplIsFloatingWindow() const { return mpWindowImpl->mbFloatWin; } -sal_Bool Window::ImplIsSplitter() const +bool Window::ImplIsSplitter() const { return mpWindowImpl->mbSplitter; } -sal_Bool Window::ImplIsPushButton() const +bool Window::ImplIsPushButton() const { return mpWindowImpl->mbPushButton; } -sal_Bool Window::ImplIsOverlapWindow() const +bool Window::ImplIsOverlapWindow() const { return mpWindowImpl->mbOverlapWin; } -void Window::ImplSetMouseTransparent( sal_Bool bTransparent ) +void Window::ImplSetMouseTransparent( bool bTransparent ) { mpWindowImpl->mbMouseTransparent = bTransparent; } @@ -1414,7 +1414,7 @@ Point Window::ImplFrameToOutput( const Point& rPos ) return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY ); } -void Window::SetCompoundControl( sal_Bool bCompound ) +void Window::SetCompoundControl( bool bCompound ) { mpWindowImpl->mbCompoundControl = bCompound; } @@ -1469,57 +1469,57 @@ Dialog* Window::GetParentDialog() const return const_cast<Dialog *>(dynamic_cast<const Dialog*>(pWindow)); } -sal_Bool Window::IsSystemWindow() const +bool Window::IsSystemWindow() const { return mpWindowImpl->mbSysWin; } -sal_Bool Window::IsDialog() const +bool Window::IsDialog() const { return mpWindowImpl->mbDialog; } -sal_Bool Window::IsMenuFloatingWindow() const +bool Window::IsMenuFloatingWindow() const { return mpWindowImpl->mbMenuFloatingWindow; } -sal_Bool Window::IsToolbarFloatingWindow() const +bool Window::IsToolbarFloatingWindow() const { return mpWindowImpl->mbToolbarFloatingWindow; } -void Window::EnableAllResize( sal_Bool bEnable ) +void Window::EnableAllResize( bool bEnable ) { mpWindowImpl->mbAllResize = bEnable; } -void Window::EnableChildTransparentMode( sal_Bool bEnable ) +void Window::EnableChildTransparentMode( bool bEnable ) { mpWindowImpl->mbChildTransparent = bEnable; } -sal_Bool Window::IsChildTransparentModeEnabled() const +bool Window::IsChildTransparentModeEnabled() const { return mpWindowImpl->mbChildTransparent; } -sal_Bool Window::IsMouseTransparent() const +bool Window::IsMouseTransparent() const { return mpWindowImpl->mbMouseTransparent; } -sal_Bool Window::IsPaintTransparent() const +bool Window::IsPaintTransparent() const { return mpWindowImpl->mbPaintTransparent; } -void Window::SetDialogControlStart( sal_Bool bStart ) +void Window::SetDialogControlStart( bool bStart ) { mpWindowImpl->mbDlgCtrlStart = bStart; } -sal_Bool Window::IsDialogControlStart() const +bool Window::IsDialogControlStart() const { return mpWindowImpl->mbDlgCtrlStart; } @@ -1539,7 +1539,7 @@ const InputContext& Window::GetInputContext() const return mpWindowImpl->maInputContext; } -sal_Bool Window::IsControlFont() const +bool Window::IsControlFont() const { return (mpWindowImpl->mpControlFont != 0); } @@ -1549,7 +1549,7 @@ Color Window::GetControlForeground() const return mpWindowImpl->maControlForeground; } -sal_Bool Window::IsControlForeground() const +bool Window::IsControlForeground() const { return mpWindowImpl->mbControlForeground; } @@ -1559,12 +1559,12 @@ Color Window::GetControlBackground() const return mpWindowImpl->maControlBackground; } -sal_Bool Window::IsControlBackground() const +bool Window::IsControlBackground() const { return mpWindowImpl->mbControlBackground; } -sal_Bool Window::IsInPaint() const +bool Window::IsInPaint() const { return mpWindowImpl->mbInPaint; } @@ -1574,37 +1574,37 @@ Window* Window::GetParent() const return mpWindowImpl->mpRealParent; } -sal_Bool Window::IsVisible() const +bool Window::IsVisible() const { return mpWindowImpl->mbVisible; } -sal_Bool Window::IsReallyVisible() const +bool Window::IsReallyVisible() const { return mpWindowImpl->mbReallyVisible; } -sal_Bool Window::IsReallyShown() const +bool Window::IsReallyShown() const { return mpWindowImpl->mbReallyShown; } -sal_Bool Window::IsInInitShow() const +bool Window::IsInInitShow() const { return mpWindowImpl->mbInInitShow; } -sal_Bool Window::IsEnabled() const +bool Window::IsEnabled() const { return !mpWindowImpl->mbDisabled; } -sal_Bool Window::IsInputEnabled() const +bool Window::IsInputEnabled() const { return !mpWindowImpl->mbInputDisabled; } -sal_Bool Window::IsAlwaysEnableInput() const +bool Window::IsAlwaysEnableInput() const { return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled; } @@ -1615,42 +1615,42 @@ sal_uInt16 Window::GetActivateMode() const } -sal_Bool Window::IsAlwaysOnTopEnabled() const +bool Window::IsAlwaysOnTopEnabled() const { return mpWindowImpl->mbAlwaysOnTop; } -sal_Bool Window::IsDefaultPos() const +bool Window::IsDefaultPos() const { return mpWindowImpl->mbDefPos; } -sal_Bool Window::IsDefaultSize() const +bool Window::IsDefaultSize() const { return mpWindowImpl->mbDefSize; } -void Window::EnablePaint( sal_Bool bEnable ) +void Window::EnablePaint( bool bEnable ) { mpWindowImpl->mbPaintDisabled = !bEnable; } -sal_Bool Window::IsPaintEnabled() const +bool Window::IsPaintEnabled() const { return !mpWindowImpl->mbPaintDisabled; } -sal_Bool Window::IsUpdateMode() const +bool Window::IsUpdateMode() const { return !mpWindowImpl->mbNoUpdate; } -void Window::SetParentUpdateMode( sal_Bool bUpdate ) +void Window::SetParentUpdateMode( bool bUpdate ) { mpWindowImpl->mbNoParentUpdate = !bUpdate; } -sal_Bool Window::IsActive() const +bool Window::IsActive() const { return mpWindowImpl->mbActive; } @@ -1660,12 +1660,12 @@ sal_uInt16 Window::GetGetFocusFlags() const return mpWindowImpl->mnGetFocusFlags; } -sal_Bool Window::IsCompoundControl() const +bool Window::IsCompoundControl() const { return mpWindowImpl->mbCompoundControl; } -sal_Bool Window::IsWait() const +bool Window::IsWait() const { return (mpWindowImpl->mnWaitCount != 0); } @@ -1680,7 +1680,7 @@ const Fraction& Window::GetZoom() const return mpWindowImpl->maZoom; } -sal_Bool Window::IsZoom() const +bool Window::IsZoom() const { return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator(); } @@ -1711,12 +1711,12 @@ void* Window::GetData() const return mpWindowImpl->mpUserData; } -sal_Bool Window::IsCreatedWithToolkit() const +bool Window::IsCreatedWithToolkit() const { return mpWindowImpl->mbCreatedWithToolkit; } -void Window::SetCreatedWithToolkit( sal_Bool b ) +void Window::SetCreatedWithToolkit( bool b ) { mpWindowImpl->mbCreatedWithToolkit = b; diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 2d299cd3faa1..33d764d1bc5e 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -64,9 +64,9 @@ bool ImplCallPreNotify( NotifyEvent& rEvt ) || rEvt.GetWindow()->PreNotify( rEvt ); } -static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, +static bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, sal_uInt16 nCode, sal_uInt16 nSVEvent, - sal_Bool bMouseLeave ) + bool bMouseLeave ) { ImplSVData* pSVData = ImplGetSVData(); @@ -84,14 +84,14 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos if ( nSVEvent == EVENT_MOUSEMOVE ) { if ( bMouseLeave ) - return sal_True; + return true; if ( !pFloat || (nHitTest & IMPL_FLOATWIN_HITTEST_RECT) ) { if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) ImplDestroyHelpWindow( true ); pChild->ImplGetFrame()->SetPointer( POINTER_ARROW ); - return sal_True; + return true; } } else @@ -109,13 +109,13 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos // if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ) // return sal_False; // else - return sal_True; + return true; } else if ( nHitTest & IMPL_FLOATWIN_HITTEST_RECT ) { if ( !(pFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE) ) pFloat->ImplSetMouseDown(); - return sal_True; + return true; } } else @@ -126,7 +126,7 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos { if ( pFloat->ImplIsMouseDown() ) pFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); - return sal_True; + return true; } } else @@ -136,7 +136,7 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos if ( !(nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - return sal_True; + return true; } } } @@ -151,21 +151,21 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos { if ( (nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) && (nSVEvent == EVENT_MOUSEBUTTONUP) ) - return sal_True; + return true; pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ) - return sal_False; + return false; else - return sal_True; + return true; } else - return sal_True; + return true; } } } } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -187,9 +187,9 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos ) if ( pChild->IsInputEnabled() && !pChild->IsInModalNonRefMode() ) { HelpEvent aHelpEvent( rMousePos, nHelpMode ); - pSVData->maHelpData.mbRequestingHelp = sal_True; + pSVData->maHelpData.mbRequestingHelp = true; pChild->RequestHelp( aHelpEvent ); - pSVData->maHelpData.mbRequestingHelp = sal_False; + pSVData->maHelpData.mbRequestingHelp = false; } // #104172# do not kill keyboard activated tooltips else if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp) @@ -213,8 +213,8 @@ static void ImplSetMousePointer( Window* pChild ) // ----------------------------------------------------------------------- -static sal_Bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL, - sal_Bool bMouse = sal_False, Point* pPos = NULL ) +static bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL, + bool bMouse = false, Point* pPos = NULL ) { Point aPos; if ( pPos ) @@ -236,22 +236,22 @@ static sal_Bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = ImplDelData aDelData( pChild ); bool bPreNotify = ImplCallPreNotify( aNCmdEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( !bPreNotify ) { pChild->ImplGetWindowImpl()->mbCommand = false; pChild->Command( aCEvt ); if( aDelData.IsDead() ) - return sal_False; + return false; pChild->ImplNotifyKeyMouseCommandEventListeners( aNCmdEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( pChild->ImplGetWindowImpl()->mbCommand ) - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -274,14 +274,14 @@ static long ContextMenuEventLink( void* pCEvent, void* ) if( ! pEv->aDelData.IsDead() ) { pEv->pWindow->ImplRemoveDel( &pEv->aDelData ); - ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, sal_True, &pEv->aChildPos ); + ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, true, &pEv->aChildPos ); } delete pEv; return 0; } -bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave, +bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, long nX, long nY, sal_uLong nMsgTime, sal_uInt16 nCode, sal_uInt16 nMode ) { @@ -314,7 +314,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( (pWinFrameData->mnLastMouseX != nX) || (pWinFrameData->mnLastMouseY != nY) ) { - ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, nX, nY, nMsgTime, nCode, nMode ); + ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, false, nX, nY, nMsgTime, nCode, nMode ); } } @@ -327,7 +327,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse pWinFrameData->mnMouseMode = nMode & ~(MOUSE_SYNTHETIC | MOUSE_MODIFIERCHANGED); if ( bMouseLeave ) { - pWinFrameData->mbMouseIn = sal_False; + pWinFrameData->mbMouseIn = false; if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) { ImplDelData aDelData( pWindow ); @@ -339,7 +339,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } } else - pWinFrameData->mbMouseIn = sal_True; + pWinFrameData->mbMouseIn = true; DBG_ASSERT( !pSVData->maWinData.mpTrackWin || (pSVData->maWinData.mpTrackWin == pSVData->maWinData.mpCaptureWin), @@ -490,7 +490,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse !(((nMouseY-nDragH) <= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) && ((nMouseY+nDragH) >= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY)) ) { - pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True; + pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = true; // Check if drag source provides it's own recognizer if( pMouseDownWin->ImplGetFrameData()->mbInternalDragGestureRecognizer ) @@ -539,7 +539,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } } else - pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True; + pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = true; } // test for mouseleave and mouseenter @@ -553,8 +553,8 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse NotifyEvent aNLeaveEvt( EVENT_MOUSEMOVE, pMouseMoveWin, &aMLeaveEvt ); ImplDelData aDelData; ImplDelData aDelData2; - pWinFrameData->mbInMouseMove = sal_True; - pMouseMoveWin->ImplGetWinData()->mbMouseOver = sal_False; + pWinFrameData->mbInMouseMove = true; + pMouseMoveWin->ImplGetWinData()->mbMouseOver = false; pMouseMoveWin->ImplAddDel( &aDelData ); // A MouseLeave can destroy this window @@ -569,7 +569,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } pWinFrameData->mpMouseMoveWin = NULL; - pWinFrameData->mbInMouseMove = sal_False; + pWinFrameData->mbInMouseMove = false; if ( pChild ) { @@ -587,7 +587,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } pWinFrameData->mpMouseMoveWin = pChild; if( pChild ) - pChild->ImplGetWinData()->mbMouseOver = sal_True; + pChild->ImplGetWinData()->mbMouseOver = true; // MouseLeave if ( !pChild ) @@ -616,7 +616,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse ((nMouseY+nDblClkH) >= pChild->ImplGetFrameData()->mnFirstMouseY) ) { pChild->ImplGetFrameData()->mnClickCount++; - pChild->ImplGetFrameData()->mbStartDragCalled = sal_True; + pChild->ImplGetFrameData()->mbStartDragCalled = true; } else { @@ -655,7 +655,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( !aDelData.IsDead() ) { pChild->ImplRemoveDel( &aDelData ); - pChild->ImplGetFrameData()->mbStartDragCalled = sal_True; + pChild->ImplGetFrameData()->mbStartDragCalled = true; } return true; } @@ -664,15 +664,15 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } // call handler - sal_Bool bDrag = sal_False; - sal_Bool bCallHelpRequest = sal_True; + bool bDrag = false; + bool bCallHelpRequest = true; DBG_ASSERT( pChild, "ImplHandleMouseEvent: pChild is NULL" ); ImplDelData aDelData; NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt ); pChild->ImplAddDel( &aDelData ); if ( nSVEvent == EVENT_MOUSEMOVE ) - pChild->ImplGetFrameData()->mbInMouseMove = sal_True; + pChild->ImplGetFrameData()->mbInMouseMove = true; // bring window into foreground on mouseclick if ( nSVEvent == EVENT_MOUSEBUTTONDOWN ) @@ -702,7 +702,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse (pSVData->maWinData.mnTrackFlags & STARTTRACK_SCROLLREPEAT) ) pSVData->maWinData.mpTrackTimer->Start(); } - bCallHelpRequest = sal_False; + bCallHelpRequest = false; nRet = true; } else @@ -713,7 +713,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse pChild->ToTop( TOTOP_NOGRABFOCUS ); if( aDelData.IsDead() ) - bCallHelpRequest = sal_False; + bCallHelpRequest = false; else { // if the MouseMove handler changes the help window's visibility @@ -722,7 +722,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse pChild->ImplGetWindowImpl()->mbMouseMove = false; pChild->MouseMove( aMEvt ); if ( pOldHelpTextWin != pSVData->maHelpData.mpHelpWin ) - bCallHelpRequest = sal_False; + bCallHelpRequest = false; } } } @@ -761,7 +761,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( nSVEvent == EVENT_MOUSEMOVE ) - pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = sal_False; + pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = false; if ( nSVEvent == EVENT_MOUSEMOVE ) { @@ -801,9 +801,9 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse { sal_uInt16 nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction(); if ( nMiddleAction == MOUSE_MIDDLE_AUTOSCROLL ) - nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, sal_True, &aChildPos ); + nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, true, &aChildPos ); else if ( nMiddleAction == MOUSE_MIDDLE_PASTESELECTION ) - nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, sal_True, &aChildPos ); + nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, true, &aChildPos ); } else { @@ -812,7 +812,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( (nCode == rMSettings.GetContextMenuCode()) && (nClicks == rMSettings.GetContextMenuClicks()) ) { - sal_Bool bContextMenu; + bool bContextMenu; if ( rMSettings.GetContextMenuDown() ) bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONDOWN); else @@ -836,7 +836,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse Application::PostUserEvent( Link( pEv, ContextMenuEventLink ) ); } else - nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_True, &aChildPos ); + nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, true, &aChildPos ); } } } @@ -892,7 +892,7 @@ static Window* ImplGetKeyInputWindow( Window* pWindow ) // ----------------------------------------------------------------------- static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, - sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, sal_Bool bForward ) + sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, bool bForward ) { ImplSVData* pSVData = ImplGetSVData(); KeyCode aKeyCode( nKeyCode, nKeyCode ); @@ -931,7 +931,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, } } - sal_Bool bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1(); + bool bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1(); // determine last input time pSVData->maAppData.mnLastInputTime = Time::GetSystemTicks(); @@ -1068,7 +1068,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, sal_uInt16 nCode = aKeyCode.GetCode(); // #101999# is focus in or below toolbox - sal_Bool bToolboxFocus=sal_False; + bool bToolboxFocus=false; if( (nCode == KEY_F1) && aKeyCode.IsShift() ) { Window *pWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; @@ -1076,7 +1076,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, { if( pWin->ImplGetWindowImpl()->mbToolBox ) { - bToolboxFocus = sal_True; + bToolboxFocus = true; break; } else @@ -1086,7 +1086,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, // ContextMenu if ( (nCode == KEY_CONTEXTMENU) || ((nCode == KEY_F10) && aKeyCode.IsShift() && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) ) - nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_False ); + nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, false ); else if ( ( (nCode == KEY_F2) && aKeyCode.IsShift() ) || ( (nCode == KEY_F1) && aKeyCode.IsMod1() ) || // #101999# no active help when focus in toolbox, simulate BallonHelp instead ( (nCode == KEY_F1) && aKeyCode.IsShift() && bToolboxFocus ) ) @@ -1099,10 +1099,10 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, aPos = pChild->OutputToScreenPixel( aPos ); HelpEvent aHelpEvent( aPos, HELPMODE_BALLOON ); - aHelpEvent.SetKeyboardActivated( sal_True ); - pSVData->maHelpData.mbSetKeyboardHelp = sal_True; + aHelpEvent.SetKeyboardActivated( true ); + pSVData->maHelpData.mbSetKeyboardHelp = true; pChild->RequestHelp( aHelpEvent ); - pSVData->maHelpData.mbSetKeyboardHelp = sal_False; + pSVData->maHelpData.mbSetKeyboardHelp = false; } else if ( (nCode == KEY_F1) || (nCode == KEY_HELP) ) { @@ -1362,7 +1362,7 @@ static bool ImplHandleInputContextChange( Window* pWindow, LanguageType eNewLang // ----------------------------------------------------------------------- -static sal_Bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, +static bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, const CommandWheelData* pWheelData ) { Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos ); @@ -1371,17 +1371,17 @@ static sal_Bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, ImplDelData aDelData( pWindow ); bool bPreNotify = ImplCallPreNotify( aNCmdEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( !bPreNotify ) { pWindow->ImplGetWindowImpl()->mbCommand = false; pWindow->Command( aCEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( pWindow->ImplGetWindowImpl()->mbCommand ) - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -1418,7 +1418,7 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv CommandWheelData aWheelData( rEvt.mnDelta, rEvt.mnNotchDelta, rEvt.mnScrollLines, nMode, nCode, bHorz, bPixel ); Point aMousePos( rEvt.mnX, rEvt.mnY ); - sal_Bool bRet = sal_True; + bool bRet = true; // first check any floating window ( eg. drop down listboxes) bool bIsFloat = false; @@ -1531,7 +1531,7 @@ static void KillOwnPopups( Window* pWindow ) ImplSVData* pSVData = ImplGetSVData(); Window *pParent = pWindow->ImplGetWindowImpl()->mpFrameWindow; Window *pChild = pSVData->maWinData.mpFirstFloat; - if ( pChild && pParent->ImplIsWindowOrChild( pChild, sal_True ) ) + if ( pChild && pParent->ImplIsWindowOrChild( pChild, true ) ) { if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) ) pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -1601,7 +1601,7 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ) pWindow->ImplGetWindowImpl()->mpFrameData->mbNeedSysWindow = (nNewWidth < IMPL_MIN_NEEDSYSWIN) || (nNewHeight < IMPL_MIN_NEEDSYSWIN); - sal_Bool bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0); + bool bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0); if( bMinimized != pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized ) pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplNotifyIconifiedState( bMinimized ); pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized = bMinimized; @@ -1644,7 +1644,7 @@ static void ImplHandleMoveResize( Window* pWindow, long nNewWidth, long nNewHeig // ----------------------------------------------------------------------- -static void ImplActivateFloatingWindows( Window* pWindow, sal_Bool bActive ) +static void ImplActivateFloatingWindows( Window* pWindow, bool bActive ) { // First check all overlapping windows Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap; @@ -1671,7 +1671,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) // If the status has been preserved, because we got back the focus // in the meantime, we do nothing - sal_Bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus; + bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus; // next execute the delayed functions if ( bHasFocus ) @@ -1682,21 +1682,21 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInputEnabled() && ! ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInModalMode() ) { if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsEnabled() ) { ImplGetWindowImpl()->mpFrameData->mpFocusWin->GrabFocus(); - bHandled = sal_True; + bHandled = true; } else if( ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplHasDlgCtrl() ) { // #109094# if the focus is restored to a disabled dialog control (was disabled meanwhile) // try to move it to the next control ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplDlgCtrlNextWindow(); - bHandled = sal_True; + bHandled = true; } } if ( !bHandled ) @@ -1777,7 +1777,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) static void ImplHandleGetFocus( Window* pWindow ) { - pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_True; + pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = true; // execute Focus-Events after a delay, such that SystemChildWindows @@ -1817,7 +1817,7 @@ static void ImplHandleLoseFocus( Window* pWindow ) pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); } - pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_False; + pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = false; // execute Focus-Events after a delay, such that SystemChildWindows // do not flicker when they receive focus @@ -1978,7 +1978,7 @@ static sal_uInt16 ImplGetMouseButtonMode( SalMouseEvent* pEvent ) inline bool ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_True, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, true, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -1988,7 +1988,7 @@ inline bool ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) inline bool ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -1998,7 +1998,7 @@ inline bool ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) inline bool ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, sal_False, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2013,7 +2013,7 @@ inline bool ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent inline bool ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, sal_False, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2095,7 +2095,7 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) #else nNewCode |= pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & ~(KEY_SHIFT | KEY_MOD1 | KEY_MOD2); #endif - pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, sal_True ); + pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, true ); } // #105224# send commandevent to allow special treatment of Ctrl-LeftShift/Ctrl-RightShift etc. @@ -2328,7 +2328,7 @@ static void ImplHandleSalQueryCharPosition( Window *pWindow, pEvt->mnCursorBoundY = aAbsScreenPos.Y(); pEvt->mnCursorBoundWidth = aDeviceRect.GetWidth(); pEvt->mnCursorBoundHeight = aDeviceRect.GetHeight(); - pEvt->mbVertical = (pWinData->mbVertical != sal_False); + pEvt->mbVertical = pWinData->mbVertical; pEvt->mbValid = true; } } @@ -2412,28 +2412,28 @@ bool ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, { SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT, - pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True ); + pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, true ); } break; case SALEVENT_EXTERNALKEYINPUT: { KeyEvent* pKeyEvt = (KeyEvent*) pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT, - pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False ); + pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), false ); } break; case SALEVENT_KEYUP: { SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYUP, - pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True ); + pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, true ); } break; case SALEVENT_EXTERNALKEYUP: { KeyEvent* pKeyEvt = (KeyEvent*) pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYUP, - pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False ); + pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), false ); } break; case SALEVENT_KEYMODCHANGE: @@ -2604,7 +2604,7 @@ bool ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, ScrollEvent* pScrollEvent = (ScrollEvent*) pEvent; SalWheelMouseEvent aSalWheelMouseEvent; aSalWheelMouseEvent.mnTime = Time::GetSystemTicks(); - aSalWheelMouseEvent.mbDeltaIsPixel = sal_True; + aSalWheelMouseEvent.mbDeltaIsPixel = true; // event location holds delta values instead aSalWheelMouseEvent.mnX = long(pScrollEvent->GetXOffset()); aSalWheelMouseEvent.mnY = long(pScrollEvent->GetYOffset()); diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 8d27cd69b749..4f6eee505780 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -41,10 +41,10 @@ void WorkWindow::ImplInitWorkWindowData() mnIcon = 0; // Should be removed in the next top level update - now in SystemWindow mnPresentationFlags = 0; - mbPresentationMode = sal_False; - mbPresentationVisible = sal_False; - mbPresentationFull = sal_False; - mbFullScreenMode = sal_False; + mbPresentationMode = false; + mbPresentationVisible = false; + mbPresentationFull = false; + mbFullScreenMode = false; } // ----------------------------------------------------------------------- @@ -113,7 +113,7 @@ WorkWindow::WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSyst SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); - mbSysChild = sal_True; + mbSysChild = true; ImplInit( pParent, nStyle, aSystemWorkWindowToken ); } @@ -123,7 +123,7 @@ WorkWindow::WorkWindow( SystemParentData* pParent ) : SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); - mbSysChild = sal_True; + mbSysChild = true; ImplInit( NULL, 0, pParent ); } @@ -141,17 +141,17 @@ WorkWindow::~WorkWindow() // ----------------------------------------------------------------------- -void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode ) +void WorkWindow::ShowFullScreenMode( bool bFullScreenMode ) { return ShowFullScreenMode( bFullScreenMode, GetScreenNumber()); } -void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDisplayScreen ) +void WorkWindow::ShowFullScreenMode( bool bFullScreenMode, sal_Int32 nDisplayScreen ) { if ( !mbFullScreenMode == !bFullScreenMode ) return; - mbFullScreenMode = bFullScreenMode != 0; + mbFullScreenMode = bFullScreenMode; if ( !mbSysChild ) { // Dispose of the canvas implementation, which might rely on @@ -173,25 +173,25 @@ void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDispla // ----------------------------------------------------------------------- -void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags ) +void WorkWindow::StartPresentationMode( bool bPresentation, sal_uInt16 nFlags ) { return StartPresentationMode( bPresentation, nFlags, GetScreenNumber()); } -void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplayScreen ) +void WorkWindow::StartPresentationMode( bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplayScreen ) { if ( !bPresentation == !mbPresentationMode ) return; if ( bPresentation ) { - mbPresentationMode = sal_True; + mbPresentationMode = true; mbPresentationVisible = IsVisible(); mbPresentationFull = mbFullScreenMode; mnPresentationFlags = nFlags; if ( !(mnPresentationFlags & PRESENTATION_NOFULLSCREEN) ) - ShowFullScreenMode( sal_True, nDisplayScreen ); + ShowFullScreenMode( true, nDisplayScreen ); if ( !mbSysChild ) { if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS ) @@ -215,16 +215,16 @@ void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlag } ShowFullScreenMode( mbPresentationFull, nDisplayScreen ); - mbPresentationMode = sal_False; - mbPresentationVisible = sal_False; - mbPresentationFull = sal_False; + mbPresentationMode = false; + mbPresentationVisible = false; + mbPresentationFull = false; mnPresentationFlags = 0; } } // ----------------------------------------------------------------------- -sal_Bool WorkWindow::IsMinimized() const +bool WorkWindow::IsMinimized() const { //return mpWindowImpl->mpFrameData->mbMinimized; SalFrameState aState; @@ -234,15 +234,15 @@ sal_Bool WorkWindow::IsMinimized() const // ----------------------------------------------------------------------- -sal_Bool WorkWindow::SetPluginParent( SystemParentData* pParent ) +bool WorkWindow::SetPluginParent( SystemParentData* pParent ) { DBG_ASSERT( ! mbPresentationMode && ! mbFullScreenMode, "SetPluginParent in fullscreen or presentation mode !" ); bool bWasDnd = Window::ImplStopDnd(); - sal_Bool bShown = IsVisible(); + bool bShown = IsVisible(); Show( false ); - sal_Bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); + bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); Show( bShown ); if( bWasDnd ) @@ -270,9 +270,9 @@ void WorkWindow::Restore() ImplSetFrameState( WINDOWSTATE_STATE_NORMAL ); } -sal_Bool WorkWindow::Close() +bool WorkWindow::Close() { - sal_Bool bCanClose = SystemWindow::Close(); + bool bCanClose = SystemWindow::Close(); // Ist es das Applikationsfenster, dann beende die Applikation if ( bCanClose && ( ImplGetSVData()->maWinData.mpAppWin == this ) ) @@ -281,14 +281,14 @@ sal_Bool WorkWindow::Close() return bCanClose; } -void WorkWindow::Maximize( sal_Bool bMaximize ) +void WorkWindow::Maximize( bool bMaximize ) { ImplSetFrameState( bMaximize ? WINDOWSTATE_STATE_MAXIMIZED : WINDOWSTATE_STATE_NORMAL ); } -sal_Bool WorkWindow::IsMaximized() const +bool WorkWindow::IsMaximized() const { - sal_Bool bRet = sal_False; + bool bRet = false; SalFrameState aState; if( mpWindowImpl->mpFrame->GetWindowState( &aState ) ) @@ -296,7 +296,7 @@ sal_Bool WorkWindow::IsMaximized() const if( aState.mnState & (WINDOWSTATE_STATE_MAXIMIZED | WINDOWSTATE_STATE_MAXIMIZED_HORZ | WINDOWSTATE_STATE_MAXIMIZED_VERT ) ) - bRet = sal_True; + bRet = true; } return bRet; } |