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