Kaydet (Commit) c9744719 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: Ic0597f42b6f0a637e0a3fdfa7972cbe67272c65d
üst d7432381
...@@ -746,7 +746,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) ...@@ -746,7 +746,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput )
sal_uInt16 nType; sal_uInt16 nType;
sal_uInt16 nGetFocusFlags = GETFOCUS_TAB; sal_uInt16 nGetFocusFlags = GETFOCUS_TAB;
sal_uInt16 nNewIndex; sal_uInt16 nNewIndex;
sal_Bool bFormular = sal_False; bool bFormular = false;
// Bei Ctrl-Tab erstmal testen, ob zwischen Formularen // Bei Ctrl-Tab erstmal testen, ob zwischen Formularen
// gesprungen werden soll // gesprungen werden soll
...@@ -763,7 +763,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) ...@@ -763,7 +763,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput )
if ( pTempWindow->ImplGetWindow()->IsDialogControlStart() ) if ( pTempWindow->ImplGetWindow()->IsDialogControlStart() )
{ {
if ( iTemp != 0 ) if ( iTemp != 0 )
bFormular = sal_True; bFormular = true;
if ( aKeyCode.IsShift() ) if ( aKeyCode.IsShift() )
{ {
if ( iTemp <= nIndex ) if ( iTemp <= nIndex )
...@@ -1140,7 +1140,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window ...@@ -1140,7 +1140,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window
{ {
// #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text. // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
// See tools/options/print for example. // See tools/options/print for example.
sal_Bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE); bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE);
// get index, form start and form end // get index, form start and form end
sal_uInt16 nIndex=0, nFormStart=0, nFormEnd=0; sal_uInt16 nIndex=0, nFormStart=0, nFormEnd=0;
Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
......
...@@ -54,7 +54,7 @@ private: ...@@ -54,7 +54,7 @@ private:
Timer maEndDockTimer; Timer maEndDockTimer;
Point maDockPos; Point maDockPos;
Rectangle maDockRect; Rectangle maDockRect;
sal_Bool mbInMove; bool mbInMove;
sal_uLong mnLastUserEvent; sal_uLong mnLastUserEvent;
DECL_LINK(DockingHdl, void *); DECL_LINK(DockingHdl, void *);
...@@ -87,7 +87,7 @@ ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits, ...@@ -87,7 +87,7 @@ ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits,
FloatingWindow( pParent, nWinBits ), FloatingWindow( pParent, nWinBits ),
mpDockWin( pDockingWin ), mpDockWin( pDockingWin ),
mnLastTicks( Time::GetSystemTicks() ), mnLastTicks( Time::GetSystemTicks() ),
mbInMove( sal_False ), mbInMove( false ),
mnLastUserEvent( 0 ) mnLastUserEvent( 0 )
{ {
// Daten vom DockingWindow uebernehmen // Daten vom DockingWindow uebernehmen
...@@ -175,7 +175,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) ...@@ -175,7 +175,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl)
Window *pDockingArea = mpDockWin->GetWindow()->GetParent(); Window *pDockingArea = mpDockWin->GetWindow()->GetParent();
PointerState aState = pDockingArea->GetPointerState(); PointerState aState = pDockingArea->GetPointerState();
sal_Bool bRealMove = sal_True; bool bRealMove = true;
if( GetStyle() & WB_OWNERDRAWDECORATION ) if( GetStyle() & WB_OWNERDRAWDECORATION )
{ {
// for windows with ownerdraw decoration // for windows with ownerdraw decoration
...@@ -196,9 +196,9 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) ...@@ -196,9 +196,9 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl)
PointerState aBorderState = pBorder->GetPointerState(); PointerState aBorderState = pBorder->GetPointerState();
if( aBorderRect.IsInside( aBorderState.maPos ) ) if( aBorderRect.IsInside( aBorderState.maPos ) )
bRealMove = sal_True; bRealMove = true;
else else
bRealMove = sal_False; bRealMove = false;
} }
} }
...@@ -236,7 +236,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) ...@@ -236,7 +236,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl)
EndDockTimerHdl( this ); EndDockTimerHdl( this );
} }
} }
mbInMove = sal_False; mbInMove = false;
return 0; return 0;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -246,7 +246,7 @@ void ImplDockFloatWin2::Move() ...@@ -246,7 +246,7 @@ void ImplDockFloatWin2::Move()
if( mbInMove ) if( mbInMove )
return; return;
mbInMove = sal_True; mbInMove = true;
FloatingWindow::Move(); FloatingWindow::Move();
mpDockWin->GetWindow()->Move(); mpDockWin->GetWindow()->Move();
...@@ -518,8 +518,8 @@ class ImplPopupFloatWin : public FloatingWindow ...@@ -518,8 +518,8 @@ class ImplPopupFloatWin : public FloatingWindow
{ {
private: private:
ImplDockingWindowWrapper* mpDockingWin; ImplDockingWindowWrapper* mpDockingWin;
sal_Bool mbHighlight; bool mbHighlight;
sal_Bool mbMoving; bool mbMoving;
bool mbTrackingEnabled; bool mbTrackingEnabled;
Point maDelta; Point maDelta;
Point maTearOffPosition; Point maTearOffPosition;
...@@ -555,8 +555,8 @@ ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* ...@@ -555,8 +555,8 @@ ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper*
mpWindowImpl->mbToolbarFloatingWindow = sal_True; // indicate window type, required for accessibility mpWindowImpl->mbToolbarFloatingWindow = sal_True; // indicate window type, required for accessibility
// which should not see this window as a toplevel window // which should not see this window as a toplevel window
mpDockingWin = pDockingWin; mpDockingWin = pDockingWin;
mbHighlight = sal_False; mbHighlight = false;
mbMoving = sal_False; mbMoving = false;
mbTrackingEnabled = sal_False; mbTrackingEnabled = sal_False;
mbGripAtBottom = sal_True; mbGripAtBottom = sal_True;
mbHasGrip = bHasGrip; mbHasGrip = bHasGrip;
...@@ -772,18 +772,18 @@ void ImplPopupFloatWin::MouseMove( const MouseEvent& rMEvt ) ...@@ -772,18 +772,18 @@ void ImplPopupFloatWin::MouseMove( const MouseEvent& rMEvt )
if( mbTrackingEnabled && rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) ) if( mbTrackingEnabled && rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) )
{ {
// start window move // start window move
mbMoving = sal_True; mbMoving = true;
StartTracking( STARTTRACK_NOKEYCANCEL ); StartTracking( STARTTRACK_NOKEYCANCEL );
return; return;
} }
if( !mbHighlight && GetDragRect().IsInside( aMousePos ) ) if( !mbHighlight && GetDragRect().IsInside( aMousePos ) )
{ {
mbHighlight = sal_True; mbHighlight = true;
DrawGrip(); DrawGrip();
} }
if( mbHighlight && ( rMEvt.IsLeaveWindow() || !GetDragRect().IsInside( aMousePos ) ) ) if( mbHighlight && ( rMEvt.IsLeaveWindow() || !GetDragRect().IsInside( aMousePos ) ) )
{ {
mbHighlight = sal_False; mbHighlight = false;
DrawGrip(); DrawGrip();
} }
} }
...@@ -820,7 +820,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt ) ...@@ -820,7 +820,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
{ {
if ( rTEvt.IsTrackingEnded() ) if ( rTEvt.IsTrackingEnded() )
{ {
mbMoving = sal_False; mbMoving = false;
EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF ); EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF );
} }
else if ( !rTEvt.GetMouseEvent().IsSynthetic() ) else if ( !rTEvt.GetMouseEvent().IsSynthetic() )
...@@ -1062,12 +1062,12 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFlo ...@@ -1062,12 +1062,12 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFlo
if ( !IsDockingCanceled() ) if ( !IsDockingCanceled() )
{ {
sal_Bool bShow = sal_False; bool bShow = false;
if ( bFloatMode != IsFloatingMode() ) if ( bFloatMode != IsFloatingMode() )
{ {
GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE ); GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
SetFloatingMode( bFloatMode ); SetFloatingMode( bFloatMode );
bShow = sal_True; bShow = true;
if ( bFloatMode ) if ( bFloatMode )
{ {
// #i44800# always use outputsize - as in all other places // #i44800# always use outputsize - as in all other places
......
...@@ -72,7 +72,7 @@ private: ...@@ -72,7 +72,7 @@ private:
Timer maDockTimer; Timer maDockTimer;
Point maDockPos; Point maDockPos;
Rectangle maDockRect; Rectangle maDockRect;
sal_Bool mbInMove; bool mbInMove;
sal_uLong mnLastUserEvent; sal_uLong mnLastUserEvent;
DECL_LINK(DockingHdl, void *); DECL_LINK(DockingHdl, void *);
...@@ -100,7 +100,7 @@ ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits, ...@@ -100,7 +100,7 @@ ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits,
FloatingWindow( pParent, nWinBits ), FloatingWindow( pParent, nWinBits ),
mpDockWin( pDockingWin ), mpDockWin( pDockingWin ),
mnLastTicks( Time::GetSystemTicks() ), mnLastTicks( Time::GetSystemTicks() ),
mbInMove( sal_False ), mbInMove( false ),
mnLastUserEvent( 0 ) mnLastUserEvent( 0 )
{ {
// Daten vom DockingWindow uebernehmen // Daten vom DockingWindow uebernehmen
...@@ -192,7 +192,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) ...@@ -192,7 +192,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl)
mpDockWin->EndDocking( maDockRect, sal_True ); mpDockWin->EndDocking( maDockRect, sal_True );
} }
} }
mbInMove = sal_False; mbInMove = false;
return 0; return 0;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -202,7 +202,7 @@ void ImplDockFloatWin::Move() ...@@ -202,7 +202,7 @@ void ImplDockFloatWin::Move()
if( mbInMove ) if( mbInMove )
return; return;
mbInMove = sal_True; mbInMove = true;
FloatingWindow::Move(); FloatingWindow::Move();
mpDockWin->Move(); mpDockWin->Move();
...@@ -668,12 +668,12 @@ void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) ...@@ -668,12 +668,12 @@ void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
{ {
if ( !IsDockingCanceled() ) if ( !IsDockingCanceled() )
{ {
sal_Bool bShow = sal_False; bool bShow = false;
if ( bFloatMode != IsFloatingMode() ) if ( bFloatMode != IsFloatingMode() )
{ {
Show( sal_False, SHOW_NOFOCUSCHANGE ); Show( sal_False, SHOW_NOFOCUSCHANGE );
SetFloatingMode( bFloatMode ); SetFloatingMode( bFloatMode );
bShow = sal_True; bShow = true;
if ( bFloatMode && mpFloatWin ) if ( bFloatMode && mpFloatWin )
mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() ); mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
} }
......
...@@ -268,7 +268,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, ...@@ -268,7 +268,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
sal_uInt16 nArrangeAry[5]; sal_uInt16 nArrangeAry[5];
sal_uInt16 nArrangeIndex; sal_uInt16 nArrangeIndex;
sal_Bool bBreak; bool bBreak;
Point e1,e2; // the common edge between the item rect and the floating window Point e1,e2; // the common edge between the item rect and the floating window
if ( nFlags & FLOATWIN_POPUPMODE_LEFT ) if ( nFlags & FLOATWIN_POPUPMODE_LEFT )
...@@ -310,7 +310,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, ...@@ -310,7 +310,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
for ( ; nArrangeIndex < 5; nArrangeIndex++ ) for ( ; nArrangeIndex < 5; nArrangeIndex++ )
{ {
bBreak = sal_True; bBreak = true;
switch ( nArrangeAry[nArrangeIndex] ) switch ( nArrangeAry[nArrangeIndex] )
{ {
...@@ -321,12 +321,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, ...@@ -321,12 +321,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if( bRTL ) // --- RTL --- we're comparing screen coordinates here if( bRTL ) // --- RTL --- we're comparing screen coordinates here
{ {
if( (devRectRTL.Right()+aSize.Width()) > aScreenRect.Right() ) if( (devRectRTL.Right()+aSize.Width()) > aScreenRect.Right() )
bBreak = sal_False; bBreak = false;
} }
else else
{ {
if ( aPos.X() < aScreenRect.Left() ) if ( aPos.X() < aScreenRect.Left() )
bBreak = sal_False; bBreak = false;
} }
if( bBreak ) if( bBreak )
{ {
...@@ -345,12 +345,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, ...@@ -345,12 +345,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if( bRTL ) // --- RTL --- we're comparing screen coordinates here if( bRTL ) // --- RTL --- we're comparing screen coordinates here
{ {
if( (devRectRTL.Left() - aSize.Width()) < aScreenRect.Left() ) if( (devRectRTL.Left() - aSize.Width()) < aScreenRect.Left() )
bBreak = sal_False; bBreak = false;
} }
else else
{ {
if ( aPos.X()+aSize.Width() > aScreenRect.Right() ) if ( aPos.X()+aSize.Width() > aScreenRect.Right() )
bBreak = sal_False; bBreak = false;
} }
if( bBreak ) if( bBreak )
{ {
...@@ -367,7 +367,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, ...@@ -367,7 +367,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
aPos.X() = devRect.Left(); aPos.X() = devRect.Left();
aPos.Y() = devRect.Top()-aSize.Height()+1; aPos.Y() = devRect.Top()-aSize.Height()+1;
if ( aPos.Y() < aScreenRect.Top() ) if ( aPos.Y() < aScreenRect.Top() )
bBreak = sal_False; bBreak = false;
if( bBreak ) if( bBreak )
{ {
e1 = devRect.TopLeft(); e1 = devRect.TopLeft();
...@@ -382,7 +382,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, ...@@ -382,7 +382,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
case FLOATWIN_POPUPMODE_DOWN: case FLOATWIN_POPUPMODE_DOWN:
aPos = devRect.BottomLeft(); aPos = devRect.BottomLeft();
if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() ) if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() )
bBreak = sal_False; bBreak = false;
if( bBreak ) if( bBreak )
{ {
e1 = devRect.BottomLeft(); e1 = devRect.BottomLeft();
......
...@@ -91,7 +91,7 @@ DBG_NAME( Menu ) ...@@ -91,7 +91,7 @@ DBG_NAME( Menu )
// document closer // document closer
#define IID_DOCUMENTCLOSE 1 #define IID_DOCUMENTCLOSE 1
static sal_Bool ImplAccelDisabled() static bool ImplAccelDisabled()
{ {
// display of accelerator strings may be suppressed via configuration // display of accelerator strings may be suppressed via configuration
static int nAccelDisabled = -1; static int nAccelDisabled = -1;
...@@ -103,7 +103,7 @@ static sal_Bool ImplAccelDisabled() ...@@ -103,7 +103,7 @@ static sal_Bool ImplAccelDisabled()
getValue( "Menu", "SuppressAccelerators" ); getValue( "Menu", "SuppressAccelerators" );
nAccelDisabled = aStr.equalsIgnoreAsciiCase("true") ? 1 : 0; nAccelDisabled = aStr.equalsIgnoreAsciiCase("true") ? 1 : 0;
} }
return (nAccelDisabled == 1) ? sal_True : sal_False; return nAccelDisabled == 1;
} }
struct MenuItemData struct MenuItemData
......
...@@ -51,8 +51,8 @@ ImplWheelWindow::ImplWheelWindow( Window* pParent ) : ...@@ -51,8 +51,8 @@ ImplWheelWindow::ImplWheelWindow( Window* pParent ) :
const Size aSize( pParent->GetOutputSizePixel() ); const Size aSize( pParent->GetOutputSizePixel() );
const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; const bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; const bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
// calculate maximum speed distance // calculate maximum speed distance
mnMaxWidth = (sal_uLong) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) ); mnMaxWidth = (sal_uLong) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) );
...@@ -217,8 +217,8 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY ) ...@@ -217,8 +217,8 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
{ {
PointerStyle eStyle; PointerStyle eStyle;
const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; const bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; const bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
if( bHorz || bVert ) if( bHorz || bVert )
{ {
...@@ -296,9 +296,9 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt ) ...@@ -296,9 +296,9 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt )
const PointerStyle eActStyle = ImplGetMousePointer( nDistX, nDistY ); const PointerStyle eActStyle = ImplGetMousePointer( nDistX, nDistY );
const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags; const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0; const bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0; const bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
const sal_Bool bOuter = mnActDist > WHEEL_RADIUS; const bool bOuter = mnActDist > WHEEL_RADIUS;
if( bOuter && ( maLastMousePos != aMousePos ) ) if( bOuter && ( maLastMousePos != aMousePos ) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment