summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/button.cxx308
-rw-r--r--vcl/source/control/combobox.cxx254
-rw-r--r--vcl/source/control/ctrl.cxx24
-rwxr-xr-xvcl/source/control/edit.cxx246
-rw-r--r--vcl/source/control/field.cxx250
-rw-r--r--vcl/source/control/field2.cxx542
-rw-r--r--vcl/source/control/fixbrd.cxx24
-rw-r--r--vcl/source/control/fixed.cxx120
-rw-r--r--vcl/source/control/group.cxx30
-rw-r--r--vcl/source/control/ilstbox.cxx682
-rw-r--r--vcl/source/control/imgctrl.cxx10
-rw-r--r--vcl/source/control/longcurr.cxx128
-rw-r--r--vcl/source/control/lstbox.cxx214
-rw-r--r--vcl/source/control/menubtn.cxx10
-rw-r--r--vcl/source/control/morebtn.cxx8
-rw-r--r--vcl/source/control/scrbar.cxx142
-rw-r--r--vcl/source/control/slider.cxx98
-rw-r--r--vcl/source/control/spinbtn.cxx68
-rw-r--r--vcl/source/control/spinfld.cxx106
-rw-r--r--vcl/source/control/tabctrl.cxx270
20 files changed, 1767 insertions, 1767 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 82bec2214dff..5ffe94212d20 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -84,8 +84,8 @@ class ImplCommonButtonData
public:
Rectangle maFocusRect;
Rectangle maSymbolRect;
- USHORT mnButtonState;
- BOOL mbSmallSymbol;
+ sal_uInt16 mnButtonState;
+ sal_Bool mbSmallSymbol;
Image maImage;
Image maImageHC;
@@ -103,7 +103,7 @@ public:
ImplCommonButtonData::ImplCommonButtonData()
{
mnButtonState = 0;
- mbSmallSymbol = FALSE;
+ mbSmallSymbol = sal_False;
mpBitmapEx = NULL;
mpBitmapExHC = NULL;
@@ -191,12 +191,12 @@ XubString Button::GetStandardText( StandardButtonType eButton )
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
{
- ResId aResId( aResIdAry[(USHORT)eButton].nResId, *pResMgr );
+ ResId aResId( aResIdAry[(sal_uInt16)eButton].nResId, *pResMgr );
aText = String( aResId );
}
else
{
- ByteString aT( aResIdAry[(USHORT)eButton].pDefText );
+ ByteString aT( aResIdAry[(sal_uInt16)eButton].pDefText );
aText = String( aT, RTL_TEXTENCODING_ASCII_US );
}
return aText;
@@ -210,7 +210,7 @@ XubString Button::GetStandardHelpText( StandardButtonType /* eButton */ )
return aHelpText;
}
// -----------------------------------------------------------------------
-BOOL Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
{
@@ -237,9 +237,9 @@ BOOL Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -258,7 +258,7 @@ const Image Button::GetModeImage( BmpColorMode eMode ) const
}
// -----------------------------------------------------------------------
-BOOL Button::HasImage() const
+sal_Bool Button::HasImage() const
{
return !!(mpButtonData->maImage);
}
@@ -280,7 +280,7 @@ ImageAlign Button::GetImageAlign() const
}
// -----------------------------------------------------------------------
-BOOL Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
+sal_Bool Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
{
if ( SetModeImage( rBitmap, eMode ) )
{
@@ -295,11 +295,11 @@ BOOL Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
mpButtonData->mpBitmapExHC = new BitmapEx( rBitmap );
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -347,11 +347,11 @@ void Button::ImplSetSymbolRect( const Rectangle& i_rRect )
// -----------------------------------------------------------------------
-USHORT Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
- ULONG nDrawFlags )
+sal_uInt16 Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
+ sal_uLong nDrawFlags )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle & ~WB_DEFBUTTON );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle & ~WB_DEFBUTTON );
if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC )
{
@@ -378,15 +378,15 @@ USHORT Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
// -----------------------------------------------------------------------
void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
- Size& rSize, BOOL bLayout,
- ULONG nImageSep, ULONG nDrawFlags,
- USHORT nTextStyle, Rectangle *pSymbolRect,
+ Size& rSize, sal_Bool bLayout,
+ sal_uLong nImageSep, sal_uLong nDrawFlags,
+ sal_uInt16 nTextStyle, Rectangle *pSymbolRect,
bool bAddImageSep )
{
XubString aText( GetText() );
- BOOL bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
- BOOL bDrawText = aText.Len() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
- BOOL bHasSymbol = pSymbolRect ? TRUE : FALSE;
+ sal_Bool bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
+ sal_Bool bDrawText = aText.Len() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
+ sal_Bool bHasSymbol = pSymbolRect ? sal_True : sal_False;
// No text and no image => nothing to do => return
if ( !bDrawImage && !bDrawText && !bHasSymbol )
@@ -646,7 +646,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
}
}
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( ! ( nDrawFlags & WINDOW_DRAW_NODISABLE ) &&
! IsEnabled() )
@@ -706,13 +706,13 @@ const Rectangle& Button::ImplGetFocusRect() const
}
// -----------------------------------------------------------------------
-USHORT& Button::ImplGetButtonState()
+sal_uInt16& Button::ImplGetButtonState()
{
return mpButtonData->mnButtonState;
}
// -----------------------------------------------------------------------
-USHORT Button::ImplGetButtonState() const
+sal_uInt16 Button::ImplGetButtonState() const
{
return mpButtonData->mnButtonState;
}
@@ -733,13 +733,13 @@ SymbolAlign Button::ImplGetSymbolAlign() const
return mpButtonData->meSymbolAlign;
}
// -----------------------------------------------------------------------
-void Button::ImplSetSmallSymbol( BOOL bSmall )
+void Button::ImplSetSmallSymbol( sal_Bool bSmall )
{
mpButtonData->mbSmallSymbol = bSmall;
}
// -----------------------------------------------------------------------
-void Button::EnableImageDisplay( BOOL bEnable )
+void Button::EnableImageDisplay( sal_Bool bEnable )
{
if( bEnable )
mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOIMAGE;
@@ -748,13 +748,13 @@ void Button::EnableImageDisplay( BOOL bEnable )
}
// -----------------------------------------------------------------------
-BOOL Button::IsImageDisplayEnabled()
+sal_Bool Button::IsImageDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOIMAGE) == 0;
}
// -----------------------------------------------------------------------
-void Button::EnableTextDisplay( BOOL bEnable )
+void Button::EnableTextDisplay( sal_Bool bEnable )
{
if( bEnable )
mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOTEXT;
@@ -763,7 +763,7 @@ void Button::EnableTextDisplay( BOOL bEnable )
}
// -----------------------------------------------------------------------
-BOOL Button::IsTextDisplayEnabled()
+sal_Bool Button::IsTextDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOTEXT) == 0;
}
@@ -783,14 +783,14 @@ bool Button::IsSmallSymbol () const
void PushButton::ImplInitPushButtonData()
{
- mpWindowImpl->mbPushButton = TRUE;
+ mpWindowImpl->mbPushButton = sal_True;
meSymbol = SYMBOL_NOSYMBOL;
meState = STATE_NOCHECK;
meSaveValue = STATE_NOCHECK;
mnDDStyle = 0;
- mbPressed = FALSE;
- mbInUserDraw = FALSE;
+ mbPressed = sal_False;
+ mbInUserDraw = sal_False;
}
// -----------------------------------------------------------------------
@@ -803,7 +803,7 @@ void PushButton::ImplInit( Window* pParent, WinBits nStyle )
if ( nStyle & WB_NOLIGHTBORDER )
ImplGetButtonState() |= BUTTON_DRAW_NOLIGHTBORDER;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -844,8 +844,8 @@ const Color& PushButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) c
// -----------------------------------------------------------------------
-void PushButton::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void PushButton::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Button::ImplInitSettings( bFont, bForeground );
@@ -858,18 +858,18 @@ void PushButton::ImplInitSettings( BOOL bFont,
if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) ||
(GetStyle() & WB_FLATBUTTON) != 0 )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON)
? false
: ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
}
}
}
@@ -877,7 +877,7 @@ void PushButton::ImplInitSettings( BOOL bFont,
// -----------------------------------------------------------------------
void PushButton::ImplDrawPushButtonFrame( Window* pDev,
- Rectangle& rRect, USHORT nStyle )
+ Rectangle& rRect, sal_uInt16 nStyle )
{
if ( !(pDev->GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) )
{
@@ -904,7 +904,7 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev,
// -----------------------------------------------------------------------
-BOOL PushButton::ImplHitTestPushButton( Window* pDev,
+sal_Bool PushButton::ImplHitTestPushButton( Window* pDev,
const Point& rPos )
{
Point aTempPoint;
@@ -915,11 +915,11 @@ BOOL PushButton::ImplHitTestPushButton( Window* pDev,
// -----------------------------------------------------------------------
-USHORT PushButton::ImplGetTextStyle( ULONG nDrawFlags ) const
+sal_uInt16 PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- USHORT nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_MULTILINE | TEXT_DRAW_ENDELLIPSIS;
+ sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_MULTILINE | TEXT_DRAW_ENDELLIPSIS;
if ( ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO ) ||
( nDrawFlags & WINDOW_DRAW_MONO ) )
@@ -954,7 +954,7 @@ USHORT PushButton::ImplGetTextStyle( ULONG nDrawFlags ) const
static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
long nX, long nY,
- Color& rColor, BOOL bBlack )
+ Color& rColor, sal_Bool bBlack )
{
Color aOldLineColor = pDev->GetLineColor();
Color aOldFillColor = pDev->GetFillColor();
@@ -980,7 +980,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
// -----------------------------------------------------------------------
-void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags,
+void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawFlags,
const Rectangle& rRect,
bool bLayout,
bool bMenuBtnSep
@@ -990,8 +990,8 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
Rectangle aInRect = rRect;
Color aColor;
XubString aText = PushButton::GetText(); // PushButton:: wegen MoreButton
- USHORT nTextStyle = ImplGetTextStyle( nDrawFlags );
- USHORT nStyle;
+ sal_uInt16 nTextStyle = ImplGetTextStyle( nDrawFlags );
+ sal_uInt16 nStyle;
if( aInRect.nRight < aInRect.nLeft || aInRect.nBottom < aInRect.nTop )
aInRect.SetEmpty();
@@ -1018,7 +1018,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
Size aSize = rRect.GetSize();
Point aPos = rRect.TopLeft();
- ULONG nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
+ sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
if( nImageSep < 1 )
nImageSep = 1;
if ( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON )
@@ -1070,7 +1070,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
if ( mnDDStyle == PUSHBUTTON_DROPDOWN_TOOLBOX && !bLayout )
{
- BOOL bBlack = FALSE;
+ sal_Bool bBlack = sal_False;
Color aArrowColor( COL_BLACK );
if ( !(nDrawFlags & WINDOW_DRAW_MONO) )
@@ -1080,7 +1080,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
else
{
aArrowColor = Color( COL_LIGHTGREEN );
- bBlack = TRUE;
+ bBlack = sal_True;
}
}
@@ -1108,13 +1108,13 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if( !bLayout )
HideFocus();
- USHORT nButtonStyle = ImplGetButtonState();
+ sal_uInt16 nButtonStyle = ImplGetButtonState();
Point aPoint;
Size aOutSz( GetOutputSizePixel() );
Rectangle aRect( aPoint, aOutSz );
Rectangle aInRect = aRect;
Rectangle aTextRect;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
// adjust style if button should be rendered 'pressed'
if ( mbPressed )
@@ -1144,7 +1144,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
break;
}
- BOOL bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) )
{
@@ -1155,11 +1155,11 @@ void PushButton::ImplDrawPushButton( bool bLayout )
{
Edit* pEdit = static_cast<Edit*>(GetParent());
if( pEdit->ImplUseNativeBorder( pEdit->GetStyle() ) )
- bNativeOK = TRUE;
+ bNativeOK = sal_True;
}
else if( GetParent()->IsNativeControlSupported( aCtrlType, HAS_BACKGROUND_TEXTURE) )
{
- bNativeOK = TRUE;
+ bNativeOK = sal_True;
}
if( !bNativeOK && GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN ) )
{
@@ -1194,7 +1194,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if( ! bRollOver && ! HasFocus() )
bDrawMenuSep = false;
}
- if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
PushButtonValue aControlValue;
Rectangle aCtrlRegion( aInRect );
@@ -1250,7 +1250,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
ShowFocus( ImplGetFocusRect() );
}
- if ( bNativeOK == FALSE )
+ if ( bNativeOK == sal_False )
{
// draw PushButtonFrame, aInRect has content size afterwards
if( (GetStyle() & WB_FLATBUTTON) )
@@ -1281,14 +1281,14 @@ void PushButton::ImplDrawPushButton( bool bLayout )
// -----------------------------------------------------------------------
-void PushButton::ImplSetDefButton( BOOL bSet )
+void PushButton::ImplSetDefButton( sal_Bool bSet )
{
Size aSize( GetSizePixel() );
Point aPos( GetPosPixel() );
int dLeft(0), dRight(0), dTop(0), dBottom(0);
- BOOL bSetPos = FALSE;
+ sal_Bool bSetPos = sal_False;
- if ( (IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
Rectangle aBound, aCont;
Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
@@ -1341,7 +1341,7 @@ void PushButton::ImplSetDefButton( BOOL bSet )
// -----------------------------------------------------------------------
-BOOL PushButton::ImplIsDefButton() const
+sal_Bool PushButton::ImplIsDefButton() const
{
return (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) != 0;
}
@@ -1391,7 +1391,7 @@ void PushButton::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() &&
ImplHitTestPushButton( this, rMEvt.GetPosPixel() ) )
{
- USHORT nTrackFlags = 0;
+ sal_uInt16 nTrackFlags = 0;
if ( ( GetStyle() & WB_REPEAT ) &&
! ( GetStyle() & WB_TOGGLE ) )
@@ -1424,11 +1424,11 @@ void PushButton::Tracking( const TrackingEvent& rTEvt )
{
if ( IsChecked() )
{
- Check( FALSE );
+ Check( sal_False );
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
}
else
- Check( TRUE );
+ Check( sal_True );
}
}
else
@@ -1513,11 +1513,11 @@ void PushButton::KeyUp( const KeyEvent& rKEvt )
{
if ( IsChecked() )
{
- Check( FALSE );
+ Check( sal_False );
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
}
else
- Check( TRUE );
+ Check( sal_True );
Toggle();
}
@@ -1552,7 +1552,7 @@ void PushButton::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1584,7 +1584,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetTextFillColor();
DecorationView aDecoView( pDev );
- USHORT nButtonStyle = 0;
+ sal_uInt16 nButtonStyle = 0;
if ( nFlags & WINDOW_DRAW_MONO )
nButtonStyle |= BUTTON_DRAW_MONO;
if ( IsChecked() )
@@ -1656,17 +1656,17 @@ void PushButton::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -1682,7 +1682,7 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1724,7 +1724,7 @@ long PushButton::PreNotify( NotifyEvent& rNEvt )
break;
}
- BOOL bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) &&
!GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) )
@@ -1787,7 +1787,7 @@ SymbolAlign PushButton::GetSymbolAlign() const
// -----------------------------------------------------------------------
-void PushButton::SetDropDown( USHORT nStyle )
+void PushButton::SetDropDown( sal_uInt16 nStyle )
{
if ( mnDDStyle != nStyle )
{
@@ -1823,7 +1823,7 @@ void PushButton::SetState( TriState eState )
// -----------------------------------------------------------------------
-void PushButton::SetPressed( BOOL bPressed )
+void PushButton::SetPressed( sal_Bool bPressed )
{
if ( mbPressed != bPressed )
{
@@ -1864,7 +1864,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
aSize = GetModeImage().GetSizePixel();
if ( PushButton::GetText().Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
- ULONG nDrawFlags = 0;
+ sal_uLong nDrawFlags = 0;
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize();
aSize.Width() += int( textSize.Width () * 1.15 );
@@ -1937,7 +1937,7 @@ void OKButton::Click()
if ( pParent->IsDialog() )
{
if ( ((Dialog*)pParent)->IsInExecute() )
- ((Dialog*)pParent)->EndDialog( TRUE );
+ ((Dialog*)pParent)->EndDialog( sal_True );
// gegen rekursive Aufrufe schuetzen
else if ( !((Dialog*)pParent)->IsInClose() )
{
@@ -2003,7 +2003,7 @@ void CancelButton::Click()
if ( pParent->IsDialog() )
{
if ( ((Dialog*)pParent)->IsInExecute() )
- ((Dialog*)pParent)->EndDialog( FALSE );
+ ((Dialog*)pParent)->EndDialog( sal_False );
// gegen rekursive Aufrufe schuetzen
else if ( !((Dialog*)pParent)->IsInClose() )
{
@@ -2077,10 +2077,10 @@ void HelpButton::Click()
void RadioButton::ImplInitRadioButtonData()
{
- mbChecked = FALSE;
- mbSaveValue = FALSE;
- mbRadioCheck = TRUE;
- mbStateChanged = FALSE;
+ mbChecked = sal_False;
+ mbSaveValue = sal_False;
+ mbRadioCheck = sal_True;
+ mbStateChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -2090,7 +2090,7 @@ void RadioButton::ImplInit( Window* pParent, WinBits nStyle )
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
Button::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -2125,8 +2125,8 @@ const Color& RadioButton::GetCanonicalTextColor( const StyleSettings& _rStyle )
// -----------------------------------------------------------------------
-void RadioButton::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void RadioButton::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Button::ImplInitSettings( bFont, bForeground );
@@ -2136,18 +2136,18 @@ void RadioButton::ImplInitSettings( BOOL bFont,
if ( !IsControlBackground() &&
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
if( IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -2183,11 +2183,11 @@ void RadioButton::ImplInvalidateOrDrawRadioButtonState()
void RadioButton::ImplDrawRadioButtonState()
{
- USHORT nButtonStyle = 0;
- BOOL bNativeOK = FALSE;
+ sal_uInt16 nButtonStyle = 0;
+ sal_Bool bNativeOK = sal_False;
// no native drawing for image radio buttons
- if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
@@ -2206,12 +2206,12 @@ void RadioButton::ImplDrawRadioButtonState()
}
-if ( bNativeOK == FALSE )
+if ( bNativeOK == sal_False )
{
// kein Image-RadioButton
if ( !maImage )
{
- USHORT nStyle = ImplGetButtonState();
+ sal_uInt16 nStyle = ImplGetButtonState();
if ( !IsEnabled() )
nStyle |= BUTTON_DRAW_DISABLED;
if ( mbChecked )
@@ -2230,7 +2230,7 @@ if ( bNativeOK == FALSE )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aImageRect = maStateRect;
Size aImageSize = maImage.GetSizePixel();
- BOOL bEnabled = IsEnabled();
+ sal_Bool bEnabled = IsEnabled();
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
@@ -2300,7 +2300,7 @@ if ( bNativeOK == FALSE )
// -----------------------------------------------------------------------
-void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout )
@@ -2320,7 +2320,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
- USHORT nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
+ sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
Size aSize( rSize );
@@ -2394,7 +2394,7 @@ da im Writer ansonsten die Images noch weiter oben haengen
}
else
{
- BOOL bTopImage = (nWinStyle & WB_TOP) != 0;
+ sal_Bool bTopImage = (nWinStyle & WB_TOP) != 0;
Size aImageSize = maImage.GetSizePixel();
Rectangle aImageRect( rPos, rSize );
long nTextHeight = pDev->GetTextHeight();
@@ -2456,7 +2456,7 @@ void RadioButton::ImplDrawRadioButton( bool bLayout )
ImplDraw( this, 0, Point(), GetOutputSizePixel(),
aImageSize, maStateRect, maMouseRect, bLayout );
- if( !bLayout || (IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)==TRUE) )
+ if( !bLayout || (IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)==sal_True) )
{
if ( !maImage && HasFocus() )
ShowFocus( ImplGetFocusRect() );
@@ -2516,7 +2516,7 @@ void RadioButton::ImplUncheckAllOther()
{
ImplDelData aDelData;
pWindow->ImplAddDel( &aDelData );
- ((RadioButton*)pWindow)->SetState( FALSE );
+ ((RadioButton*)pWindow)->SetState( sal_False );
if ( aDelData.IsDelete() )
return;
pWindow->ImplRemoveDel( &aDelData );
@@ -2547,7 +2547,7 @@ void RadioButton::ImplUncheckAllOther()
{
ImplDelData aDelData;
pWindow->ImplAddDel( &aDelData );
- ((RadioButton*)pWindow)->SetState( FALSE );
+ ((RadioButton*)pWindow)->SetState( sal_False );
if ( aDelData.IsDelete() )
return;
pWindow->ImplRemoveDel( &aDelData );
@@ -2563,10 +2563,10 @@ void RadioButton::ImplUncheckAllOther()
// -----------------------------------------------------------------------
-void RadioButton::ImplCallClick( BOOL bGrabFocus, USHORT nFocusFlags )
+void RadioButton::ImplCallClick( sal_Bool bGrabFocus, sal_uInt16 nFocusFlags )
{
mbStateChanged = !mbChecked;
- mbChecked = TRUE;
+ mbChecked = sal_True;
mpWindowImpl->mnStyle |= WB_TABSTOP;
ImplInvalidateOrDrawRadioButtonState();
ImplDelData aDelData;
@@ -2587,7 +2587,7 @@ void RadioButton::ImplCallClick( BOOL bGrabFocus, USHORT nFocusFlags )
if ( aDelData.IsDelete() )
return;
ImplRemoveDel( &aDelData );
- mbStateChanged = FALSE;
+ mbStateChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -2621,9 +2621,9 @@ void RadioButton::ImplLoadRes( const ResId& rResId )
Button::ImplLoadRes( rResId );
//anderer Wert als Default ?
- USHORT nChecked = ReadShortRes();
+ sal_uInt16 nChecked = ReadShortRes();
if ( nChecked )
- SetState( TRUE );
+ SetState( sal_True );
}
// -----------------------------------------------------------------------
@@ -2744,7 +2744,7 @@ void RadioButton::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
if ( !maImage )
{
@@ -2883,17 +2883,17 @@ void RadioButton::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -2909,7 +2909,7 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -2952,7 +2952,7 @@ void RadioButton::Toggle()
// -----------------------------------------------------------------------
-BOOL RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
{
@@ -2971,9 +2971,9 @@ BOOL RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2988,7 +2988,7 @@ const Image& RadioButton::GetModeRadioImage( BmpColorMode eMode ) const
// -----------------------------------------------------------------------
-void RadioButton::SetState( BOOL bCheck )
+void RadioButton::SetState( sal_Bool bCheck )
{
// TabStop-Flag richtig mitfuehren
if ( bCheck )
@@ -3006,7 +3006,7 @@ void RadioButton::SetState( BOOL bCheck )
// -----------------------------------------------------------------------
-void RadioButton::Check( BOOL bCheck )
+void RadioButton::Check( sal_Bool bCheck )
{
// TabStop-Flag richtig mitfuehren
if ( bCheck )
@@ -3072,7 +3072,7 @@ Size RadioButton::ImplGetRadioImageSize() const
static void LoadThemedImageList (const StyleSettings &rStyleSettings,
ImageList *pList, const ResId &rResId,
- USHORT nImages)
+ sal_uInt16 nImages)
{
Color aColorAry1[6];
Color aColorAry2[6];
@@ -3096,11 +3096,11 @@ static void LoadThemedImageList (const StyleSettings &rStyleSettings,
aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
}
-Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags )
+Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_RADIOBUTTON_MONO;
@@ -3142,7 +3142,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags )
pSVData->maCtrlData.mnRadioStyle = nStyle;
}
- USHORT nId;
+ sal_uInt16 nId;
if ( nFlags & BUTTON_DRAW_DISABLED )
{
if ( nFlags & BUTTON_DRAW_CHECKED )
@@ -3252,7 +3252,7 @@ void CheckBox::ImplInitCheckBoxData()
{
meState = STATE_NOCHECK;
meSaveValue = STATE_NOCHECK;
- mbTriState = FALSE;
+ mbTriState = sal_False;
}
// -----------------------------------------------------------------------
@@ -3262,7 +3262,7 @@ void CheckBox::ImplInit( Window* pParent, WinBits nStyle )
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
Button::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -3292,8 +3292,8 @@ const Color& CheckBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con
// -----------------------------------------------------------------------
-void CheckBox::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void CheckBox::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Button::ImplInitSettings( bFont, bForeground );
@@ -3303,18 +3303,18 @@ void CheckBox::ImplInitSettings( BOOL bFont,
if ( !IsControlBackground() &&
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
if( IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -3332,10 +3332,10 @@ void CheckBox::ImplLoadRes( const ResId& rResId )
if ( rResId.GetRT() != RSC_TRISTATEBOX )
{
- USHORT nChecked = ReadShortRes();
+ sal_uInt16 nChecked = ReadShortRes();
//anderer Wert als Default ?
if( nChecked )
- Check( TRUE );
+ Check( sal_True );
}
}
@@ -3357,9 +3357,9 @@ void CheckBox::ImplInvalidateOrDrawCheckBoxState()
void CheckBox::ImplDrawCheckBoxState()
{
- bool bNativeOK = TRUE;
+ bool bNativeOK = sal_True;
- if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == sal_True )
{
ImplControlValue aControlValue( meState == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRegion( maStateRect );
@@ -3382,9 +3382,9 @@ void CheckBox::ImplDrawCheckBoxState()
aControlValue, rtl::OUString() );
}
- if ( bNativeOK == FALSE )
+ if ( bNativeOK == sal_False )
{
- USHORT nStyle = ImplGetButtonState();
+ sal_uInt16 nStyle = ImplGetButtonState();
if ( !IsEnabled() )
nStyle |= BUTTON_DRAW_DISABLED;
if ( meState == STATE_DONTKNOW )
@@ -3401,7 +3401,7 @@ void CheckBox::ImplDrawCheckBoxState()
// -----------------------------------------------------------------------
-void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout )
@@ -3416,7 +3416,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
- USHORT nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
+ sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
Size aSize( rSize );
@@ -3690,7 +3690,7 @@ void CheckBox::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
MapMode aResMapMode( MAP_100TH_MM );
Point aPos = pDev->LogicToPixel( rPos );
@@ -3880,17 +3880,17 @@ void CheckBox::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -3906,7 +3906,7 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -3964,7 +3964,7 @@ void CheckBox::SetState( TriState eState )
// -----------------------------------------------------------------------
-void CheckBox::EnableTriState( BOOL bTriState )
+void CheckBox::EnableTriState( sal_Bool bTriState )
{
if ( mbTriState != bTriState )
{
@@ -4014,11 +4014,11 @@ Size CheckBox::ImplGetCheckImageSize() const
return aSize;
}
-Image CheckBox::GetCheckImage( const AllSettings& rSettings, USHORT nFlags )
+Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_CHECKBOX_MONO;
@@ -4045,7 +4045,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, USHORT nFlags )
pSVData->maCtrlData.mnCheckStyle = nStyle;
}
- USHORT nId;
+ sal_uInt16 nId;
if ( nFlags & BUTTON_DRAW_DISABLED )
{
if ( nFlags & BUTTON_DRAW_DONTKNOW )
@@ -4173,7 +4173,7 @@ ImageButton::ImageButton( Window* pParent, WinBits nStyle ) :
ImageButton::ImageButton( Window* pParent, const ResId& rResId ) :
PushButton( pParent, rResId.SetRT( RSC_IMAGEBUTTON ) )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_IMAGEBUTTON_IMAGE & nObjMask )
{
@@ -4222,7 +4222,7 @@ ImageRadioButton::ImageRadioButton( Window* pParent, WinBits nStyle ) :
ImageRadioButton::ImageRadioButton( Window* pParent, const ResId& rResId ) :
RadioButton( pParent, rResId.SetRT( RSC_IMAGERADIOBUTTON ) )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_IMAGERADIOBUTTON_IMAGE & nObjMask )
{
@@ -4242,7 +4242,7 @@ ImageRadioButton::~ImageRadioButton()
TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) :
CheckBox( pParent, nStyle )
{
- EnableTriState( TRUE );
+ EnableTriState( sal_True );
}
// -----------------------------------------------------------------------
@@ -4250,15 +4250,15 @@ TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) :
TriStateBox::TriStateBox( Window* pParent, const ResId& rResId ) :
CheckBox( pParent, rResId.SetRT( RSC_TRISTATEBOX ) )
{
- EnableTriState( TRUE );
+ EnableTriState( sal_True );
- ULONG nTriState = ReadLongRes();
- USHORT bDisableTriState = ReadShortRes();
+ sal_uLong nTriState = ReadLongRes();
+ sal_uInt16 bDisableTriState = ReadShortRes();
//anderer Wert als Default ?
if ( (TriState)nTriState != STATE_NOCHECK )
SetState( (TriState)nTriState );
if ( bDisableTriState )
- EnableTriState( FALSE );
+ EnableTriState( sal_False );
}
// -----------------------------------------------------------------------
@@ -4327,7 +4327,7 @@ void DisclosureButton::ImplDrawCheckBoxState()
if( ! pImg )
return;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if( ! IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 5b2e8755e5c8..2fd0ade0f65d 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -47,7 +47,7 @@
// =======================================================================
-inline ULONG ImplCreateKey( USHORT nPos )
+inline sal_uLong ImplCreateKey( sal_uInt16 nPos )
{
// Key = Pos+1, wegen Pos 0
return nPos+1;
@@ -61,7 +61,7 @@ static void lcl_GetSelectedEntries( Table& rSelectedPos, const XubString& rText,
{
XubString aToken = rText.GetToken( --n, cTokenSep );
aToken.EraseLeadingAndTrailingChars( ' ' );
- USHORT nPos = pEntryList->FindEntry( aToken );
+ sal_uInt16 nPos = pEntryList->FindEntry( aToken );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
rSelectedPos.Insert( ImplCreateKey( nPos ), (void*)sal_IntPtr(1L) );
}
@@ -123,9 +123,9 @@ void ComboBox::ImplInitComboBoxData()
mpFloatWin = NULL;
mnDDHeight = 0;
- mbDDAutoSize = TRUE;
- mbSyntheticModify = FALSE;
- mbMatchCase = FALSE;
+ mbDDAutoSize = sal_True;
+ mbSyntheticModify = sal_False;
+ mbMatchCase = sal_False;
mcMultiSep = ';';
}
@@ -135,7 +135,7 @@ void ComboBox::ImplCalcEditHeight()
{
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
- mnDDHeight = (USHORT)(mpSubEdit->GetTextHeight() + nTop + nBottom + 4);
+ mnDDHeight = (sal_uInt16)(mpSubEdit->GetTextHeight() + nTop + nBottom + 4);
if ( !IsDropDownBox() )
mnDDHeight += 4;
@@ -151,7 +151,7 @@ void ComboBox::ImplCalcEditHeight()
{
const long nNCHeight = aBoundRegion.GetHeight();
if( mnDDHeight < nNCHeight )
- mnDDHeight = sal::static_int_cast<USHORT>( nNCHeight );
+ mnDDHeight = sal::static_int_cast<sal_uInt16>( nNCHeight );
}
}
@@ -161,7 +161,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
{
ImplInitStyle( nStyle );
- BOOL bNoBorder = ( nStyle & WB_NOBORDER ) ? TRUE : FALSE;
+ sal_Bool bNoBorder = ( nStyle & WB_NOBORDER ) ? sal_True : sal_False;
if ( !(nStyle & WB_DROPDOWN) )
{
nStyle &= ~WB_BORDER;
@@ -182,7 +182,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
if( nStyle & WB_DROPDOWN )
{
mpFloatWin = new ImplListBoxFloatingWindow( this );
- mpFloatWin->SetAutoWidth( TRUE );
+ mpFloatWin->SetAutoWidth( sal_True );
mpFloatWin->SetPopupModeEndHdl( LINK( this, ComboBox, ImplPopupModeEndHdl ) );
mpBtn = new ImplBtn( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
@@ -205,10 +205,10 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
}
mpSubEdit = new Edit( this, nEditStyle );
- mpSubEdit->EnableRTL( FALSE );
+ mpSubEdit->EnableRTL( sal_False );
SetSubEdit( mpSubEdit );
mpSubEdit->SetPosPixel( Point() );
- EnableAutocomplete( TRUE );
+ EnableAutocomplete( sal_True );
mpSubEdit->Show();
Window* pLBParent = this;
@@ -226,11 +226,11 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
if ( mpFloatWin )
mpFloatWin->SetImplListBox( mpImplLB );
else
- mpImplLB->GetMainWindow()->AllowGrabFocus( TRUE );
+ mpImplLB->GetMainWindow()->AllowGrabFocus( sal_True );
ImplCalcEditHeight();
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
// -----------------------------------------------------------------------
@@ -250,11 +250,11 @@ void ComboBox::ImplLoadRes( const ResId& rResId )
{
Edit::ImplLoadRes( rResId );
- ULONG nNumber = ReadLongRes();
+ sal_uLong nNumber = ReadLongRes();
if( nNumber )
{
- for( USHORT i = 0; i < nNumber; i++ )
+ for( sal_uInt16 i = 0; i < nNumber; i++ )
{
InsertEntry( ReadStringRes(), LISTBOX_APPEND );
}
@@ -263,7 +263,7 @@ void ComboBox::ImplLoadRes( const ResId& rResId )
// -----------------------------------------------------------------------
-void ComboBox::EnableAutocomplete( BOOL bEnable, BOOL bMatchCase )
+void ComboBox::EnableAutocomplete( sal_Bool bEnable, sal_Bool bMatchCase )
{
mbMatchCase = bMatchCase;
@@ -275,7 +275,7 @@ void ComboBox::EnableAutocomplete( BOOL bEnable, BOOL bMatchCase )
// -----------------------------------------------------------------------
-BOOL ComboBox::IsAutocompleteEnabled() const
+sal_Bool ComboBox::IsAutocompleteEnabled() const
{
return mpSubEdit->GetAutocompleteHdl().IsSet();
}
@@ -289,10 +289,10 @@ IMPL_LINK( ComboBox, ImplClickBtnHdl, void*, EMPTYARG )
if ( !mpImplLB->GetEntryList()->GetMRUCount() )
ImplUpdateFloatSelection();
else
- mpImplLB->SelectEntry( 0 , TRUE );
- mpBtn->SetPressed( TRUE );
+ mpImplLB->SelectEntry( 0 , sal_True );
+ mpBtn->SetPressed( sal_True );
SetSelection( Selection( 0, SELECTION_MAX ) );
- mpFloatWin->StartFloat( TRUE );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
ImplClearLayoutData();
@@ -310,9 +310,9 @@ IMPL_LINK( ComboBox, ImplPopupModeEndHdl, void*, EMPTYARG )
{
if ( !mpImplLB->GetEntryList()->IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) )
{
- mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), TRUE );
- BOOL bTravelSelect = mpImplLB->IsTravelSelect();
- mpImplLB->SetTravelSelect( TRUE );
+ mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), sal_True );
+ sal_Bool bTravelSelect = mpImplLB->IsTravelSelect();
+ mpImplLB->SetTravelSelect( sal_True );
Select();
mpImplLB->SetTravelSelect( bTravelSelect );
}
@@ -322,7 +322,7 @@ IMPL_LINK( ComboBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if( mpImplLB )
mpImplLB->GetMainWindow()->ImplClearLayoutData();
- mpBtn->SetPressed( FALSE );
+ mpBtn->SetPressed( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE );
return 0;
}
@@ -342,36 +342,36 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
{
XubString aFullText = pEdit->GetText();
XubString aStartText = aFullText.Copy( 0, (xub_StrLen)aSel.Max() );
- USHORT nStart = mpImplLB->GetCurrentPos();
+ sal_uInt16 nStart = mpImplLB->GetCurrentPos();
if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0;
- BOOL bForward = TRUE;
+ sal_Bool bForward = sal_True;
if ( eAction == AUTOCOMPLETE_TABFORWARD )
nStart++;
else if ( eAction == AUTOCOMPLETE_TABBACKWARD )
{
- bForward = FALSE;
+ bForward = sal_False;
nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1;
}
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if( ! mbMatchCase )
{
// Try match case insensitive from current position
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, TRUE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, sal_True );
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match case insensitive, but from start
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, TRUE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, sal_True );
}
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match full from current position
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, FALSE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, sal_False );
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Match full, but from start
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, FALSE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, sal_False );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -388,8 +388,8 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
{
- BOOL bPopup = IsInDropDown();
- BOOL bCallSelect = FALSE;
+ sal_Bool bPopup = IsInDropDown();
+ sal_Bool bCallSelect = sal_False;
if ( mpImplLB->IsSelectionChanged() || bPopup )
{
XubString aText;
@@ -405,7 +405,7 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
xub_StrLen nTokenLen = aToken.Len();
aToken.EraseLeadingAndTrailingChars( ' ' );
- USHORT nP = mpImplLB->GetEntryList()->FindEntry( aToken );
+ sal_uInt16 nP = mpImplLB->GetEntryList()->FindEntry( aToken );
if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) )
{
aText.Erase( nPrevIndex, nTokenLen );
@@ -422,10 +422,10 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
// Fehlende Eintraege anhaengen...
Table aSelInText;
lcl_GetSelectedEntries( aSelInText, aText, mcMultiSep, mpImplLB->GetEntryList() );
- USHORT nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount();
- for ( USHORT n = 0; n < nSelectedEntries; n++ )
+ sal_uInt16 nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount();
+ for ( sal_uInt16 n = 0; n < nSelectedEntries; n++ )
{
- USHORT nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n );
+ sal_uInt16 nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n );
if ( !aSelInText.IsKeyValid( ImplCreateKey( nP ) ) )
{
if ( aText.Len() && (aText.GetChar( aText.Len()-1 ) != mcMultiSep) )
@@ -451,7 +451,7 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
aNewSelection.Min() = aText.Len();
mpSubEdit->SetSelection( aNewSelection );
- bCallSelect = TRUE;
+ bCallSelect = sal_True;
}
// #84652# Call GrabFocus and EndPopupMode before calling Select/Modify, but after changing the text
@@ -466,9 +466,9 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
if ( bCallSelect )
{
mpSubEdit->SetModifyFlag();
- mbSyntheticModify = TRUE;
+ mbSyntheticModify = sal_True;
Modify();
- mbSyntheticModify = FALSE;
+ mbSyntheticModify = sal_False;
Select();
}
@@ -491,7 +491,7 @@ IMPL_LINK( ComboBox, ImplSelectionChangedHdl, void*, n )
{
if ( !mpImplLB->IsTrackingSelect() )
{
- USHORT nChanged = (USHORT)(ULONG)n;
+ sal_uInt16 nChanged = (sal_uInt16)(sal_uLong)n;
if ( !mpSubEdit->IsReadOnly() && mpImplLB->GetEntryList()->IsEntryPosSelected( nChanged ) )
mpSubEdit->SetText( mpImplLB->GetEntryList()->GetEntryText( nChanged ) );
}
@@ -520,11 +520,11 @@ void ComboBox::ToggleDropDown()
if ( !mpImplLB->GetEntryList()->GetMRUCount() )
ImplUpdateFloatSelection();
else
- mpImplLB->SelectEntry( 0 , TRUE );
+ mpImplLB->SelectEntry( 0 , sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
- mpBtn->SetPressed( TRUE );
+ mpBtn->SetPressed( sal_True );
SetSelection( Selection( 0, SELECTION_MAX ) );
- mpFloatWin->StartFloat( TRUE );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
}
}
@@ -546,7 +546,7 @@ void ComboBox::DoubleClick()
// -----------------------------------------------------------------------
-void ComboBox::EnableAutoSize( BOOL bAuto )
+void ComboBox::EnableAutoSize( sal_Bool bAuto )
{
mbDDAutoSize = bAuto;
if ( mpFloatWin )
@@ -560,7 +560,7 @@ void ComboBox::EnableAutoSize( BOOL bAuto )
// -----------------------------------------------------------------------
-void ComboBox::EnableDDAutoWidth( BOOL b )
+void ComboBox::EnableDDAutoWidth( sal_Bool b )
{
if ( mpFloatWin )
mpFloatWin->SetAutoWidth( b );
@@ -568,15 +568,15 @@ void ComboBox::EnableDDAutoWidth( BOOL b )
// -----------------------------------------------------------------------
-BOOL ComboBox::IsDDAutoWidthEnabled() const
+sal_Bool ComboBox::IsDDAutoWidthEnabled() const
{
- return mpFloatWin ? mpFloatWin->IsAutoWidth() : FALSE;
+ return mpFloatWin ? mpFloatWin->IsAutoWidth() : sal_False;
}
// -----------------------------------------------------------------------
-void ComboBox::SetDropDownLineCount( USHORT nLines )
+void ComboBox::SetDropDownLineCount( sal_uInt16 nLines )
{
if ( mpFloatWin )
mpFloatWin->SetDropDownLineCount( nLines );
@@ -584,9 +584,9 @@ void ComboBox::SetDropDownLineCount( USHORT nLines )
// -----------------------------------------------------------------------
-USHORT ComboBox::GetDropDownLineCount() const
+sal_uInt16 ComboBox::GetDropDownLineCount() const
{
- USHORT nLines = 0;
+ sal_uInt16 nLines = 0;
if ( mpFloatWin )
nLines = mpFloatWin->GetDropDownLineCount();
return nLines;
@@ -595,7 +595,7 @@ USHORT ComboBox::GetDropDownLineCount() const
// -----------------------------------------------------------------------
void ComboBox::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) )
{
@@ -756,7 +756,7 @@ void ComboBox::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
- mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? TRUE : FALSE );
+ mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? sal_True : sal_False );
}
else if( nType == STATE_CHANGE_MIRRORING )
{
@@ -811,7 +811,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
&& !IsReadOnly() )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
- USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode();
switch( nKeyCode )
{
case KEY_UP:
@@ -823,11 +823,11 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
if( ( nKeyCode == KEY_DOWN ) && mpFloatWin && !mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() )
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
- mpBtn->SetPressed( TRUE );
+ mpBtn->SetPressed( sal_True );
if ( mpImplLB->GetEntryList()->GetMRUCount() )
- mpImplLB->SelectEntry( 0 , TRUE );
+ mpImplLB->SelectEntry( 0 , sal_True );
SetSelection( Selection( 0, SELECTION_MAX ) );
- mpFloatWin->StartFloat( FALSE );
+ mpFloatWin->StartFloat( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
nDone = 1;
}
@@ -858,14 +858,14 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
{
if( mpFloatWin->HasChildPathFocus() )
mpSubEdit->GrabFocus();
- else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( TRUE ) )
+ else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( sal_True ) )
mpFloatWin->EndPopupMode();
}
else if( (rNEvt.GetType() == EVENT_COMMAND) &&
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpSubEdit) )
{
- USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
|| ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
&& HasChildPathFocus()
@@ -922,12 +922,12 @@ void ComboBox::Modify()
void ComboBox::ImplUpdateFloatSelection()
{
// Text in der ListBox in den sichtbaren Bereich bringen
- mpImplLB->SetCallSelectionChangedHdl( FALSE );
+ mpImplLB->SetCallSelectionChangedHdl( sal_False );
if ( !IsMultiSelectionEnabled() )
{
XubString aSearchStr( mpSubEdit->GetText() );
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
- BOOL bSelect = TRUE;
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_Bool bSelect = sal_True;
if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND )
{
@@ -941,7 +941,7 @@ void ComboBox::ImplUpdateFloatSelection()
if ( nSelect == LISTBOX_ENTRY_NOTFOUND )
{
nSelect = mpImplLB->GetEntryList()->FindMatchingEntry( aSearchStr );
- bSelect = FALSE;
+ bSelect = sal_False;
}
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
@@ -954,7 +954,7 @@ void ComboBox::ImplUpdateFloatSelection()
{
nSelect = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 );
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
- mpImplLB->SelectEntry( nSelect, FALSE );
+ mpImplLB->SelectEntry( nSelect, sal_False );
mpImplLB->ResetCurrentPos();
}
}
@@ -962,28 +962,28 @@ void ComboBox::ImplUpdateFloatSelection()
{
Table aSelInText;
lcl_GetSelectedEntries( aSelInText, mpSubEdit->GetText(), mcMultiSep, mpImplLB->GetEntryList() );
- for ( USHORT n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ )
+ for ( sal_uInt16 n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ )
mpImplLB->SelectEntry( n, aSelInText.IsKeyValid( ImplCreateKey( n ) ) );
}
- mpImplLB->SetCallSelectionChangedHdl( TRUE );
+ mpImplLB->SetCallSelectionChangedHdl( sal_True );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 ComboBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
// -----------------------------------------------------------------------
-USHORT ComboBox::InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos )
+sal_uInt16 ComboBox::InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
@@ -997,7 +997,7 @@ void ComboBox::RemoveEntry( const XubString& rStr )
// -----------------------------------------------------------------------
-void ComboBox::RemoveEntry( USHORT nPos )
+void ComboBox::RemoveEntry( sal_uInt16 nPos )
{
mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) );
@@ -1012,7 +1012,7 @@ void ComboBox::Clear()
}
// -----------------------------------------------------------------------
-Image ComboBox::GetEntryImage( USHORT nPos ) const
+Image ComboBox::GetEntryImage( sal_uInt16 nPos ) const
{
if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
return mpImplLB->GetEntryList()->GetEntryImage( nPos );
@@ -1021,70 +1021,70 @@ Image ComboBox::GetEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ComboBox::GetEntryPos( const XubString& rStr ) const
+sal_uInt16 ComboBox::GetEntryPos( const XubString& rStr ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetEntryPos( const void* pData ) const
+sal_uInt16 ComboBox::GetEntryPos( const void* pData ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( pData );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( pData );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-XubString ComboBox::GetEntry( USHORT nPos ) const
+XubString ComboBox::GetEntry( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetEntryCount() const
+sal_uInt16 ComboBox::GetEntryCount() const
{
return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount();
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsTravelSelect() const
+sal_Bool ComboBox::IsTravelSelect() const
{
return mpImplLB->IsTravelSelect();
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsInDropDown() const
+sal_Bool ComboBox::IsInDropDown() const
{
return mpFloatWin && mpFloatWin->IsInPopupMode();
}
// -----------------------------------------------------------------------
-void ComboBox::EnableMultiSelection( BOOL bMulti )
+void ComboBox::EnableMultiSelection( sal_Bool bMulti )
{
- mpImplLB->EnableMultiSelection( bMulti, FALSE );
- mpImplLB->SetMultiSelectionSimpleMode( TRUE );
+ mpImplLB->EnableMultiSelection( bMulti, sal_False );
+ mpImplLB->SetMultiSelectionSimpleMode( sal_True );
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsMultiSelectionEnabled() const
+sal_Bool ComboBox::IsMultiSelectionEnabled() const
{
return mpImplLB->IsMultiSelectionEnabled();
}
// -----------------------------------------------------------------------
-long ComboBox::CalcWindowSizePixel( USHORT nLines ) const
+long ComboBox::CalcWindowSizePixel( sal_uInt16 nLines ) const
{
return mpImplLB->GetEntryHeight() * nLines;
}
@@ -1151,7 +1151,7 @@ Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const
// -----------------------------------------------------------------------
-Size ComboBox::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size ComboBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
// ggf. werden ScrollBars eingeblendet
Size aMinSz = CalcMinimumSize();
@@ -1191,28 +1191,28 @@ Size ComboBox::CalcSize( USHORT nColumns, USHORT nLines ) const
// -----------------------------------------------------------------------
-void ComboBox::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
long nCharWidth = GetTextWidth( UniString( 'x' ) );
if ( !IsDropDownBox() )
{
Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();
- rnCols = (USHORT)(aOutSz.Width()/nCharWidth);
- rnLines = (USHORT)(aOutSz.Height()/mpImplLB->GetEntryHeight());
+ rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth);
+ rnLines = (sal_uInt16)(aOutSz.Height()/mpImplLB->GetEntryHeight());
}
else
{
Size aOutSz = mpSubEdit->GetOutputSizePixel();
- rnCols = (USHORT)(aOutSz.Width()/nCharWidth);
+ rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth);
rnLines = 1;
}
}
// -----------------------------------------------------------------------
-void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- mpImplLB->GetMainWindow()->ImplInitSettings( TRUE, TRUE, TRUE );
+ mpImplLB->GetMainWindow()->ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1227,8 +1227,8 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
// Border/Background
pDev->SetLineColor();
pDev->SetFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
+ sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
if ( bBorder || bBackground )
{
Rectangle aRect( aPos, aSize );
@@ -1250,7 +1250,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
long nOnePixel = GetDrawPixel( pDev, 1 );
long nTextHeight = pDev->GetTextHeight();
long nEditHeight = nTextHeight + 6*nOnePixel;
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
// First, draw the edit part
mpSubEdit->Draw( pDev, aPos, Size( aSize.Width(), nEditHeight ), nFlags );
@@ -1282,10 +1282,10 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
- USHORT nLines = (USHORT) ( (aSize.Height()-nEditHeight) / nTextHeight );
+ sal_uInt16 nLines = (sal_uInt16) ( (aSize.Height()-nEditHeight) / nTextHeight );
if ( !nLines )
nLines = 1;
- USHORT nTEntry = IsReallyVisible() ? mpImplLB->GetTopEntry() : 0;
+ sal_uInt16 nTEntry = IsReallyVisible() ? mpImplLB->GetTopEntry() : 0;
Rectangle aTextRect( aPos, aSize );
@@ -1295,7 +1295,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
aTextRect.Bottom() = aTextRect.Top() + nTextHeight;
// the drawing starts here
- for ( USHORT n = 0; n < nLines; n++ )
+ for ( sal_uInt16 n = 0; n < nLines; n++ )
{
pDev->DrawText( aTextRect, mpImplLB->GetEntryList()->GetEntryText( n+nTEntry ), nTextStyle );
aTextRect.Top() += nTextHeight;
@@ -1344,21 +1344,21 @@ const Size& ComboBox::GetUserItemSize() const
// -----------------------------------------------------------------------
-void ComboBox::EnableUserDraw( BOOL bUserDraw )
+void ComboBox::EnableUserDraw( sal_Bool bUserDraw )
{
mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw );
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsUserDrawEnabled() const
+sal_Bool ComboBox::IsUserDrawEnabled() const
{
return mpImplLB->GetMainWindow()->IsUserDrawEnabled();
}
// -----------------------------------------------------------------------
-void ComboBox::DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos )
+void ComboBox::DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos )
{
DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow(), "DrawEntry?!" );
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
@@ -1366,7 +1366,7 @@ void ComboBox::DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDraw
// -----------------------------------------------------------------------
-void ComboBox::SetSeparatorPos( USHORT n )
+void ComboBox::SetSeparatorPos( sal_uInt16 n )
{
mpImplLB->SetSeparatorPos( n );
}
@@ -1380,7 +1380,7 @@ void ComboBox::SetSeparatorPos()
// -----------------------------------------------------------------------
-USHORT ComboBox::GetSeparatorPos() const
+sal_uInt16 ComboBox::GetSeparatorPos() const
{
return mpImplLB->GetSeparatorPos();
}
@@ -1401,58 +1401,58 @@ XubString ComboBox::GetMRUEntries( xub_Unicode cSep ) const
// -----------------------------------------------------------------------
-void ComboBox::SetMaxMRUCount( USHORT n )
+void ComboBox::SetMaxMRUCount( sal_uInt16 n )
{
mpImplLB->SetMaxMRUCount( n );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetMaxMRUCount() const
+sal_uInt16 ComboBox::GetMaxMRUCount() const
{
return mpImplLB->GetMaxMRUCount();
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetDisplayLineCount() const
+sal_uInt16 ComboBox::GetDisplayLineCount() const
{
return mpImplLB->GetDisplayLineCount();
}
// -----------------------------------------------------------------------
-void ComboBox::SetEntryData( USHORT nPos, void* pNewData )
+void ComboBox::SetEntryData( sal_uInt16 nPos, void* pNewData )
{
mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData );
}
// -----------------------------------------------------------------------
-void* ComboBox::GetEntryData( USHORT nPos ) const
+void* ComboBox::GetEntryData( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ComboBox::SetTopEntry( USHORT nPos )
+void ComboBox::SetTopEntry( sal_uInt16 nPos )
{
mpImplLB->SetTopEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ComboBox::ShowProminentEntry( USHORT nPos )
+void ComboBox::ShowProminentEntry( sal_uInt16 nPos )
{
mpImplLB->ShowProminentEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetTopEntry() const
+sal_uInt16 ComboBox::GetTopEntry() const
{
- USHORT nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = 0;
return nPos;
@@ -1502,29 +1502,29 @@ const Wallpaper& ComboBox::GetDisplayBackground() const
return rBack;
}
// -----------------------------------------------------------------------------
-USHORT ComboBox::GetSelectEntryCount() const
+sal_uInt16 ComboBox::GetSelectEntryCount() const
{
return mpImplLB->GetEntryList()->GetSelectEntryCount();
}
// -----------------------------------------------------------------------------
-USHORT ComboBox::GetSelectEntryPos( USHORT nIndex ) const
+sal_uInt16 ComboBox::GetSelectEntryPos( sal_uInt16 nIndex ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = mpImplLB->GetEntryList()->FindEntry( mpImplLB->GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
}
return nPos;
}
// -----------------------------------------------------------------------------
-BOOL ComboBox::IsEntryPosSelected( USHORT nPos ) const
+sal_Bool ComboBox::IsEntryPosSelected( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------------
-void ComboBox::SelectEntryPos( USHORT nPos, BOOL bSelect)
+void ComboBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect)
{
if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
@@ -1536,7 +1536,7 @@ void ComboBox::SetNoSelection()
mpSubEdit->SetText( String() );
}
// -----------------------------------------------------------------------------
-Rectangle ComboBox::GetBoundingRectangle( USHORT nItem ) const
+Rectangle ComboBox::GetBoundingRectangle( sal_uInt16 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (Window*)this );
@@ -1545,7 +1545,7 @@ Rectangle ComboBox::GetBoundingRectangle( USHORT nItem ) const
}
// -----------------------------------------------------------------------------
-void ComboBox::SetBorderStyle( USHORT nBorderStyle )
+void ComboBox::SetBorderStyle( sal_uInt16 nBorderStyle )
{
Window::SetBorderStyle( nBorderStyle );
if ( !IsDropDownBox() )
@@ -1556,7 +1556,7 @@ void ComboBox::SetBorderStyle( USHORT nBorderStyle )
}
// -----------------------------------------------------------------------------
-long ComboBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
+long ComboBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
@@ -1576,7 +1576,7 @@ long ComboBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
aConvPoint = pMain->PixelToLogic( aConvPoint );
// try to find entry
- USHORT nEntry = pMain->GetEntryPosForPoint( aConvPoint );
+ sal_uInt16 nEntry = pMain->GetEntryPosForPoint( aConvPoint );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
nIndex = -1;
else
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 918675cc0783..6bbe5bb32c38 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -49,7 +49,7 @@ using namespace vcl;
void Control::ImplInitControlData()
{
- mbHasFocus = FALSE;
+ mbHasFocus = sal_False;
mpControlData = new ImplControlData;
}
@@ -305,10 +305,10 @@ long Control::Notify( NotifyEvent& rNEvt )
{
if ( !mbHasFocus )
{
- mbHasFocus = TRUE;
+ mbHasFocus = sal_True;
if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_GETFOCUS, maGetFocusHdl, this ) )
// been destroyed within the handler
- return TRUE;
+ return sal_True;
}
}
else
@@ -318,10 +318,10 @@ long Control::Notify( NotifyEvent& rNEvt )
Window* pFocusWin = Application::GetFocusWindow();
if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) )
{
- mbHasFocus = FALSE;
+ mbHasFocus = sal_False;
if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_LOSEFOCUS, maLoseFocusHdl, this ) )
// been destroyed within the handler
- return TRUE;
+ return sal_True;
}
}
}
@@ -374,7 +374,7 @@ void Control::AppendLayoutData( const Control& rSubControl ) const
// -----------------------------------------------------------------
-BOOL Control::ImplCallEventListenersAndHandler( ULONG nEvent, const Link& rHandler, void* pCaller )
+sal_Bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& rHandler, void* pCaller )
{
ImplDelData aCheckDelete;
ImplAddDel( &aCheckDelete );
@@ -387,10 +387,10 @@ BOOL Control::ImplCallEventListenersAndHandler( ULONG nEvent, const Link& rHand
if ( !aCheckDelete.IsDelete() )
{
ImplRemoveDel( &aCheckDelete );
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------
@@ -449,8 +449,8 @@ void Control::DataChanged( const DataChangedEvent& rDCEvt)
{
AllSettings aSettings = GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- ULONG nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions();
- ULONG nNewOptions = aStyleSettings.GetOptions();
+ sal_uLong nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions();
+ sal_uLong nNewOptions = aStyleSettings.GetOptions();
if ( !(nNewOptions & STYLE_OPTION_MONO) && ( nOldOptions & STYLE_OPTION_MONO ) )
{
@@ -519,7 +519,7 @@ const Color& Control::GetCanonicalTextColor( const StyleSettings& _rStyle ) cons
}
// -----------------------------------------------------------------
-void Control::ImplInitSettings( const BOOL _bFont, const BOOL _bForeground )
+void Control::ImplInitSettings( const sal_Bool _bFont, const sal_Bool _bForeground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -546,7 +546,7 @@ void Control::ImplInitSettings( const BOOL _bFont, const BOOL _bForeground )
// -----------------------------------------------------------------
void Control::DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect, const XubString& _rStr,
- USHORT _nStyle, MetricVector* _pVector, String* _pDisplayText ) const
+ sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText ) const
{
#ifdef FS_DEBUG
if ( !_pVector )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 5091a4722845..f166a3c1f535 100755
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -119,19 +119,19 @@ struct DDInfo
Cursor aCursor;
Selection aDndStartSel;
xub_StrLen nDropPos;
- BOOL bStarterOfDD;
- BOOL bDroppedInMe;
- BOOL bVisCursor;
- BOOL bIsStringSupported;
+ sal_Bool bStarterOfDD;
+ sal_Bool bDroppedInMe;
+ sal_Bool bVisCursor;
+ sal_Bool bIsStringSupported;
DDInfo()
{
aCursor.SetStyle( CURSOR_SHADOW );
nDropPos = 0;
- bStarterOfDD = FALSE;
- bDroppedInMe = FALSE;
- bVisCursor = FALSE;
- bIsStringSupported = FALSE;
+ bStarterOfDD = sal_False;
+ bDroppedInMe = sal_False;
+ bVisCursor = sal_False;
+ bIsStringSupported = sal_False;
}
};
@@ -140,11 +140,11 @@ struct DDInfo
struct Impl_IMEInfos
{
String aOldTextAfterStartPos;
- USHORT* pAttribs;
+ sal_uInt16* pAttribs;
xub_StrLen nPos;
xub_StrLen nLen;
- BOOL bCursor;
- BOOL bWasCursorOverwrite;
+ sal_Bool bCursor;
+ sal_Bool bWasCursorOverwrite;
Impl_IMEInfos( xub_StrLen nPos, const String& rOldTextAfterStartPos );
~Impl_IMEInfos();
@@ -160,9 +160,9 @@ Impl_IMEInfos::Impl_IMEInfos( xub_StrLen nP, const String& rOldTextAfterStartPos
{
nPos = nP;
nLen = 0;
- bCursor = TRUE;
+ bCursor = sal_True;
pAttribs = NULL;
- bWasCursorOverwrite = FALSE;
+ bWasCursorOverwrite = sal_False;
}
// -----------------------------------------------------------------------
@@ -178,8 +178,8 @@ void Impl_IMEInfos::CopyAttribs( const xub_StrLen* pA, xub_StrLen nL )
{
nLen = nL;
delete[] pAttribs;
- pAttribs = new USHORT[ nL ];
- rtl_copyMemory( pAttribs, pA, nL*sizeof(USHORT) );
+ pAttribs = new sal_uInt16[ nL ];
+ rtl_copyMemory( pAttribs, pA, nL*sizeof(sal_uInt16) );
}
// -----------------------------------------------------------------------
@@ -236,7 +236,7 @@ Edit::Edit( Window* pParent, const ResId& rResId, bool bDisableAccessibleLabeled
ImplInit( pParent, nStyle );
ImplLoadRes( rResId );
if ( bDisableAccessibleLabeledByRelation )
- ImplGetWindowImpl()->mbDisableAccessibleLabeledByRelation = TRUE;
+ ImplGetWindowImpl()->mbDisableAccessibleLabeledByRelation = sal_True;
// Derived MultiLineEdit takes care to call Show only after MultiLineEdit
// ctor has already started:
@@ -289,21 +289,21 @@ void Edit::ImplInitEditData()
mnAlign = EDIT_ALIGN_LEFT;
mnMaxTextLen = EDIT_NOLIMIT;
meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
- mbModified = FALSE;
- mbInternModified = FALSE;
- mbReadOnly = FALSE;
- mbInsertMode = TRUE;
- mbClickedInSelection = FALSE;
- mbActivePopup = FALSE;
- mbIsSubEdit = FALSE;
- mbInMBDown = FALSE;
+ mbModified = sal_False;
+ mbInternModified = sal_False;
+ mbReadOnly = sal_False;
+ mbInsertMode = sal_True;
+ mbClickedInSelection = sal_False;
+ mbActivePopup = sal_False;
+ mbIsSubEdit = sal_False;
+ mbInMBDown = sal_False;
mpDDInfo = NULL;
mpIMEInfos = NULL;
mcEchoChar = 0;
// --- RTL --- no default mirroring for Edit controls
// note: controls that use a subedit will revert this (SpinField, ComboBox)
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
vcl::unohelper::DragAndDropWrapper* pDnDWrapper = new vcl::unohelper::DragAndDropWrapper( this );
mxDnDListener = pDnDWrapper;
@@ -350,7 +350,7 @@ void Edit::ImplInit( Window* pParent, WinBits nStyle )
SetCursor( new Cursor );
SetPointer( Pointer( POINTER_TEXT ) );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY );
uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer();
@@ -378,7 +378,7 @@ WinBits Edit::ImplInitStyle( WinBits nStyle )
// -----------------------------------------------------------------------
-BOOL Edit::IsCharInput( const KeyEvent& rKeyEvent )
+sal_Bool Edit::IsCharInput( const KeyEvent& rKeyEvent )
{
// In the future we must use new Unicode functions for this
xub_Unicode cCharCode = rKeyEvent.GetCharCode();
@@ -392,13 +392,13 @@ BOOL Edit::IsCharInput( const KeyEvent& rKeyEvent )
void Edit::ImplModified()
{
- mbModified = TRUE;
+ mbModified = sal_True;
Modify();
}
// -----------------------------------------------------------------------
-void Edit::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground )
+void Edit::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -545,7 +545,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
}
Cursor* pCursor = GetCursor();
- BOOL bVisCursor = pCursor ? pCursor->IsVisible() : FALSE;
+ sal_Bool bVisCursor = pCursor ? pCursor->IsVisible() : sal_False;
if ( pCursor )
pCursor->Hide();
@@ -553,7 +553,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( IsEnabled() )
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
else
SetTextColor( rStyleSettings.GetDisableColor() );
@@ -574,7 +574,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
else
SetTextFillColor( IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor() );
- BOOL bDrawSelection = maSelection.Len() && ( HasFocus() || ( GetStyle() & WB_NOHIDESELECTION ) || mbActivePopup );
+ sal_Bool bDrawSelection = maSelection.Len() && ( HasFocus() || ( GetStyle() & WB_NOHIDESELECTION ) || mbActivePopup );
long nPos = nStart ? pDX[2*nStart] : 0;
aPos.X() = nPos + mnXOffset + ImplGetExtraOffset();
@@ -664,7 +664,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
for( i = 0; i < mpIMEInfos->nLen; )
{
- USHORT nAttr = mpIMEInfos->pAttribs[i];
+ sal_uInt16 nAttr = mpIMEInfos->pAttribs[i];
Region aClip;
int nIndex = i;
while( nIndex < mpIMEInfos->nLen && mpIMEInfos->pAttribs[nIndex] == nAttr) // #112631# check nIndex before using it
@@ -720,7 +720,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
// -----------------------------------------------------------------------
-void Edit::ImplDelete( const Selection& rSelection, BYTE nDirection, BYTE nMode )
+void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode )
{
XubString aText = ImplGetText();
@@ -780,7 +780,7 @@ void Edit::ImplDelete( const Selection& rSelection, BYTE nDirection, BYTE nMode
maSelection.Min() = aSelection.Min();
maSelection.Max() = aSelection.Min();
ImplAlignAndPaint();
- mbInternModified = TRUE;
+ mbInternModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -1003,7 +1003,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
}
ImplAlignAndPaint();
- mbInternModified = TRUE;
+ mbInternModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -1027,7 +1027,7 @@ void Edit::ImplSetText( const XubString& rText, const Selection* pNewSelection )
ImplAlign();
if ( pNewSelection )
- ImplSetSelection( *pNewSelection, FALSE );
+ ImplSetSelection( *pNewSelection, sal_False );
if ( mnXOffset && !pNewSelection )
maSelection.Max() = 0;
@@ -1165,7 +1165,7 @@ void Edit::ImplClearBackground( long nXStart, long nXEnd )
// -----------------------------------------------------------------------
-void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
+void Edit::ImplShowCursor( sal_Bool bOnlyIfVisible )
{
if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) )
return;
@@ -1358,7 +1358,7 @@ xub_StrLen Edit::ImplGetCharPos( const Point& rWindowPos ) const
// -----------------------------------------------------------------------
-void Edit::ImplSetCursorPos( xub_StrLen nChar, BOOL bSelect )
+void Edit::ImplSetCursorPos( xub_StrLen nChar, sal_Bool bSelect )
{
Selection aSelection( maSelection );
aSelection.Max() = nChar;
@@ -1450,7 +1450,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() < 4 )
{
- mbClickedInSelection = FALSE;
+ mbClickedInSelection = sal_False;
if ( rMEvt.GetClicks() == 3 )
{
ImplSetSelection( Selection( 0, 0xFFFF ) );
@@ -1465,7 +1465,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
ImplCopyToSelectionClipboard();
}
else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nChar ) )
- mbClickedInSelection = TRUE;
+ mbClickedInSelection = sal_True;
else if ( rMEvt.IsLeft() )
ImplSetCursorPos( nChar, rMEvt.IsShift() );
@@ -1473,9 +1473,9 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
StartTracking( STARTTRACK_SCROLLREPEAT );
}
- mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren
+ mbInMBDown = sal_True; // Dann im GetFocus nicht alles selektieren
GrabFocus();
- mbInMBDown = FALSE;
+ mbInMBDown = sal_False;
}
// -----------------------------------------------------------------------
@@ -1485,8 +1485,8 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt )
if ( mbClickedInSelection && rMEvt.IsLeft() )
{
xub_StrLen nChar = ImplGetCharPos( rMEvt.GetPosPixel() );
- ImplSetCursorPos( nChar, FALSE );
- mbClickedInSelection = FALSE;
+ ImplSetCursorPos( nChar, sal_False );
+ mbClickedInSelection = sal_False;
}
else if ( rMEvt.IsMiddle() && !mbReadOnly &&
( GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) )
@@ -1506,8 +1506,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
if ( mbClickedInSelection )
{
xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, FALSE );
- mbClickedInSelection = FALSE;
+ ImplSetCursorPos( nChar, sal_False );
+ mbClickedInSelection = sal_False;
}
else if ( rTEvt.GetMouseEvent().IsLeft() )
{
@@ -1519,7 +1519,7 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
if( !mbClickedInSelection )
{
xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, TRUE );
+ ImplSetCursorPos( nChar, sal_True );
}
}
@@ -1529,13 +1529,13 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
// -----------------------------------------------------------------------
-BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
+sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_Bool bDone = sal_False;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- mbInternModified = FALSE;
+ mbInternModified = sal_False;
if ( eFunc != KEYFUNC_DONTKNOW )
{
@@ -1547,7 +1547,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
Cut();
ImplModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1557,7 +1557,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !(GetStyle() & WB_PASSWORD) )
{
Copy();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1567,7 +1567,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly )
{
Paste();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1577,7 +1577,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly )
{
Undo();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1592,7 +1592,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( nCode == KEY_A )
{
ImplSetSelection( Selection( 0, maText.Len() ) );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( rKEvt.GetKeyCode().IsShift() && (nCode == KEY_S) )
{
@@ -1606,7 +1606,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
ImplInsertText( aChars );
ImplModified();
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -1618,7 +1618,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
case com::sun::star::awt::Key::SELECT_ALL:
{
ImplSetSelection( Selection( 0, maText.Len() ) );
- bDone = TRUE;
+ bDone = sal_True;
}
break;
@@ -1744,7 +1744,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1758,8 +1758,8 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( !mbReadOnly && !rKEvt.GetKeyCode().IsMod2() )
{
- BYTE nDel = (nCode == KEY_DELETE) ? EDIT_DEL_RIGHT : EDIT_DEL_LEFT;
- BYTE nMode = rKEvt.GetKeyCode().IsMod1() ? EDIT_DELMODE_RESTOFWORD : EDIT_DELMODE_SIMPLE;
+ sal_uInt8 nDel = (nCode == KEY_DELETE) ? EDIT_DEL_RIGHT : EDIT_DEL_LEFT;
+ sal_uInt8 nMode = rKEvt.GetKeyCode().IsMod1() ? EDIT_DELMODE_RESTOFWORD : EDIT_DELMODE_SIMPLE;
if ( (nMode == EDIT_DELMODE_RESTOFWORD) && rKEvt.GetKeyCode().IsShift() )
nMode = EDIT_DELMODE_RESTOFCONTENT;
switch( nCode )
@@ -1786,7 +1786,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
ImplDelete( maSelection, nDel, nMode );
if ( maText.Len() != nOldLen )
ImplModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1796,7 +1796,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mpIMEInfos && !mbReadOnly && !rKEvt.GetKeyCode().IsMod2() )
{
SetInsertMode( !mbInsertMode );
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1821,7 +1821,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
// Wurde nichts veraendert, dann TAB fuer DialogControl
if ( GetSelection().Len() )
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1831,7 +1831,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( IsCharInput( rKEvt ) )
{
- bDone = TRUE; // Auch bei ReadOnly die Zeichen schlucken.
+ bDone = sal_True; // Auch bei ReadOnly die Zeichen schlucken.
if ( !mbReadOnly )
{
ImplInsertText( rKEvt.GetCharCode(), 0, sal_True );
@@ -1899,9 +1899,9 @@ void Edit::Resize()
// -----------------------------------------------------------------------
-void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1916,8 +1916,8 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG
// Border/Background
pDev->SetLineColor();
pDev->SetFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
+ sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
if ( bBorder || bBackground )
{
Rectangle aRect( aPos, aSize );
@@ -2009,7 +2009,7 @@ void Edit::GetFocus()
{
maUndoText = maText;
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if ( !( GetStyle() & (WB_NOHIDESELECTION|WB_READONLY) )
&& ( GetGetFocusFlags() & (GETFOCUS_INIT|GETFOCUS_TAB|GETFOCUS_CURSOR|GETFOCUS_MNEMONIC) ) )
{
@@ -2106,22 +2106,22 @@ void Edit::Command( const CommandEvent& rCEvt )
if ( !maSelection.Len() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_COPY, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_COPY, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
}
if ( IsReadOnly() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_PASTE, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_PASTE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, sal_False );
}
else
{
// Paste nur, wenn Text im Clipboard
- BOOL bData = FALSE;
+ sal_Bool bData = sal_False;
uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard();
if ( xClipboard.is() )
{
@@ -2139,17 +2139,17 @@ void Edit::Command( const CommandEvent& rCEvt )
}
if ( maUndoText == maText )
- pPopup->EnableItem( SV_MENU_EDIT_UNDO, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_UNDO, sal_False );
if ( ( maSelection.Min() == 0 ) && ( maSelection.Max() == maText.Len() ) )
- pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, sal_False );
if ( !pImplFncGetSpecialChars )
{
- USHORT nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL );
+ sal_uInt16 nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL );
pPopup->RemoveItem( nPos );
pPopup->RemoveItem( nPos-1 );
}
- mbActivePopup = TRUE;
+ mbActivePopup = sal_True;
Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
Point aPos = rCEvt.GetMousePosPixel();
if ( !rCEvt.IsMouseEvent() )
@@ -2158,7 +2158,7 @@ void Edit::Command( const CommandEvent& rCEvt )
Size aSize = GetOutputSizePixel();
aPos = Point( aSize.Width()/2, aSize.Height()/2 );
}
- USHORT n = pPopup->Execute( this, aPos );
+ sal_uInt16 n = pPopup->Execute( this, aPos );
Edit::DeletePopupMenu( pPopup );
SetSelection( aSaveSel );
switch ( n )
@@ -2197,7 +2197,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
break;
}
- mbActivePopup = FALSE;
+ mbActivePopup = sal_False;
}
else if ( rCEvt.GetCommand() == COMMAND_VOICE )
{
@@ -2245,12 +2245,12 @@ void Edit::Command( const CommandEvent& rCEvt )
}
else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
{
- BOOL bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
+ sal_Bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
delete mpIMEInfos;
mpIMEInfos = NULL;
// Font wieder ohne Attribute einstellen, wird jetzt im Repaint nicht
// mehr neu initialisiert
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
SetInsertMode( bInsertMode );
@@ -2274,20 +2274,20 @@ void Edit::Command( const CommandEvent& rCEvt )
maText.Insert( pData->GetText(), mpIMEInfos->nPos );
if ( mpIMEInfos->bWasCursorOverwrite )
{
- USHORT nOldIMETextLen = mpIMEInfos->nLen;
- USHORT nNewIMETextLen = pData->GetText().Len();
+ sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
+ sal_uInt16 nNewIMETextLen = pData->GetText().Len();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// restore old characters
- USHORT nRestore = nOldIMETextLen - nNewIMETextLen;
+ sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen;
maText.Insert( mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ), mpIMEInfos->nPos + nNewIMETextLen );
}
else if ( ( nOldIMETextLen < nNewIMETextLen ) &&
( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// overwrite
- USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen;
+ sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen;
if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.Len() )
nOverwrite = mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen;
maText.Erase( mpIMEInfos->nPos + nNewIMETextLen, nOverwrite );
@@ -2319,7 +2319,7 @@ void Edit::Command( const CommandEvent& rCEvt )
{
if ( mpIMEInfos )
{
- xub_StrLen nCursorPos = (USHORT)GetSelection().Max();
+ xub_StrLen nCursorPos = (sal_uInt16)GetSelection().Max();
SetCursorRect( NULL, GetTextWidth(
maText, nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) );
}
@@ -2349,10 +2349,10 @@ void Edit::StateChanged( StateChangedType nType )
mnXOffset = 0; // Falls vorher GrabFocus, als Groesse noch falsch.
ImplAlign();
if ( !mpSubEdit )
- ImplShowCursor( FALSE );
+ ImplShowCursor( sal_False );
}
// update background (eventual SetPaintTransparent)
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
}
else if ( nType == STATE_CHANGE_ENABLE )
{
@@ -2371,7 +2371,7 @@ void Edit::StateChanged( StateChangedType nType )
SetStyle( nStyle );
}
- USHORT nOldAlign = mnAlign;
+ sal_uInt16 nOldAlign = mnAlign;
mnAlign = EDIT_ALIGN_LEFT;
// --- RTL --- hack: right align until keyinput and cursor travelling works
@@ -2405,8 +2405,8 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
- ImplShowCursor( TRUE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
+ ImplShowCursor( sal_True );
Invalidate();
}
}
@@ -2414,7 +2414,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplShowCursor();
Invalidate();
}
@@ -2423,7 +2423,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
}
@@ -2431,7 +2431,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -2450,8 +2450,8 @@ void Edit::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
- ImplShowCursor( TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
+ ImplShowCursor( sal_True );
Invalidate();
}
}
@@ -2472,7 +2472,7 @@ void Edit::ImplShowDDCursor()
mpDDInfo->aCursor.SetPos( aCursorRect.TopLeft() );
mpDDInfo->aCursor.SetSize( aCursorRect.GetSize() );
mpDDInfo->aCursor.Show();
- mpDDInfo->bVisCursor = TRUE;
+ mpDDInfo->bVisCursor = sal_True;
}
}
@@ -2483,7 +2483,7 @@ void Edit::ImplHideDDCursor()
if ( mpDDInfo && mpDDInfo->bVisCursor )
{
mpDDInfo->aCursor.Hide();
- mpDDInfo->bVisCursor = FALSE;
+ mpDDInfo->bVisCursor = sal_False;
}
}
@@ -2535,7 +2535,7 @@ IMPL_LINK( Edit, ImplUpdateDataHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-void Edit::EnableUpdateData( ULONG nTimeout )
+void Edit::EnableUpdateData( sal_uLong nTimeout )
{
if ( !nTimeout )
DisableUpdateData();
@@ -2562,7 +2562,7 @@ void Edit::SetEchoChar( xub_Unicode c )
// -----------------------------------------------------------------------
-void Edit::SetReadOnly( BOOL bReadOnly )
+void Edit::SetReadOnly( sal_Bool bReadOnly )
{
if ( mbReadOnly != bReadOnly )
{
@@ -2585,7 +2585,7 @@ void Edit::SetAutocompleteHdl( const Link& rHdl )
// -----------------------------------------------------------------------
-void Edit::SetInsertMode( BOOL bInsert )
+void Edit::SetInsertMode( sal_Bool bInsert )
{
if ( bInsert != mbInsertMode )
{
@@ -2599,7 +2599,7 @@ void Edit::SetInsertMode( BOOL bInsert )
// -----------------------------------------------------------------------
-BOOL Edit::IsInsertMode() const
+sal_Bool Edit::IsInsertMode() const
{
if ( mpSubEdit )
return mpSubEdit->IsInsertMode();
@@ -2638,7 +2638,7 @@ void Edit::SetSelection( const Selection& rSelection )
// -----------------------------------------------------------------------
-void Edit::ImplSetSelection( const Selection& rSelection, BOOL bPaint )
+void Edit::ImplSetSelection( const Selection& rSelection, sal_Bool bPaint )
{
if ( mpSubEdit )
mpSubEdit->ImplSetSelection( rSelection );
@@ -2809,9 +2809,9 @@ XubString Edit::GetText() const
void Edit::SetModifyFlag()
{
if ( mpSubEdit )
- mpSubEdit->mbModified = TRUE;
+ mpSubEdit->mbModified = sal_True;
else
- mbModified = TRUE;
+ mbModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -2819,9 +2819,9 @@ void Edit::SetModifyFlag()
void Edit::ClearModifyFlag()
{
if ( mpSubEdit )
- mpSubEdit->mbModified = FALSE;
+ mpSubEdit->mbModified = sal_False;
else
- mbModified = FALSE;
+ mbModified = sal_False;
}
// -----------------------------------------------------------------------
@@ -2832,7 +2832,7 @@ void Edit::SetSubEdit( Edit* pEdit )
if ( mpSubEdit )
{
SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM...
- mpSubEdit->mbIsSubEdit = TRUE;
+ mpSubEdit->mbIsSubEdit = sal_True;
mpSubEdit->SetReadOnly( mbReadOnly );
}
@@ -2944,8 +2944,8 @@ PopupMenu* Edit::CreatePopupMenu()
pPopup->SetAccelKey( SV_MENU_EDIT_COPY, KeyCode( KEYFUNC_COPY ) );
pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, KeyCode( KEYFUNC_PASTE ) );
pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, KeyCode( KEYFUNC_DELETE ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, FALSE, TRUE, FALSE, FALSE ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, TRUE, TRUE, FALSE, FALSE ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, sal_False, sal_True, sal_False, sal_False ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, sal_True, sal_True, sal_False, sal_False ) );
return pPopup;
}
@@ -2962,7 +2962,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
vos::OGuard aVclGuard( Application::GetSolarMutex() );
if ( !IsTracking() && maSelection.Len() &&
- !(GetStyle() & WB_PASSWORD) && (!mpDDInfo || mpDDInfo->bStarterOfDD == FALSE) ) // Kein Mehrfach D&D
+ !(GetStyle() & WB_PASSWORD) && (!mpDDInfo || mpDDInfo->bStarterOfDD == sal_False) ) // Kein Mehrfach D&D
{
Selection aSel( maSelection );
aSel.Justify();
@@ -2975,7 +2975,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
if ( !mpDDInfo )
mpDDInfo = new DDInfo;
- mpDDInfo->bStarterOfDD = TRUE;
+ mpDDInfo->bStarterOfDD = sal_True;
mpDDInfo->aDndStartSel = aSel;
@@ -3025,7 +3025,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
{
vos::OGuard aVclGuard( Application::GetSolarMutex() );
- BOOL bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
if ( !mbReadOnly && mpDDInfo )
{
ImplHideDDCursor();
@@ -3036,7 +3036,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
if ( aSel.Len() && !mpDDInfo->bStarterOfDD )
ImplDelete( aSel, EDIT_DEL_RIGHT, EDIT_DELMODE_SIMPLE );
- mpDDInfo->bDroppedInMe = TRUE;
+ mpDDInfo->bDroppedInMe = sal_True;
aSel.Min() = mpDDInfo->nDropPos;
aSel.Max() = mpDDInfo->nDropPos;
@@ -3053,7 +3053,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
::rtl::OUString aText;
aData >>= aText;
ImplInsertText( aText );
- bChanges = TRUE;
+ bChanges = sal_True;
ImplModified();
}
}
@@ -3077,14 +3077,14 @@ void Edit::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragE
// search for string data type
const Sequence< com::sun::star::datatransfer::DataFlavor >& rFlavors( rDTDE.SupportedDataFlavors );
sal_Int32 nEle = rFlavors.getLength();
- mpDDInfo->bIsStringSupported = FALSE;
+ mpDDInfo->bIsStringSupported = sal_False;
for( sal_Int32 i = 0; i < nEle; i++ )
{
sal_Int32 nIndex = 0;
rtl::OUString aMimetype = rFlavors[i].MimeType.getToken( 0, ';', nIndex );
if( aMimetype.equalsAscii( "text/plain" ) )
{
- mpDDInfo->bIsStringSupported = TRUE;
+ mpDDInfo->bIsStringSupported = sal_True;
break;
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 4c4e3c870429..4a42abd3ea79 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -60,9 +60,9 @@ using namespace ::com::sun::star;
// -----------------------------------------------------------------------
-static sal_Int64 ImplPower10( USHORT n )
+static sal_Int64 ImplPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
sal_Int64 nValue = 1;
for ( i=0; i < n; i++ )
@@ -73,16 +73,16 @@ static sal_Int64 ImplPower10( USHORT n )
// -----------------------------------------------------------------------
-static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
- BOOL bStrictFormat, BOOL bThousandSep,
+static sal_Bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
+ sal_Bool bStrictFormat, sal_Bool bThousandSep,
const LocaleDataWrapper& rLocaleDataWrappper )
{
if ( !bStrictFormat )
- return FALSE;
+ return sal_False;
else
{
xub_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
@@ -90,28 +90,28 @@ static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
(cChar == rLocaleDataWrappper.getNumDecimalSep() ) ||
(bThousandSep && (cChar == rLocaleDataWrappper.getNumThousandSep())) ||
(cChar == '-') )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
}
// -----------------------------------------------------------------------
-static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrappper,
- BOOL bCurrency = FALSE )
+static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrappper,
+ sal_Bool bCurrency = sal_False )
{
XubString aStr = rStr;
XubString aStr1;
XubString aStr2;
- BOOL bNegative = FALSE;
+ sal_Bool bNegative = sal_False;
xub_StrLen nDecPos;
xub_StrLen i;
// Reaktion auf leeren String
if ( !rStr.Len() )
- return FALSE;
+ return sal_False;
// Fuehrende und nachfolgende Leerzeichen entfernen
aStr.EraseLeadingAndTrailingChars( ' ' );
@@ -130,7 +130,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
if ( bCurrency )
{
if ( (aStr.GetChar( 0 ) == '(') && (aStr.GetChar( aStr.Len()-1 ) == ')') )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( !bNegative )
{
for ( i=0; i < aStr.Len(); i++ )
@@ -139,14 +139,14 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
}
if ( !bNegative && bCurrency && aStr.Len() )
{
- USHORT nFormat = rLocaleDataWrappper.getCurrNegativeFormat();
+ sal_uInt16 nFormat = rLocaleDataWrappper.getCurrNegativeFormat();
if ( (nFormat == 3) || (nFormat == 6) ||
(nFormat == 7) || (nFormat == 10) )
{
@@ -156,7 +156,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
@@ -166,7 +166,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
else
{
if ( aStr1.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
}
// Alle unerwuenschten Zeichen rauswerfen
@@ -186,7 +186,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
}
if ( !aStr1.Len() && !aStr2.Len() )
- return FALSE;
+ return sal_False;
if ( !aStr1.Len() )
aStr1.Insert( '0' );
@@ -194,11 +194,11 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
aStr1.Insert( '-', 0 );
// Nachkommateil zurechtstutzen und dabei runden
- BOOL bRound = FALSE;
+ sal_Bool bRound = sal_False;
if ( aStr2.Len() > nDecDigits )
{
if ( aStr2.GetChar( nDecDigits ) >= '5' )
- bRound = TRUE;
+ bRound = sal_True;
aStr2.Erase( nDecDigits );
}
if ( aStr2.Len() < nDecDigits )
@@ -219,7 +219,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
rValue = nValue;
- return TRUE;
+ return sal_True;
}
static void ImplUpdateSeparatorString( String& io_rText,
@@ -267,8 +267,8 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
if( bChangeDec || bChangeTh )
{
- BOOL bUpdateMode = pEdit->IsUpdateMode();
- pEdit->SetUpdateMode( FALSE );
+ sal_Bool bUpdateMode = pEdit->IsUpdateMode();
+ pEdit->SetUpdateMode( sal_False );
String aText = pEdit->GetText();
ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep );
pEdit->SetText( aText );
@@ -277,8 +277,8 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
if( pCombo )
{
// update box entries
- USHORT nEntryCount = pCombo->GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ sal_uInt16 nEntryCount = pCombo->GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
aText = pCombo->GetEntry( i );
void* pEntryData = pCombo->GetEntryData( i );
@@ -299,11 +299,11 @@ FormatterBase::FormatterBase( Edit* pField )
{
mpField = pField;
mpLocaleDataWrapper = NULL;
- mbReformat = FALSE;
- mbStrictFormat = FALSE;
- mbEmptyFieldValue = FALSE;
- mbEmptyFieldValueEnabled = FALSE;
- mbDefaultLocale = TRUE;
+ mbReformat = sal_False;
+ mbStrictFormat = sal_False;
+ mbEmptyFieldValue = sal_False;
+ mbEmptyFieldValueEnabled = sal_False;
+ mbDefaultLocale = sal_True;
}
// -----------------------------------------------------------------------
@@ -344,7 +344,7 @@ void FormatterBase::ReformatAll()
// -----------------------------------------------------------------------
-void FormatterBase::SetStrictFormat( BOOL bStrict )
+void FormatterBase::SetStrictFormat( sal_Bool bStrict )
{
if ( bStrict != mbStrictFormat )
{
@@ -359,7 +359,7 @@ void FormatterBase::SetStrictFormat( BOOL bStrict )
void FormatterBase::SetLocale( const lang::Locale& rLocale )
{
ImplGetLocaleDataWrapper().setLocale( rLocale );
- mbDefaultLocale = FALSE;
+ mbDefaultLocale = sal_False;
ReformatAll();
}
@@ -390,7 +390,7 @@ const AllSettings& FormatterBase::GetFieldSettings() const
// -----------------------------------------------------------------------
-void FormatterBase::SetFieldText( const XubString& rText, BOOL bKeepSelection )
+void FormatterBase::SetFieldText( const XubString& rText, sal_Bool bKeepSelection )
{
if ( mpField )
{
@@ -417,7 +417,7 @@ void FormatterBase::ImplSetText( const XubString& rText, Selection* pNewSelectio
mpField->SetText( rText, aSel );
}
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
}
@@ -427,23 +427,23 @@ void FormatterBase::SetEmptyFieldValue()
{
if ( mpField )
mpField->SetText( ImplGetSVEmptyStr() );
- mbEmptyFieldValue = TRUE;
+ mbEmptyFieldValue = sal_True;
}
// -----------------------------------------------------------------------
-BOOL FormatterBase::IsEmptyFieldValue() const
+sal_Bool FormatterBase::IsEmptyFieldValue() const
{
return (!mpField || !mpField->GetText().Len());
}
// -----------------------------------------------------------------------
-BOOL NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValue,
+sal_Bool NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValue,
XubString& rOutStr )
{
if ( !ImplNumericGetValue( rStr, rValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() ) )
- return TRUE;
+ return sal_True;
else
{
double nTempVal = rValue;
@@ -459,14 +459,14 @@ BOOL NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValu
if ( !GetErrorHdl().Call( this ) )
{
mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
mnCorrectedValue = 0;
}
rOutStr = CreateFieldText( (sal_Int64)nTempVal );
- return TRUE;
+ return sal_True;
}
}
@@ -481,8 +481,8 @@ void NumericFormatter::ImplInit()
mnCorrectedValue = 0;
mnDecimalDigits = 2;
mnType = FORMAT_NUMERIC;
- mbThousandSep = TRUE;
- mbShowTrailingZeros = TRUE;
+ mbThousandSep = sal_True;
+ mbShowTrailingZeros = sal_True;
// for fields
mnSpinSize = 1;
@@ -507,7 +507,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
@@ -516,7 +516,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
mnMax = pMgr->ReadLong();
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
@@ -532,7 +532,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
}
if ( NUMERICFORMATTER_NOTHOUSANDSEP & nMask )
- SetUseThousandSep( !(BOOL)pMgr->ReadShort() );
+ SetUseThousandSep( !(sal_Bool)pMgr->ReadShort() );
}
}
@@ -562,7 +562,7 @@ void NumericFormatter::SetMax( sal_Int64 nNewMax )
// -----------------------------------------------------------------------
-void NumericFormatter::SetUseThousandSep( BOOL b )
+void NumericFormatter::SetUseThousandSep( sal_Bool b )
{
mbThousandSep = b;
ReformatAll();
@@ -570,7 +570,7 @@ void NumericFormatter::SetUseThousandSep( BOOL b )
// -----------------------------------------------------------------------
-void NumericFormatter::SetDecimalDigits( USHORT nDigits )
+void NumericFormatter::SetDecimalDigits( sal_uInt16 nDigits )
{
mnDecimalDigits = nDigits;
ReformatAll();
@@ -578,7 +578,7 @@ void NumericFormatter::SetDecimalDigits( USHORT nDigits )
// -----------------------------------------------------------------------
-void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
+void NumericFormatter::SetShowTrailingZeros( sal_Bool bShowTrailingZeros )
{
if ( mbShowTrailingZeros != bShowTrailingZeros )
{
@@ -589,7 +589,7 @@ void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
// -----------------------------------------------------------------------
-USHORT NumericFormatter::GetDecimalDigits() const
+sal_uInt16 NumericFormatter::GetDecimalDigits() const
{
return mnDecimalDigits;
}
@@ -600,7 +600,7 @@ void NumericFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -656,14 +656,14 @@ sal_Int64 NumericFormatter::GetValue() const
// -----------------------------------------------------------------------
-BOOL NumericFormatter::IsValueModified() const
+sal_Bool NumericFormatter::IsValueModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyFieldValue();
else if ( GetValue() != mnFieldValue )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -714,7 +714,7 @@ void NumericFormatter::Reformat()
XubString aStr;
// caution: precision loss in double cast
double nTemp = (double)mnLastValue;
- BOOL bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr );
+ sal_Bool bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr );
mnLastValue = (sal_Int64)nTemp;
if ( !bOK )
return;
@@ -834,7 +834,7 @@ void NumericField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
NumericFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( NUMERICFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -870,7 +870,7 @@ long NumericField::PreNotify( NotifyEvent& rNEvt )
long NumericField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -903,7 +903,7 @@ void NumericField::DataChanged( const DataChangedEvent& rDCEvt )
void NumericField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -989,7 +989,7 @@ long NumericBox::PreNotify( NotifyEvent& rNEvt )
long NumericBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1022,7 +1022,7 @@ void NumericBox::DataChanged( const DataChangedEvent& rDCEvt )
void NumericBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -1032,21 +1032,21 @@ void NumericBox::ReformatAll()
{
double nValue;
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplNumericReformat( GetEntry( i ), nValue, aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
NumericFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void NumericBox::InsertValue( sal_Int64 nValue, USHORT nPos )
+void NumericBox::InsertValue( sal_Int64 nValue, sal_uInt16 nPos )
{
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
@@ -1060,7 +1060,7 @@ void NumericBox::RemoveValue( sal_Int64 nValue )
// -----------------------------------------------------------------------
-sal_Int64 NumericBox::GetValue( USHORT nPos ) const
+sal_Int64 NumericBox::GetValue( sal_uInt16 nPos ) const
{
double nValue = 0;
ImplNumericGetValue( ComboBox::GetEntry( nPos ), nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() );
@@ -1069,19 +1069,19 @@ sal_Int64 NumericBox::GetValue( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT NumericBox::GetValuePos( sal_Int64 nValue ) const
+sal_uInt16 NumericBox::GetValuePos( sal_Int64 nValue ) const
{
return ComboBox::GetEntryPos( CreateFieldText( nValue ) );
}
// -----------------------------------------------------------------------
-static BOOL ImplMetricProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
- BOOL, BOOL bUseThousandSep, const LocaleDataWrapper& rWrapper )
+static sal_Bool ImplMetricProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+ sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rWrapper )
{
// Es gibt hier kein sinnvolles StrictFormat, also alle
// Zeichen erlauben
- return ImplNumericProcessKeyInput( pEdit, rKEvt, FALSE, bUseThousandSep, rWrapper );
+ return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rWrapper );
}
// -----------------------------------------------------------------------
@@ -1107,7 +1107,7 @@ static XubString ImplMetricGetUnitText( const XubString& rStr )
/*
// MT: #90545# Preparation for translated strings...
String aMetricText;
- for ( USHORT n = rStr.Len(); n; )
+ for ( sal_uInt16 n = rStr.Len(); n; )
{
sal_Unicode c = rStr.GetChar( --n );
sal_Int32 nType = xCharClass->getStringType( rStr, n, 1, rLocale );
@@ -1245,7 +1245,7 @@ static double nonValueDoubleToValueDouble( double nValue )
return rtl::math::isFinite( nValue ) ? nValue : 0.0;
}
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, USHORT nDecDigits,
+sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit )
{
// caution: precision loss in double cast
@@ -1259,7 +1259,7 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, US
// -----------------------------------------------------------------------
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
+sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_uInt16 nDigits,
MapUnit eInUnit, FieldUnit eOutUnit )
{
return static_cast<sal_Int64>(
@@ -1271,7 +1271,7 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
+sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_uInt16 nDigits,
FieldUnit eInUnit, MapUnit eOutUnit )
{
return static_cast<sal_Int64>(
@@ -1283,7 +1283,7 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, USHORT nDecDigits,
+double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit )
{
if ( eInUnit != eOutUnit )
@@ -1295,7 +1295,7 @@ double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, US
if ( (mnBaseValue <= 0) || (nValue <= 0) )
return nValue;
nDiv = 100;
- for ( USHORT i=0; i < nDecDigits; i++ )
+ for ( sal_uInt16 i=0; i < nDecDigits; i++ )
nDiv *= 10;
nMult = mnBaseValue;
@@ -1334,7 +1334,7 @@ double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, US
// -----------------------------------------------------------------------
-double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
+double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
MapUnit eInUnit, FieldUnit eOutUnit )
{
if ( eOutUnit == FUNIT_PERCENT ||
@@ -1391,7 +1391,7 @@ double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
+double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
FieldUnit eInUnit, MapUnit eOutUnit )
{
if ( eInUnit == FUNIT_PERCENT ||
@@ -1448,12 +1448,12 @@ double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-static BOOL ImplMetricGetValue( const XubString& rStr, double& rValue, sal_Int64 nBaseValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, FieldUnit eUnit )
+static sal_Bool ImplMetricGetValue( const XubString& rStr, double& rValue, sal_Int64 nBaseValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, FieldUnit eUnit )
{
// Zahlenwert holen
if ( !ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper ) )
- return FALSE;
+ return sal_False;
// Einheit rausfinden
FieldUnit eEntryUnit = ImplMetricGetUnit( rStr );
@@ -1461,15 +1461,15 @@ static BOOL ImplMetricGetValue( const XubString& rStr, double& rValue, sal_Int64
// Einheiten umrechnen
rValue = MetricField::ConvertDoubleValue( rValue, nBaseValue, nDecDigits, eEntryUnit, eUnit );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr )
+sal_Bool MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr )
{
if ( !ImplMetricGetValue( rStr, rValue, mnBaseValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), meUnit ) )
- return TRUE;
+ return sal_True;
else
{
double nTempVal = rValue;
@@ -1485,14 +1485,14 @@ BOOL MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue,
if ( !GetErrorHdl().Call( this ) )
{
mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
mnCorrectedValue = 0;
}
rOutStr = CreateFieldText( (sal_Int64)nTempVal );
- return TRUE;
+ return sal_True;
}
}
@@ -1521,7 +1521,7 @@ void MetricFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( METRICFORMATTER_UNIT & nMask )
meUnit = (FieldUnit)pMgr->ReadLong();
@@ -1695,7 +1695,7 @@ void MetricFormatter::Reformat()
XubString aStr;
// caution: precision loss in double cast
double nTemp = (double)mnLastValue;
- BOOL bOK = ImplMetricReformat( aText, nTemp, aStr );
+ sal_Bool bOK = ImplMetricReformat( aText, nTemp, aStr );
mnLastValue = (sal_Int64)nTemp;
if ( !bOK )
@@ -1752,7 +1752,7 @@ void MetricField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
MetricFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( METRICFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -1828,7 +1828,7 @@ long MetricField::PreNotify( NotifyEvent& rNEvt )
long MetricField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1861,7 +1861,7 @@ void MetricField::DataChanged( const DataChangedEvent& rDCEvt )
void MetricField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -1954,7 +1954,7 @@ long MetricBox::PreNotify( NotifyEvent& rNEvt )
long MetricBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1987,7 +1987,7 @@ void MetricBox::DataChanged( const DataChangedEvent& rDCEvt )
void MetricBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -1997,16 +1997,16 @@ void MetricBox::ReformatAll()
{
double nValue;
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplMetricReformat( GetEntry( i ), nValue, aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
MetricFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
@@ -2018,7 +2018,7 @@ void MetricBox::CustomConvert()
// -----------------------------------------------------------------------
-void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, USHORT nPos )
+void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_uInt16 nPos )
{
// Umrechnen auf eingestellte Einheiten
nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
@@ -2038,7 +2038,7 @@ void MetricBox::RemoveValue( sal_Int64 nValue, FieldUnit eInUnit )
// -----------------------------------------------------------------------
-sal_Int64 MetricBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const
+sal_Int64 MetricBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
{
double nValue = 0;
ImplMetricGetValue( ComboBox::GetEntry( nPos ), nValue, mnBaseValue,
@@ -2053,7 +2053,7 @@ sal_Int64 MetricBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const
// -----------------------------------------------------------------------
-USHORT MetricBox::GetValuePos( sal_Int64 nValue, FieldUnit eInUnit ) const
+sal_uInt16 MetricBox::GetValuePos( sal_Int64 nValue, FieldUnit eInUnit ) const
{
// Umrechnen auf eingestellte Einheiten
nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
@@ -2079,31 +2079,31 @@ sal_Int64 MetricBox::GetValue() const
// -----------------------------------------------------------------------
-static BOOL ImplCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
- BOOL, BOOL bUseThousandSep, const LocaleDataWrapper& rWrapper )
+static sal_Bool ImplCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+ sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rWrapper )
{
// Es gibt hier kein sinnvolles StrictFormat, also alle
// Zeichen erlauben
- return ImplNumericProcessKeyInput( pEdit, rKEvt, FALSE, bUseThousandSep, rWrapper );
+ return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rWrapper );
}
// -----------------------------------------------------------------------
-inline BOOL ImplCurrencyGetValue( const XubString& rStr, double& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rWrapper )
+inline sal_Bool ImplCurrencyGetValue( const XubString& rStr, double& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rWrapper )
{
// Zahlenwert holen
- return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, TRUE );
+ return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, sal_True );
}
// -----------------------------------------------------------------------
-BOOL CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
+sal_Bool CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
XubString& rOutStr )
{
double nValue;
- if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), TRUE ) )
- return TRUE;
+ if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), sal_True ) )
+ return sal_True;
else
{
double nTempVal = nValue;
@@ -2119,14 +2119,14 @@ BOOL CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
if ( !GetErrorHdl().Call( this ) )
{
mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
mnCorrectedValue = 0;
}
rOutStr = CreateFieldText( (long)nTempVal );
- return TRUE;
+ return sal_True;
}
}
@@ -2171,7 +2171,7 @@ void CurrencyFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -2210,7 +2210,7 @@ void CurrencyFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
+ sal_Bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
@@ -2257,7 +2257,7 @@ void CurrencyField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
CurrencyFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( CURRENCYFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -2295,7 +2295,7 @@ long CurrencyField::PreNotify( NotifyEvent& rNEvt )
long CurrencyField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -2328,7 +2328,7 @@ void CurrencyField::DataChanged( const DataChangedEvent& rDCEvt )
void CurrencyField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -2414,7 +2414,7 @@ long CurrencyBox::PreNotify( NotifyEvent& rNEvt )
long CurrencyBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -2447,7 +2447,7 @@ void CurrencyBox::DataChanged( const DataChangedEvent& rDCEvt )
void CurrencyBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -2456,21 +2456,21 @@ void CurrencyBox::Modify()
void CurrencyBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplCurrencyReformat( GetEntry( i ), aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
CurrencyFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void CurrencyBox::InsertValue( sal_Int64 nValue, USHORT nPos )
+void CurrencyBox::InsertValue( sal_Int64 nValue, sal_uInt16 nPos )
{
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
@@ -2484,7 +2484,7 @@ void CurrencyBox::RemoveValue( sal_Int64 nValue )
// -----------------------------------------------------------------------
-sal_Int64 CurrencyBox::GetValue( USHORT nPos ) const
+sal_Int64 CurrencyBox::GetValue( sal_uInt16 nPos ) const
{
double nValue = 0;
ImplCurrencyGetValue( ComboBox::GetEntry( nPos ), nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() );
@@ -2493,7 +2493,7 @@ sal_Int64 CurrencyBox::GetValue( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT CurrencyBox::GetValuePos( sal_Int64 nValue ) const
+sal_uInt16 CurrencyBox::GetValuePos( sal_Int64 nValue ) const
{
return ComboBox::GetEntryPos( CreateFieldText( nValue ) );
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 8ae2ecff41b9..4b14a5a4b199 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -95,7 +95,7 @@ static sal_Unicode* ImplAddString( sal_Unicode* pBuf, const String& rStr )
// -----------------------------------------------------------------------
-static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, ULONG nNumber, int nMinLen )
+static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, sal_uLong nNumber, int nMinLen )
{
// fill temp buffer with digits
sal_Unicode aTempBuf[30];
@@ -132,15 +132,15 @@ static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, ULONG nNumber, int nMinLen )
// -----------------------------------------------------------------------
-static USHORT ImplGetNum( const sal_Unicode*& rpBuf, BOOL& rbError )
+static sal_uInt16 ImplGetNum( const sal_Unicode*& rpBuf, sal_Bool& rbError )
{
if ( !*rpBuf )
{
- rbError = TRUE;
+ rbError = sal_True;
return 0;
}
- USHORT nNumber = 0;
+ sal_uInt16 nNumber = 0;
while( ( *rpBuf >= '0' ) && ( *rpBuf <= '9' ) )
{
nNumber *= 10;
@@ -176,38 +176,38 @@ static int ImplIsPatternChar( xub_Unicode cChar, sal_Char cEditMask )
catch ( ::com::sun::star::uno::Exception& )
{
DBG_ERRORFILE( "ImplIsPatternChar: Exception caught!" );
- return FALSE;
+ return sal_False;
}
if ( (cEditMask == EDITMASK_ALPHA) || (cEditMask == EDITMASK_UPPERALPHA) )
{
if( !CharClass::isLetterType( nType ) )
- return FALSE;
+ return sal_False;
}
else if ( cEditMask == EDITMASK_NUM )
{
if( !CharClass::isNumericType( nType ) )
- return FALSE;
+ return sal_False;
}
else if ( (cEditMask == EDITMASK_ALPHANUM) || (cEditMask == EDITMASK_UPPERALPHANUM) )
{
if( !CharClass::isLetterNumericType( nType ) )
- return FALSE;
+ return sal_False;
}
else if ( (cEditMask == EDITMASK_ALLCHAR) || (cEditMask == EDITMASK_UPPERALLCHAR) )
{
if ( cChar < 32 )
- return FALSE;
+ return sal_False;
}
else if ( cEditMask == EDITMASK_NUMSPACE )
{
if ( !CharClass::isNumericType( nType ) && ( cChar != ' ' ) )
- return FALSE;
+ return sal_False;
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -233,12 +233,12 @@ static xub_Unicode ImplPatternChar( xub_Unicode cChar, sal_Char cEditMask )
static int ImplKommaPointCharEqual( xub_Unicode c1, xub_Unicode c2 )
{
if ( c1 == c2 )
- return TRUE;
+ return sal_True;
else if ( ((c1 == '.') || (c1 == ',')) &&
((c2 == '.') || (c2 == ',')) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -246,7 +246,7 @@ static int ImplKommaPointCharEqual( xub_Unicode c1, xub_Unicode c2 )
static XubString ImplPatternReformat( const XubString& rStr,
const ByteString& rEditMask,
const XubString& rLiteralMask,
- USHORT nFormatFlags )
+ sal_uInt16 nFormatFlags )
{
if ( !rEditMask.Len() )
return rStr;
@@ -350,8 +350,8 @@ static XubString ImplPatternReformat( const XubString& rStr,
// -----------------------------------------------------------------------
static void ImplPatternMaxPos( const XubString rStr, const ByteString& rEditMask,
- USHORT nFormatFlags, BOOL bSameMask,
- USHORT nCursorPos, USHORT& rPos )
+ sal_uInt16 nFormatFlags, sal_Bool bSameMask,
+ sal_uInt16 nCursorPos, sal_uInt16& rPos )
{
// Letzte Position darf nicht groesser als der enthaltene String sein
@@ -395,7 +395,7 @@ static void ImplPatternMaxPos( const XubString rStr, const ByteString& rEditMask
static void ImplPatternProcessStrictModify( Edit* pEdit,
const ByteString& rEditMask,
const XubString& rLiteralMask,
- USHORT nFormatFlags, BOOL bSameMask )
+ sal_uInt16 nFormatFlags, sal_Bool bSameMask )
{
XubString aText = pEdit->GetText();
@@ -424,7 +424,7 @@ static void ImplPatternProcessStrictModify( Edit* pEdit,
// Selection so anpassen, das diese wenn sie vorher am Ende
// stand, immer noch am Ende steht
Selection aSel = pEdit->GetSelection();
- ULONG nMaxSel = Max( aSel.Min(), aSel.Max() );
+ sal_uLong nMaxSel = Max( aSel.Min(), aSel.Max() );
if ( nMaxSel >= aText.Len() )
{
xub_StrLen nMaxPos = aNewText.Len();
@@ -465,7 +465,7 @@ static xub_StrLen ImplPatternLeftPos( const ByteString& rEditMask, xub_StrLen nC
// -----------------------------------------------------------------------
static xub_StrLen ImplPatternRightPos( const XubString& rStr, const ByteString& rEditMask,
- USHORT nFormatFlags, BOOL bSameMask,
+ sal_uInt16 nFormatFlags, sal_Bool bSameMask,
xub_StrLen nCursorPos )
{
// Naechstes Zeichen suchen, was kein Literal ist
@@ -486,22 +486,22 @@ static xub_StrLen ImplPatternRightPos( const XubString& rStr, const ByteString&
// -----------------------------------------------------------------------
-static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+static sal_Bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
const ByteString& rEditMask,
const XubString& rLiteralMask,
- BOOL bStrictFormat,
- USHORT nFormatFlags,
- BOOL bSameMask,
- BOOL& rbInKeyInput )
+ sal_Bool bStrictFormat,
+ sal_uInt16 nFormatFlags,
+ sal_Bool bSameMask,
+ sal_Bool& rbInKeyInput )
{
if ( !rEditMask.Len() || !bStrictFormat )
- return FALSE;
+ return sal_False;
Selection aOldSel = pEdit->GetSelection();
KeyCode aCode = rKEvt.GetKeyCode();
xub_Unicode cChar = rKEvt.GetCharCode();
- USHORT nKeyCode = aCode.GetCode();
- BOOL bShift = aCode.IsShift();
+ sal_uInt16 nKeyCode = aCode.GetCode();
+ sal_Bool bShift = aCode.IsShift();
xub_StrLen nCursorPos = (xub_StrLen)aOldSel.Max();
xub_StrLen nNewPos;
xub_StrLen nTempPos;
@@ -514,7 +514,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( bShift )
aSel.Min() = aOldSel.Min();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_RIGHT )
{
@@ -530,7 +530,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
else
aSel.Min() = aSel.Max();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_HOME )
{
@@ -546,7 +546,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( bShift )
aSel.Min() = aOldSel.Min();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_END )
{
@@ -568,7 +568,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
else
aSel.Min() = aSel.Max();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( (nKeyCode == KEY_BACKSPACE) || (nKeyCode == KEY_DELETE) )
{
@@ -619,16 +619,16 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
{
if ( bSameMask )
aStr = ImplPatternReformat( aStr, rEditMask, rLiteralMask, nFormatFlags );
- rbInKeyInput = TRUE;
+ rbInKeyInput = sal_True;
pEdit->SetText( aStr, Selection( nNewPos ) );
pEdit->SetModifyFlag();
pEdit->Modify();
- rbInKeyInput = FALSE;
+ rbInKeyInput = sal_False;
}
else
pEdit->SetSelection( Selection( nNewPos ) );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_INSERT )
{
@@ -638,13 +638,13 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( !bSameMask )
{
Sound::Beep();
- return TRUE;
+ return sal_True;
}
}
}
if ( rKEvt.GetKeyCode().IsMod2() || (cChar < 32) || (cChar == 127) )
- return FALSE;
+ return sal_False;
Selection aSel = aOldSel;
aSel.Justify();
@@ -682,7 +682,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( nTempPos > nNewPos )
{
pEdit->SetSelection( Selection( nTempPos ) );
- return TRUE;
+ return sal_True;
}
}
break;
@@ -699,7 +699,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( cChar )
{
XubString aStr = pEdit->GetText();
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
if ( bSameMask && pEdit->IsInsertMode() )
{
// Text um Spacezeichen und Literale am Ende kuerzen, bis zur
@@ -730,7 +730,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
aStr = ImplPatternReformat( aStr, rEditMask, rLiteralMask, nFormatFlags );
}
else
- bError = TRUE;
+ bError = sal_True;
}
else
{
@@ -751,18 +751,18 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
Sound::Beep();
else
{
- rbInKeyInput = TRUE;
+ rbInKeyInput = sal_True;
Selection aNewSel( ImplPatternRightPos( aStr, rEditMask, nFormatFlags, bSameMask, nNewPos ) );
pEdit->SetText( aStr, aNewSel );
pEdit->SetModifyFlag();
pEdit->Modify();
- rbInKeyInput = FALSE;
+ rbInKeyInput = sal_False;
}
}
else
Sound::Beep();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -772,7 +772,7 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
{
maEditMask = rEditMask;
maLiteralMask = rLiteralMask;
- mbSameMask = TRUE;
+ mbSameMask = sal_True;
if ( maEditMask.Len() != maLiteralMask.Len() )
{
@@ -797,14 +797,14 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
(cTemp == EDITMASK_UPPERALLCHAR) ||
(cTemp == EDITMASK_NUMSPACE) )
{
- mbSameMask = FALSE;
+ mbSameMask = sal_False;
break;
}
if ( i < rLiteralMask.Len() )
{
if ( rLiteralMask.GetChar( i ) != ' ' )
{
- mbSameMask = FALSE;
+ mbSameMask = sal_False;
break;
}
}
@@ -812,7 +812,7 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
c = cTemp;
if ( cTemp != c )
{
- mbSameMask = FALSE;
+ mbSameMask = sal_False;
break;
}
}
@@ -825,8 +825,8 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
PatternFormatter::PatternFormatter()
{
mnFormatFlags = 0;
- mbSameMask = TRUE;
- mbInPattKeyInput = FALSE;
+ mbSameMask = sal_True;
+ mbInPattKeyInput = sal_False;
}
// -----------------------------------------------------------------------
@@ -838,10 +838,10 @@ void PatternFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( PATTERNFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( PATTERNFORMATTER_EDITMASK & nMask )
aEditMask = ByteString( pMgr->ReadString(), RTL_TEXTENCODING_ASCII_US );
@@ -877,7 +877,7 @@ void PatternFormatter::SetString( const XubString& rStr )
if ( GetField() )
{
GetField()->SetText( rStr );
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
}
@@ -899,7 +899,7 @@ void PatternFormatter::Reformat()
{
ImplSetText( ImplPatternReformat( GetField()->GetText(), maEditMask, maLiteralMask, mnFormatFlags ) );
if ( !mbSameMask && IsStrictFormat() && !GetField()->IsReadOnly() )
- GetField()->SetInsertMode( FALSE );
+ GetField()->SetInsertMode( sal_False );
}
}
@@ -970,7 +970,7 @@ long PatternField::PreNotify( NotifyEvent& rNEvt )
long PatternField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -989,7 +989,7 @@ void PatternField::Modify()
if ( IsStrictFormat() )
ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), GetFormatFlags(), ImplIsSameMask() );
else
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
}
SpinField::Modify();
@@ -1048,7 +1048,7 @@ long PatternBox::PreNotify( NotifyEvent& rNEvt )
long PatternBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1067,7 +1067,7 @@ void PatternBox::Modify()
if ( IsStrictFormat() )
ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), GetFormatFlags(), ImplIsSameMask() );
else
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
}
ComboBox::Modify();
@@ -1078,21 +1078,21 @@ void PatternBox::Modify()
void PatternBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
aStr = ImplPatternReformat( GetEntry( i ), GetEditMask(), GetLiteralMask(), GetFormatFlags() );
RemoveEntry( i );
InsertEntry( aStr, i );
}
PatternFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void PatternBox::InsertString( const XubString& rStr, USHORT nPos )
+void PatternBox::InsertString( const XubString& rStr, sal_uInt16 nPos )
{
ComboBox::InsertEntry( ImplPatternReformat( rStr, GetEditMask(), GetLiteralMask(), GetFormatFlags() ), nPos );
}
@@ -1106,14 +1106,14 @@ void PatternBox::RemoveString( const XubString& rStr )
// -----------------------------------------------------------------------
-XubString PatternBox::GetString( USHORT nPos ) const
+XubString PatternBox::GetString( sal_uInt16 nPos ) const
{
return ImplPatternReformat( ComboBox::GetEntry( nPos ), GetEditMask(), GetLiteralMask(), GetFormatFlags() );
}
// -----------------------------------------------------------------------
-USHORT PatternBox::GetStringPos( const XubString& rStr ) const
+sal_uInt16 PatternBox::GetStringPos( const XubString& rStr ) const
{
return ComboBox::GetEntryPos( ImplPatternReformat( rStr, GetEditMask(), GetLiteralMask(), GetFormatFlags() ) );
}
@@ -1132,7 +1132,7 @@ static ExtDateFieldFormat ImplGetExtFormat( DateFormat eOld )
// -----------------------------------------------------------------------
-static USHORT ImplCutNumberFromString( XubString& rStr )
+static sal_uInt16 ImplCutNumberFromString( XubString& rStr )
{
// Nach Zahl suchen
while ( rStr.Len() && !(rStr.GetChar( 0 ) >= '0' && rStr.GetChar( 0 ) <= '9') )
@@ -1145,28 +1145,28 @@ static USHORT ImplCutNumberFromString( XubString& rStr )
aNumStr.Insert( rStr.GetChar( 0 ) );
rStr.Erase( 0, 1 );
}
- return (USHORT)aNumStr.ToInt32();
+ return (sal_uInt16)aNumStr.ToInt32();
}
// -----------------------------------------------------------------------
-static BOOL ImplCutMonthName( XubString& rStr, const XubString& _rLookupMonthName )
+static sal_Bool ImplCutMonthName( XubString& rStr, const XubString& _rLookupMonthName )
{
- USHORT nPos = rStr.Search( _rLookupMonthName );
+ sal_uInt16 nPos = rStr.Search( _rLookupMonthName );
if ( nPos != STRING_NOTFOUND )
{
rStr.Erase( 0, nPos + _rLookupMonthName.Len() );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-static USHORT ImplCutMonthFromString( XubString& rStr, const CalendarWrapper& rCalendarWrapper )
+static sal_uInt16 ImplCutMonthFromString( XubString& rStr, const CalendarWrapper& rCalendarWrapper )
{
// search for a month' name
- for ( USHORT i=1; i <= 12; i++ )
+ for ( sal_uInt16 i=1; i <= 12; i++ )
{
String aMonthName = rCalendarWrapper.getMonths()[i-1].FullName;
// long month name?
@@ -1194,31 +1194,31 @@ static String ImplGetDateSep( const LocaleDataWrapper& rLocaleDataWrapper, ExtDa
return aDateSep;
}
-static BOOL ImplDateProcessKeyInput( Edit*, const KeyEvent& rKEvt, ExtDateFieldFormat eFormat,
+static sal_Bool ImplDateProcessKeyInput( Edit*, const KeyEvent& rKEvt, ExtDateFieldFormat eFormat,
const LocaleDataWrapper& rLocaleDataWrapper )
{
xub_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC)||
((cChar >= '0') && (cChar <= '9')) ||
(cChar == ImplGetDateSep( rLocaleDataWrapper, eFormat ).GetChar(0) ) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFormat eDateFormat,
+static sal_Bool ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFormat eDateFormat,
const LocaleDataWrapper& rLocaleDataWrapper, const CalendarWrapper& rCalendarWrapper,
const AllSettings& )
{
- USHORT nDay = 0;
- USHORT nMonth = 0;
- USHORT nYear = 0;
- BOOL bYear = TRUE;
- BOOL bError = FALSE;
+ sal_uInt16 nDay = 0;
+ sal_uInt16 nMonth = 0;
+ sal_uInt16 nYear = 0;
+ sal_Bool bYear = sal_True;
+ sal_Bool bError = sal_False;
String aStr( rStr );
if ( eDateFormat == XTDATEF_SYSTEM_LONG )
@@ -1248,13 +1248,13 @@ static BOOL ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFo
{
// Check if year is present:
String aDateSep = ImplGetDateSep( rLocaleDataWrapper, eDateFormat );
- USHORT nSepPos = aStr.Search( aDateSep );
+ sal_uInt16 nSepPos = aStr.Search( aDateSep );
if ( nSepPos == STRING_NOTFOUND )
- return FALSE;
+ return sal_False;
nSepPos = aStr.Search( aDateSep, nSepPos+1 );
if ( ( nSepPos == STRING_NOTFOUND ) || ( nSepPos == (aStr.Len()-1) ) )
{
- bYear = FALSE;
+ bYear = sal_False;
nYear = Date().GetYear();
}
@@ -1307,25 +1307,25 @@ static BOOL ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFo
}
if ( bError || !nDay || !nMonth )
- return FALSE;
+ return sal_False;
Date aNewDate( nDay, nMonth, nYear );
DateFormatter::ExpandCentury( aNewDate, utl::MiscCfg().GetYear2000() );
if ( aNewDate.IsValid() )
{
rDate = aNewDate;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr, const AllSettings& rSettings )
+sal_Bool DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr, const AllSettings& rSettings )
{
Date aDate( 0, 0, 0 );
- if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
- return TRUE;
+ if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ return sal_True;
Date aTempDate = aDate;
if ( aTempDate > GetMax() )
@@ -1339,7 +1339,7 @@ BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr,
if( !GetErrorHdl().Call( this ) )
{
maCorrectedDate = Date();
- return FALSE;
+ return sal_False;
}
else
maCorrectedDate = Date();
@@ -1347,7 +1347,7 @@ BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr,
rOutStr = ImplGetDateAsText( aTempDate, rSettings );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1355,7 +1355,7 @@ BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr,
XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
const AllSettings& ) const
{
- BOOL bShowCentury = FALSE;
+ sal_Bool bShowCentury = sal_False;
switch ( GetExtDateFormat() )
{
case XTDATEF_SYSTEM_SHORT_YYYY:
@@ -1365,43 +1365,43 @@ XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
case XTDATEF_SHORT_YYYYMMDD:
case XTDATEF_SHORT_YYYYMMDD_DIN5008:
{
- bShowCentury = TRUE;
+ bShowCentury = sal_True;
}
break;
default:
{
- bShowCentury = FALSE;
+ bShowCentury = sal_False;
}
}
if ( !bShowCentury )
{
// Check if I have to use force showing the century
- USHORT nTwoDigitYearStart = utl::MiscCfg().GetYear2000();
- USHORT nYear = rDate.GetYear();
+ sal_uInt16 nTwoDigitYearStart = utl::MiscCfg().GetYear2000();
+ sal_uInt16 nYear = rDate.GetYear();
// Wenn Jahr nicht im 2stelligen Grenzbereich liegt,
if ( (nYear < nTwoDigitYearStart) || (nYear >= nTwoDigitYearStart+100) )
- bShowCentury = TRUE;
+ bShowCentury = sal_True;
}
sal_Unicode aBuf[128];
sal_Unicode* pBuf = aBuf;
- String aDateSep = ImplGetDateSep( ImplGetLocaleDataWrapper(), GetExtDateFormat( TRUE ) );
- USHORT nDay = rDate.GetDay();
- USHORT nMonth = rDate.GetMonth();
- USHORT nYear = rDate.GetYear();
- USHORT nYearLen = bShowCentury ? 4 : 2;
+ String aDateSep = ImplGetDateSep( ImplGetLocaleDataWrapper(), GetExtDateFormat( sal_True ) );
+ sal_uInt16 nDay = rDate.GetDay();
+ sal_uInt16 nMonth = rDate.GetMonth();
+ sal_uInt16 nYear = rDate.GetYear();
+ sal_uInt16 nYearLen = bShowCentury ? 4 : 2;
if ( !bShowCentury )
nYear %= 100;
- switch ( GetExtDateFormat( TRUE ) )
+ switch ( GetExtDateFormat( sal_True ) )
{
case XTDATEF_SYSTEM_LONG:
{
- return ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, FALSE, 1, !bShowCentury );
+ return ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, sal_False, 1, !bShowCentury );
}
case XTDATEF_SHORT_DDMMYY:
case XTDATEF_SHORT_DDMMYYYY:
@@ -1441,12 +1441,12 @@ XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
}
}
- return String( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ return String( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) );
}
// -----------------------------------------------------------------------
-static void ImplDateIncrementDay( Date& rDate, BOOL bUp )
+static void ImplDateIncrementDay( Date& rDate, sal_Bool bUp )
{
DateFormatter::ExpandCentury( rDate );
@@ -1464,12 +1464,12 @@ static void ImplDateIncrementDay( Date& rDate, BOOL bUp )
// -----------------------------------------------------------------------
-static void ImplDateIncrementMonth( Date& rDate, BOOL bUp )
+static void ImplDateIncrementMonth( Date& rDate, sal_Bool bUp )
{
DateFormatter::ExpandCentury( rDate );
- USHORT nMonth = rDate.GetMonth();
- USHORT nYear = rDate.GetYear();
+ sal_uInt16 nMonth = rDate.GetMonth();
+ sal_uInt16 nYear = rDate.GetYear();
if ( bUp )
{
if ( (nMonth == 12) && (nYear < 9999) )
@@ -1497,18 +1497,18 @@ static void ImplDateIncrementMonth( Date& rDate, BOOL bUp )
}
}
- USHORT nDaysInMonth = rDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = rDate.GetDaysInMonth();
if ( rDate.GetDay() > nDaysInMonth )
rDate.SetDay( nDaysInMonth );
}
// -----------------------------------------------------------------------
-static void ImplDateIncrementYear( Date& rDate, BOOL bUp )
+static void ImplDateIncrementYear( Date& rDate, sal_Bool bUp )
{
DateFormatter::ExpandCentury( rDate );
- USHORT nYear = rDate.GetYear();
+ sal_uInt16 nYear = rDate.GetYear();
if ( bUp )
{
if ( nYear < 9999 )
@@ -1522,14 +1522,14 @@ static void ImplDateIncrementYear( Date& rDate, BOOL bUp )
}
// -----------------------------------------------------------------------
-BOOL DateFormatter::ImplAllowMalformedInput() const
+sal_Bool DateFormatter::ImplAllowMalformedInput() const
{
return !IsEnforceValidValue();
}
// -----------------------------------------------------------------------
-void DateField::ImplDateSpinArea( BOOL bUp )
+void DateField::ImplDateSpinArea( sal_Bool bUp )
{
// Wenn alles selektiert ist, Tage hochzaehlen
if ( GetField() )
@@ -1544,7 +1544,7 @@ void DateField::ImplDateSpinArea( BOOL bUp )
{
xub_StrLen nDateArea = 0;
- ExtDateFieldFormat eFormat = GetExtDateFormat( TRUE );
+ ExtDateFieldFormat eFormat = GetExtDateFormat( sal_True );
if ( eFormat == XTDATEF_SYSTEM_LONG )
{
eFormat = ImplGetExtFormat( ImplGetLocaleDataWrapper().getLongDateFormat() );
@@ -1558,7 +1558,7 @@ void DateField::ImplDateSpinArea( BOOL bUp )
for ( xub_StrLen i = 1; i <= 3; i++ )
{
nPos = aText.Search( aDateSep, nPos );
- if ( nPos >= (USHORT)aSelection.Max() )
+ if ( nPos >= (sal_uInt16)aSelection.Max() )
{
nDateArea = i;
break;
@@ -1623,8 +1623,8 @@ void DateField::ImplDateSpinArea( BOOL bUp )
void DateFormatter::ImplInit()
{
- mbLongFormat = FALSE;
- mbShowDateCentury = TRUE;
+ mbLongFormat = sal_False;
+ mbShowDateCentury = sal_True;
mpCalendarWrapper = NULL;
mnDateFormat = 0xFFFF;
mnExtDateFormat = XTDATEF_SYSTEM_SHORT;
@@ -1637,7 +1637,7 @@ DateFormatter::DateFormatter() :
maLastDate( 0 ),
maMin( 1, 1, 1900 ),
maMax( 31, 12, 2200 ),
- mbEnforceValidValue( TRUE )
+ mbEnforceValidValue( sal_True )
{
ImplInit();
}
@@ -1649,7 +1649,7 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( DATEFORMATTER_MIN & nMask )
{
@@ -1662,10 +1662,10 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE*)pMgr->GetClass() ) );
}
if ( DATEFORMATTER_LONGFORMAT & nMask )
- mbLongFormat = (BOOL)pMgr->ReadShort();
+ mbLongFormat = (sal_Bool)pMgr->ReadShort();
if ( DATEFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( DATEFORMATTER_VALUE & nMask )
{
@@ -1721,13 +1721,13 @@ void DateFormatter::SetExtDateFormat( ExtDateFieldFormat eFormat )
// -----------------------------------------------------------------------
-ExtDateFieldFormat DateFormatter::GetExtDateFormat( BOOL bResolveSystemFormat ) const
+ExtDateFieldFormat DateFormatter::GetExtDateFormat( sal_Bool bResolveSystemFormat ) const
{
ExtDateFieldFormat eDateFormat = (ExtDateFieldFormat)mnExtDateFormat;
if ( bResolveSystemFormat && ( eDateFormat <= XTDATEF_SYSTEM_SHORT_YYYY ) )
{
- BOOL bShowCentury = (eDateFormat == XTDATEF_SYSTEM_SHORT_YYYY);
+ sal_Bool bShowCentury = (eDateFormat == XTDATEF_SYSTEM_SHORT_YYYY);
switch ( ImplGetLocaleDataWrapper().getDateFormat() )
{
case DMY: eDateFormat = bShowCentury ? XTDATEF_SHORT_DDMMYYYY : XTDATEF_SHORT_DDMMYY;
@@ -1769,7 +1769,7 @@ void DateFormatter::SetMax( const Date& rNewMax )
// -----------------------------------------------------------------------
-void DateFormatter::SetLongFormat( BOOL bLong )
+void DateFormatter::SetLongFormat( sal_Bool bLong )
{
mbLongFormat = bLong;
@@ -1789,7 +1789,7 @@ void DateFormatter::SetLongFormat( BOOL bLong )
// -----------------------------------------------------------------------
-void DateFormatter::SetShowDateCentury( BOOL bShowDateCentury )
+void DateFormatter::SetShowDateCentury( sal_Bool bShowDateCentury )
{
mbShowDateCentury = bShowDateCentury;
@@ -1905,7 +1905,7 @@ Date DateFormatter::GetDate() const
if ( GetField() )
{
- if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
{
if ( aDate > maMax )
aDate = maMax;
@@ -1945,7 +1945,7 @@ Date DateFormatter::GetRealDate() const
if ( GetField() )
{
- if ( !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ if ( !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
if ( ImplAllowMalformedInput() )
aDate = GetInvalidDate();
}
@@ -1962,20 +1962,20 @@ void DateFormatter::SetEmptyDate()
// -----------------------------------------------------------------------
-BOOL DateFormatter::IsEmptyDate() const
+sal_Bool DateFormatter::IsEmptyDate() const
{
- BOOL bEmpty = FormatterBase::IsEmptyFieldValue();
+ sal_Bool bEmpty = FormatterBase::IsEmptyFieldValue();
if ( GetField() && MustBeReformatted() && IsEmptyFieldValueEnabled() )
{
if ( !GetField()->GetText().Len() )
{
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else if ( !maLastDate.GetDate() )
{
Date aDate;
- bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
+ bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
}
}
return bEmpty;
@@ -1983,14 +1983,14 @@ BOOL DateFormatter::IsEmptyDate() const
// -----------------------------------------------------------------------
-BOOL DateFormatter::IsDateModified() const
+sal_Bool DateFormatter::IsDateModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyDate();
else if ( GetDate() != maFieldDate )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2004,14 +2004,14 @@ void DateFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() );
+ sal_Bool bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() );
if( !bOK )
return;
if ( aStr.Len() )
{
ImplSetText( aStr );
- ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
+ ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
}
else
{
@@ -2022,7 +2022,7 @@ void DateFormatter::Reformat()
else
{
ImplSetText( ImplGetSVEmptyStr() );
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
}
}
@@ -2036,12 +2036,12 @@ void DateFormatter::ExpandCentury( Date& rDate )
// -----------------------------------------------------------------------
-void DateFormatter::ExpandCentury( Date& rDate, USHORT nTwoDigitYearStart )
+void DateFormatter::ExpandCentury( Date& rDate, sal_uInt16 nTwoDigitYearStart )
{
- USHORT nDateYear = rDate.GetYear();
+ sal_uInt16 nDateYear = rDate.GetYear();
if ( nDateYear < 100 )
{
- USHORT nCentury = nTwoDigitYearStart / 100;
+ sal_uInt16 nCentury = nTwoDigitYearStart / 100;
if ( nDateYear < (nTwoDigitYearStart % 100) )
nCentury++;
rDate.SetYear( nDateYear + (nCentury*100) );
@@ -2092,7 +2092,7 @@ void DateField::ImplLoadRes( const ResId& rResId )
{
DateFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( DATEFIELD_FIRST & nMask )
{
maFirst = Date( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
@@ -2122,7 +2122,7 @@ long DateField::PreNotify( NotifyEvent& rNEvt )
( GetExtDateFormat() != XTDATEF_SYSTEM_LONG ) &&
!rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
- if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( TRUE ), ImplGetLocaleDataWrapper() ) )
+ if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( sal_True ), ImplGetLocaleDataWrapper() ) )
return 1;
}
@@ -2134,7 +2134,7 @@ long DateField::PreNotify( NotifyEvent& rNEvt )
long DateField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() )
@@ -2144,7 +2144,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
// !!! allen anderen Feldern anders behandelt wird.
// !!! Siehe dazu Bug: 52304
- BOOL bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = GetText().Len() != 0;
if ( bTextLen || !IsEmptyFieldValueEnabled() )
{
if ( !ImplAllowMalformedInput() )
@@ -2152,7 +2152,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
else
{
Date aDate( 0, 0, 0 );
- if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
// even with strict text analysis, our text is a valid date -> do a complete
// reformat
Reformat();
@@ -2161,7 +2161,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
else if ( !bTextLen && IsEmptyFieldValueEnabled() )
{
ResetLastDate();
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
}
}
@@ -2187,7 +2187,7 @@ void DateField::DataChanged( const DataChangedEvent& rDCEvt )
void DateField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -2195,7 +2195,7 @@ void DateField::Modify()
void DateField::Up()
{
- ImplDateSpinArea( TRUE );
+ ImplDateSpinArea( sal_True );
SpinField::Up();
}
@@ -2203,7 +2203,7 @@ void DateField::Up()
void DateField::Down()
{
- ImplDateSpinArea( FALSE );
+ ImplDateSpinArea( sal_False );
SpinField::Down();
}
@@ -2267,7 +2267,7 @@ long DateBox::PreNotify( NotifyEvent& rNEvt )
( GetExtDateFormat() != XTDATEF_SYSTEM_LONG ) &&
!rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
- if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( TRUE ), ImplGetLocaleDataWrapper() ) )
+ if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( sal_True ), ImplGetLocaleDataWrapper() ) )
return 1;
}
@@ -2293,18 +2293,18 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt )
long DateBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() )
{
- BOOL bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = GetText().Len() != 0;
if ( bTextLen || !IsEmptyFieldValueEnabled() )
Reformat();
else if ( !bTextLen && IsEmptyFieldValueEnabled() )
{
ResetLastDate();
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
}
}
@@ -2316,7 +2316,7 @@ long DateBox::Notify( NotifyEvent& rNEvt )
void DateBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -2325,21 +2325,21 @@ void DateBox::Modify()
void DateBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplDateReformat( GetEntry( i ), aStr, GetFieldSettings() );
RemoveEntry( i );
InsertEntry( aStr, i );
}
DateFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void DateBox::InsertDate( const Date& rDate, USHORT nPos )
+void DateBox::InsertDate( const Date& rDate, sal_uInt16 nPos )
{
Date aDate = rDate;
if ( aDate > GetMax() )
@@ -2359,20 +2359,20 @@ void DateBox::RemoveDate( const Date& rDate )
// -----------------------------------------------------------------------
-Date DateBox::GetDate( USHORT nPos ) const
+Date DateBox::GetDate( sal_uInt16 nPos ) const
{
Date aDate( 0, 0, 0 );
- ImplDateGetValue( ComboBox::GetEntry( nPos ), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetSettings() );
+ ImplDateGetValue( ComboBox::GetEntry( nPos ), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetSettings() );
return aDate;
}
// -----------------------------------------------------------------------
-USHORT DateBox::GetDatePos( const Date& rDate ) const
+sal_uInt16 DateBox::GetDatePos( const Date& rDate ) const
{
XubString aStr;
if ( IsLongFormat() )
- aStr = ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, FALSE, 1, !IsShowDateCentury() );
+ aStr = ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, sal_False, 1, !IsShowDateCentury() );
else
aStr = ImplGetLocaleDataWrapper().getDate( rDate );
return ComboBox::GetEntryPos( aStr );
@@ -2380,18 +2380,18 @@ USHORT DateBox::GetDatePos( const Date& rDate ) const
// -----------------------------------------------------------------------
-static BOOL ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
- BOOL bStrictFormat, BOOL bDuration,
+static sal_Bool ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
+ sal_Bool bStrictFormat, sal_Bool bDuration,
TimeFieldFormat eFormat,
const LocaleDataWrapper& rLocaleDataWrapper )
{
xub_Unicode cChar = rKEvt.GetCharCode();
if ( !bStrictFormat )
- return FALSE;
+ return sal_False;
else
{
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
((cChar >= '0') && (cChar <= '9')) ||
@@ -2403,55 +2403,55 @@ static BOOL ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
((eFormat == TIMEF_100TH_SEC) && (cChar == rLocaleDataWrapper.getTime100SecSep())) ||
((eFormat == TIMEF_SEC_CS) && (cChar == rLocaleDataWrapper.getTime100SecSep())) ||
(bDuration && (cChar == '-')) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
}
// -----------------------------------------------------------------------
-static BOOL ImplIsOnlyDigits( const String& _rStr )
+static sal_Bool ImplIsOnlyDigits( const String& _rStr )
{
const sal_Unicode* _pChr = _rStr.GetBuffer();
for ( xub_StrLen i = 0; i < _rStr.Len(); ++i, ++_pChr )
{
if ( *_pChr < '0' || *_pChr > '9' )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplIsValidTimePortion( BOOL _bSkipInvalidCharacters, const String& _rStr )
+static sal_Bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const String& _rStr )
{
if ( !_bSkipInvalidCharacters )
{
if ( ( _rStr.Len() > 2 ) || ( _rStr.Len() < 1 ) || !ImplIsOnlyDigits( _rStr ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplCutTimePortion( String& _rStr, xub_StrLen _nSepPos, BOOL _bSkipInvalidCharacters, short* _pPortion )
+static sal_Bool ImplCutTimePortion( String& _rStr, xub_StrLen _nSepPos, sal_Bool _bSkipInvalidCharacters, short* _pPortion )
{
String sPortion = _rStr.Copy( 0, _nSepPos );
_rStr.Erase( 0, _nSepPos + 1 );
if ( !ImplIsValidTimePortion( _bSkipInvalidCharacters, sPortion ) )
- return FALSE;
+ return sal_False;
*_pPortion = (short)sPortion.ToInt32();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
- TimeFieldFormat eFormat, BOOL bDuration,
- const LocaleDataWrapper& rLocaleDataWrapper, BOOL _bSkipInvalidCharacters = TRUE )
+static sal_Bool ImplTimeGetValue( const XubString& rStr, Time& rTime,
+ TimeFieldFormat eFormat, sal_Bool bDuration,
+ const LocaleDataWrapper& rLocaleDataWrapper, sal_Bool _bSkipInvalidCharacters = sal_True )
{
XubString aStr = rStr;
short nHour = 0;
@@ -2461,7 +2461,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
Time aTime( 0, 0, 0 );
if ( !rStr.Len() )
- return FALSE;
+ return sal_False;
// Nach Separatoren suchen
if ( rLocaleDataWrapper.getTimeSep().Len() )
@@ -2483,34 +2483,34 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
}
}
- BOOL bNegative = FALSE;
+ sal_Bool bNegative = sal_False;
xub_StrLen nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( eFormat != TIMEF_SEC_CS )
{
if ( nSepPos == STRING_NOTFOUND )
nSepPos = aStr.Len();
if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, &nHour ) )
- return FALSE;
+ return sal_False;
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, &nMinute ) )
- return FALSE;
+ return sal_False;
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, &nSecond ) )
- return FALSE;
+ return sal_False;
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
n100Sec = (short)aStr.ToInt32();
}
else
@@ -2534,7 +2534,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
nMinute = nSecond;
@@ -2543,7 +2543,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
nHour = nMinute;
@@ -2595,7 +2595,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
}
if ( (nMinute > 59) || (nSecond > 59) || (n100Sec > 100) )
- return FALSE;
+ return sal_False;
if ( eFormat == TIMEF_NONE )
nSecond = n100Sec = 0;
@@ -2606,7 +2606,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
{
if ( bNegative || (nHour < 0) || (nMinute < 0) ||
(nSecond < 0) || (n100Sec < 0) )
- return FALSE;
+ return sal_False;
aStr.ToUpperAscii();
XubString aAM( rLocaleDataWrapper.getTimeAM() );
@@ -2622,39 +2622,39 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
if ( (nHour == 12) && ( ( aStr.Search( aAM ) != STRING_NOTFOUND ) || ( aStr.Search( aAM2 ) != STRING_NOTFOUND ) ) )
nHour = 0;
- aTime = Time( (USHORT)nHour, (USHORT)nMinute, (USHORT)nSecond,
- (USHORT)n100Sec );
+ aTime = Time( (sal_uInt16)nHour, (sal_uInt16)nMinute, (sal_uInt16)nSecond,
+ (sal_uInt16)n100Sec );
}
else
{
if ( bNegative || (nHour < 0) || (nMinute < 0) ||
(nSecond < 0) || (n100Sec < 0) )
{
- bNegative = TRUE;
+ bNegative = sal_True;
nHour = nHour < 0 ? -nHour : nHour;
nMinute = nMinute < 0 ? -nMinute : nMinute;
nSecond = nSecond < 0 ? -nSecond : nSecond;
n100Sec = n100Sec < 0 ? -n100Sec : n100Sec;
}
- aTime = Time( (USHORT)nHour, (USHORT)nMinute, (USHORT)nSecond,
- (USHORT)n100Sec );
+ aTime = Time( (sal_uInt16)nHour, (sal_uInt16)nMinute, (sal_uInt16)nSecond,
+ (sal_uInt16)n100Sec );
if ( bNegative )
aTime = -aTime;
}
rTime = aTime;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr )
+sal_Bool TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr )
{
Time aTime( 0, 0, 0 );
if ( !ImplTimeGetValue( rStr, aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() ) )
- return TRUE;
+ return sal_True;
Time aTempTime = aTime;
if ( aTempTime > GetMax() )
@@ -2668,22 +2668,22 @@ BOOL TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr
if ( !GetErrorHdl().Call( this ) )
{
maCorrectedTime = Time();
- return FALSE;
+ return sal_False;
}
else
maCorrectedTime = Time();
}
- BOOL bSecond = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSecond = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( meFormat != TIMEF_NONE )
- bSecond = TRUE;
+ bSecond = sal_True;
if ( meFormat == TIMEF_100TH_SEC )
- b100Sec = TRUE;
+ b100Sec = sal_True;
if ( meFormat == TIMEF_SEC_CS )
{
- ULONG n = aTempTime.GetHour() * 3600L;
+ sal_uLong n = aTempTime.GetHour() * 3600L;
n += aTempTime.GetMin() * 60L;
n += aTempTime.GetSec();
rOutStr = String::CreateFromInt32( n );
@@ -2713,18 +2713,18 @@ BOOL TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL TimeFormatter::ImplAllowMalformedInput() const
+sal_Bool TimeFormatter::ImplAllowMalformedInput() const
{
return !IsEnforceValidValue();
}
// -----------------------------------------------------------------------
-void TimeField::ImplTimeSpinArea( BOOL bUp )
+void TimeField::ImplTimeSpinArea( sal_Bool bUp )
{
if ( GetField() )
{
@@ -2795,7 +2795,7 @@ void TimeField::ImplTimeSpinArea( BOOL bUp )
void TimeFormatter::ImplInit()
{
meFormat = TIMEF_NONE;
- mbDuration = FALSE;
+ mbDuration = sal_False;
mnTimeFormat = HOUR_24; // Should become a ExtTimeFieldFormat in next implementation, merge with mbDuration and meFormat
}
@@ -2805,7 +2805,7 @@ TimeFormatter::TimeFormatter() :
maLastTime( 0, 0 ),
maMin( 0, 0 ),
maMax( 23, 59, 59, 99 ),
- mbEnforceValidValue( TRUE ),
+ mbEnforceValidValue( sal_True ),
maFieldTime( 0, 0 )
{
ImplInit();
@@ -2818,7 +2818,7 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( TIMEFORMATTER_MIN & nMask )
{
@@ -2836,10 +2836,10 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
meFormat = (TimeFieldFormat)pMgr->ReadLong();
if ( TIMEFORMATTER_DURATION & nMask )
- mbDuration = (BOOL)pMgr->ReadShort();
+ mbDuration = (sal_Bool)pMgr->ReadShort();
if ( TIMEFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( TIMEFORMATTER_VALUE & nMask )
{
@@ -2890,7 +2890,7 @@ void TimeFormatter::SetMax( const Time& rNewMax )
void TimeFormatter::SetTimeFormat( TimeFormatter::TimeFormat eNewFormat )
{
- mnTimeFormat = sal::static_int_cast<USHORT>(eNewFormat);
+ mnTimeFormat = sal::static_int_cast<sal_uInt16>(eNewFormat);
}
// -----------------------------------------------------------------------
@@ -2910,7 +2910,7 @@ void TimeFormatter::SetFormat( TimeFieldFormat eNewFormat )
// -----------------------------------------------------------------------
-void TimeFormatter::SetDuration( BOOL bNewDuration )
+void TimeFormatter::SetDuration( sal_Bool bNewDuration )
{
mbDuration = bNewDuration;
ReformatAll();
@@ -2922,7 +2922,7 @@ void TimeFormatter::SetTime( const Time& rNewTime )
{
SetUserTime( rNewTime );
maFieldTime = maLastTime;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -2969,15 +2969,15 @@ void TimeFormatter::ImplSetUserTime( const Time& rNewTime, Selection* pNewSelect
if ( GetField() )
{
XubString aStr;
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( meFormat != TIMEF_NONE )
- bSec = TRUE;
+ bSec = sal_True;
if ( meFormat == TIMEF_100TH_SEC || meFormat == TIMEF_SEC_CS )
- b100Sec = TRUE;
+ b100Sec = sal_True;
if ( meFormat == TIMEF_SEC_CS )
{
- ULONG n = aNewTime.GetHour() * 3600L;
+ sal_uLong n = aNewTime.GetHour() * 3600L;
n += aNewTime.GetMin() * 60L;
n += aNewTime.GetSec();
aStr = String::CreateFromInt32( n );
@@ -3028,7 +3028,7 @@ Time TimeFormatter::GetTime() const
if ( GetField() )
{
- BOOL bAllowMailformed = ImplAllowMalformedInput();
+ sal_Bool bAllowMailformed = ImplAllowMalformedInput();
if ( ImplTimeGetValue( GetField()->GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), !bAllowMailformed ) )
{
if ( aTime > GetMax() )
@@ -3056,7 +3056,7 @@ Time TimeFormatter::GetRealTime() const
if ( GetField() )
{
- BOOL bAllowMailformed = ImplAllowMalformedInput();
+ sal_Bool bAllowMailformed = ImplAllowMalformedInput();
if ( !ImplTimeGetValue( GetField()->GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), !bAllowMailformed ) )
if ( bAllowMailformed )
aTime = GetInvalidTime();
@@ -3067,14 +3067,14 @@ Time TimeFormatter::GetRealTime() const
// -----------------------------------------------------------------------
-BOOL TimeFormatter::IsTimeModified() const
+sal_Bool TimeFormatter::IsTimeModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyTime();
else if ( GetTime() != maFieldTime )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -3088,7 +3088,7 @@ void TimeFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplTimeReformat( GetField()->GetText(), aStr );
+ sal_Bool bOK = ImplTimeReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
@@ -3109,7 +3109,7 @@ TimeField::TimeField( Window* pParent, WinBits nWinStyle ) :
maLast( GetMax() )
{
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
Reformat();
}
@@ -3124,7 +3124,7 @@ TimeField::TimeField( Window* pParent, const ResId& rResId ) :
WinBits nStyle = ImplInitRes( rResId );
SpinField::ImplInit( pParent, nStyle );
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE ) )
@@ -3141,7 +3141,7 @@ void TimeField::ImplLoadRes( const ResId& rResId )
{
TimeFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( TIMEFIELD_FIRST & nMask )
{
@@ -3182,7 +3182,7 @@ long TimeField::PreNotify( NotifyEvent& rNEvt )
long TimeField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -3192,7 +3192,7 @@ long TimeField::Notify( NotifyEvent& rNEvt )
else
{
Time aTime( 0, 0, 0 );
- if ( ImplTimeGetValue( GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), FALSE ) )
+ if ( ImplTimeGetValue( GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), sal_False ) )
// even with strict text analysis, our text is a valid time -> do a complete
// reformat
Reformat();
@@ -3221,7 +3221,7 @@ void TimeField::DataChanged( const DataChangedEvent& rDCEvt )
void TimeField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -3229,7 +3229,7 @@ void TimeField::Modify()
void TimeField::Up()
{
- ImplTimeSpinArea( TRUE );
+ ImplTimeSpinArea( sal_True );
SpinField::Up();
}
@@ -3237,7 +3237,7 @@ void TimeField::Up()
void TimeField::Down()
{
- ImplTimeSpinArea( FALSE );
+ ImplTimeSpinArea( sal_False );
SpinField::Down();
}
@@ -3266,40 +3266,40 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat )
case EXTTIMEF_24H_SHORT:
{
SetTimeFormat( HOUR_24 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_NONE );
}
break;
case EXTTIMEF_24H_LONG:
{
SetTimeFormat( HOUR_24 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_SEC );
}
break;
case EXTTIMEF_12H_SHORT:
{
SetTimeFormat( HOUR_12 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_NONE );
}
break;
case EXTTIMEF_12H_LONG:
{
SetTimeFormat( HOUR_12 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_SEC );
}
break;
case EXTTIMEF_DURATION_SHORT:
{
- SetDuration( TRUE );
+ SetDuration( sal_True );
SetFormat( TIMEF_NONE );
}
break;
case EXTTIMEF_DURATION_LONG:
{
- SetDuration( TRUE );
+ SetDuration( sal_True );
SetFormat( TIMEF_SEC );
}
break;
@@ -3317,7 +3317,7 @@ TimeBox::TimeBox( Window* pParent, WinBits nWinStyle ) :
ComboBox( pParent, nWinStyle )
{
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
Reformat();
}
@@ -3330,7 +3330,7 @@ TimeBox::TimeBox( Window* pParent, const ResId& rResId ) :
WinBits nStyle = ImplInitRes( rResId );
ComboBox::ImplInit( pParent, nStyle );
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
ComboBox::ImplLoadRes( rResId );
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
@@ -3365,7 +3365,7 @@ long TimeBox::PreNotify( NotifyEvent& rNEvt )
long TimeBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -3393,7 +3393,7 @@ void TimeBox::DataChanged( const DataChangedEvent& rDCEvt )
void TimeBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -3402,21 +3402,21 @@ void TimeBox::Modify()
void TimeBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplTimeReformat( GetEntry( i ), aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
TimeFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void TimeBox::InsertTime( const Time& rTime, USHORT nPos )
+void TimeBox::InsertTime( const Time& rTime, sal_uInt16 nPos )
{
Time aTime = rTime;
if ( aTime > GetMax() )
@@ -3424,12 +3424,12 @@ void TimeBox::InsertTime( const Time& rTime, USHORT nPos )
else if ( aTime < GetMin() )
aTime = GetMin();
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( GetFormat() == TIMEF_SEC )
- bSec = TRUE;
+ bSec = sal_True;
if ( GetFormat() == TIMEF_100TH_SEC || GetFormat() == TIMEF_SEC_CS )
- bSec = b100Sec = TRUE;
+ bSec = b100Sec = sal_True;
ComboBox::InsertEntry( ImplGetLocaleDataWrapper().getTime( aTime, bSec, b100Sec ), nPos );
}
@@ -3437,18 +3437,18 @@ void TimeBox::InsertTime( const Time& rTime, USHORT nPos )
void TimeBox::RemoveTime( const Time& rTime )
{
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( GetFormat() == TIMEF_SEC )
- bSec = TRUE;
+ bSec = sal_True;
if ( GetFormat() == TIMEF_100TH_SEC || TIMEF_SEC_CS )
- bSec = b100Sec = TRUE;
+ bSec = b100Sec = sal_True;
ComboBox::RemoveEntry( ImplGetLocaleDataWrapper().getTime( rTime, bSec, b100Sec ) );
}
// -----------------------------------------------------------------------
-Time TimeBox::GetTime( USHORT nPos ) const
+Time TimeBox::GetTime( sal_uInt16 nPos ) const
{
Time aTime( 0, 0, 0 );
ImplTimeGetValue( ComboBox::GetEntry( nPos ), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() );
@@ -3457,13 +3457,13 @@ Time TimeBox::GetTime( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT TimeBox::GetTimePos( const Time& rTime ) const
+sal_uInt16 TimeBox::GetTimePos( const Time& rTime ) const
{
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( GetFormat() == TIMEF_SEC )
- bSec = TRUE;
+ bSec = sal_True;
if ( GetFormat() == TIMEF_100TH_SEC || TIMEF_SEC_CS )
- bSec = b100Sec = TRUE;
+ bSec = b100Sec = sal_True;
return ComboBox::GetEntryPos( ImplGetLocaleDataWrapper().getTime( rTime, bSec, b100Sec ) );
}
diff --git a/vcl/source/control/fixbrd.cxx b/vcl/source/control/fixbrd.cxx
index b519174f95d1..cc621e16175d 100644
--- a/vcl/source/control/fixbrd.cxx
+++ b/vcl/source/control/fixbrd.cxx
@@ -41,7 +41,7 @@
void FixedBorder::ImplInit( Window* pParent, WinBits nStyle )
{
mnType = FIXEDBORDER_TYPE_DOUBLEOUT;
- mbTransparent = TRUE;
+ mbTransparent = sal_True;
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
@@ -66,18 +66,18 @@ void FixedBorder::ImplInitSettings()
!(pParent->GetStyle() & WB_CLIPCHILDREN) ) &&
!IsControlBackground() && mbTransparent )
{
- SetMouseTransparent( TRUE );
- EnableChildTransparentMode( TRUE );
+ SetMouseTransparent( sal_True );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- SetMouseTransparent( FALSE );
- EnableChildTransparentMode( FALSE );
+ SetMouseTransparent( sal_False );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -116,12 +116,12 @@ FixedBorder::~FixedBorder()
// -----------------------------------------------------------------------
-void FixedBorder::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedBorder::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect( rPos, rSize );
- USHORT nBorderStyle = mnType;
+ sal_uInt16 nBorderStyle = mnType;
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
@@ -159,7 +159,7 @@ void FixedBorder::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedBorder::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -214,7 +214,7 @@ void FixedBorder::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void FixedBorder::SetTransparent( BOOL bTransparent )
+void FixedBorder::SetTransparent( sal_Bool bTransparent )
{
if ( mbTransparent != bTransparent )
{
@@ -226,7 +226,7 @@ void FixedBorder::SetTransparent( BOOL bTransparent )
// -----------------------------------------------------------------------
-void FixedBorder::SetBorderType( USHORT nType )
+void FixedBorder::SetBorderType( sal_uInt16 nType )
{
if ( mnType != nType )
{
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index f73cf008a5e5..db92cd0b09af 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -94,7 +94,7 @@ void FixedText::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -121,8 +121,8 @@ const Color& FixedText::GetCanonicalTextColor( const StyleSettings& _rStyle ) co
// -----------------------------------------------------------------------
-void FixedText::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void FixedText::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -131,16 +131,16 @@ void FixedText::ImplInitSettings( BOOL bFont,
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -182,7 +182,7 @@ FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessi
ImplInit( pParent, nStyle );
ImplLoadRes( rResId );
if ( bDisableAccessibleLabelForRelation )
- ImplGetWindowImpl()->mbDisableAccessibleLabelForRelation = TRUE;
+ ImplGetWindowImpl()->mbDisableAccessibleLabelForRelation = sal_True;
if ( !(nStyle & WB_HIDE) )
Show();
@@ -190,9 +190,9 @@ FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessi
// -----------------------------------------------------------------------
-USHORT FixedText::ImplGetTextStyle( WinBits nWinStyle )
+sal_uInt16 FixedText::ImplGetTextStyle( WinBits nWinStyle )
{
- USHORT nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_ENDELLIPSIS;
+ sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_ENDELLIPSIS;
if( ! (nWinStyle & WB_NOMULTILINE) )
nTextStyle |= TEXT_DRAW_MULTILINE;
@@ -223,7 +223,7 @@ USHORT FixedText::ImplGetTextStyle( WinBits nWinStyle )
// -----------------------------------------------------------------------
-void FixedText::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedText::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize,
bool bFillLayout
) const
@@ -231,7 +231,7 @@ void FixedText::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
Point aPos = rPos;
if ( nWinStyle & WB_EXTRAOFFSET )
@@ -279,9 +279,9 @@ void FixedText::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -296,8 +296,8 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetTextColor( GetTextColor() );
pDev->SetTextFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
+ sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
if ( bBorder || bBackground )
{
Rectangle aRect( aPos, aSize );
@@ -343,24 +343,24 @@ void FixedText::StateChanged( StateChangedType nType )
if ( (GetPrevStyle() & FIXEDTEXT_VIEW_STYLE) !=
(GetStyle() & FIXEDTEXT_VIEW_STYLE) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
}
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -376,7 +376,7 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -385,7 +385,7 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt )
Size FixedText::CalcMinimumTextSize( Control const *pControl, long nMaxWidth )
{
- USHORT nStyle = ImplGetTextStyle( pControl->GetStyle() );
+ sal_uInt16 nStyle = ImplGetTextStyle( pControl->GetStyle() );
if ( !( pControl->GetStyle() & WB_NOLABEL ) )
nStyle |= TEXT_DRAW_MNEMONIC;
@@ -434,7 +434,7 @@ void FixedLine::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -461,8 +461,8 @@ const Color& FixedLine::GetCanonicalTextColor( const StyleSettings& _rStyle ) co
// -----------------------------------------------------------------------
-void FixedLine::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void FixedLine::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -471,16 +471,16 @@ void FixedLine::ImplInitSettings( BOOL bFont,
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -543,7 +543,7 @@ void FixedLine::ImplDraw( bool bLayout )
}
else
{
- USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( (nWinStyle & WB_CENTER) )
@@ -609,7 +609,7 @@ void FixedLine::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void FixedLine::Draw( OutputDevice*, const Point&, const Size&, ULONG )
+void FixedLine::Draw( OutputDevice*, const Point&, const Size&, sal_uLong )
{
}
@@ -645,17 +645,17 @@ void FixedLine::StateChanged( StateChangedType nType )
(nType == STATE_CHANGE_STYLE) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -671,7 +671,7 @@ void FixedLine::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -713,16 +713,16 @@ void FixedBitmap::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -737,7 +737,7 @@ void FixedBitmap::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_FIXEDBITMAP_BITMAP & nObjMask )
{
@@ -776,10 +776,10 @@ FixedBitmap::~FixedBitmap()
// -----------------------------------------------------------------------
-void FixedBitmap::ImplDraw( OutputDevice* pDev, ULONG /* nDrawFlags */,
+void FixedBitmap::ImplDraw( OutputDevice* pDev, sal_uLong /* nDrawFlags */,
const Point& rPos, const Size& rSize )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
Bitmap* pBitmap = &maBitmap;
Color aCol;
if( !!maBitmapHC )
@@ -829,7 +829,7 @@ void FixedBitmap::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -908,7 +908,7 @@ void FixedBitmap::SetBitmap( const Bitmap& rBitmap )
// -----------------------------------------------------------------------
-BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
+sal_Bool FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetBitmap( rBitmap );
@@ -918,8 +918,8 @@ BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
StateChanged( STATE_CHANGE_DATA );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -937,7 +937,7 @@ const Bitmap& FixedBitmap::GetModeBitmap( BmpColorMode eMode) const
void FixedImage::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
Control::ImplInit( pParent, nStyle, NULL );
ImplInitSettings();
}
@@ -958,16 +958,16 @@ void FixedImage::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -982,7 +982,7 @@ void FixedImage::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSC_FIXEDIMAGE_IMAGE & nObjMask )
{
@@ -1021,10 +1021,10 @@ FixedImage::~FixedImage()
// -----------------------------------------------------------------------
-void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
{
if ( !IsEnabled() )
@@ -1051,10 +1051,10 @@ void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
}
}
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
UserDrawEvent aUDEvt( pDev, Rectangle( rPos, rSize ), 0, nStyle );
UserDraw( aUDEvt );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
}
// -----------------------------------------------------------------------
@@ -1081,7 +1081,7 @@ void FixedImage::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1163,7 +1163,7 @@ void FixedImage::SetImage( const Image& rImage )
// -----------------------------------------------------------------------
-BOOL FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetImage( rImage );
@@ -1176,8 +1176,8 @@ BOOL FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index ecf00568e11f..5b09bf6bb3b5 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -50,8 +50,8 @@ void GroupBox::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
- SetMouseTransparent( TRUE );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ SetMouseTransparent( sal_True );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -78,8 +78,8 @@ const Color& GroupBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con
// -----------------------------------------------------------------------
-void GroupBox::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void GroupBox::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -90,16 +90,16 @@ void GroupBox::ImplInitSettings( BOOL bFont,
!(pParent->GetStyle() & WB_CLIPCHILDREN) ) &&
!IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -133,7 +133,7 @@ GroupBox::GroupBox( Window* pParent, const ResId& rResId ) :
// -----------------------------------------------------------------------
-void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout )
{
long nTop;
@@ -141,7 +141,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
XubString aText( GetText() );
Rectangle aRect( rPos, rSize );
- USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
if ( GetStyle() & WB_NOLABEL )
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
@@ -241,7 +241,7 @@ void GroupBox::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -291,17 +291,17 @@ void GroupBox::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -317,7 +317,7 @@ void GroupBox::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index bd0179ffe454..670d6dad0ada 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -57,7 +57,7 @@ using namespace ::com::sun::star;
// =======================================================================
-void ImplInitFieldSettings( Window* pWin, BOOL bFont, BOOL bForeground, BOOL bBackground )
+void ImplInitFieldSettings( Window* pWin, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
@@ -108,7 +108,7 @@ ImplEntryList::ImplEntryList( Window* pWindow )
mnLastSelected = LISTBOX_ENTRY_NOTFOUND;
mnSelectionAnchor = LISTBOX_ENTRY_NOTFOUND;
mnImages = 0;
- mbCallSelectionChangedHdl = TRUE;
+ mbCallSelectionChangedHdl = sal_True;
mnMRUCount = 0;
mnMaxMRUCount = 0;
@@ -126,7 +126,7 @@ ImplEntryList::~ImplEntryList()
void ImplEntryList::Clear()
{
mnImages = 0;
- for ( USHORT n = GetEntryCount(); n; )
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
delete pImplEntry;
@@ -136,7 +136,7 @@ void ImplEntryList::Clear()
// -----------------------------------------------------------------------
-void ImplEntryList::SelectEntry( USHORT nPos, BOOL bSelect )
+void ImplEntryList::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
{
ImplEntryType* pImplEntry = GetEntry( nPos );
if ( pImplEntry &&
@@ -162,7 +162,7 @@ uno::Reference< i18n::XCollator > ImplGetCollator (lang::Locale &rLocale)
return xCollator;
}
-USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort )
+sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, sal_Bool bSort )
{
if ( !!pNewEntry->maImage )
mnImages++;
@@ -177,11 +177,11 @@ USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL b
uno::Reference< i18n::XCollator > xCollator = ImplGetCollator(aLocale);
const XubString& rStr = pNewEntry->maStr;
- ULONG nLow, nHigh, nMid;
+ sal_uLong nLow, nHigh, nMid;
nHigh = Count();
- ImplEntryType* pTemp = GetEntry( (USHORT)(nHigh-1) );
+ ImplEntryType* pTemp = GetEntry( (sal_uInt16)(nHigh-1) );
try
{
@@ -199,12 +199,12 @@ USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL b
else
{
nLow = mnMRUCount;
- pTemp = (ImplEntryType*)GetEntry( (USHORT)nLow );
+ pTemp = (ImplEntryType*)GetEntry( (sal_uInt16)nLow );
eComp = (StringCompare)xCollator->compareString (rStr, pTemp->maStr);
if ( eComp != COMPARE_GREATER )
{
- Insert( pNewEntry, (ULONG)0 );
+ Insert( pNewEntry, (sal_uLong)0 );
}
else
{
@@ -242,17 +242,17 @@ USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL b
// garbage you wouldn't insert it. If the exception occured because the
// Collator implementation is garbage then give the user a chance to see
// his stuff
- Insert( pNewEntry, (ULONG)0 );
+ Insert( pNewEntry, (sal_uLong)0 );
}
}
- return (USHORT)GetPos( pNewEntry );
+ return (sal_uInt16)GetPos( pNewEntry );
}
// -----------------------------------------------------------------------
-void ImplEntryList::RemoveEntry( USHORT nPos )
+void ImplEntryList::RemoveEntry( sal_uInt16 nPos )
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::Remove( nPos );
if ( pImplEntry )
@@ -266,10 +266,10 @@ void ImplEntryList::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindEntry( const XubString& rString, BOOL bSearchMRUArea ) const
+sal_uInt16 ImplEntryList::FindEntry( const XubString& rString, sal_Bool bSearchMRUArea ) const
{
- USHORT nEntries = GetEntryCount();
- for ( USHORT n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ )
+ sal_uInt16 nEntries = GetEntryCount();
+ for ( sal_uInt16 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ )
{
ImplEntryType* pImplEntry = GetEntry( n );
String aComp( vcl::I18nHelper::filterFormattingChars( pImplEntry->maStr ) );
@@ -281,21 +281,21 @@ USHORT ImplEntryList::FindEntry( const XubString& rString, BOOL bSearchMRUArea )
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindMatchingEntry( const XubString& rStr, USHORT nStart, BOOL bForward, BOOL bLazy ) const
+sal_uInt16 ImplEntryList::FindMatchingEntry( const XubString& rStr, sal_uInt16 nStart, sal_Bool bForward, sal_Bool bLazy ) const
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nEntryCount = GetEntryCount();
if ( !bForward )
nStart++; // wird sofort dekrementiert
const vcl::I18nHelper& rI18nHelper = mpWindow->GetSettings().GetLocaleI18nHelper();
- for ( USHORT n = nStart; bForward ? ( n < nEntryCount ) : n; )
+ for ( sal_uInt16 n = nStart; bForward ? ( n < nEntryCount ) : n; )
{
if ( !bForward )
n--;
ImplEntryType* pImplEntry = GetEntry( n );
- BOOL bMatch = bLazy ? rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0 : ( rStr.Match( pImplEntry->maStr ) == STRING_MATCH );
+ sal_Bool bMatch = bLazy ? rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0 : ( rStr.Match( pImplEntry->maStr ) == STRING_MATCH );
if ( bMatch )
{
nPos = n;
@@ -311,10 +311,10 @@ USHORT ImplEntryList::FindMatchingEntry( const XubString& rStr, USHORT nStart, B
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindEntry( const void* pData ) const
+sal_uInt16 ImplEntryList::FindEntry( const void* pData ) const
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
- for ( USHORT n = GetEntryCount(); n; )
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
if ( pImplEntry->mpUserData == pData )
@@ -328,12 +328,12 @@ USHORT ImplEntryList::FindEntry( const void* pData ) const
// -----------------------------------------------------------------------
-long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, long i_nBeginHeight ) const
+long ImplEntryList::GetAddedHeight( sal_uInt16 i_nEndIndex, sal_uInt16 i_nBeginIndex, long i_nBeginHeight ) const
{
long nHeight = i_nBeginHeight;
- USHORT nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
- USHORT nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
+ sal_uInt16 nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
+ sal_uInt16 nEntryCount = GetEntryCount();
if( nStop != LISTBOX_ENTRY_NOTFOUND && nEntryCount != 0 )
{
// sanity check
@@ -342,7 +342,7 @@ long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, lo
if( nStart > nEntryCount-1 )
nStart = nEntryCount-1;
- USHORT nIndex = nStart;
+ sal_uInt16 nIndex = nStart;
while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
{
nHeight += GetEntryPtr( nIndex )-> mnHeight;
@@ -356,7 +356,7 @@ long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, lo
// -----------------------------------------------------------------------
-long ImplEntryList::GetEntryHeight( USHORT nPos ) const
+long ImplEntryList::GetEntryHeight( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? pImplEntry->mnHeight : 0;
@@ -364,7 +364,7 @@ long ImplEntryList::GetEntryHeight( USHORT nPos ) const
// -----------------------------------------------------------------------
-XubString ImplEntryList::GetEntryText( USHORT nPos ) const
+XubString ImplEntryList::GetEntryText( sal_uInt16 nPos ) const
{
XubString aEntryText;
ImplEntryType* pImplEntry = GetEntry( nPos );
@@ -375,9 +375,9 @@ XubString ImplEntryList::GetEntryText( USHORT nPos ) const
// -----------------------------------------------------------------------
-BOOL ImplEntryList::HasEntryImage( USHORT nPos ) const
+sal_Bool ImplEntryList::HasEntryImage( sal_uInt16 nPos ) const
{
- BOOL bImage = FALSE;
+ sal_Bool bImage = sal_False;
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
if ( pImplEntry )
bImage = !!pImplEntry->maImage;
@@ -386,7 +386,7 @@ BOOL ImplEntryList::HasEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-Image ImplEntryList::GetEntryImage( USHORT nPos ) const
+Image ImplEntryList::GetEntryImage( sal_uInt16 nPos ) const
{
Image aImage;
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
@@ -397,7 +397,7 @@ Image ImplEntryList::GetEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-void ImplEntryList::SetEntryData( USHORT nPos, void* pNewData )
+void ImplEntryList::SetEntryData( sal_uInt16 nPos, void* pNewData )
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
if ( pImplEntry )
@@ -406,7 +406,7 @@ void ImplEntryList::SetEntryData( USHORT nPos, void* pNewData )
// -----------------------------------------------------------------------
-void* ImplEntryList::GetEntryData( USHORT nPos ) const
+void* ImplEntryList::GetEntryData( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
return pImplEntry ? pImplEntry->mpUserData : NULL;
@@ -414,7 +414,7 @@ void* ImplEntryList::GetEntryData( USHORT nPos ) const
// -----------------------------------------------------------------------
-void ImplEntryList::SetEntryFlags( USHORT nPos, long nFlags )
+void ImplEntryList::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
if ( pImplEntry )
@@ -423,7 +423,7 @@ void ImplEntryList::SetEntryFlags( USHORT nPos, long nFlags )
// -----------------------------------------------------------------------
-long ImplEntryList::GetEntryFlags( USHORT nPos ) const
+long ImplEntryList::GetEntryFlags( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
return pImplEntry ? pImplEntry->mnFlags : 0;
@@ -431,10 +431,10 @@ long ImplEntryList::GetEntryFlags( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ImplEntryList::GetSelectEntryCount() const
+sal_uInt16 ImplEntryList::GetSelectEntryCount() const
{
- USHORT nSelCount = 0;
- for ( USHORT n = GetEntryCount(); n; )
+ sal_uInt16 nSelCount = 0;
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
if ( pImplEntry->mbIsSelected )
@@ -445,20 +445,20 @@ USHORT ImplEntryList::GetSelectEntryCount() const
// -----------------------------------------------------------------------
-XubString ImplEntryList::GetSelectEntry( USHORT nIndex ) const
+XubString ImplEntryList::GetSelectEntry( sal_uInt16 nIndex ) const
{
return GetEntryText( GetSelectEntryPos( nIndex ) );
}
// -----------------------------------------------------------------------
-USHORT ImplEntryList::GetSelectEntryPos( USHORT nIndex ) const
+sal_uInt16 ImplEntryList::GetSelectEntryPos( sal_uInt16 nIndex ) const
{
- USHORT nSelEntryPos = LISTBOX_ENTRY_NOTFOUND;
- USHORT nSel = 0;
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nSelEntryPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSel = 0;
+ sal_uInt16 nEntryCount = GetEntryCount();
- for ( USHORT n = 0; n < nEntryCount; n++ )
+ for ( sal_uInt16 n = 0; n < nEntryCount; n++ )
{
ImplEntryType* pImplEntry = GetEntry( n );
if ( pImplEntry->mbIsSelected )
@@ -477,22 +477,22 @@ USHORT ImplEntryList::GetSelectEntryPos( USHORT nIndex ) const
// -----------------------------------------------------------------------
-BOOL ImplEntryList::IsEntrySelected( const XubString& rStr ) const
+sal_Bool ImplEntryList::IsEntrySelected( const XubString& rStr ) const
{
return IsEntryPosSelected( FindEntry( rStr ) );
}
// -----------------------------------------------------------------------
-BOOL ImplEntryList::IsEntryPosSelected( USHORT nIndex ) const
+sal_Bool ImplEntryList::IsEntryPosSelected( sal_uInt16 nIndex ) const
{
ImplEntryType* pImplEntry = GetEntry( nIndex );
- return pImplEntry ? pImplEntry->mbIsSelected : FALSE;
+ return pImplEntry ? pImplEntry->mbIsSelected : sal_False;
}
// -----------------------------------------------------------------------
-bool ImplEntryList::IsEntrySelectable( USHORT nPos ) const
+bool ImplEntryList::IsEntrySelectable( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? ((pImplEntry->mnFlags & LISTBOX_ENTRY_FLAG_DISABLE_SELECTION) == 0) : true;
@@ -500,7 +500,7 @@ bool ImplEntryList::IsEntrySelectable( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindFirstSelectable( USHORT nPos, bool bForward /* = true */ )
+sal_uInt16 ImplEntryList::FindFirstSelectable( sal_uInt16 nPos, bool bForward /* = true */ )
{
if( IsEntrySelectable( nPos ) )
return nPos;
@@ -539,26 +539,26 @@ ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
mnBorder = 1;
mnSelectModifier = 0;
mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
- mbTrack = FALSE;
- mbImgsDiffSz = FALSE;
- mbTravelSelect = FALSE;
- mbTrackingSelect = FALSE;
- mbSelectionChanged = FALSE;
- mbMouseMoveSelect = FALSE;
- mbMulti = FALSE;
- mbStackMode = FALSE;
- mbGrabFocus = FALSE;
- mbUserDrawEnabled = FALSE;
- mbInUserDraw = FALSE;
- mbReadOnly = FALSE;
- mbHasFocusRect = FALSE;
- mbRight = ( nWinStyle & WB_RIGHT ) ? TRUE : FALSE;
- mbCenter = ( nWinStyle & WB_CENTER ) ? TRUE : FALSE;
- mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? TRUE : FALSE;
- mbSort = ( nWinStyle & WB_SORT ) ? TRUE : FALSE;
+ mbTrack = sal_False;
+ mbImgsDiffSz = sal_False;
+ mbTravelSelect = sal_False;
+ mbTrackingSelect = sal_False;
+ mbSelectionChanged = sal_False;
+ mbMouseMoveSelect = sal_False;
+ mbMulti = sal_False;
+ mbStackMode = sal_False;
+ mbGrabFocus = sal_False;
+ mbUserDrawEnabled = sal_False;
+ mbInUserDraw = sal_False;
+ mbReadOnly = sal_False;
+ mbHasFocusRect = sal_False;
+ mbRight = ( nWinStyle & WB_RIGHT ) ? sal_True : sal_False;
+ mbCenter = ( nWinStyle & WB_CENTER ) ? sal_True : sal_False;
+ mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? sal_True : sal_False;
+ mbSort = ( nWinStyle & WB_SORT ) ? sal_True : sal_False;
// pb: #106948# explicit mirroring for calc
- mbMirroring = FALSE;
+ mbMirroring = sal_False;
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
@@ -569,7 +569,7 @@ ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
SetTextFillColor();
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
ImplCalcMetrics();
}
@@ -582,7 +582,7 @@ ImplListBoxWindow::~ImplListBoxWindow()
// -----------------------------------------------------------------------
-void ImplListBoxWindow::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground )
+void ImplListBoxWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
ImplInitFieldSettings( this, bFont, bForeground, bBackground );
}
@@ -597,16 +597,16 @@ void ImplListBoxWindow::ImplCalcMetrics()
mnMaxImgTxtWidth= 0;
mnMaxImgHeight = 0;
- mnTextHeight = (USHORT)GetTextHeight();
+ mnTextHeight = (sal_uInt16)GetTextHeight();
mnMaxTxtHeight = mnTextHeight + mnBorder;
mnMaxHeight = mnMaxTxtHeight;
if ( maUserItemSize.Height() > mnMaxHeight )
- mnMaxHeight = (USHORT) maUserItemSize.Height();
+ mnMaxHeight = (sal_uInt16) maUserItemSize.Height();
if ( maUserItemSize.Width() > mnMaxWidth )
- mnMaxWidth= (USHORT) maUserItemSize.Width();
+ mnMaxWidth= (sal_uInt16) maUserItemSize.Width();
- for ( USHORT n = mpEntryList->GetEntryCount(); n; )
+ for ( sal_uInt16 n = mpEntryList->GetEntryCount(); n; )
{
ImplEntryType* pEntry = mpEntryList->GetMutableEntryPtr( --n );
ImplUpdateEntryMetrics( *pEntry );
@@ -633,7 +633,7 @@ void ImplListBoxWindow::Clear()
mnMaxImgHeight = 0;
mnTop = 0;
mnLeft = 0;
- mbImgsDiffSz = FALSE;
+ mbImgsDiffSz = sal_False;
ImplClearLayoutData();
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -653,8 +653,8 @@ void ImplListBoxWindow::SetUserItemSize( const Size& rSz )
struct ImplEntryMetrics
{
- BOOL bText;
- BOOL bImage;
+ sal_Bool bText;
+ sal_Bool bImage;
long nEntryWidth;
long nEntryHeight;
long nTextWidth;
@@ -667,7 +667,7 @@ struct ImplEntryMetrics
void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
{
ImplEntryMetrics aMetrics;
- aMetrics.bText = rEntry.maStr.Len() ? TRUE : FALSE;
+ aMetrics.bText = rEntry.maStr.Len() ? sal_True : sal_False;
aMetrics.bImage = !!rEntry.maImage;
aMetrics.nEntryWidth = 0;
aMetrics.nEntryHeight = 0;
@@ -695,7 +695,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
else
{
// normal single line case
- aMetrics.nTextWidth = (USHORT)GetTextWidth( rEntry.maStr );
+ aMetrics.nTextWidth = (sal_uInt16)GetTextWidth( rEntry.maStr );
if( aMetrics.nTextWidth > mnMaxTxtWidth )
mnMaxTxtWidth = aMetrics.nTextWidth;
aMetrics.nEntryWidth = mnMaxTxtWidth;
@@ -705,13 +705,13 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
if ( aMetrics.bImage )
{
Size aImgSz = rEntry.maImage.GetSizePixel();
- aMetrics.nImgWidth = (USHORT) CalcZoom( aImgSz.Width() );
- aMetrics.nImgHeight = (USHORT) CalcZoom( aImgSz.Height() );
+ aMetrics.nImgWidth = (sal_uInt16) CalcZoom( aImgSz.Width() );
+ aMetrics.nImgHeight = (sal_uInt16) CalcZoom( aImgSz.Height() );
if( mnMaxImgWidth && ( aMetrics.nImgWidth != mnMaxImgWidth ) )
- mbImgsDiffSz = TRUE;
+ mbImgsDiffSz = sal_True;
else if ( mnMaxImgHeight && ( aMetrics.nImgHeight != mnMaxImgHeight ) )
- mbImgsDiffSz = TRUE;
+ mbImgsDiffSz = sal_True;
if( aMetrics.nImgWidth > mnMaxImgWidth )
mnMaxImgWidth = aMetrics.nImgWidth;
@@ -753,19 +753,19 @@ void ImplListBoxWindow::ImplCallSelect()
if ( !IsTravelSelect() && GetEntryList()->GetMaxMRUCount() )
{
// Insert the selected entry as MRU, if not allready first MRU
- USHORT nSelected = GetEntryList()->GetSelectEntryPos( 0 );
- USHORT nMRUCount = GetEntryList()->GetMRUCount();
+ sal_uInt16 nSelected = GetEntryList()->GetSelectEntryPos( 0 );
+ sal_uInt16 nMRUCount = GetEntryList()->GetMRUCount();
String aSelected = GetEntryList()->GetEntryText( nSelected );
- USHORT nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, TRUE );
+ sal_uInt16 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, sal_True );
if ( nFirstMatchingEntryPos || !nMRUCount )
{
- BOOL bSelectNewEntry = FALSE;
+ sal_Bool bSelectNewEntry = sal_False;
if ( nFirstMatchingEntryPos < nMRUCount )
{
RemoveEntry( nFirstMatchingEntryPos );
nMRUCount--;
if ( nFirstMatchingEntryPos == nSelected )
- bSelectNewEntry = TRUE;
+ bSelectNewEntry = sal_True;
}
else if ( nMRUCount == GetEntryList()->GetMaxMRUCount() )
{
@@ -777,7 +777,7 @@ void ImplListBoxWindow::ImplCallSelect()
ImplEntryType* pNewEntry = new ImplEntryType( aSelected );
pNewEntry->mbIsSelected = bSelectNewEntry;
- GetEntryList()->InsertEntry( 0, pNewEntry, FALSE );
+ GetEntryList()->InsertEntry( 0, pNewEntry, sal_False );
ImplUpdateEntryMetrics( *pNewEntry );
GetEntryList()->SetMRUCount( ++nMRUCount );
SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 );
@@ -786,15 +786,15 @@ void ImplListBoxWindow::ImplCallSelect()
}
maSelectHdl.Call( NULL );
- mbSelectionChanged = FALSE;
+ mbSelectionChanged = sal_False;
}
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
+sal_uInt16 ImplListBoxWindow::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry )
{
ImplClearLayoutData();
- USHORT nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort );
+ sal_uInt16 nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort );
if( (GetStyle() & WB_WORDBREAK) )
pNewEntry->mnFlags |= LISTBOX_ENTRY_FLAG_MULTILINE;
@@ -805,7 +805,7 @@ USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::RemoveEntry( USHORT nPos )
+void ImplListBoxWindow::RemoveEntry( sal_uInt16 nPos )
{
ImplClearLayoutData();
mpEntryList->RemoveEntry( nPos );
@@ -816,7 +816,7 @@ void ImplListBoxWindow::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::SetEntryFlags( USHORT nPos, long nFlags )
+void ImplListBoxWindow::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
mpEntryList->SetEntryFlags( nPos, nFlags );
ImplEntryType* pEntry = mpEntryList->GetMutableEntryPtr( nPos );
@@ -831,7 +831,7 @@ void ImplListBoxWindow::ImplShowFocusRect()
if ( mbHasFocusRect )
HideFocus();
ShowFocus( maFocusRect );
- mbHasFocusRect = TRUE;
+ mbHasFocusRect = sal_True;
}
// -----------------------------------------------------------------------
@@ -841,18 +841,18 @@ void ImplListBoxWindow::ImplHideFocusRect()
if ( mbHasFocusRect )
{
HideFocus();
- mbHasFocusRect = FALSE;
+ mbHasFocusRect = sal_False;
}
}
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
+sal_uInt16 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
{
long nY = mnBorder;
- USHORT nSelect = mnTop;
+ sal_uInt16 nSelect = mnTop;
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
while( pEntry && rPoint.Y() > pEntry->mnHeight + nY )
{
@@ -867,16 +867,16 @@ USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
// -----------------------------------------------------------------------
-BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
+sal_Bool ImplListBoxWindow::IsVisible( sal_uInt16 i_nEntry ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( i_nEntry >= mnTop )
{
if( mpEntryList->GetAddedHeight( i_nEntry, mnTop ) <
PixelToLogic( GetSizePixel() ).Height() )
{
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -885,11 +885,11 @@ BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::GetLastVisibleEntry() const
+sal_uInt16 ImplListBoxWindow::GetLastVisibleEntry() const
{
- USHORT nPos = mnTop;
+ sal_uInt16 nPos = mnTop;
long nWindowHeight = GetSizePixel().Height();
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
long nDiff;
for( nDiff = 0; nDiff < nWindowHeight && nPos < nCount; nDiff = mpEntryList->GetAddedHeight( nPos, mnTop ) )
nPos++;
@@ -907,14 +907,14 @@ USHORT ImplListBoxWindow::GetLastVisibleEntry() const
void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbMouseMoveSelect = FALSE; // Nur bis zum ersten MouseButtonDown
+ mbMouseMoveSelect = sal_False; // Nur bis zum ersten MouseButtonDown
maQuickSelectionEngine.Reset();
if ( !IsReadOnly() )
{
if( rMEvt.GetClicks() == 1 )
{
- USHORT nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
+ sal_uInt16 nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
{
if ( !mbMulti && GetEntryList()->GetSelectEntryCount() )
@@ -923,9 +923,9 @@ void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
mnCurrentPos = nSelect;
- mbTrackingSelect = TRUE;
+ mbTrackingSelect = sal_True;
SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
if ( mbGrabFocus )
GrabFocus();
@@ -958,10 +958,10 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
SetTopEntry( 0 );
if ( mbStackMode ) // #87072#, #92323#
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rMEvt.GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
@@ -975,28 +975,28 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
{
if ( IsMouseMoveSelect() )
{
- USHORT nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
+ sal_uInt16 nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
if( nSelect == LISTBOX_ENTRY_NOTFOUND )
nSelect = mpEntryList->GetEntryCount() - 1;
nSelect = Min( nSelect, GetLastVisibleEntry() );
- nSelect = Min( nSelect, (USHORT) ( mpEntryList->GetEntryCount() - 1 ) );
+ nSelect = Min( nSelect, (sal_uInt16) ( mpEntryList->GetEntryCount() - 1 ) );
// Select only visible Entries with MouseMove, otherwise Tracking...
if ( IsVisible( nSelect ) &&
mpEntryList->IsEntrySelectable( nSelect ) &&
( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() || ( nSelect != GetEntryList()->GetSelectEntryPos( 0 ) ) ) )
{
- mbTrackingSelect = TRUE;
- if ( SelectEntries( nSelect, LET_TRACKING, FALSE, FALSE ) )
+ mbTrackingSelect = sal_True;
+ if ( SelectEntries( nSelect, LET_TRACKING, sal_False, sal_False ) )
{
if ( mbStackMode ) // #87072#
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rMEvt.GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
}
}
@@ -1024,14 +1024,14 @@ void ImplListBoxWindow::DeselectAll()
{
while ( GetEntryList()->GetSelectEntryCount() )
{
- USHORT nS = GetEntryList()->GetSelectEntryPos( 0 );
- SelectEntry( nS, FALSE );
+ sal_uInt16 nS = GetEntryList()->GetSelectEntryPos( 0 );
+ SelectEntry( nS, sal_False );
}
}
// -----------------------------------------------------------------------
-void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
+void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
{
if( (mpEntryList->IsEntryPosSelected( nPos ) != bSelect) && mpEntryList->IsEntrySelectable( nPos ) )
{
@@ -1041,16 +1041,16 @@ void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
if( !mbMulti )
{
// Selektierten Eintrag deselektieren
- USHORT nDeselect = GetEntryList()->GetSelectEntryPos( 0 );
+ sal_uInt16 nDeselect = GetEntryList()->GetSelectEntryPos( 0 );
if( nDeselect != LISTBOX_ENTRY_NOTFOUND )
{
- //SelectEntryPos( nDeselect, FALSE );
- GetEntryList()->SelectEntry( nDeselect, FALSE );
+ //SelectEntryPos( nDeselect, sal_False );
+ GetEntryList()->SelectEntry( nDeselect, sal_False );
if ( IsUpdateMode() && IsReallyVisible() )
- ImplPaint( nDeselect, TRUE );
+ ImplPaint( nDeselect, sal_True );
}
}
- mpEntryList->SelectEntry( nPos, TRUE );
+ mpEntryList->SelectEntry( nPos, sal_True );
mnCurrentPos = nPos;
if ( ( nPos != LISTBOX_ENTRY_NOTFOUND ) && IsUpdateMode() )
{
@@ -1058,7 +1058,7 @@ void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
if ( !IsVisible( nPos ) )
{
ImplClearLayoutData();
- USHORT nVisibleEntries = GetLastVisibleEntry()-mnTop;
+ sal_uInt16 nVisibleEntries = GetLastVisibleEntry()-mnTop;
if ( !nVisibleEntries || !IsReallyVisible() || ( nPos < GetTopEntry() ) )
{
Resize();
@@ -1073,46 +1073,46 @@ void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
}
else
{
- mpEntryList->SelectEntry( nPos, FALSE );
- ImplPaint( nPos, TRUE );
+ mpEntryList->SelectEntry( nPos, sal_False );
+ ImplPaint( nPos, sal_True );
}
- mbSelectionChanged = TRUE;
+ mbSelectionChanged = sal_True;
}
}
// -----------------------------------------------------------------------
-BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift, BOOL bCtrl )
+sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl )
{
- BOOL bFocusChanged = FALSE;
- BOOL bSelectionChanged = FALSE;
+ sal_Bool bFocusChanged = sal_False;
+ sal_Bool bSelectionChanged = sal_False;
if( IsEnabled() && mpEntryList->IsEntrySelectable( nSelect ) )
{
// Hier (Single-ListBox) kann nur ein Eintrag deselektiert werden
if( !mbMulti )
{
- USHORT nDeselect = mpEntryList->GetSelectEntryPos( 0 );
+ sal_uInt16 nDeselect = mpEntryList->GetSelectEntryPos( 0 );
if( nSelect != nDeselect )
{
- SelectEntry( nSelect, TRUE );
+ SelectEntry( nSelect, sal_True );
mpEntryList->SetLastSelected( nSelect );
- bFocusChanged = TRUE;
- bSelectionChanged = TRUE;
+ bFocusChanged = sal_True;
+ bSelectionChanged = sal_True;
}
}
// MultiListBox ohne Modifier
else if( mbSimpleMode && !bCtrl && !bShift )
{
- USHORT nEntryCount = mpEntryList->GetEntryCount();
- for ( USHORT nPos = 0; nPos < nEntryCount; nPos++ )
+ sal_uInt16 nEntryCount = mpEntryList->GetEntryCount();
+ for ( sal_uInt16 nPos = 0; nPos < nEntryCount; nPos++ )
{
- BOOL bSelect = nPos == nSelect;
+ sal_Bool bSelect = nPos == nSelect;
if ( mpEntryList->IsEntryPosSelected( nPos ) != bSelect )
{
SelectEntry( nPos, bSelect );
- bFocusChanged = TRUE;
- bSelectionChanged = TRUE;
+ bFocusChanged = sal_True;
+ bSelectionChanged = sal_True;
}
}
mpEntryList->SetLastSelected( nSelect );
@@ -1124,20 +1124,20 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
// Space fuer Selektionswechsel
if( !bShift && ( ( eLET == LET_KEYSPACE ) || ( eLET == LET_MBDOWN ) ) )
{
- BOOL bSelect = ( mbStackMode && IsMouseMoveSelect() ) ? TRUE : !mpEntryList->IsEntryPosSelected( nSelect );
+ sal_Bool bSelect = ( mbStackMode && IsMouseMoveSelect() ) ? sal_True : !mpEntryList->IsEntryPosSelected( nSelect );
if ( mbStackMode )
{
- USHORT n;
+ sal_uInt16 n;
if ( bSelect )
{
// All entries before nSelect must be selected...
for ( n = 0; n < nSelect; n++ )
- SelectEntry( n, TRUE );
+ SelectEntry( n, sal_True );
}
if ( !bSelect )
{
for ( n = nSelect+1; n < mpEntryList->GetEntryCount(); n++ )
- SelectEntry( n, FALSE );
+ SelectEntry( n, sal_False );
}
}
SelectEntry( nSelect, bSelect );
@@ -1145,16 +1145,16 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
mpEntryList->SetSelectionAnchor( mbStackMode ? 0 : nSelect );
if ( !mpEntryList->IsEntryPosSelected( nSelect ) )
mpEntryList->SetSelectionAnchor( LISTBOX_ENTRY_NOTFOUND );
- bFocusChanged = TRUE;
- bSelectionChanged = TRUE;
+ bFocusChanged = sal_True;
+ bSelectionChanged = sal_True;
}
else if( ( ( eLET == LET_TRACKING ) && ( nSelect != mnCurrentPos ) ) ||
( (bShift||mbStackMode) && ( ( eLET == LET_KEYMOVE ) || ( eLET == LET_MBDOWN ) ) ) )
{
mnCurrentPos = nSelect;
- bFocusChanged = TRUE;
+ bFocusChanged = sal_True;
- USHORT nAnchor = mpEntryList->GetSelectionAnchor();
+ sal_uInt16 nAnchor = mpEntryList->GetSelectionAnchor();
if( ( nAnchor == LISTBOX_ENTRY_NOTFOUND ) && ( mpEntryList->GetSelectEntryCount() || mbStackMode ) )
{
nAnchor = mbStackMode ? 0 : mpEntryList->GetSelectEntryPos( mpEntryList->GetSelectEntryCount() - 1 );
@@ -1162,40 +1162,40 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
if( nAnchor != LISTBOX_ENTRY_NOTFOUND )
{
// Alle Eintraege vom Anchor bis nSelect muessen selektiert sein
- USHORT nStart = Min( nSelect, nAnchor );
- USHORT nEnd = Max( nSelect, nAnchor );
- for ( USHORT n = nStart; n <= nEnd; n++ )
+ sal_uInt16 nStart = Min( nSelect, nAnchor );
+ sal_uInt16 nEnd = Max( nSelect, nAnchor );
+ for ( sal_uInt16 n = nStart; n <= nEnd; n++ )
{
if ( !mpEntryList->IsEntryPosSelected( n ) )
{
- SelectEntry( n, TRUE );
- bSelectionChanged = TRUE;
+ SelectEntry( n, sal_True );
+ bSelectionChanged = sal_True;
}
}
// Ggf. muss noch was deselektiert werden...
- USHORT nLast = mpEntryList->GetLastSelected();
+ sal_uInt16 nLast = mpEntryList->GetLastSelected();
if ( nLast != LISTBOX_ENTRY_NOTFOUND )
{
if ( ( nLast > nSelect ) && ( nLast > nAnchor ) )
{
- for ( USHORT n = nSelect+1; n <= nLast; n++ )
+ for ( sal_uInt16 n = nSelect+1; n <= nLast; n++ )
{
if ( mpEntryList->IsEntryPosSelected( n ) )
{
- SelectEntry( n, FALSE );
- bSelectionChanged = TRUE;
+ SelectEntry( n, sal_False );
+ bSelectionChanged = sal_True;
}
}
}
else if ( ( nLast < nSelect ) && ( nLast < nAnchor ) )
{
- for ( USHORT n = nLast; n < nSelect; n++ )
+ for ( sal_uInt16 n = nLast; n < nSelect; n++ )
{
if ( mpEntryList->IsEntryPosSelected( n ) )
{
- SelectEntry( n, FALSE );
- bSelectionChanged = TRUE;
+ SelectEntry( n, sal_False );
+ bSelectionChanged = sal_True;
}
}
}
@@ -1206,17 +1206,17 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
else if( eLET != LET_TRACKING )
{
ImplHideFocusRect();
- ImplPaint( nSelect, TRUE );
- bFocusChanged = TRUE;
+ ImplPaint( nSelect, sal_True );
+ bFocusChanged = sal_True;
}
}
else if( bShift )
{
- bFocusChanged = TRUE;
+ bFocusChanged = sal_True;
}
if( bSelectionChanged )
- mbSelectionChanged = TRUE;
+ mbSelectionChanged = sal_True;
if( bFocusChanged )
{
@@ -1239,7 +1239,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
Point aPoint;
Rectangle aRect( aPoint, GetOutputSizePixel() );
- BOOL bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() );
+ sal_Bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() );
if( rTEvt.IsTrackingCanceled() || rTEvt.IsTrackingEnded() ) // MouseButtonUp
{
@@ -1253,9 +1253,9 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
maCancelHdl.Call( NULL );
if ( !mbMulti )
{
- mbTrackingSelect = TRUE;
- SelectEntry( mnTrackingSaveSelection, TRUE );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_True;
+ SelectEntry( mnTrackingSaveSelection, sal_True );
+ mbTrackingSelect = sal_False;
if ( mnTrackingSaveSelection != LISTBOX_ENTRY_NOTFOUND )
{
long nHeightDiff = mpEntryList->GetAddedHeight( mnCurrentPos, mnTop, 0 );
@@ -1268,23 +1268,23 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
}
}
- mbTrack = FALSE;
+ mbTrack = sal_False;
}
else
{
- BOOL bTrackOrQuickClick = mbTrack;
+ sal_Bool bTrackOrQuickClick = mbTrack;
if( !mbTrack )
{
if ( bInside )
{
- mbTrack = TRUE;
+ mbTrack = sal_True;
}
// Folgender Fall tritt nur auf, wenn man ganz kurz die Maustaste drueckt
if( rTEvt.IsTrackingEnded() && mbTrack )
{
- bTrackOrQuickClick = TRUE;
- mbTrack = FALSE;
+ bTrackOrQuickClick = sal_True;
+ mbTrack = sal_False;
}
}
@@ -1292,10 +1292,10 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
MouseEvent aMEvt = rTEvt.GetMouseEvent();
Point aPt( aMEvt.GetPosPixel() );
- BOOL bShift = aMEvt.IsShift();
- BOOL bCtrl = aMEvt.IsMod1();
+ sal_Bool bShift = aMEvt.IsShift();
+ sal_Bool bCtrl = aMEvt.IsMod1();
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
if( aPt.Y() < 0 )
{
if ( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
@@ -1309,43 +1309,43 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSelect = Min( (USHORT)(mnCurrentPos+1), (USHORT)(mpEntryList->GetEntryCount()-1) );
+ nSelect = Min( (sal_uInt16)(mnCurrentPos+1), (sal_uInt16)(mpEntryList->GetEntryCount()-1) );
if( nSelect >= GetLastVisibleEntry() )
SetTopEntry( mnTop+1 );
}
}
else
{
- nSelect = (USHORT) ( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + (USHORT) mnTop;
+ nSelect = (sal_uInt16) ( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + (sal_uInt16) mnTop;
nSelect = Min( nSelect, GetLastVisibleEntry() );
- nSelect = Min( nSelect, (USHORT) ( mpEntryList->GetEntryCount() - 1 ) );
+ nSelect = Min( nSelect, (sal_uInt16) ( mpEntryList->GetEntryCount() - 1 ) );
}
if ( bInside )
{
if ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() )
{
- mbTrackingSelect = TRUE;
+ mbTrackingSelect = sal_True;
if ( SelectEntries( nSelect, LET_TRACKING, bShift, bCtrl ) )
{
if ( mbStackMode ) // #87734# (#87072#)
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rTEvt.GetMouseEvent().GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
}
}
else
{
if ( !mbMulti && GetEntryList()->GetSelectEntryCount() )
{
- mbTrackingSelect = TRUE;
- SelectEntry( GetEntryList()->GetSelectEntryPos( 0 ), FALSE );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_True;
+ SelectEntry( GetEntryList()->GetSelectEntryPos( 0 ), sal_False );
+ mbTrackingSelect = sal_False;
}
else if ( mbStackMode )
{
@@ -1353,32 +1353,32 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( ( rTEvt.GetMouseEvent().GetPosPixel().Y() < 0 ) || ( rTEvt.GetMouseEvent().GetPosPixel().Y() > GetOutputSizePixel().Height() ) )
{
- BOOL bSelectionChanged = FALSE;
+ sal_Bool bSelectionChanged = sal_False;
if ( ( rTEvt.GetMouseEvent().GetPosPixel().Y() < 0 )
&& !mnCurrentPos )
{
if ( mpEntryList->IsEntryPosSelected( 0 ) )
{
- SelectEntry( 0, FALSE );
- bSelectionChanged = TRUE;
+ SelectEntry( 0, sal_False );
+ bSelectionChanged = sal_True;
nSelect = LISTBOX_ENTRY_NOTFOUND;
}
}
else
{
- mbTrackingSelect = TRUE;
+ mbTrackingSelect = sal_True;
bSelectionChanged = SelectEntries( nSelect, LET_TRACKING, bShift, bCtrl );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
}
if ( bSelectionChanged )
{
- mbSelectionChanged = TRUE;
- mbTravelSelect = TRUE;
+ mbSelectionChanged = sal_True;
+ mbTravelSelect = sal_True;
mnSelectModifier = rTEvt.GetMouseEvent().GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
}
@@ -1416,18 +1416,18 @@ void ImplListBoxWindow::KeyInput( const KeyEvent& rKEvt )
#define IMPL_SELECT_UP 1
#define IMPL_SELECT_DOWN 2
-BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
+sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
// zu selektierender Eintrag
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
LB_EVENT_TYPE eLET = LET_KEYMOVE;
KeyCode aKeyCode = rKEvt.GetKeyCode();
- BOOL bShift = aKeyCode.IsShift();
- BOOL bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
- BOOL bMod2 = aKeyCode.IsMod2();
- BOOL bDone = FALSE;
+ sal_Bool bShift = aKeyCode.IsShift();
+ sal_Bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
+ sal_Bool bMod2 = aKeyCode.IsMod2();
+ sal_Bool bDone = sal_False;
switch( aKeyCode.GetCode() )
{
@@ -1453,7 +1453,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect < mnTop ) )
SetTopEntry( mnTop-1 );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1480,7 +1480,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect >= GetLastVisibleEntry() ) )
SetTopEntry( mnTop+1 );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1490,7 +1490,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
if ( IsReadOnly() )
{
- USHORT nCurVis = GetLastVisibleEntry() - mnTop +1;
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop +1;
SetTopEntry( ( mnTop > nCurVis ) ?
(mnTop-nCurVis) : 0 );
}
@@ -1504,14 +1504,14 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
if( mnCurrentPos == mnTop )
{
- USHORT nCurVis = GetLastVisibleEntry() - mnTop +1;
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop +1;
SetTopEntry( ( mnTop > nCurVis ) ? ( mnTop-nCurVis+1 ) : 0 );
}
// find first selectable starting from mnTop looking foreward
nSelect = mpEntryList->FindFirstSelectable( mnTop, true );
}
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1531,21 +1531,21 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
}
else if ( (mnCurrentPos+1) < mpEntryList->GetEntryCount() )
{
- USHORT nCount = mpEntryList->GetEntryCount();
- USHORT nCurVis = GetLastVisibleEntry() - mnTop;
- USHORT nTmp = Min( nCurVis, nCount );
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop;
+ sal_uInt16 nTmp = Min( nCurVis, nCount );
nTmp += mnTop - 1;
if( mnCurrentPos == nTmp && mnCurrentPos != nCount - 1 )
{
long nTmp2 = Min( (long)(nCount-nCurVis), (long)((long)mnTop+(long)nCurVis-1) );
nTmp2 = Max( (long)0 , nTmp2 );
- nTmp = (USHORT)(nTmp2+(nCurVis-1) );
- SetTopEntry( (USHORT)nTmp2 );
+ nTmp = (sal_uInt16)(nTmp2+(nCurVis-1) );
+ SetTopEntry( (sal_uInt16)nTmp2 );
}
// find first selectable starting from nTmp looking backwards
nSelect = mpEntryList->FindFirstSelectable( nTmp, false );
}
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1565,7 +1565,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( mnTop != 0 )
SetTopEntry( 0 );
- bDone = TRUE;
+ bDone = sal_True;
}
}
maQuickSelectionEngine.Reset();
@@ -1586,13 +1586,13 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
}
else if ( (mnCurrentPos+1) < mpEntryList->GetEntryCount() )
{
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
nSelect = mpEntryList->FindFirstSelectable( nCount - 1, false );
- USHORT nCurVis = GetLastVisibleEntry() - mnTop + 1;
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop + 1;
if( nCount > nCurVis )
SetTopEntry( nCount - nCurVis );
}
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1603,7 +1603,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( !bCtrl && !bMod2 )
{
ScrollHorz( -HORZ_SCROLL );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1614,7 +1614,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( !bCtrl && !bMod2 )
{
ScrollHorz( HORZ_SCROLL );
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1626,7 +1626,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- bDone = FALSE; // RETURN nicht abfangen.
+ bDone = sal_False; // RETURN nicht abfangen.
}
maQuickSelectionEngine.Reset();
}
@@ -1641,7 +1641,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
nSelect = mnCurrentPos;
eLET = LET_KEYSPACE;
}
- bDone = TRUE;
+ bDone = sal_True;
}
maQuickSelectionEngine.Reset();
}
@@ -1652,12 +1652,12 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( bCtrl && mbMulti )
{
// paint only once
- BOOL bUpdates = IsUpdateMode();
- SetUpdateMode( FALSE );
+ sal_Bool bUpdates = IsUpdateMode();
+ SetUpdateMode( sal_False );
- USHORT nEntryCount = mpEntryList->GetEntryCount();
- for( USHORT i = 0; i < nEntryCount; i++ )
- SelectEntry( i, TRUE );
+ sal_uInt16 nEntryCount = mpEntryList->GetEntryCount();
+ for( sal_uInt16 i = 0; i < nEntryCount; i++ )
+ SelectEntry( i, sal_True );
// restore update mode
SetUpdateMode( bUpdates );
@@ -1665,7 +1665,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
maQuickSelectionEngine.Reset();
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -1692,10 +1692,10 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
mnCurrentPos = nSelect;
if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
@@ -1705,10 +1705,10 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
namespace
{
- static ::vcl::StringEntryIdentifier lcl_getEntry( const ImplEntryList& _rList, USHORT _nPos, String& _out_entryText )
+ static ::vcl::StringEntryIdentifier lcl_getEntry( const ImplEntryList& _rList, sal_uInt16 _nPos, String& _out_entryText )
{
OSL_PRECOND( ( _nPos != LISTBOX_ENTRY_NOTFOUND ), "lcl_getEntry: invalid position!" );
- USHORT nEntryCount( _rList.GetEntryCount() );
+ sal_uInt16 nEntryCount( _rList.GetEntryCount() );
if ( _nPos >= nEntryCount )
_nPos = 0;
_out_entryText = _rList.GetEntryText( _nPos );
@@ -1718,10 +1718,10 @@ namespace
return reinterpret_cast< ::vcl::StringEntryIdentifier >( _nPos + 1 );
}
- static USHORT lcl_getEntryPos( ::vcl::StringEntryIdentifier _entry )
+ static sal_uInt16 lcl_getEntryPos( ::vcl::StringEntryIdentifier _entry )
{
// our pos is 0-based, but StringEntryIdentifier does not allow for a NULL
- return static_cast< USHORT >( reinterpret_cast< sal_Int64 >( _entry ) ) - 1;
+ return static_cast< sal_uInt16 >( reinterpret_cast< sal_Int64 >( _entry ) ) - 1;
}
}
@@ -1734,14 +1734,14 @@ namespace
// -----------------------------------------------------------------------
::vcl::StringEntryIdentifier ImplListBoxWindow::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const
{
- USHORT nNextPos = lcl_getEntryPos( _currentEntry ) + 1;
+ sal_uInt16 nNextPos = lcl_getEntryPos( _currentEntry ) + 1;
return lcl_getEntry( *GetEntryList(), nNextPos, _out_entryText );
}
// -----------------------------------------------------------------------
void ImplListBoxWindow::SelectEntry( ::vcl::StringEntryIdentifier _entry )
{
- USHORT nSelect = lcl_getEntryPos( _entry );
+ sal_uInt16 nSelect = lcl_getEntryPos( _entry );
if ( mpEntryList->IsEntryPosSelected( nSelect ) )
{
// ignore that. This method is a callback from the QuickSelectionEngine, which means the user attempted
@@ -1759,18 +1759,18 @@ void ImplListBoxWindow::SelectEntry( ::vcl::StringEntryIdentifier _entry )
// actually select
mnCurrentPos = nSelect;
- if ( SelectEntries( nSelect, LET_KEYMOVE, FALSE, FALSE ) )
+ if ( SelectEntries( nSelect, LET_KEYMOVE, sal_False, sal_False ) )
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = 0;
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
// -----------------------------------------------------------------------
-void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
+void ImplListBoxWindow::ImplPaint( sal_uInt16 nPos, sal_Bool bErase, bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1793,7 +1793,7 @@ void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
}
else
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
if( !IsEnabled() )
SetTextColor( rStyleSettings.GetDisableColor() );
SetTextFillColor();
@@ -1804,25 +1804,25 @@ void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
if ( IsUserDrawEnabled() )
{
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
mnUserDrawEntry = nPos;
aRect.Left() -= mnLeft;
if ( nPos < GetEntryList()->GetMRUCount() )
nPos = GetEntryList()->FindEntry( GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<USHORT>(nPos - GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - GetEntryList()->GetMRUCount());
UserDrawEvent aUDEvt( this, aRect, nPos, 0 );
maUserDrawHdl.Call( &aUDEvt );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
}
else
{
- DrawEntry( nPos, TRUE, TRUE, FALSE, bLayout );
+ DrawEntry( nPos, sal_True, sal_True, sal_False, bLayout );
}
}
// -----------------------------------------------------------------------
-void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos, bool bLayout )
+void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos, bool bLayout )
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos );
if( ! pEntry )
@@ -1896,7 +1896,7 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
aTextRect.Left() -= ( aImgSz.Width() + IMG_TXT_DISTANCE );
}
- USHORT nDrawStyle = ImplGetTextStyle();
+ sal_uInt16 nDrawStyle = ImplGetTextStyle();
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_MULTILINE) )
nDrawStyle |= MULTILINE_ENTRY_DRAW_FLAGS;
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_DRAW_DISABLED) )
@@ -1937,22 +1937,22 @@ void ImplListBoxWindow::FillLayoutData() const
void ImplListBoxWindow::ImplDoPaint( const Rectangle& rRect, bool bLayout )
{
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
- BOOL bShowFocusRect = mbHasFocusRect;
+ sal_Bool bShowFocusRect = mbHasFocusRect;
if ( mbHasFocusRect && ! bLayout )
ImplHideFocusRect();
long nY = 0; // + mnBorder;
long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
- for( USHORT i = (USHORT)mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++ )
+ for( sal_uInt16 i = (sal_uInt16)mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++ )
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( i );
if( nY + pEntry->mnHeight >= rRect.Top() &&
nY <= rRect.Bottom() + mnMaxHeight )
{
- ImplPaint( i, FALSE, bLayout );
+ ImplPaint( i, sal_False, bLayout );
}
nY += pEntry->mnHeight;
}
@@ -1974,13 +1974,13 @@ void ImplListBoxWindow::Paint( const Rectangle& rRect )
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::GetDisplayLineCount() const
+sal_uInt16 ImplListBoxWindow::GetDisplayLineCount() const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
- USHORT nEntries = static_cast< USHORT >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
+ sal_uInt16 nEntries = static_cast< sal_uInt16 >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
if( nEntries > nCount-mnTop )
nEntries = nCount-mnTop;
@@ -1993,7 +1993,7 @@ void ImplListBoxWindow::Resize()
{
Control::Resize();
- BOOL bShowFocusRect = mbHasFocusRect;
+ sal_Bool bShowFocusRect = mbHasFocusRect;
if ( bShowFocusRect )
ImplHideFocusRect();
@@ -2013,7 +2013,7 @@ void ImplListBoxWindow::Resize()
void ImplListBoxWindow::GetFocus()
{
- USHORT nPos = mnCurrentPos;
+ sal_uInt16 nPos = mnCurrentPos;
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
long nHeightDiff = mpEntryList->GetAddedHeight( nPos, mnTop, 0 );
@@ -2046,14 +2046,14 @@ void ImplListBoxWindow::RequestHelp( const HelpEvent& rHEvt )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::SetTopEntry( USHORT nTop )
+void ImplListBoxWindow::SetTopEntry( sal_uInt16 nTop )
{
if( mpEntryList->GetEntryCount() == 0 )
return;
long nWHeight = PixelToLogic( GetSizePixel() ).Height();
- USHORT nLastEntry = mpEntryList->GetEntryCount()-1;
+ sal_uInt16 nLastEntry = mpEntryList->GetEntryCount()-1;
if( nTop > nLastEntry )
nTop = nLastEntry;
const ImplEntryType* pLast = mpEntryList->GetEntryPtr( nLastEntry );
@@ -2079,11 +2079,11 @@ void ImplListBoxWindow::SetTopEntry( USHORT nTop )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::ShowProminentEntry( USHORT nEntryPos )
+void ImplListBoxWindow::ShowProminentEntry( sal_uInt16 nEntryPos )
{
if( meProminentType == PROMINENT_MIDDLE )
{
- USHORT nPos = nEntryPos;
+ sal_uInt16 nPos = nEntryPos;
long nWHeight = PixelToLogic( GetSizePixel() ).Height();
while( nEntryPos > 0 && mpEntryList->GetAddedHeight( nPos+1, nEntryPos ) < nWHeight/2 )
nEntryPos--;
@@ -2121,7 +2121,7 @@ void ImplListBoxWindow::ScrollHorz( long n )
if ( nDiff )
{
ImplClearLayoutData();
- mnLeft = sal::static_int_cast<USHORT>(mnLeft + nDiff);
+ mnLeft = sal::static_int_cast<sal_uInt16>(mnLeft + nDiff);
Update();
ImplHideFocusRect();
Scroll( -nDiff, 0 );
@@ -2134,12 +2134,12 @@ void ImplListBoxWindow::ScrollHorz( long n )
// -----------------------------------------------------------------------
-Size ImplListBoxWindow::CalcSize( USHORT nMaxLines ) const
+Size ImplListBoxWindow::CalcSize( sal_uInt16 nMaxLines ) const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
Size aSz;
-// USHORT nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
+// sal_uInt16 nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
aSz.Height() = nMaxLines * mnMaxHeight;
aSz.Width() = mnMaxWidth + 2*mnBorder;
return aSz;
@@ -2147,7 +2147,7 @@ Size ImplListBoxWindow::CalcSize( USHORT nMaxLines ) const
// -----------------------------------------------------------------------
-Rectangle ImplListBoxWindow::GetBoundingRectangle( USHORT nItem ) const
+Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_uInt16 nItem ) const
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem );
Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() );
@@ -2165,7 +2165,7 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType )
if ( nType == STATE_CHANGE_ZOOM )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplCalcMetrics();
Invalidate();
}
@@ -2176,18 +2176,18 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType )
}
else if ( nType == STATE_CHANGE_CONTROLFONT )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplCalcMetrics();
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
ImplClearLayoutData();
@@ -2205,7 +2205,7 @@ void ImplListBoxWindow::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
ImplClearLayoutData();
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
ImplCalcMetrics();
Invalidate();
}
@@ -2213,9 +2213,9 @@ void ImplListBoxWindow::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::ImplGetTextStyle() const
+sal_uInt16 ImplListBoxWindow::ImplGetTextStyle() const
{
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
if ( mpEntryList->HasImages() )
nTextStyle |= TEXT_DRAW_LEFT;
@@ -2246,9 +2246,9 @@ ImplListBox::ImplListBox( Window* pParent, WinBits nWinStyle ) :
mpVScrollBar->SetScrollHdl( aLink );
mpHScrollBar->SetScrollHdl( aLink );
- mbVScroll = FALSE;
- mbHScroll = FALSE;
- mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? TRUE : FALSE;
+ mbVScroll = sal_False;
+ mbHScroll = sal_False;
+ mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? sal_True : sal_False;
maLBWindow.SetScrollHdl( LINK( this, ImplListBox, LBWindowScrolled ) );
maLBWindow.SetMRUChangedHdl( LINK( this, ImplListBox, MRUChanged ) );
@@ -2281,37 +2281,37 @@ void ImplListBox::Clear()
// -----------------------------------------------------------------------
-USHORT ImplListBox::InsertEntry( USHORT nPos, const XubString& rStr )
+sal_uInt16 ImplListBox::InsertEntry( sal_uInt16 nPos, const XubString& rStr )
{
ImplEntryType* pNewEntry = new ImplEntryType( rStr );
- USHORT nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
+ sal_uInt16 nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
StateChanged( STATE_CHANGE_DATA );
return nNewPos;
}
// -----------------------------------------------------------------------
-USHORT ImplListBox::InsertEntry( USHORT nPos, const Image& rImage )
+sal_uInt16 ImplListBox::InsertEntry( sal_uInt16 nPos, const Image& rImage )
{
ImplEntryType* pNewEntry = new ImplEntryType( rImage );
- USHORT nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
+ sal_uInt16 nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
StateChanged( STATE_CHANGE_DATA );
return nNewPos;
}
// -----------------------------------------------------------------------
-USHORT ImplListBox::InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage )
+sal_uInt16 ImplListBox::InsertEntry( sal_uInt16 nPos, const XubString& rStr, const Image& rImage )
{
ImplEntryType* pNewEntry = new ImplEntryType( rStr, rImage );
- USHORT nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
+ sal_uInt16 nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
StateChanged( STATE_CHANGE_DATA );
return nNewPos;
}
// -----------------------------------------------------------------------
-void ImplListBox::RemoveEntry( USHORT nPos )
+void ImplListBox::RemoveEntry( sal_uInt16 nPos )
{
maLBWindow.RemoveEntry( nPos );
StateChanged( STATE_CHANGE_DATA );
@@ -2319,21 +2319,21 @@ void ImplListBox::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-void ImplListBox::SetEntryFlags( USHORT nPos, long nFlags )
+void ImplListBox::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
maLBWindow.SetEntryFlags( nPos, nFlags );
}
// -----------------------------------------------------------------------
-long ImplListBox::GetEntryFlags( USHORT nPos ) const
+long ImplListBox::GetEntryFlags( sal_uInt16 nPos ) const
{
return maLBWindow.GetEntryList()->GetEntryFlags( nPos );
}
// -----------------------------------------------------------------------
-void ImplListBox::SelectEntry( USHORT nPos, BOOL bSelect )
+void ImplListBox::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
{
maLBWindow.SelectEntry( nPos, bSelect );
}
@@ -2397,7 +2397,7 @@ IMPL_LINK( ImplListBox, LBWindowScrolled, void*, EMPTYARG )
IMPL_LINK( ImplListBox, ScrollBarHdl, ScrollBar*, pSB )
{
- USHORT nPos = (USHORT) pSB->GetThumbPos();
+ sal_uInt16 nPos = (sal_uInt16) pSB->GetThumbPos();
if( pSB == mpVScrollBar )
SetTopEntry( nPos );
else if( pSB == mpHScrollBar )
@@ -2410,18 +2410,18 @@ IMPL_LINK( ImplListBox, ScrollBarHdl, ScrollBar*, pSB )
void ImplListBox::ImplCheckScrollBars()
{
- BOOL bArrange = FALSE;
+ sal_Bool bArrange = sal_False;
Size aOutSz = GetOutputSizePixel();
- USHORT nEntries = GetEntryList()->GetEntryCount();
- USHORT nMaxVisEntries = (USHORT) (aOutSz.Height() / GetEntryHeight());
+ sal_uInt16 nEntries = GetEntryList()->GetEntryCount();
+ sal_uInt16 nMaxVisEntries = (sal_uInt16) (aOutSz.Height() / GetEntryHeight());
// vert. ScrollBar
if( nEntries > nMaxVisEntries )
{
if( !mbVScroll )
- bArrange = TRUE;
- mbVScroll = TRUE;
+ bArrange = sal_True;
+ mbVScroll = sal_True;
// Ueberpruefung des rausgescrollten Bereichs
if( GetEntryList()->GetSelectEntryCount() == 1 &&
@@ -2433,15 +2433,15 @@ void ImplListBox::ImplCheckScrollBars()
else
{
if( mbVScroll )
- bArrange = TRUE;
- mbVScroll = FALSE;
+ bArrange = sal_True;
+ mbVScroll = sal_False;
SetTopEntry( 0 );
}
// horz. ScrollBar
if( mbAutoHScroll )
{
- long nWidth = (USHORT) aOutSz.Width();
+ long nWidth = (sal_uInt16) aOutSz.Width();
if ( mbVScroll )
nWidth -= mpVScrollBar->GetSizePixel().Width();
@@ -2449,16 +2449,16 @@ void ImplListBox::ImplCheckScrollBars()
if( nWidth < nMaxWidth )
{
if( !mbHScroll )
- bArrange = TRUE;
- mbHScroll = TRUE;
+ bArrange = sal_True;
+ mbHScroll = sal_True;
if ( !mbVScroll ) // ggf. brauchen wir jetzt doch einen
{
- nMaxVisEntries = (USHORT) ( ( aOutSz.Height() - mpHScrollBar->GetSizePixel().Height() ) / GetEntryHeight() );
+ nMaxVisEntries = (sal_uInt16) ( ( aOutSz.Height() - mpHScrollBar->GetSizePixel().Height() ) / GetEntryHeight() );
if( nEntries > nMaxVisEntries )
{
- bArrange = TRUE;
- mbVScroll = TRUE;
+ bArrange = sal_True;
+ mbVScroll = sal_True;
// Ueberpruefung des rausgescrollten Bereichs
if( GetEntryList()->GetSelectEntryCount() == 1 &&
@@ -2470,15 +2470,15 @@ void ImplListBox::ImplCheckScrollBars()
}
// Ueberpruefung des rausgescrollten Bereichs
- USHORT nMaxLI = (USHORT) (nMaxWidth - nWidth);
+ sal_uInt16 nMaxLI = (sal_uInt16) (nMaxWidth - nWidth);
if ( nMaxLI < GetLeftIndent() )
SetLeftIndent( nMaxLI );
}
else
{
if( mbHScroll )
- bArrange = TRUE;
- mbHScroll = FALSE;
+ bArrange = sal_True;
+ mbHScroll = sal_False;
SetLeftIndent( 0 );
}
}
@@ -2497,8 +2497,8 @@ void ImplListBox::ImplInitScrollBars()
if ( mbVScroll )
{
- USHORT nEntries = GetEntryList()->GetEntryCount();
- USHORT nVisEntries = (USHORT) (aOutSz.Height() / GetEntryHeight());
+ sal_uInt16 nEntries = GetEntryList()->GetEntryCount();
+ sal_uInt16 nVisEntries = (sal_uInt16) (aOutSz.Height() / GetEntryHeight());
mpVScrollBar->SetRangeMax( nEntries );
mpVScrollBar->SetVisibleSize( nVisEntries );
mpVScrollBar->SetPageSize( nVisEntries - 1 );
@@ -2507,7 +2507,7 @@ void ImplListBox::ImplInitScrollBars()
if ( mbHScroll )
{
mpHScrollBar->SetRangeMax( GetMaxEntryWidth() + HORZ_SCROLL );
- mpHScrollBar->SetVisibleSize( (USHORT)aOutSz.Width() );
+ mpHScrollBar->SetVisibleSize( (sal_uInt16)aOutSz.Width() );
mpHScrollBar->SetLineSize( HORZ_SCROLL );
mpHScrollBar->SetPageSize( aOutSz.Width() - HORZ_SCROLL );
}
@@ -2532,7 +2532,7 @@ void ImplListBox::ImplResizeControls()
// pb: #106948# explicit mirroring for calc
// Scrollbar on left or right side?
- BOOL bMirroring = maLBWindow.IsMirroring();
+ sal_Bool bMirroring = maLBWindow.IsMirroring();
Point aWinPos( bMirroring && mbVScroll ? nSBWidth : 0, 0 );
maLBWindow.SetPosSizePixel( aWinPos, aInnerSz );
@@ -2587,7 +2587,7 @@ void ImplListBox::StateChanged( StateChangedType nType )
}
else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) )
{
- BOOL bUpdate = IsUpdateMode();
+ sal_Bool bUpdate = IsUpdateMode();
maLBWindow.SetUpdateMode( bUpdate );
// mpHScrollBar->SetUpdateMode( bUpdate );
// mpVScrollBar->SetUpdateMode( bUpdate );
@@ -2673,15 +2673,15 @@ const Wallpaper& ImplListBox::GetDisplayBackground() const
// -----------------------------------------------------------------------
-BOOL ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
+sal_Bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( rCEvt.GetCommand() == COMMAND_WHEEL )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) )
{
- USHORT nKey = ( pData->GetDelta() < 0 ) ? KEY_DOWN : KEY_UP;
+ sal_uInt16 nKey = ( pData->GetDelta() < 0 ) ? KEY_DOWN : KEY_UP;
KeyEvent aKeyEvent( 0, KeyCode( nKey ) );
bDone = ProcessKeyInput( aKeyEvent );
}
@@ -2693,23 +2693,23 @@ BOOL ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
void ImplListBox::SetMRUEntries( const XubString& rEntries, xub_Unicode cSep )
{
- BOOL bChanges = GetEntryList()->GetMRUCount() ? TRUE : FALSE;
+ sal_Bool bChanges = GetEntryList()->GetMRUCount() ? sal_True : sal_False;
// Remove old MRU entries
- for ( USHORT n = GetEntryList()->GetMRUCount();n; )
+ for ( sal_uInt16 n = GetEntryList()->GetMRUCount();n; )
maLBWindow.RemoveEntry( --n );
- USHORT nMRUCount = 0;
- USHORT nEntries = rEntries.GetTokenCount( cSep );
- for ( USHORT nEntry = 0; nEntry < nEntries; nEntry++ )
+ sal_uInt16 nMRUCount = 0;
+ sal_uInt16 nEntries = rEntries.GetTokenCount( cSep );
+ for ( sal_uInt16 nEntry = 0; nEntry < nEntries; nEntry++ )
{
XubString aEntry = rEntries.GetToken( nEntry, cSep );
// Accept only existing entries
if ( GetEntryList()->FindEntry( aEntry ) != LISTBOX_ENTRY_NOTFOUND )
{
ImplEntryType* pNewEntry = new ImplEntryType( aEntry );
- maLBWindow.GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, FALSE );
- bChanges = TRUE;
+ maLBWindow.GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, sal_False );
+ bChanges = sal_True;
}
}
@@ -2726,7 +2726,7 @@ void ImplListBox::SetMRUEntries( const XubString& rEntries, xub_Unicode cSep )
XubString ImplListBox::GetMRUEntries( xub_Unicode cSep ) const
{
String aEntries;
- for ( USHORT n = 0; n < GetEntryList()->GetMRUCount(); n++ )
+ for ( sal_uInt16 n = 0; n < GetEntryList()->GetMRUCount(); n++ )
{
aEntries += GetEntryList()->GetEntryText( n );
if( n < ( GetEntryList()->GetMRUCount() - 1 ) )
@@ -2746,22 +2746,22 @@ ImplWin::ImplWin( Window* pParent, WinBits nWinStyle ) :
else
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
- mbInUserDraw = FALSE;
- mbUserDrawEnabled = FALSE;
+ mbInUserDraw = sal_False;
+ mbUserDrawEnabled = sal_False;
mnItemPos = LISTBOX_ENTRY_NOTFOUND;
}
// -----------------------------------------------------------------------
-BOOL ImplWin::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool ImplWin::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetImage( rImage );
else if( eMode == BMP_COLOR_HIGHCONTRAST )
maImageHC = rImage;
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2831,7 +2831,7 @@ void ImplWin::ImplDraw( bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( ! bLayout )
{
@@ -2858,11 +2858,11 @@ void ImplWin::ImplDraw( bool bLayout )
Point aPoint( -nLeft, -nTop );
Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() );
- BOOL bMouseOver = FALSE;
+ sal_Bool bMouseOver = sal_False;
if( GetParent() )
{
Window *pChild = GetParent()->GetWindow( WINDOW_FIRSTCHILD );
- while( pChild && (bMouseOver = pChild->IsMouseOver()) == FALSE )
+ while( pChild && (bMouseOver = pChild->IsMouseOver()) == sal_False )
pChild = pChild->GetWindow( WINDOW_NEXT );
}
@@ -2915,14 +2915,14 @@ void ImplWin::ImplDraw( bool bLayout )
if ( IsUserDrawEnabled() )
{
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
UserDrawEvent aUDEvt( this, maFocusRect, mnItemPos, 0 );
maUserDrawHdl.Call( &aUDEvt );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
}
else
{
- DrawEntry( TRUE, TRUE, FALSE, bLayout );
+ DrawEntry( sal_True, sal_True, sal_False, bLayout );
}
}
@@ -2935,15 +2935,15 @@ void ImplWin::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void ImplWin::DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos, bool bLayout )
+void ImplWin::DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos, bool bLayout )
{
long nBorder = 1;
Size aOutSz = GetOutputSizePixel();
- BOOL bImage = !!maImage;
+ sal_Bool bImage = !!maImage;
if( bDrawImage && bImage && !bLayout )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
Size aImgSz = maImage.GetSizePixel();
Point aPtImg( nBorder, ( ( aOutSz.Height() - aImgSz.Height() ) / 2 ) );
@@ -2970,7 +2970,7 @@ void ImplWin::DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImageP
if( bDrawText && maString.Len() )
{
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
if ( bDrawImage && bImage && !bLayout )
nTextStyle |= TEXT_DRAW_LEFT;
@@ -3049,7 +3049,7 @@ void ImplWin::LoseFocus()
ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) :
PushButton( pParent, nWinStyle ),
- mbDown ( FALSE )
+ mbDown ( sal_False )
{
}
@@ -3069,7 +3069,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& )
if( IsEnabled() )
{
MBDown();
- mbDown = TRUE;
+ mbDown = sal_True;
}
}
@@ -3080,7 +3080,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) :
{
mpImplLB = NULL;
mnDDLineCount = 0;
- mbAutoWidth = FALSE;
+ mbAutoWidth = sal_False;
mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND;
@@ -3105,7 +3105,7 @@ long ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if( !GetParent()->HasChildPathFocus( TRUE ) )
+ if( !GetParent()->HasChildPathFocus( sal_True ) )
EndPopupMode();
}
@@ -3114,7 +3114,7 @@ long ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
FloatingWindow::SetPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
@@ -3131,7 +3131,7 @@ void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth,
if ( nFlags & WINDOW_POSSIZE_Y )
aPos.Y() = nY;
- USHORT nIndex;
+ sal_uInt16 nIndex;
SetPosPixel( ImplCalcPos( this, Rectangle( aPos, GetParent()->GetSizePixel() ), FLOATWIN_POPUPMODE_DOWN, nIndex ) );
}
@@ -3166,7 +3166,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
- USHORT nLines = mpImplLB->GetEntryList()->GetEntryCount();
+ sal_uInt16 nLines = mpImplLB->GetEntryList()->GetEntryCount();
if ( mnDDLineCount && ( nLines > mnDDLineCount ) )
nLines = mnDDLineCount;
@@ -3220,7 +3220,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
// -----------------------------------------------------------------------
-void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
+void ImplListBoxFloatingWindow::StartFloat( sal_Bool bStartTracking )
{
if( !IsInPopupMode() )
{
@@ -3229,7 +3229,7 @@ void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
SetSizePixel( aFloatSz );
mpImplLB->SetSizePixel( GetOutputSizePixel() );
- USHORT nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 );
mnPopupModeStartSaveSelection = nPos;
Size aSz = GetParent()->GetSizePixel();
@@ -3260,7 +3260,7 @@ void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
mpImplLB->ShowProminentEntry( nPos );
if( bStartTracking )
- mpImplLB->GetMainWindow()->EnableMouseMoveSelect( TRUE );
+ mpImplLB->GetMainWindow()->EnableMouseMoveSelect( sal_True );
if ( mpImplLB->GetMainWindow()->IsGrabFocusAllowed() )
mpImplLB->GetMainWindow()->GrabFocus();
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 662efd407995..faeb460c46e4 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -95,9 +95,9 @@ namespace
// -----------------------------------------------------------------------
-void ImageControl::ImplDraw( OutputDevice& rDev, ULONG nDrawFlags, const Point& rPos, const Size& rSize ) const
+void ImageControl::ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
{
if ( !IsEnabled() )
@@ -119,7 +119,7 @@ void ImageControl::ImplDraw( OutputDevice& rDev, ULONG nDrawFlags, const Point&
return;
WinBits nWinStyle = GetStyle();
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
if ( !IsEnabled() )
nTextStyle |= TEXT_DRAW_DISABLE;
@@ -174,7 +174,7 @@ void ImageControl::Paint( const Rectangle& /*rRect*/ )
{
Window *pWin = GetWindow( WINDOW_BORDER );
- BOOL bFlat = (GetBorderStyle() == 2);
+ sal_Bool bFlat = (GetBorderStyle() == 2);
Rectangle aRect( Point(0,0), pWin->GetOutputSizePixel() );
Color oldLineCol = pWin->GetLineColor();
Color oldFillCol = pWin->GetFillColor();
@@ -193,7 +193,7 @@ void ImageControl::Paint( const Rectangle& /*rRect*/ )
}
// -----------------------------------------------------------------------
-void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
const Point aPos = pDev->LogicToPixel( rPos );
const Size aSize = pDev->LogicToPixel( rSize );
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 65fe11929d1e..aae78baa3fb7 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -53,9 +53,9 @@
// =======================================================================
-static BigInt ImplPower10( USHORT n )
+static BigInt ImplPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
BigInt nValue = 1;
for ( i=0; i < n; i++ )
@@ -66,7 +66,7 @@ static BigInt ImplPower10( USHORT n )
// -----------------------------------------------------------------------
-static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt &rNumber, USHORT nDigits, const String& rCurrSymbol, BOOL bShowThousandSep )
+static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt &rNumber, sal_uInt16 nDigits, const String& rCurrSymbol, sal_Bool bShowThousandSep )
{
DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
@@ -114,16 +114,16 @@ static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const
// -----------------------------------------------------------------------
-static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
- BOOL bStrictFormat, BOOL bThousandSep,
+static sal_Bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
+ sal_Bool bStrictFormat, sal_Bool bThousandSep,
const LocaleDataWrapper& rLocaleDataWrapper )
{
if ( !bStrictFormat )
- return FALSE;
+ return sal_False;
else
{
sal_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
@@ -131,28 +131,28 @@ static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
(bThousandSep && (cChar == rLocaleDataWrapper.getNumThousandSep())) ||
(cChar == rLocaleDataWrapper.getNumDecimalSep() ) ||
(cChar == '-') )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
}
// -----------------------------------------------------------------------
-static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
- BOOL bCurrency = FALSE )
+static sal_Bool ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
+ sal_Bool bCurrency = sal_False )
{
XubString aStr = rStr;
XubString aStr1;
XubString aStr2;
- USHORT nDecPos;
- BOOL bNegative = FALSE;
+ sal_uInt16 nDecPos;
+ sal_Bool bNegative = sal_False;
xub_StrLen i;
// Reaktion auf leeren String
if ( !rStr.Len() )
- return FALSE;
+ return sal_False;
// Fuehrende und nachfolgende Leerzeichen entfernen
aStr.EraseLeadingAndTrailingChars( ' ' );
@@ -172,7 +172,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
if ( bCurrency )
{
if ( (aStr.GetChar( 0 ) == '(') && (aStr.GetChar( aStr.Len()-1 ) == ')') )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( !bNegative )
{
for ( i=0; i < aStr.Len(); i++ )
@@ -181,24 +181,24 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
}
if ( !bNegative && bCurrency && aStr.Len() )
{
- USHORT nFormat = rLocaleDataWrapper.getCurrNegativeFormat();
+ sal_uInt16 nFormat = rLocaleDataWrapper.getCurrNegativeFormat();
if ( (nFormat == 3) || (nFormat == 6) ||
(nFormat == 7) || (nFormat == 10) )
{
- for ( i = (USHORT)(aStr.Len()-1); i > 0; i++ )
+ for ( i = (sal_uInt16)(aStr.Len()-1); i > 0; i++ )
{
if ( (aStr.GetChar( i ) >= '0') && (aStr.GetChar( i ) <= '9') )
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
@@ -208,7 +208,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
else
{
if ( aStr1.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
}
// Alle unerwuenschten Zeichen rauswerfen
@@ -228,7 +228,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
}
if ( !aStr1.Len() && !aStr2.Len() )
- return FALSE;
+ return sal_False;
if ( !aStr1.Len() )
aStr1.Insert( '0' );
@@ -236,11 +236,11 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
aStr1.Insert( '-', 0 );
// Nachkommateil zurechtstutzen und dabei runden
- BOOL bRound = FALSE;
+ sal_Bool bRound = sal_False;
if ( aStr2.Len() > nDecDigits )
{
if ( aStr2.GetChar( nDecDigits ) >= '5' )
- bRound = TRUE;
+ bRound = sal_True;
aStr2.Erase( nDecDigits );
}
if ( aStr2.Len() < nDecDigits )
@@ -261,38 +261,38 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
rValue = nValue;
- return TRUE;
+ return sal_True;
}
// =======================================================================
-static BOOL ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
- BOOL, BOOL bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper )
+static sal_Bool ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+ sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper )
{
// Es gibt hier kein sinnvolles StrictFormat, also alle
// Zeichen erlauben
- return ImplNumericProcessKeyInput( pEdit, rKEvt, FALSE, bUseThousandSep, rLocaleDataWrapper );
+ return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rLocaleDataWrapper );
}
// -----------------------------------------------------------------------
-inline BOOL ImplLongCurrencyGetValue( const XubString& rStr, BigInt& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper )
+inline sal_Bool ImplLongCurrencyGetValue( const XubString& rStr, BigInt& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper )
{
// Zahlenwert holen
- return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, TRUE );
+ return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, sal_True );
}
// -----------------------------------------------------------------------
-BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
- USHORT nDecDigits,
+sal_Bool ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
+ sal_uInt16 nDecDigits,
const LocaleDataWrapper& rLocaleDataWrapper, String& rOutStr,
LongCurrencyFormatter& rFormatter )
{
BigInt nValue;
- if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, TRUE ) )
- return TRUE;
+ if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, sal_True ) )
+ return sal_True;
else
{
BigInt nTempVal = nValue;
@@ -307,7 +307,7 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
if ( !rFormatter.GetErrorHdl().Call( &rFormatter ) )
{
rFormatter.mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
{
@@ -316,7 +316,7 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
}
rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
- return TRUE;
+ return sal_True;
}
}
@@ -333,7 +333,7 @@ void LongCurrencyFormatter::ImpInit()
mnCorrectedValue = 0;
mnDecimalDigits = 0;
mnType = FORMAT_LONGCURRENCY;
- mbThousandSep = TRUE;
+ mbThousandSep = sal_True;
SetDecimalDigits( 0 );
}
@@ -353,7 +353,7 @@ void LongCurrencyFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uLong nMask = pMgr->ReadLong();
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
@@ -362,7 +362,7 @@ void LongCurrencyFormatter::ImplLoadRes( const ResId& rResId )
mnMax = pMgr->ReadLong();
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
@@ -406,7 +406,7 @@ void LongCurrencyFormatter::SetValue( BigInt nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -431,7 +431,7 @@ void LongCurrencyFormatter::SetUserValue( BigInt nNewValue )
}
else
GetField()->SetText( aStr );
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
// -----------------------------------------------------------------------
@@ -465,7 +465,7 @@ void LongCurrencyFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplLongCurrencyReformat( GetField()->GetText(), mnMin, mnMax,
+ sal_Bool bOK = ImplLongCurrencyReformat( GetField()->GetText(), mnMin, mnMax,
GetDecimalDigits(), GetLocaleDataWrapper(), aStr, *this );
if ( !bOK )
return;
@@ -473,7 +473,7 @@ void LongCurrencyFormatter::Reformat()
if ( aStr.Len() )
{
GetField()->SetText( aStr );
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
ImplLongCurrencyGetValue( aStr, mnLastValue, GetDecimalDigits(), GetLocaleDataWrapper() );
}
else
@@ -505,7 +505,7 @@ void LongCurrencyFormatter::SetMax( BigInt nNewMax )
// -----------------------------------------------------------------------
-void LongCurrencyFormatter::SetUseThousandSep( BOOL b )
+void LongCurrencyFormatter::SetUseThousandSep( sal_Bool b )
{
mbThousandSep = b;
ReformatAll();
@@ -514,7 +514,7 @@ void LongCurrencyFormatter::SetUseThousandSep( BOOL b )
// -----------------------------------------------------------------------
-void LongCurrencyFormatter::SetDecimalDigits( USHORT nDigits )
+void LongCurrencyFormatter::SetDecimalDigits( sal_uInt16 nDigits )
{
// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
@@ -527,21 +527,21 @@ void LongCurrencyFormatter::SetDecimalDigits( USHORT nDigits )
// -----------------------------------------------------------------------
-USHORT LongCurrencyFormatter::GetDecimalDigits() const
+sal_uInt16 LongCurrencyFormatter::GetDecimalDigits() const
{
return mnDecimalDigits;
}
// -----------------------------------------------------------------------
-BOOL LongCurrencyFormatter::IsValueModified() const
+sal_Bool LongCurrencyFormatter::IsValueModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyValue();
else if ( GetValue() != mnFieldValue )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -549,7 +549,7 @@ BOOL LongCurrencyFormatter::IsValueModified() const
void LongCurrencyFormatter::SetEmptyValue()
{
GetField()->SetText( ImplGetSVEmptyStr() );
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
// -----------------------------------------------------------------------
@@ -578,7 +578,7 @@ void ImplNewLongCurrencyFieldValue( LongCurrencyField* pField, BigInt nNewValue
Selection aSelect = pField->GetSelection();
aSelect.Justify();
XubString aText = pField->GetText();
- BOOL bLastSelected = ((xub_StrLen)aSelect.Max() == aText.Len()) ? TRUE : FALSE;
+ sal_Bool bLastSelected = ((xub_StrLen)aSelect.Max() == aText.Len()) ? sal_True : sal_False;
BigInt nOldLastValue = pField->mnLastValue;
pField->SetUserValue( nNewValue );
@@ -635,7 +635,7 @@ void LongCurrencyField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
LongCurrencyFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uLong nMask = ReadLongRes();
if ( CURRENCYFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -670,7 +670,7 @@ long LongCurrencyField::Notify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_GETFOCUS )
{
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
@@ -687,7 +687,7 @@ long LongCurrencyField::Notify( NotifyEvent& rNEvt )
void LongCurrencyField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -782,7 +782,7 @@ long LongCurrencyBox::Notify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_GETFOCUS )
{
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
@@ -799,7 +799,7 @@ long LongCurrencyBox::Notify( NotifyEvent& rNEvt )
void LongCurrencyBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -808,9 +808,9 @@ void LongCurrencyBox::Modify()
void LongCurrencyBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplLongCurrencyReformat( GetEntry( i ), mnMin, mnMax,
GetDecimalDigits(), GetLocaleDataWrapper(),
@@ -819,12 +819,12 @@ void LongCurrencyBox::ReformatAll()
InsertEntry( aStr, i );
}
LongCurrencyFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void LongCurrencyBox::InsertValue( BigInt nValue, USHORT nPos )
+void LongCurrencyBox::InsertValue( BigInt nValue, sal_uInt16 nPos )
{
XubString aStr = ImplGetCurr( GetLocaleDataWrapper(), nValue, GetDecimalDigits(), GetCurrencySymbol(), IsUseThousandSep() );
ComboBox::InsertEntry( aStr, nPos );
@@ -840,7 +840,7 @@ void LongCurrencyBox::RemoveValue( BigInt nValue )
// -----------------------------------------------------------------------
-BigInt LongCurrencyBox::GetValue( USHORT nPos ) const
+BigInt LongCurrencyBox::GetValue( sal_uInt16 nPos ) const
{
BigInt nValue = 0;
ImplLongCurrencyGetValue( ComboBox::GetEntry( nPos ), nValue,
@@ -850,7 +850,7 @@ BigInt LongCurrencyBox::GetValue( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT LongCurrencyBox::GetValuePos( BigInt nValue ) const
+sal_uInt16 LongCurrencyBox::GetValuePos( BigInt nValue ) const
{
XubString aStr = ImplGetCurr( GetLocaleDataWrapper(), nValue, GetDecimalDigits(), GetCurrencySymbol(), IsUseThousandSep() );
return ComboBox::GetEntryPos( aStr );
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 03527bf083a7..594b76684a1a 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -104,7 +104,7 @@ void ListBox::ImplInitListBoxData()
mpBtn = NULL;
mnDDHeight = 0;
- mbDDAutoSize = TRUE;
+ mbDDAutoSize = sal_True;
mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
}
@@ -126,7 +126,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
{
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
- mnDDHeight = (USHORT)(GetTextHeight() + nTop + nBottom + 4);
+ mnDDHeight = (sal_uInt16)(GetTextHeight() + nTop + nBottom + 4);
if( IsNativeWidgetEnabled() &&
IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) )
@@ -141,12 +141,12 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
{
sal_Int32 nHeight = aBoundingRgn.GetHeight();
if( nHeight > mnDDHeight )
- mnDDHeight = static_cast<USHORT>(nHeight);
+ mnDDHeight = static_cast<sal_uInt16>(nHeight);
}
}
mpFloatWin = new ImplListBoxFloatingWindow( this );
- mpFloatWin->SetAutoWidth( TRUE );
+ mpFloatWin->SetAutoWidth( sal_True );
mpFloatWin->SetPopupModeEndHdl( LINK( this, ListBox, ImplPopupModeEndHdl ) );
mpFloatWin->GetDropTarget()->addDropTargetListener(xDrop);
@@ -185,9 +185,9 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetSelectionChangedHdl( LINK( this, ListBox, ImplSelectionChangedHdl ) );
}
else
- mpImplLB->GetMainWindow()->AllowGrabFocus( TRUE );
+ mpImplLB->GetMainWindow()->AllowGrabFocus( sal_True );
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
// -----------------------------------------------------------------------
@@ -207,12 +207,12 @@ void ListBox::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- USHORT nSelPos = ReadShortRes();
- USHORT nNumber = sal::static_int_cast<USHORT>(ReadLongRes());
+ sal_uInt16 nSelPos = ReadShortRes();
+ sal_uInt16 nNumber = sal::static_int_cast<sal_uInt16>(ReadLongRes());
- for( USHORT i = 0; i < nNumber; i++ )
+ for( sal_uInt16 i = 0; i < nNumber; i++ )
{
- USHORT nPos = InsertEntry( ReadStringRes(), LISTBOX_APPEND );
+ sal_uInt16 nPos = InsertEntry( ReadStringRes(), LISTBOX_APPEND );
long nId = ReadLongRes();
if( nId )
@@ -227,7 +227,7 @@ void ListBox::ImplLoadRes( const ResId& rResId )
IMPL_LINK( ListBox, ImplSelectHdl, void*, EMPTYARG )
{
- BOOL bPopup = IsInDropDown();
+ sal_Bool bPopup = IsInDropDown();
if( IsDropDownBox() )
{
if( !mpImplLB->IsTravelSelect() )
@@ -276,7 +276,7 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n )
{
if ( !mpImplLB->IsTrackingSelect() )
{
- USHORT nChanged = (USHORT)(ULONG)n;
+ sal_uInt16 nChanged = (sal_uInt16)(sal_uLong)n;
const ImplEntryList* pEntryList = mpImplLB->GetEntryList();
if ( pEntryList->IsEntryPosSelected( nChanged ) )
{
@@ -312,8 +312,8 @@ IMPL_LINK( ListBox, ImplClickBtnHdl, void*, EMPTYARG )
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpImplWin->GrabFocus();
- mpBtn->SetPressed( TRUE );
- mpFloatWin->StartFloat( TRUE );
+ mpBtn->SetPressed( sal_True );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
ImplClearLayoutData();
@@ -335,9 +335,9 @@ IMPL_LINK( ListBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if ( ( mpFloatWin->GetPopupModeStartSaveSelection() != LISTBOX_ENTRY_NOTFOUND )
&& !IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) )
{
- mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), TRUE );
- BOOL bTravelSelect = mpImplLB->IsTravelSelect();
- mpImplLB->SetTravelSelect( TRUE );
+ mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), sal_True );
+ sal_Bool bTravelSelect = mpImplLB->IsTravelSelect();
+ mpImplLB->SetTravelSelect( sal_True );
ImplDelData aCheckDelete;
ImplAddDel( &aCheckDelete );
@@ -356,7 +356,7 @@ IMPL_LINK( ListBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if( mpImplWin )
mpImplWin->ImplClearLayoutData();
- mpBtn->SetPressed( FALSE );
+ mpBtn->SetPressed( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE );
return 0;
}
@@ -373,8 +373,8 @@ void ListBox::ToggleDropDown()
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpImplWin->GrabFocus();
- mpBtn->SetPressed( TRUE );
- mpFloatWin->StartFloat( TRUE );
+ mpBtn->SetPressed( sal_True );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
}
}
@@ -382,9 +382,9 @@ void ListBox::ToggleDropDown()
// -----------------------------------------------------------------------
-void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- mpImplLB->GetMainWindow()->ImplInitSettings( TRUE, TRUE, TRUE );
+ mpImplLB->GetMainWindow()->ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -399,8 +399,8 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
// Border/Background
pDev->SetLineColor();
pDev->SetFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
+ sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
if ( bBorder || bBackground )
{
Rectangle aRect( aPos, aSize );
@@ -434,7 +434,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
}
long nOnePixel = GetDrawPixel( pDev, 1 );
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
Rectangle aTextRect( aPos, aSize );
if ( GetStyle() & WB_CENTER )
@@ -471,7 +471,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
else
{
long nTextHeight = pDev->GetTextHeight();
- USHORT nLines = (USHORT)(aSize.Height() / nTextHeight);
+ sal_uInt16 nLines = (sal_uInt16)(aSize.Height() / nTextHeight);
Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
@@ -479,10 +479,10 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
if ( !nLines )
nLines = 1;
- for ( USHORT n = 0; n < nLines; n++ )
+ for ( sal_uInt16 n = 0; n < nLines; n++ )
{
- USHORT nEntry = n+mpImplLB->GetTopEntry();
- BOOL bSelected = mpImplLB->GetEntryList()->IsEntryPosSelected( nEntry );
+ sal_uInt16 nEntry = n+mpImplLB->GetTopEntry();
+ sal_Bool bSelected = mpImplLB->GetEntryList()->IsEntryPosSelected( nEntry );
if ( bSelected )
{
pDev->SetFillColor( COL_BLACK );
@@ -566,7 +566,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( mpImplWin )
{
mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt...
- ImplInitFieldSettings( mpImplWin, TRUE, TRUE, TRUE );
+ ImplInitFieldSettings( mpImplWin, sal_True, sal_True, sal_True );
mpBtn->SetSettings( GetSettings() );
ImplInitDropDownButton( mpBtn );
@@ -580,7 +580,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void ListBox::EnableAutoSize( BOOL bAuto )
+void ListBox::EnableAutoSize( sal_Bool bAuto )
{
mbDDAutoSize = bAuto;
if ( mpFloatWin )
@@ -594,7 +594,7 @@ void ListBox::EnableAutoSize( BOOL bAuto )
// -----------------------------------------------------------------------
-void ListBox::EnableDDAutoWidth( BOOL b )
+void ListBox::EnableDDAutoWidth( sal_Bool b )
{
if ( mpFloatWin )
mpFloatWin->SetAutoWidth( b );
@@ -602,14 +602,14 @@ void ListBox::EnableDDAutoWidth( BOOL b )
// -----------------------------------------------------------------------
-BOOL ListBox::IsDDAutoWidthEnabled() const
+sal_Bool ListBox::IsDDAutoWidthEnabled() const
{
- return mpFloatWin ? mpFloatWin->IsAutoWidth() : FALSE;
+ return mpFloatWin ? mpFloatWin->IsAutoWidth() : sal_False;
}
// -----------------------------------------------------------------------
-void ListBox::SetDropDownLineCount( USHORT nLines )
+void ListBox::SetDropDownLineCount( sal_uInt16 nLines )
{
mnLineCount = nLines;
if ( mpFloatWin )
@@ -618,7 +618,7 @@ void ListBox::SetDropDownLineCount( USHORT nLines )
// -----------------------------------------------------------------------
-USHORT ListBox::GetDropDownLineCount() const
+sal_uInt16 ListBox::GetDropDownLineCount() const
{
if ( mpFloatWin )
return mpFloatWin->GetDropDownLineCount();
@@ -627,7 +627,7 @@ USHORT ListBox::GetDropDownLineCount() const
// -----------------------------------------------------------------------
-void ListBox::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void ListBox::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) )
{
@@ -747,7 +747,7 @@ void ListBox::FillLayoutData() const
// -----------------------------------------------------------------------
-long ListBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
+long ListBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
@@ -767,7 +767,7 @@ long ListBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
aConvPoint = pMain->PixelToLogic( aConvPoint );
// try to find entry
- USHORT nEntry = pMain->GetEntryPosForPoint( aConvPoint );
+ sal_uInt16 nEntry = pMain->GetEntryPosForPoint( aConvPoint );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
{
// not found, maybe dropdown case
@@ -892,8 +892,8 @@ void ListBox::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
- mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? TRUE : FALSE );
- BOOL bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? sal_True : sal_False );
+ sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False;
mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode );
}
else if( nType == STATE_CHANGE_MIRRORING )
@@ -930,8 +930,8 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
aKeyEvt.GetKeyCode().IsMod2() )
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
- mpBtn->SetPressed( TRUE );
- mpFloatWin->StartFloat( FALSE );
+ mpBtn->SetPressed( sal_True );
+ mpFloatWin->StartFloat( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
nDone = 1;
}
@@ -973,14 +973,14 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
}
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( IsInDropDown() && !HasChildPathFocus( TRUE ) )
+ if ( IsInDropDown() && !HasChildPathFocus( sal_True ) )
mpFloatWin->EndPopupMode();
}
else if ( (rNEvt.GetType() == EVENT_COMMAND) &&
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpImplWin) )
{
- USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
|| ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
&& HasChildPathFocus()
@@ -1046,30 +1046,30 @@ void ListBox::SetNoSelection()
// -----------------------------------------------------------------------
-USHORT ListBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 ListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
// -----------------------------------------------------------------------
-USHORT ListBox::InsertEntry( const Image& rImage, USHORT nPos )
+sal_uInt16 ListBox::InsertEntry( const Image& rImage, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rImage );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rImage );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
// -----------------------------------------------------------------------
-USHORT ListBox::InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos )
+sal_uInt16 ListBox::InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
@@ -1083,7 +1083,7 @@ void ListBox::RemoveEntry( const XubString& rStr )
// -----------------------------------------------------------------------
-void ListBox::RemoveEntry( USHORT nPos )
+void ListBox::RemoveEntry( sal_uInt16 nPos )
{
mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) );
@@ -1091,7 +1091,7 @@ void ListBox::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-Image ListBox::GetEntryImage( USHORT nPos ) const
+Image ListBox::GetEntryImage( sal_uInt16 nPos ) const
{
if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
return mpImplLB->GetEntryList()->GetEntryImage( nPos );
@@ -1100,90 +1100,90 @@ Image ListBox::GetEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ListBox::GetEntryPos( const XubString& rStr ) const
+sal_uInt16 ListBox::GetEntryPos( const XubString& rStr ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetEntryPos( const void* pData ) const
+sal_uInt16 ListBox::GetEntryPos( const void* pData ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( pData );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( pData );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-XubString ListBox::GetEntry( USHORT nPos ) const
+XubString ListBox::GetEntry( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetEntryCount() const
+sal_uInt16 ListBox::GetEntryCount() const
{
return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount();
}
// -----------------------------------------------------------------------
-XubString ListBox::GetSelectEntry( USHORT nIndex ) const
+XubString ListBox::GetSelectEntry( sal_uInt16 nIndex ) const
{
return GetEntry( GetSelectEntryPos( nIndex ) );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetSelectEntryCount() const
+sal_uInt16 ListBox::GetSelectEntryCount() const
{
return mpImplLB->GetEntryList()->GetSelectEntryCount();
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetSelectEntryPos( USHORT nIndex ) const
+sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nIndex ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = mpImplLB->GetEntryList()->FindEntry( mpImplLB->GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
}
return nPos;
}
// -----------------------------------------------------------------------
-BOOL ListBox::IsEntrySelected( const XubString& rStr ) const
+sal_Bool ListBox::IsEntrySelected( const XubString& rStr ) const
{
return IsEntryPosSelected( GetEntryPos( rStr ) );
}
// -----------------------------------------------------------------------
-BOOL ListBox::IsEntryPosSelected( USHORT nPos ) const
+sal_Bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::SelectEntry( const XubString& rStr, BOOL bSelect )
+void ListBox::SelectEntry( const XubString& rStr, sal_Bool bSelect )
{
SelectEntryPos( GetEntryPos( rStr ), bSelect );
}
// -----------------------------------------------------------------------
-void ListBox::SelectEntryPos( USHORT nPos, BOOL bSelect )
+void ListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
{
if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
@@ -1191,51 +1191,51 @@ void ListBox::SelectEntryPos( USHORT nPos, BOOL bSelect )
// -----------------------------------------------------------------------
-void ListBox::SetEntryData( USHORT nPos, void* pNewData )
+void ListBox::SetEntryData( sal_uInt16 nPos, void* pNewData )
{
mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData );
}
// -----------------------------------------------------------------------
-void* ListBox::GetEntryData( USHORT nPos ) const
+void* ListBox::GetEntryData( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::SetEntryFlags( USHORT nPos, long nFlags )
+void ListBox::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
mpImplLB->SetEntryFlags( nPos + mpImplLB->GetEntryList()->GetMRUCount(), nFlags );
}
// -----------------------------------------------------------------------
-long ListBox::GetEntryFlags( USHORT nPos ) const
+long ListBox::GetEntryFlags( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryFlags( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::SetTopEntry( USHORT nPos )
+void ListBox::SetTopEntry( sal_uInt16 nPos )
{
mpImplLB->SetTopEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::ShowProminentEntry( USHORT nPos )
+void ListBox::ShowProminentEntry( sal_uInt16 nPos )
{
mpImplLB->ShowProminentEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetTopEntry() const
+sal_uInt16 ListBox::GetTopEntry() const
{
- USHORT nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = 0;
return nPos;
@@ -1257,26 +1257,26 @@ ProminentEntry ListBox::GetProminentEntryType() const
// -----------------------------------------------------------------------
-BOOL ListBox::IsTravelSelect() const
+sal_Bool ListBox::IsTravelSelect() const
{
return mpImplLB->IsTravelSelect();
}
// -----------------------------------------------------------------------
-BOOL ListBox::IsInDropDown() const
+sal_Bool ListBox::IsInDropDown() const
{
return mpFloatWin && mpFloatWin->IsInPopupMode();
}
// -----------------------------------------------------------------------
-long ListBox::CalcWindowSizePixel( USHORT nLines ) const
+long ListBox::CalcWindowSizePixel( sal_uInt16 nLines ) const
{
return mpImplLB->GetEntryHeight() * nLines;
}
-Rectangle ListBox::GetBoundingRectangle( USHORT nItem ) const
+Rectangle ListBox::GetBoundingRectangle( sal_uInt16 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (Window*)this );
@@ -1286,12 +1286,12 @@ Rectangle ListBox::GetBoundingRectangle( USHORT nItem ) const
// -----------------------------------------------------------------------
-void ListBox::EnableMultiSelection( BOOL bMulti )
+void ListBox::EnableMultiSelection( sal_Bool bMulti )
{
- EnableMultiSelection( bMulti, FALSE );
+ EnableMultiSelection( bMulti, sal_False );
}
-void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
+void ListBox::EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackSelection )
{
mpImplLB->EnableMultiSelection( bMulti, bStackSelection );
@@ -1299,7 +1299,7 @@ void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
// Die MultiListBox verh�lt sich wie eine normale ListBox.
// Die Mehrfachselektion kann nur �ber entsprechende Zusatztasten erfolgen.
- BOOL bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False;
mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode );
// ohne Focus ist das Traveln in einer MultiSelection nicht zu sehen:
@@ -1309,7 +1309,7 @@ void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
// -----------------------------------------------------------------------
-BOOL ListBox::IsMultiSelectionEnabled() const
+sal_Bool ListBox::IsMultiSelectionEnabled() const
{
return mpImplLB->IsMultiSelectionEnabled();
}
@@ -1406,7 +1406,7 @@ Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const
// -----------------------------------------------------------------------
-Size ListBox::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size ListBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
// ggf. werden ScrollBars eingeblendet
Size aMinSz = CalcMinimumSize();
@@ -1448,19 +1448,19 @@ Size ListBox::CalcSize( USHORT nColumns, USHORT nLines ) const
// -----------------------------------------------------------------------
-void ListBox::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
long nCharWidth = GetTextWidth( UniString( 'x' ) );
if ( !IsDropDownBox() )
{
Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();
- rnCols = (USHORT) (aOutSz.Width()/nCharWidth);
- rnLines = (USHORT) (aOutSz.Height()/mpImplLB->GetEntryHeight());
+ rnCols = (sal_uInt16) (aOutSz.Width()/nCharWidth);
+ rnLines = (sal_uInt16) (aOutSz.Height()/mpImplLB->GetEntryHeight());
}
else
{
Size aOutSz = mpImplWin->GetOutputSizePixel();
- rnCols = (USHORT) (aOutSz.Width()/nCharWidth);
+ rnCols = (sal_uInt16) (aOutSz.Width()/nCharWidth);
rnLines = 1;
}
}
@@ -1481,7 +1481,7 @@ void ListBox::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void ListBox::DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos )
+void ListBox::DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos )
{
if ( rEvt.GetDevice() == mpImplLB->GetMainWindow() )
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
@@ -1507,7 +1507,7 @@ const Size& ListBox::GetUserItemSize() const
// -----------------------------------------------------------------------
-void ListBox::EnableUserDraw( BOOL bUserDraw )
+void ListBox::EnableUserDraw( sal_Bool bUserDraw )
{
mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw );
if ( mpImplWin )
@@ -1516,14 +1516,14 @@ void ListBox::EnableUserDraw( BOOL bUserDraw )
// -----------------------------------------------------------------------
-BOOL ListBox::IsUserDrawEnabled() const
+sal_Bool ListBox::IsUserDrawEnabled() const
{
return mpImplLB->GetMainWindow()->IsUserDrawEnabled();
}
// -----------------------------------------------------------------------
-void ListBox::SetReadOnly( BOOL bReadOnly )
+void ListBox::SetReadOnly( sal_Bool bReadOnly )
{
if ( mpImplLB->IsReadOnly() != bReadOnly )
{
@@ -1534,14 +1534,14 @@ void ListBox::SetReadOnly( BOOL bReadOnly )
// -----------------------------------------------------------------------
-BOOL ListBox::IsReadOnly() const
+sal_Bool ListBox::IsReadOnly() const
{
return mpImplLB->IsReadOnly();
}
// -----------------------------------------------------------------------
-void ListBox::SetSeparatorPos( USHORT n )
+void ListBox::SetSeparatorPos( sal_uInt16 n )
{
mpImplLB->SetSeparatorPos( n );
}
@@ -1555,7 +1555,7 @@ void ListBox::SetSeparatorPos()
// -----------------------------------------------------------------------
-USHORT ListBox::GetSeparatorPos() const
+sal_uInt16 ListBox::GetSeparatorPos() const
{
return mpImplLB->GetSeparatorPos();
}
@@ -1576,21 +1576,21 @@ XubString ListBox::GetMRUEntries( xub_Unicode cSep ) const
// -----------------------------------------------------------------------
-void ListBox::SetMaxMRUCount( USHORT n )
+void ListBox::SetMaxMRUCount( sal_uInt16 n )
{
mpImplLB->SetMaxMRUCount( n );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetMaxMRUCount() const
+sal_uInt16 ListBox::GetMaxMRUCount() const
{
return mpImplLB->GetMaxMRUCount();
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetDisplayLineCount() const
+sal_uInt16 ListBox::GetDisplayLineCount() const
{
return mpImplLB->GetDisplayLineCount();
}
@@ -1625,7 +1625,7 @@ MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) :
ListBox( WINDOW_MULTILISTBOX )
{
ImplInit( pParent, nStyle );
- EnableMultiSelection( TRUE );
+ EnableMultiSelection( sal_True );
}
// -----------------------------------------------------------------------
@@ -1640,5 +1640,5 @@ MultiListBox::MultiListBox( Window* pParent, const ResId& rResId ) :
if ( !(nStyle & WB_HIDE ) )
Show();
- EnableMultiSelection( TRUE );
+ EnableMultiSelection( sal_True );
}
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index c264d01916fc..5996a5b2d1b1 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -78,10 +78,10 @@ void MenuButton::ImplExecuteMenu()
Point aPos( 0, 1 );
Size aSize = GetSizePixel();
Rectangle aRect( aPos, aSize );
- SetPressed( TRUE );
+ SetPressed( sal_True );
EndSelection();
mnCurItemId = mpMenu->Execute( this, aRect, POPUPMENU_EXECUTE_DOWN );
- SetPressed( FALSE );
+ SetPressed( sal_False );
if ( mnCurItemId )
{
Select();
@@ -120,7 +120,7 @@ void MenuButton::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( RSCMENUBUTTON_MENU & nObjMask )
{
@@ -196,7 +196,7 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt )
void MenuButton::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
- USHORT nCode = aKeyCode.GetCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
if ( (nCode == KEY_DOWN) && aKeyCode.IsMod2() )
ImplExecuteMenu();
else if ( !(mnMenuMode & MENUBUTTON_MENUMODE_TIMED) &&
@@ -223,7 +223,7 @@ void MenuButton::Select()
// -----------------------------------------------------------------------
-void MenuButton::SetMenuMode( USHORT nMode )
+void MenuButton::SetMenuMode( sal_uInt16 nMode )
{
// Fuer die 5.1-Auslieferung besser noch nicht inline, ansonsten kann
// diese Funktion zur 6.0 inline werden
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 921a25756d32..f03136394512 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -53,7 +53,7 @@ void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
mpMBData = new ImplMoreButtonData;
mnDelta = 0;
meUnit = MAP_PIXEL;
- mbState = FALSE;
+ mbState = sal_False;
mpMBData->mpItemList = NULL;
@@ -67,7 +67,7 @@ void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
ShowState();
SetSymbolAlign( SYMBOLALIGN_RIGHT );
- ImplSetSmallSymbol( TRUE );
+ ImplSetSmallSymbol( sal_True );
if ( ! ( nStyle & ( WB_RIGHT | WB_LEFT ) ) )
{
@@ -119,12 +119,12 @@ void MoreButton::ImplLoadRes( const ResId& rResId )
{
PushButton::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( nObjMask & RSC_MOREBUTTON_STATE )
{
// Nicht Methode rufen, da Dialog nicht umgeschaltet werden soll
- mbState = (BOOL)ReadShortRes();
+ mbState = (sal_Bool)ReadShortRes();
// SetText( GetText() );
ShowState();
}
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 4261965995fa..9bc71f1a55e3 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -70,30 +70,30 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
// =======================================================================
-#define SCRBAR_DRAW_BTN1 ((USHORT)0x0001)
-#define SCRBAR_DRAW_BTN2 ((USHORT)0x0002)
-#define SCRBAR_DRAW_PAGE1 ((USHORT)0x0004)
-#define SCRBAR_DRAW_PAGE2 ((USHORT)0x0008)
-#define SCRBAR_DRAW_THUMB ((USHORT)0x0010)
-#define SCRBAR_DRAW_BACKGROUND ((USHORT)0x0020)
+#define SCRBAR_DRAW_BTN1 ((sal_uInt16)0x0001)
+#define SCRBAR_DRAW_BTN2 ((sal_uInt16)0x0002)
+#define SCRBAR_DRAW_PAGE1 ((sal_uInt16)0x0004)
+#define SCRBAR_DRAW_PAGE2 ((sal_uInt16)0x0008)
+#define SCRBAR_DRAW_THUMB ((sal_uInt16)0x0010)
+#define SCRBAR_DRAW_BACKGROUND ((sal_uInt16)0x0020)
#define SCRBAR_DRAW_ALL (SCRBAR_DRAW_BTN1 | SCRBAR_DRAW_BTN2 | \
SCRBAR_DRAW_PAGE1 | SCRBAR_DRAW_PAGE2 |\
SCRBAR_DRAW_THUMB | SCRBAR_DRAW_BACKGROUND )
-#define SCRBAR_STATE_BTN1_DOWN ((USHORT)0x0001)
-#define SCRBAR_STATE_BTN1_DISABLE ((USHORT)0x0002)
-#define SCRBAR_STATE_BTN2_DOWN ((USHORT)0x0004)
-#define SCRBAR_STATE_BTN2_DISABLE ((USHORT)0x0008)
-#define SCRBAR_STATE_PAGE1_DOWN ((USHORT)0x0010)
-#define SCRBAR_STATE_PAGE2_DOWN ((USHORT)0x0020)
-#define SCRBAR_STATE_THUMB_DOWN ((USHORT)0x0040)
+#define SCRBAR_STATE_BTN1_DOWN ((sal_uInt16)0x0001)
+#define SCRBAR_STATE_BTN1_DISABLE ((sal_uInt16)0x0002)
+#define SCRBAR_STATE_BTN2_DOWN ((sal_uInt16)0x0004)
+#define SCRBAR_STATE_BTN2_DISABLE ((sal_uInt16)0x0008)
+#define SCRBAR_STATE_PAGE1_DOWN ((sal_uInt16)0x0010)
+#define SCRBAR_STATE_PAGE2_DOWN ((sal_uInt16)0x0020)
+#define SCRBAR_STATE_THUMB_DOWN ((sal_uInt16)0x0040)
#define SCRBAR_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT)
struct ImplScrollBarData
{
AutoTimer maTimer; // Timer
- BOOL mbHide;
+ sal_Bool mbHide;
Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic
};
@@ -116,14 +116,14 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle )
mnStateFlags = 0;
meScrollType = SCROLL_DONTKNOW;
meDDScrollType = SCROLL_DONTKNOW;
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
mbFullDrag = 0;
if( !mpData ) // TODO: remove when maTrackRect is no longer in mpData
{
mpData = new ImplScrollBarData;
mpData->maTimer.SetTimeoutHdl( LINK( this, ScrollBar, ImplAutoTimerHdl ) );
- mpData->mbHide = FALSE;
+ mpData->mbHide = sal_False;
}
ImplInitStyle( nStyle );
@@ -139,7 +139,7 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle )
void ScrollBar::ImplInitStyle( WinBits nStyle )
{
if ( nStyle & WB_DRAG )
- mbFullDrag = TRUE;
+ mbFullDrag = sal_True;
else
mbFullDrag = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL) != 0;
}
@@ -180,12 +180,12 @@ void ScrollBar::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- INT16 nMin = ReadShortRes();
- INT16 nMax = ReadShortRes();
- INT16 nThumbPos = ReadShortRes();
- INT16 nPage = ReadShortRes();
- INT16 nStep = ReadShortRes();
- INT16 nVisibleSize = ReadShortRes();
+ sal_Int16 nMin = ReadShortRes();
+ sal_Int16 nMax = ReadShortRes();
+ sal_Int16 nThumbPos = ReadShortRes();
+ sal_Int16 nPage = ReadShortRes();
+ sal_Int16 nStep = ReadShortRes();
+ sal_Int16 nVisibleSize = ReadShortRes();
SetRange( Range( nMin, nMax ) );
SetLineSize( nStep );
@@ -196,9 +196,9 @@ void ScrollBar::ImplLoadRes( const ResId& rResId )
// -----------------------------------------------------------------------
-void ScrollBar::ImplUpdateRects( BOOL bUpdate )
+void ScrollBar::ImplUpdateRects( sal_Bool bUpdate )
{
- USHORT nOldStateFlags = mnStateFlags;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
Rectangle aOldPage1Rect = maPage1Rect;
Rectangle aOldPage2Rect = maPage2Rect;
Rectangle aOldThumbRect = maThumbRect;
@@ -281,7 +281,7 @@ void ScrollBar::ImplUpdateRects( BOOL bUpdate )
if ( bUpdate )
{
- USHORT nDraw = 0;
+ sal_uInt16 nDraw = 0;
if ( (nOldStateFlags & SCRBAR_STATE_BTN1_DISABLE) !=
(mnStateFlags & SCRBAR_STATE_BTN1_DISABLE) )
nDraw |= SCRBAR_DRAW_BTN1;
@@ -334,7 +334,7 @@ long ScrollBar::ImplCalcThumbPosPix( long nPos )
// -----------------------------------------------------------------------
-void ScrollBar::ImplCalc( BOOL bUpdate )
+void ScrollBar::ImplCalc( sal_Bool bUpdate )
{
const Size aSize = GetOutputSizePixel();
const long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();;
@@ -431,7 +431,7 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if ( !mnThumbPixRange )
maThumbRect.SetEmpty();
- mbCalcSize = FALSE;
+ mbCalcSize = sal_False;
}
if ( mnThumbPixRange )
@@ -469,14 +469,14 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if ( bUpdate && HasPaintEvent() )
{
Invalidate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
ImplUpdateRects( bUpdate );
}
// -----------------------------------------------------------------------
-void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -505,7 +505,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
// -force recalculate
if ( mbCalcSize )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
maBtn1Rect+=aPos;
maBtn2Rect+=aPos;
@@ -517,19 +517,19 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ImplDraw( SCRBAR_DRAW_ALL, pDev );
pDev->Pop();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
}
// -----------------------------------------------------------------------
-BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
+sal_Bool ScrollBar::ImplDrawNative( sal_uInt16 nDrawFlags )
{
ScrollbarValue scrValue;
- BOOL bNativeOK = IsNativeControlSupported(CTRL_SCROLLBAR, PART_ENTIRE_CONTROL);
+ sal_Bool bNativeOK = IsNativeControlSupported(CTRL_SCROLLBAR, PART_ENTIRE_CONTROL);
if( bNativeOK )
{
- BOOL bHorz = (GetStyle() & WB_HORZ ? true : false);
+ sal_Bool bHorz = (GetStyle() & WB_HORZ ? true : false);
// Draw the entire background if the control supports it
if( IsNativeControlSupported(CTRL_SCROLLBAR, bHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT) )
@@ -683,18 +683,18 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
return bNativeOK;
}
-void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
+void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev )
{
DecorationView aDecoView( pOutDev );
Rectangle aTempRect;
- USHORT nStyle;
+ sal_uInt16 nStyle;
const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
SymbolType eSymbolType;
- BOOL bEnabled = IsEnabled();
+ sal_Bool bEnabled = IsEnabled();
// Evt. noch offene Berechnungen nachholen
if ( mbCalcSize )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Window *pWin = NULL;
if( pOutDev->GetOutDevType() == OUTDEV_WINDOW )
@@ -800,7 +800,7 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
// -----------------------------------------------------------------------
-long ScrollBar::ImplScroll( long nNewPos, BOOL bCallEndScroll )
+long ScrollBar::ImplScroll( long nNewPos, sal_Bool bCallEndScroll )
{
long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
@@ -818,7 +818,7 @@ long ScrollBar::ImplScroll( long nNewPos, BOOL bCallEndScroll )
// -----------------------------------------------------------------------
-long ScrollBar::ImplDoAction( BOOL bCallEndScroll )
+long ScrollBar::ImplDoAction( sal_Bool bCallEndScroll )
{
long nDelta = 0;
@@ -848,12 +848,12 @@ long ScrollBar::ImplDoAction( BOOL bCallEndScroll )
// -----------------------------------------------------------------------
-void ScrollBar::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
+void ScrollBar::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction )
{
- USHORT nOldStateFlags = mnStateFlags;
- BOOL bAction = FALSE;
- BOOL bHorizontal = ( GetStyle() & WB_HORZ )? TRUE: FALSE;
- BOOL bIsInside = FALSE;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
+ sal_Bool bAction = sal_False;
+ sal_Bool bHorizontal = ( GetStyle() & WB_HORZ )? sal_True: sal_False;
+ sal_Bool bIsInside = sal_False;
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
@@ -920,7 +920,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
if ( nOldStateFlags != mnStateFlags )
ImplDraw( mnDragDraw, this );
if ( bAction )
- ImplDoAction( FALSE );
+ ImplDoAction( sal_False );
}
// -----------------------------------------------------------------------
@@ -960,10 +960,10 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() || rMEvt.IsMiddle() )
{
const Point& rMousePos = rMEvt.GetPosPixel();
- USHORT nTrackFlags = 0;
- BOOL bHorizontal = ( GetStyle() & WB_HORZ )? TRUE: FALSE;
- BOOL bIsInside = FALSE;
- BOOL bDragToMouse = FALSE;
+ sal_uInt16 nTrackFlags = 0;
+ sal_Bool bHorizontal = ( GetStyle() & WB_HORZ )? sal_True: sal_False;
+ sal_Bool bIsInside = sal_False;
+ sal_Bool bDragToMouse = sal_False;
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
@@ -1006,7 +1006,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
{
if( mpData )
{
- mpData->mbHide = TRUE; // disable focus blinking
+ mpData->mbHide = sal_True; // disable focus blinking
if( HasFocus() )
ImplDraw( SCRBAR_DRAW_THUMB, this ); // paint without focus
}
@@ -1020,7 +1020,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
// calculate mouse offset
if( rMEvt.IsMiddle() || (ImplGetSVData()->maNWFData.mbScrollbarJumpPage && !bThumbHit) )
{
- bDragToMouse = TRUE;
+ bDragToMouse = sal_True;
if ( GetStyle() & WB_HORZ )
mnMouseOff = maThumbRect.GetWidth()/2;
else
@@ -1042,7 +1042,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else if( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA,
aControlRegion, rMousePos, bIsInside )?
- bIsInside : TRUE )
+ bIsInside : sal_True )
{
nTrackFlags = STARTTRACK_BUTTONREPEAT;
@@ -1087,7 +1087,7 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
// Button und PageRect-Status wieder herstellen
- USHORT nOldStateFlags = mnStateFlags;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
mnStateFlags &= ~(SCRBAR_STATE_BTN1_DOWN | SCRBAR_STATE_BTN2_DOWN |
SCRBAR_STATE_PAGE1_DOWN | SCRBAR_STATE_PAGE2_DOWN |
SCRBAR_STATE_THUMB_DOWN);
@@ -1124,7 +1124,7 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
meScrollType = SCROLL_DONTKNOW;
if( mpData )
- mpData->mbHide = FALSE; // re-enable focus blinking
+ mpData->mbHide = sal_False; // re-enable focus blinking
}
else
{
@@ -1198,9 +1198,9 @@ void ScrollBar::Paint( const Rectangle& )
void ScrollBar::Resize()
{
Control::Resize();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
if ( IsReallyVisible() )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
@@ -1239,7 +1239,7 @@ void ScrollBar::GetFocus()
{
mpData = new ImplScrollBarData;
mpData->maTimer.SetTimeoutHdl( LINK( this, ScrollBar, ImplAutoTimerHdl ) );
- mpData->mbHide = FALSE;
+ mpData->mbHide = sal_False;
}
ImplInvert(); // react immediately
mpData->maTimer.SetTimeout( GetSettings().GetStyleSettings().GetCursorBlinkTime() );
@@ -1265,17 +1265,17 @@ void ScrollBar::StateChanged( StateChangedType nType )
Control::StateChanged( nType );
if ( nType == STATE_CHANGE_INITSHOW )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
else if ( nType == STATE_CHANGE_DATA )
{
if ( IsReallyVisible() && IsUpdateMode() )
- ImplCalc( TRUE );
+ ImplCalc( sal_True );
}
else if ( nType == STATE_CHANGE_UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -1292,8 +1292,8 @@ void ScrollBar::StateChanged( StateChangedType nType )
if ( (GetPrevStyle() & SCRBAR_VIEW_STYLE) !=
(GetStyle() & SCRBAR_VIEW_STYLE) )
{
- mbCalcSize = TRUE;
- ImplCalc( FALSE );
+ mbCalcSize = sal_True;
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -1309,8 +1309,8 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- mbCalcSize = TRUE;
- ImplCalc( FALSE );
+ mbCalcSize = sal_True;
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -1319,8 +1319,8 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt )
Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
{
- BOOL bHorizontal = ( GetStyle() & WB_HORZ )? TRUE: FALSE;
- BOOL bIsInside = FALSE;
+ sal_Bool bHorizontal = ( GetStyle() & WB_HORZ )? sal_True: sal_False;
+ sal_Bool bIsInside = sal_False;
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
@@ -1382,7 +1382,7 @@ long ScrollBar::PreNotify( NotifyEvent& rNEvt )
aClipRegion.Union( *pLastRect );
// Support for 3-button scroll bars
- BOOL bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS );
+ sal_Bool bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS );
if ( bHas3Buttons && ( pRect == &maBtn1Rect || pLastRect == &maBtn1Rect ) )
{
aClipRegion.Union( maBtn2Rect );
@@ -1422,7 +1422,7 @@ long ScrollBar::DoScroll( long nNewPos )
return 0;
meScrollType = SCROLL_DRAG;
- long nDelta = ImplScroll( nNewPos, TRUE );
+ long nDelta = ImplScroll( nNewPos, sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -1437,7 +1437,7 @@ long ScrollBar::DoScrollAction( ScrollType eScrollType )
return 0;
meScrollType = eScrollType;
- long nDelta = ImplDoAction( TRUE );
+ long nDelta = ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 26a4c1cfd205..0058acc005c7 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -47,15 +47,15 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
// =======================================================================
-#define SLIDER_DRAW_THUMB ((USHORT)0x0001)
-#define SLIDER_DRAW_CHANNEL1 ((USHORT)0x0002)
-#define SLIDER_DRAW_CHANNEL2 ((USHORT)0x0004)
+#define SLIDER_DRAW_THUMB ((sal_uInt16)0x0001)
+#define SLIDER_DRAW_CHANNEL1 ((sal_uInt16)0x0002)
+#define SLIDER_DRAW_CHANNEL2 ((sal_uInt16)0x0004)
#define SLIDER_DRAW_CHANNEL (SLIDER_DRAW_CHANNEL1 | SLIDER_DRAW_CHANNEL2)
#define SLIDER_DRAW_ALL (SLIDER_DRAW_THUMB | SLIDER_DRAW_CHANNEL)
-#define SLIDER_STATE_CHANNEL1_DOWN ((USHORT)0x0001)
-#define SLIDER_STATE_CHANNEL2_DOWN ((USHORT)0x0002)
-#define SLIDER_STATE_THUMB_DOWN ((USHORT)0x0004)
+#define SLIDER_STATE_CHANNEL1_DOWN ((sal_uInt16)0x0001)
+#define SLIDER_STATE_CHANNEL2_DOWN ((sal_uInt16)0x0002)
+#define SLIDER_STATE_THUMB_DOWN ((sal_uInt16)0x0004)
#define SLIDER_THUMB_SIZE 9
#define SLIDER_THUMB_HALFSIZE 4
@@ -88,8 +88,8 @@ void Slider::ImplInit( Window* pParent, WinBits nStyle )
mnDragDraw = 0;
mnStateFlags = 0;
meScrollType = SCROLL_DONTKNOW;
- mbCalcSize = TRUE;
- mbFullDrag = TRUE;
+ mbCalcSize = sal_True;
+ mbFullDrag = sal_True;
Control::ImplInit( pParent, nStyle, NULL );
@@ -125,12 +125,12 @@ void Slider::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- INT16 nMin = ReadShortRes();
- INT16 nMax = ReadShortRes();
- INT16 nThumbPos = ReadShortRes();
- INT16 nPage = ReadShortRes();
- INT16 nStep = ReadShortRes();
- /* INT16 nVisibleSize = */ ReadShortRes();
+ sal_Int16 nMin = ReadShortRes();
+ sal_Int16 nMax = ReadShortRes();
+ sal_Int16 nThumbPos = ReadShortRes();
+ sal_Int16 nPage = ReadShortRes();
+ sal_Int16 nStep = ReadShortRes();
+ /* sal_Int16 nVisibleSize = */ ReadShortRes();
SetRange( Range( nMin, nMax ) );
SetLineSize( nStep );
@@ -145,16 +145,16 @@ void Slider::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -165,7 +165,7 @@ void Slider::ImplInitSettings()
// -----------------------------------------------------------------------
-void Slider::ImplUpdateRects( BOOL bUpdate )
+void Slider::ImplUpdateRects( sal_Bool bUpdate )
{
Rectangle aOldThumbRect = maThumbRect;
bool bInvalidateAll = false;
@@ -303,9 +303,9 @@ long Slider::ImplCalcThumbPosPix( long nPos )
// -----------------------------------------------------------------------
-void Slider::ImplCalc( BOOL bUpdate )
+void Slider::ImplCalc( sal_Bool bUpdate )
{
- BOOL bInvalidateAll = FALSE;
+ sal_Bool bInvalidateAll = sal_False;
if ( mbCalcSize )
{
@@ -356,9 +356,9 @@ void Slider::ImplCalc( BOOL bUpdate )
(nOldChannelPixRange != mnChannelPixRange) ||
(nOldChannelPixTop != mnChannelPixTop) ||
(nOldChannelPixBottom != mnChannelPixBottom) )
- bInvalidateAll = TRUE;
+ bInvalidateAll = sal_True;
- mbCalcSize = FALSE;
+ mbCalcSize = sal_False;
}
if ( mnThumbPixRange )
@@ -367,23 +367,23 @@ void Slider::ImplCalc( BOOL bUpdate )
if ( bUpdate && bInvalidateAll )
{
Invalidate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
ImplUpdateRects( bUpdate );
}
// -----------------------------------------------------------------------
-void Slider::ImplDraw( USHORT nDrawFlags )
+void Slider::ImplDraw( sal_uInt16 nDrawFlags )
{
DecorationView aDecoView( this );
- USHORT nStyle;
+ sal_uInt16 nStyle;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bEnabled = IsEnabled();
+ sal_Bool bEnabled = IsEnabled();
// Evt. noch offene Berechnungen nachholen
if ( mbCalcSize )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
ControlPart nPart = (GetStyle() & WB_HORZ) ? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA;
ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
@@ -514,7 +514,7 @@ void Slider::ImplDraw( USHORT nDrawFlags )
// -----------------------------------------------------------------------
-BOOL Slider::ImplIsPageUp( const Point& rPos )
+sal_Bool Slider::ImplIsPageUp( const Point& rPos )
{
Size aSize = GetOutputSizePixel();
Rectangle aRect = maChannel1Rect;
@@ -533,7 +533,7 @@ BOOL Slider::ImplIsPageUp( const Point& rPos )
// -----------------------------------------------------------------------
-BOOL Slider::ImplIsPageDown( const Point& rPos )
+sal_Bool Slider::ImplIsPageDown( const Point& rPos )
{
Size aSize = GetOutputSizePixel();
Rectangle aRect = maChannel2Rect;
@@ -552,7 +552,7 @@ BOOL Slider::ImplIsPageDown( const Point& rPos )
// -----------------------------------------------------------------------
-long Slider::ImplSlide( long nNewPos, BOOL bCallEndSlide )
+long Slider::ImplSlide( long nNewPos, sal_Bool bCallEndSlide )
{
long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
@@ -570,7 +570,7 @@ long Slider::ImplSlide( long nNewPos, BOOL bCallEndSlide )
// -----------------------------------------------------------------------
-long Slider::ImplDoAction( BOOL bCallEndSlide )
+long Slider::ImplDoAction( sal_Bool bCallEndSlide )
{
long nDelta = 0;
@@ -604,10 +604,10 @@ long Slider::ImplDoAction( BOOL bCallEndSlide )
// -----------------------------------------------------------------------
-void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
+void Slider::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction )
{
- USHORT nOldStateFlags = mnStateFlags;
- BOOL bAction = FALSE;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
+ sal_Bool bAction = sal_False;
switch ( meScrollType )
{
@@ -650,7 +650,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
if ( bAction )
{
- if ( ImplDoAction( FALSE ) )
+ if ( ImplDoAction( sal_False ) )
{
// Update the channel complete
if ( mnDragDraw & SLIDER_DRAW_CHANNEL )
@@ -672,7 +672,7 @@ long Slider::ImplDoSlide( long nNewPos )
return 0;
meScrollType = SCROLL_DRAG;
- long nDelta = ImplSlide( nNewPos, TRUE );
+ long nDelta = ImplSlide( nNewPos, sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -687,7 +687,7 @@ long Slider::ImplDoSlideAction( ScrollType eScrollType )
return 0;
meScrollType = eScrollType;
- long nDelta = ImplDoAction( TRUE );
+ long nDelta = ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -699,7 +699,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() )
{
const Point& rMousePos = rMEvt.GetPosPixel();
- USHORT nTrackFlags = 0;
+ sal_uInt16 nTrackFlags = 0;
if ( maThumbRect.IsInside( rMousePos ) )
{
@@ -760,7 +760,7 @@ void Slider::MouseButtonUp( const MouseEvent& )
if( SCROLL_SET == meScrollType )
{
// Button und PageRect-Status wieder herstellen
- const USHORT nOldStateFlags = mnStateFlags;
+ const sal_uInt16 nOldStateFlags = mnStateFlags;
mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN | SLIDER_STATE_THUMB_DOWN );
@@ -768,7 +768,7 @@ void Slider::MouseButtonUp( const MouseEvent& )
ImplDraw( mnDragDraw );
mnDragDraw = 0;
- ImplDoAction( TRUE );
+ ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
}
}
@@ -780,7 +780,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
// Button und PageRect-Status wieder herstellen
- USHORT nOldStateFlags = mnStateFlags;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
mnStateFlags &= ~(SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN |
SLIDER_STATE_THUMB_DOWN);
if ( nOldStateFlags != mnStateFlags )
@@ -917,9 +917,9 @@ void Slider::Paint( const Rectangle& )
void Slider::Resize()
{
Control::Resize();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
if ( IsReallyVisible() )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
@@ -937,17 +937,17 @@ void Slider::StateChanged( StateChangedType nType )
Control::StateChanged( nType );
if ( nType == STATE_CHANGE_INITSHOW )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
else if ( nType == STATE_CHANGE_DATA )
{
if ( IsReallyVisible() && IsUpdateMode() )
- ImplCalc( TRUE );
+ ImplCalc( sal_True );
}
else if ( nType == STATE_CHANGE_UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -963,8 +963,8 @@ void Slider::StateChanged( StateChangedType nType )
if ( (GetPrevStyle() & SLIDER_VIEW_STYLE) !=
(GetStyle() & SLIDER_VIEW_STYLE) )
{
- mbCalcSize = TRUE;
- ImplCalc( FALSE );
+ mbCalcSize = sal_True;
+ ImplCalc( sal_False );
Invalidate();
}
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 921ba2a24e5a..52b3fdca9730 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -36,10 +36,10 @@
void SpinButton::ImplInit( Window* pParent, WinBits nStyle )
{
- mbUpperIn = FALSE;
- mbLowerIn = FALSE;
- mbInitialUp = FALSE;
- mbInitialDown = FALSE;
+ mbUpperIn = sal_False;
+ mbLowerIn = sal_False;
+ mbInitialUp = sal_False;
+ mbInitialDown = sal_False;
mnMinRange = 0;
mnMaxRange = 100;
@@ -52,9 +52,9 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle )
mbRepeat = 0 != ( nStyle & WB_REPEAT );
if ( nStyle & WB_HSCROLL )
- mbHorz = TRUE;
+ mbHorz = sal_True;
else
- mbHorz = FALSE;
+ mbHorz = sal_False;
Control::ImplInit( pParent, nStyle, NULL );
}
@@ -63,7 +63,7 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle )
SpinButton::SpinButton( Window* pParent, WinBits nStyle )
:Control( WINDOW_SPINBUTTON )
- ,mbUpperIsFocused( FALSE )
+ ,mbUpperIsFocused( sal_False )
{
ImplInit( pParent, nStyle );
}
@@ -72,7 +72,7 @@ SpinButton::SpinButton( Window* pParent, WinBits nStyle )
SpinButton::SpinButton( Window* pParent, const ResId& rResId )
:Control( WINDOW_SPINBUTTON )
- ,mbUpperIsFocused( FALSE )
+ ,mbUpperIsFocused( sal_False )
{
rResId.SetRT( RSC_SPINBUTTON );
ImplInit( pParent, ImplInitRes( rResId ) );
@@ -115,7 +115,7 @@ void SpinButton::Up()
mnValue += mnValueStep;
StateChanged( STATE_CHANGE_DATA );
- ImplMoveFocus( TRUE );
+ ImplMoveFocus( sal_True );
}
ImplCallEventListenersAndHandler( VCLEVENT_SPINBUTTON_UP, maUpHdlLink, this );
@@ -130,7 +130,7 @@ void SpinButton::Down()
mnValue -= mnValueStep;
StateChanged( STATE_CHANGE_DATA );
- ImplMoveFocus( FALSE );
+ ImplMoveFocus( sal_False );
}
ImplCallEventListenersAndHandler( VCLEVENT_SPINBUTTON_DOWN, maDownHdlLink, this );
@@ -163,7 +163,7 @@ void SpinButton::Resize()
// -----------------------------------------------------------------------
-void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -200,9 +200,9 @@ void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aUpperRect += aPos;
aLowerRect += aPos;
- ImplDrawSpinButton( pDev, aUpperRect, aLowerRect, FALSE, FALSE,
+ ImplDrawSpinButton( pDev, aUpperRect, aLowerRect, sal_False, sal_False,
IsEnabled() && ImplIsUpperEnabled(),
- IsEnabled() && ImplIsLowerEnabled(), mbHorz, TRUE );
+ IsEnabled() && ImplIsLowerEnabled(), mbHorz, sal_True );
pDev->Pop();
}
@@ -211,10 +211,10 @@ void SpinButton::Paint( const Rectangle& )
{
HideFocus();
- BOOL bEnable = IsEnabled();
+ sal_Bool bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect, mbUpperIn, mbLowerIn,
bEnable && ImplIsUpperEnabled(),
- bEnable && ImplIsLowerEnabled(), mbHorz, TRUE );
+ bEnable && ImplIsLowerEnabled(), mbHorz, sal_True );
if ( HasFocus() )
ShowFocus( maFocusRect );
@@ -226,14 +226,14 @@ void SpinButton::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) && ( ImplIsUpperEnabled() ) )
{
- mbUpperIn = TRUE;
- mbInitialUp = TRUE;
+ mbUpperIn = sal_True;
+ mbInitialUp = sal_True;
Invalidate( maUpperRect );
}
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) && ( ImplIsLowerEnabled() ) )
{
- mbLowerIn = TRUE;
- mbInitialDown = TRUE;
+ mbLowerIn = sal_True;
+ mbInitialDown = sal_True;
Invalidate( maLowerRect );
}
@@ -259,20 +259,20 @@ void SpinButton::MouseButtonUp( const MouseEvent& )
if ( mbUpperIn )
{
- mbUpperIn = FALSE;
+ mbUpperIn = sal_False;
Invalidate( maUpperRect );
Update();
Up();
}
else if ( mbLowerIn )
{
- mbLowerIn = FALSE;
+ mbLowerIn = sal_False;
Invalidate( maLowerRect );
Update();
Down();
}
- mbInitialUp = mbInitialDown = FALSE;
+ mbInitialUp = mbInitialDown = sal_False;
}
// -----------------------------------------------------------------------
@@ -285,7 +285,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
if ( !maUpperRect.IsInside( rMEvt.GetPosPixel() ) &&
mbUpperIn && mbInitialUp )
{
- mbUpperIn = FALSE;
+ mbUpperIn = sal_False;
maRepeatTimer.Stop();
Invalidate( maUpperRect );
Update();
@@ -293,7 +293,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
else if ( !maLowerRect.IsInside( rMEvt.GetPosPixel() ) &&
mbLowerIn & mbInitialDown )
{
- mbLowerIn = FALSE;
+ mbLowerIn = sal_False;
maRepeatTimer.Stop();
Invalidate( maLowerRect );
Update();
@@ -301,7 +301,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
else if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) &&
!mbUpperIn && mbInitialUp )
{
- mbUpperIn = TRUE;
+ mbUpperIn = sal_True;
if ( mbRepeat )
maRepeatTimer.Start();
Invalidate( maUpperRect );
@@ -310,7 +310,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) &&
!mbLowerIn && mbInitialDown )
{
- mbLowerIn = TRUE;
+ mbLowerIn = sal_True;
if ( mbRepeat )
maRepeatTimer.Start();
Invalidate( maLowerRect );
@@ -331,7 +331,7 @@ void SpinButton::KeyInput( const KeyEvent& rKEvt )
case KEY_LEFT:
case KEY_RIGHT:
{
- BOOL bUp = KEY_RIGHT == rKEvt.GetKeyCode().GetCode();
+ sal_Bool bUp = KEY_RIGHT == rKEvt.GetKeyCode().GetCode();
if ( mbHorz && !ImplMoveFocus( bUp ) )
bUp ? Up() : Down();
}
@@ -340,7 +340,7 @@ void SpinButton::KeyInput( const KeyEvent& rKEvt )
case KEY_UP:
case KEY_DOWN:
{
- BOOL bUp = KEY_UP == rKEvt.GetKeyCode().GetCode();
+ sal_Bool bUp = KEY_UP == rKEvt.GetKeyCode().GetCode();
if ( !mbHorz && !ImplMoveFocus( KEY_UP == rKEvt.GetKeyCode().GetCode() ) )
bUp ? Up() : Down();
}
@@ -372,7 +372,7 @@ void SpinButton::StateChanged( StateChangedType nType )
case STATE_CHANGE_STYLE:
{
- BOOL bNewRepeat = 0 != ( GetStyle() & WB_REPEAT );
+ sal_Bool bNewRepeat = 0 != ( GetStyle() & WB_REPEAT );
if ( bNewRepeat != mbRepeat )
{
if ( maRepeatTimer.IsActive() )
@@ -383,7 +383,7 @@ void SpinButton::StateChanged( StateChangedType nType )
mbRepeat = bNewRepeat;
}
- BOOL bNewHorz = 0 != ( GetStyle() & WB_HSCROLL );
+ sal_Bool bNewHorz = 0 != ( GetStyle() & WB_HSCROLL );
if ( bNewHorz != mbHorz )
{
mbHorz = bNewHorz;
@@ -472,21 +472,21 @@ void SpinButton::LoseFocus()
// -----------------------------------------------------------------------
-BOOL SpinButton::ImplMoveFocus( BOOL _bUpper )
+sal_Bool SpinButton::ImplMoveFocus( sal_Bool _bUpper )
{
if ( _bUpper == mbUpperIsFocused )
- return FALSE;
+ return sal_False;
HideFocus();
ImplCalcFocusRect( _bUpper );
if ( HasFocus() )
ShowFocus( maFocusRect );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void SpinButton::ImplCalcFocusRect( BOOL _bUpper )
+void SpinButton::ImplCalcFocusRect( sal_Bool _bUpper )
{
maFocusRect = _bUpper ? maUpperRect : maLowerRect;
// inflate by some pixels
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index c51ac834f1b4..d7501a6f99b6 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -40,8 +40,8 @@
void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect,
const Rectangle& rLowerRect,
- BOOL bUpperIn, BOOL bLowerIn,
- BOOL bUpperEnabled, BOOL bLowerEnabled, BOOL bHorz,
+ sal_Bool bUpperIn, sal_Bool bLowerIn,
+ sal_Bool bUpperEnabled, sal_Bool bLowerEnabled, sal_Bool bHorz,
SpinbuttonValue& rValue )
{
// convert spinbutton data to a SpinbuttonValue structure for native painting
@@ -80,9 +80,9 @@ void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect,
}
-BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
+sal_Bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
{
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( pWin->IsNativeControlSupported(CTRL_SPINBOX, PART_ENTIRE_CONTROL) &&
// there is just no useful native support for spinfields with dropdown
@@ -131,9 +131,9 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
return bNativeOK;
}
-BOOL ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
+sal_Bool ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
{
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( pWin->IsNativeControlSupported(CTRL_SPINBUTTONS, PART_ENTIRE_CONTROL) )
{
@@ -147,13 +147,13 @@ BOOL ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbutton
void ImplDrawSpinButton( OutputDevice* pOutDev,
const Rectangle& rUpperRect,
const Rectangle& rLowerRect,
- BOOL bUpperIn, BOOL bLowerIn,
- BOOL bUpperEnabled, BOOL bLowerEnabled, BOOL bHorz, BOOL bMirrorHorz )
+ sal_Bool bUpperIn, sal_Bool bLowerIn,
+ sal_Bool bUpperEnabled, sal_Bool bLowerEnabled, sal_Bool bHorz, sal_Bool bMirrorHorz )
{
DecorationView aDecoView( pOutDev );
- USHORT nStyle = BUTTON_DRAW_NOLEFTLIGHTBORDER;
- USHORT nSymStyle = 0;
+ sal_uInt16 nStyle = BUTTON_DRAW_NOLEFTLIGHTBORDER;
+ sal_uInt16 nSymStyle = 0;
SymbolType eType1, eType2;
@@ -187,11 +187,11 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
}
// Oberen/linken Button malen
- USHORT nTempStyle = nStyle;
+ sal_uInt16 nTempStyle = nStyle;
if ( bUpperIn )
nTempStyle |= BUTTON_DRAW_PRESSED;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
Rectangle aUpRect;
if( pOutDev->GetOutDevType() == OUTDEV_WINDOW )
@@ -297,14 +297,14 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
void SpinField::ImplInitSpinFieldData()
{
mpEdit = NULL;
- mbSpin = FALSE;
- mbRepeat = FALSE;
- mbUpperIn = FALSE;
- mbLowerIn = FALSE;
- mbInitialUp = FALSE;
- mbInitialDown = FALSE;
- mbNoSelect = FALSE;
- mbInDropDown = FALSE;
+ mbSpin = sal_False;
+ mbRepeat = sal_False;
+ mbUpperIn = sal_False;
+ mbLowerIn = sal_False;
+ mbInitialUp = sal_False;
+ mbInitialDown = sal_False;
+ mbNoSelect = sal_False;
+ mbInDropDown = sal_False;
}
// --------------------------------------------------------------------
@@ -315,7 +315,7 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
if ( nWinStyle & (WB_SPIN|WB_DROPDOWN) )
{
- mbSpin = TRUE;
+ mbSpin = sal_True;
// Some themes want external spin buttons, therefore the main
// spinfield should not overdraw the border between its encapsulated
@@ -329,7 +329,7 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
else
mpEdit = new Edit( this, WB_NOBORDER );
- mpEdit->EnableRTL( FALSE );
+ mpEdit->EnableRTL( sal_False );
mpEdit->SetPosPixel( Point() );
mpEdit->Show();
SetSubEdit( mpEdit );
@@ -337,9 +337,9 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
maRepeatTimer.SetTimeoutHdl( LINK( this, SpinField, ImplTimeout ) );
maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
if ( nWinStyle & WB_REPEAT )
- mbRepeat = TRUE;
+ mbRepeat = sal_True;
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
}
@@ -416,7 +416,7 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( !HasFocus() && ( !mpEdit || !mpEdit->HasFocus() ) )
{
- mbNoSelect = TRUE;
+ mbNoSelect = sal_True;
GrabFocus();
}
@@ -424,20 +424,20 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbUpperIn = TRUE;
- mbInitialUp = TRUE;
+ mbUpperIn = sal_True;
+ mbInitialUp = sal_True;
Invalidate( maUpperRect );
}
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbLowerIn = TRUE;
- mbInitialDown = TRUE;
+ mbLowerIn = sal_True;
+ mbInitialDown = sal_True;
Invalidate( maLowerRect );
}
else if ( maDropDownRect.IsInside( rMEvt.GetPosPixel() ) )
{
// Rechts daneben liegt der DropDownButton:
- mbInDropDown = ShowDropDown( mbInDropDown ? FALSE : TRUE );
+ mbInDropDown = ShowDropDown( mbInDropDown ? sal_False : sal_True );
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
}
@@ -459,20 +459,20 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
void SpinField::MouseButtonUp( const MouseEvent& rMEvt )
{
ReleaseMouse();
- mbInitialUp = mbInitialDown = FALSE;
+ mbInitialUp = mbInitialDown = sal_False;
maRepeatTimer.Stop();
maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
if ( mbUpperIn )
{
- mbUpperIn = FALSE;
+ mbUpperIn = sal_False;
Invalidate( maUpperRect );
Update();
Up();
}
else if ( mbLowerIn )
{
- mbLowerIn = FALSE;
+ mbLowerIn = sal_False;
Invalidate( maLowerRect );
Update();
Down();
@@ -489,7 +489,7 @@ void SpinField::MouseMove( const MouseEvent& rMEvt )
{
if ( mbInitialUp )
{
- BOOL bNewUpperIn = maUpperRect.IsInside( rMEvt.GetPosPixel() );
+ sal_Bool bNewUpperIn = maUpperRect.IsInside( rMEvt.GetPosPixel() );
if ( bNewUpperIn != mbUpperIn )
{
if ( bNewUpperIn )
@@ -507,7 +507,7 @@ void SpinField::MouseMove( const MouseEvent& rMEvt )
}
else if ( mbInitialDown )
{
- BOOL bNewLowerIn = maLowerRect.IsInside( rMEvt.GetPosPixel() );
+ sal_Bool bNewLowerIn = maLowerRect.IsInside( rMEvt.GetPosPixel() );
if ( bNewLowerIn != mbLowerIn )
{
if ( bNewLowerIn )
@@ -538,7 +538,7 @@ long SpinField::Notify( NotifyEvent& rNEvt )
const KeyEvent& rKEvt = *rNEvt.GetKeyEvent();
if ( !IsReadOnly() )
{
- USHORT nMod = rKEvt.GetKeyCode().GetModifier();
+ sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier();
switch ( rKEvt.GetKeyCode().GetCode() )
{
case KEY_UP:
@@ -559,7 +559,7 @@ long SpinField::Notify( NotifyEvent& rNEvt )
}
else if ( ( nMod == KEY_MOD2 ) && !mbInDropDown && ( GetStyle() & WB_DROPDOWN ) )
{
- mbInDropDown = ShowDropDown( TRUE );
+ mbInDropDown = ShowDropDown( sal_True );
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
nDone = 1;
}
@@ -591,7 +591,7 @@ long SpinField::Notify( NotifyEvent& rNEvt )
{
if ( ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) && !IsReadOnly() )
{
- USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
|| ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
&& HasChildPathFocus()
@@ -643,7 +643,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
if ( mbSpin )
{
- BOOL bEnable = IsEnabled();
+ sal_Bool bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect,
mbUpperIn, mbLowerIn, bEnable, bEnable );
}
@@ -652,7 +652,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
DecorationView aView( this );
- USHORT nStyle = BUTTON_DRAW_NOLIGHTBORDER;
+ sal_uInt16 nStyle = BUTTON_DRAW_NOLIGHTBORDER;
if ( mbInDropDown )
nStyle |= BUTTON_DRAW_PRESSED;
Rectangle aInnerRect = aView.DrawButton( maDropDownRect, nStyle );
@@ -699,7 +699,7 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
if ( !(aSize.Height() & 0x01) )
nBottom1--;
- BOOL bNativeRegionOK = FALSE;
+ sal_Bool bNativeRegionOK = sal_False;
Rectangle aContentUp, aContentDown;
if ( (pDev->GetOutDevType() == OUTDEV_WINDOW) &&
@@ -838,9 +838,9 @@ void SpinField::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_STYLE )
{
if ( GetStyle() & WB_REPEAT )
- mbRepeat = TRUE;
+ mbRepeat = sal_True;
else
- mbRepeat = FALSE;
+ mbRepeat = sal_False;
}
else if ( nType == STATE_CHANGE_ZOOM )
{
@@ -853,21 +853,21 @@ void SpinField::StateChanged( StateChangedType nType )
{
if ( mpEdit )
mpEdit->SetControlFont( GetControlFont() );
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
if ( mpEdit )
mpEdit->SetControlForeground( GetControlForeground() );
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
if ( mpEdit )
mpEdit->SetControlBackground( GetControlBackground() );
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
else if( nType == STATE_CHANGE_MIRRORING )
@@ -958,15 +958,15 @@ long SpinField::PreNotify( NotifyEvent& rNEvt )
void SpinField::EndDropDown()
{
- mbInDropDown = FALSE;
+ mbInDropDown = sal_False;
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
}
// -----------------------------------------------------------------------
-BOOL SpinField::ShowDropDown( BOOL )
+sal_Bool SpinField::ShowDropDown( sal_Bool )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -997,7 +997,7 @@ Size SpinField::GetOptimalSize(WindowSizeType eType) const
// -----------------------------------------------------------------------
-Size SpinField::CalcSize( USHORT nChars ) const
+Size SpinField::CalcSize( sal_uInt16 nChars ) const
{
Size aSz = Edit::CalcSize( nChars );
@@ -1030,7 +1030,7 @@ IMPL_LINK( SpinField, ImplTimeout, Timer*, pTimer )
// -----------------------------------------------------------------------
-void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
Edit::Draw( pDev, rPos, rSize, nFlags );
@@ -1071,7 +1071,7 @@ void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
if ( GetStyle() & WB_DROPDOWN )
{
DecorationView aView( pDev );
- USHORT nStyle = BUTTON_DRAW_NOLIGHTBORDER;
+ sal_uInt16 nStyle = BUTTON_DRAW_NOLIGHTBORDER;
Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
SymbolType eSymbol = SYMBOL_SPIN_DOWN;
if ( GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN )
@@ -1083,7 +1083,7 @@ void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
if ( GetStyle() & WB_SPIN )
{
- ImplDrawSpinButton( pDev, aUp, aDown, FALSE, FALSE, TRUE, TRUE );
+ ImplDrawSpinButton( pDev, aUp, aDown, sal_False, sal_False, sal_True, sal_True );
}
pDev->Pop();
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 2c81b6af241b..31de70d73616 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -52,22 +52,22 @@
struct ImplTabItem
{
- USHORT mnId;
- USHORT mnTabPageResId;
+ sal_uInt16 mnId;
+ sal_uInt16 mnTabPageResId;
TabPage* mpTabPage;
String maText;
String maFormatText;
String maHelpText;
rtl::OString maHelpId;
Rectangle maRect;
- USHORT mnLine;
+ sal_uInt16 mnLine;
bool mbFullVisible;
bool mbEnabled;
Image maTabImage;
ImplTabItem()
: mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ),
- mnLine( 0 ), mbFullVisible( FALSE ), mbEnabled( true )
+ mnLine( 0 ), mbFullVisible( sal_False ), mbEnabled( true )
{}
};
@@ -117,16 +117,16 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
mnMaxPageWidth = 0;
mnActPageId = 0;
mnCurPageId = 0;
- mbFormat = TRUE;
- mbRestoreHelpId = FALSE;
- mbRestoreUnqId = FALSE;
- mbSmallInvalidate = FALSE;
- mbExtraSpace = FALSE;
+ mbFormat = sal_True;
+ mbRestoreHelpId = sal_False;
+ mbRestoreUnqId = sal_False;
+ mbSmallInvalidate = sal_False;
+ mbExtraSpace = sal_False;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData->mpListBox = NULL;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
if( (nStyle & WB_DROPDOWN) )
{
@@ -139,7 +139,7 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
// if the tabcontrol 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_PANE, PART_ENTIRE_CONTROL) )
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
if ( pParent->IsDialog() )
pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
@@ -160,8 +160,8 @@ const Color& TabControl::GetCanonicalTextColor( const StyleSettings& _rStyle ) c
// -----------------------------------------------------------------------
-void TabControl::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void TabControl::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -176,17 +176,17 @@ void TabControl::ImplInitSettings( BOOL bFont,
{
// set transparent mode for NWF tabcontrols to have
// the background always cleared properly
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -236,14 +236,14 @@ void TabControl::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uLong nObjMask = ReadLongRes();
if ( nObjMask & RSC_TABCONTROL_ITEMLIST )
{
- ULONG nEle = ReadLongRes();
+ sal_uLong nEle = ReadLongRes();
// Item hinzufuegen
- for( ULONG i = 0; i < nEle; i++ )
+ for( sal_uLong i = 0; i < nEle; i++ )
{
InsertPage( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
@@ -271,7 +271,7 @@ TabControl::~TabControl()
// -----------------------------------------------------------------------
-ImplTabItem* TabControl::ImplGetItem( USHORT nId ) const
+ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const
{
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
@@ -352,7 +352,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
// -----------------------------------------------------------------------
-Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight )
+Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight )
{
Size aWinSize = Control::GetOutputSizePixel();
if ( nWidth == -1 )
@@ -368,7 +368,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
if ( nItemPos == TAB_PAGERECT )
{
- USHORT nLastPos;
+ sal_uInt16 nLastPos;
if ( mnCurPageId )
nLastPos = GetPagePos( mnCurPageId );
else
@@ -390,9 +390,9 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
{
Font aFont( GetFont() );
Font aLightFont = aFont;
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus) ? WEIGHT_BOLD : WEIGHT_LIGHT );
- aLightFont.SetTransparent( TRUE );
+ aLightFont.SetTransparent( sal_True );
aLightFont.SetWeight( WEIGHT_LIGHT );
// If Bold and none Bold strings have the same width, we
@@ -412,16 +412,16 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
long nX = nOffsetX;
long nY = nOffsetY;
long nMaxWidth = nWidth;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( (mnMaxPageWidth > 0) && (mnMaxPageWidth < nMaxWidth) )
nMaxWidth = mnMaxPageWidth;
nMaxWidth -= GetItemsOffset().X();
- USHORT nLines = 0;
- USHORT nCurLine = 0;
+ sal_uInt16 nLines = 0;
+ sal_uInt16 nCurLine = 0;
long nLineWidthAry[100];
- USHORT nLinePosAry[101];
+ sal_uInt16 nLinePosAry[101];
nLineWidthAry[0] = 0;
nLinePosAry[0] = 0;
@@ -444,10 +444,10 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
Rectangle aNewRect( Point( nX, nY ), aSize );
if ( mbSmallInvalidate && (it->maRect != aNewRect) )
- mbSmallInvalidate = FALSE;
+ mbSmallInvalidate = sal_False;
it->maRect = aNewRect;
it->mnLine = nLines;
- it->mbFullVisible = TRUE;
+ it->mbFullVisible = sal_True;
nLineWidthAry[nLines] += aSize.Width();
nX += aSize.Width();
@@ -463,8 +463,8 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
long nDX = 0;
long nModDX = 0;
long nIDX = 0;
- USHORT i;
- USHORT n;
+ sal_uInt16 i;
+ sal_uInt16 n;
long nLineHeightAry[100];
long nIH = mpTabCtrlData->maItemList[0].maRect.Bottom()-2;
@@ -480,7 +480,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
i = 0;
n = 0;
- nLinePosAry[nLines+1] = (USHORT)mpTabCtrlData->maItemList.size();
+ nLinePosAry[nLines+1] = (sal_uInt16)mpTabCtrlData->maItemList.size();
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
{
@@ -541,7 +541,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
mnLastWidth = nWidth;
mnLastHeight = nHeight;
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle();
@@ -549,7 +549,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
// -----------------------------------------------------------------------
-void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
+void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
{
ImplFreeLayoutData();
@@ -561,7 +561,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
if ( IsReallyVisible() && IsUpdateMode() )
{
- USHORT nPos = GetPagePos( nId );
+ sal_uInt16 nPos = GetPagePos( nId );
Rectangle aRect = ImplGetTabRect( nPos );
if ( !pOldItem || (pOldItem->mnLine != pItem->mnLine) )
@@ -607,12 +607,12 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// also set the help id of the parent window to that of the tab page
if ( !GetHelpId().getLength() )
{
- mbRestoreHelpId = TRUE;
+ mbRestoreHelpId = sal_True;
pCtrlParent->SetHelpId( pPage->GetHelpId() );
}
if ( !pCtrlParent->GetUniqueId().getLength() )
{
- mbRestoreUnqId = TRUE;
+ mbRestoreUnqId = sal_True;
pCtrlParent->SetUniqueId( pPage->GetUniqueId() );
}
@@ -620,7 +620,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
if ( pOldPage && pOldPage->HasChildPathFocus() )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
Window* pFirstChild = pPage->ImplGetDlgWindow( n, DLGWINDOW_FIRST );
if ( pFirstChild )
pFirstChild->ImplControlFocus( GETFOCUS_INIT );
@@ -650,7 +650,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// -----------------------------------------------------------------------
-BOOL TabControl::ImplPosCurTabPage()
+sal_Bool TabControl::ImplPosCurTabPage()
{
// Aktuelle TabPage resizen/positionieren
ImplTabItem* pItem = ImplGetItem( GetCurPageId() );
@@ -658,17 +658,17 @@ BOOL TabControl::ImplPosCurTabPage()
{
Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
pItem->mpTabPage->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void TabControl::ImplActivateTabPage( BOOL bNext )
+void TabControl::ImplActivateTabPage( sal_Bool bNext )
{
- USHORT nCurPos = GetPagePos( GetCurPageId() );
+ sal_uInt16 nCurPos = GetPagePos( GetCurPageId() );
if ( bNext )
nCurPos = (nCurPos + 1) % GetPageCount();
@@ -698,14 +698,14 @@ void TabControl::ImplShowFocus()
aFont.SetWeight( (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus) ? WEIGHT_BOLD : WEIGHT_LIGHT );
SetFont( aFont );
- USHORT nCurPos = GetPagePos( mnCurPageId );
+ sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
Rectangle aRect = ImplGetTabRect( nCurPos );
const ImplTabItem& rItem = mpTabCtrlData->maItemList[ nCurPos ];
Size aTabSize = aRect.GetSize();
Size aImageSize( 0, 0 );
long nTextHeight = GetTextHeight();
long nTextWidth = GetCtrlTextWidth( rItem.maFormatText );
- USHORT nOff;
+ sal_uInt16 nOff;
if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_MONO) )
nOff = 1;
@@ -767,13 +767,13 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
Rectangle aRect = pItem->maRect;
long nLeftBottom = aRect.Bottom();
long nRightBottom = aRect.Bottom();
- BOOL bLeftBorder = TRUE;
- BOOL bRightBorder = TRUE;
- USHORT nOff;
- BOOL bNativeOK = FALSE;
+ sal_Bool bLeftBorder = sal_True;
+ sal_Bool bRightBorder = sal_True;
+ sal_uInt16 nOff;
+ sal_Bool bNativeOK = sal_False;
- USHORT nOff2 = 0;
- USHORT nOff3 = 0;
+ sal_uInt16 nOff2 = 0;
+ sal_uInt16 nOff3 = 0;
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
nOff = 1;
@@ -795,10 +795,10 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
{
aLeftTestPos.X() -= 2;
if ( rCurRect.IsInside( aLeftTestPos ) )
- bLeftBorder = FALSE;
+ bLeftBorder = sal_False;
aRightTestPos.X() += 2;
if ( rCurRect.IsInside( aRightTestPos ) )
- bRightBorder = FALSE;
+ bRightBorder = sal_False;
}
else
{
@@ -809,7 +809,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
}
}
- if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == TRUE )
+ if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == sal_True )
{
Rectangle aCtrlRegion( pItem->maRect );
ControlState nState = 0;
@@ -908,7 +908,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
// set font accordingly, current item is painted bold
// we set the font attributes always before drawing to be re-entrant (DrawNativeControl may trigger additional paints)
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( ((bIsCurrentItem) && (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus)) ? WEIGHT_BOLD : WEIGHT_LIGHT );
SetFont( aFont );
@@ -926,7 +926,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
long nYPos = aRect.Top()+((aTabSize.Height()-nTextHeight)/2)-nOff3;
if( pItem->maFormatText.Len() )
{
- USHORT nStyle = TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC;
if( ! pItem->mbEnabled )
nStyle |= TEXT_DRAW_DISABLE;
DrawCtrlText( Point( nXPos + aImageSize.Width(), nYPos ),
@@ -955,7 +955,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKeyEvent.GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( aKeyCode.IsMod1() )
{
@@ -963,7 +963,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) )
{
- ImplActivateTabPage( FALSE );
+ ImplActivateTabPage( sal_False );
nRet = 1;
}
}
@@ -971,7 +971,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) )
{
- ImplActivateTabPage( TRUE );
+ ImplActivateTabPage( sal_True );
nRet = 1;
}
}
@@ -1016,7 +1016,7 @@ void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
if( rMEvt.IsLeft() )
{
- USHORT nPageId = GetPageId( rMEvt.GetPosPixel() );
+ sal_uInt16 nPageId = GetPageId( rMEvt.GetPosPixel() );
ImplTabItem* pItem = ImplGetItem( nPageId );
if( pItem && pItem->mbEnabled )
SelectTabPage( nPageId );
@@ -1033,11 +1033,11 @@ void TabControl::KeyInput( const KeyEvent& rKEvt )
else if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( (nKeyCode == KEY_LEFT) || (nKeyCode == KEY_RIGHT) )
{
- BOOL bNext = (nKeyCode == KEY_RIGHT);
+ sal_Bool bNext = (nKeyCode == KEY_RIGHT);
ImplActivateTabPage( bNext );
}
}
@@ -1087,17 +1087,17 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
// increased to avoid round corners that might be drawn by a theme
// in this case we're only interested in the top border of the tabpage because the tabitems are used
// standalone (eg impress)
- BOOL bNoTabPage = FALSE;
+ sal_Bool bNoTabPage = sal_False;
TabPage* pCurPage = (pCurItem) ? pCurItem->mpTabPage : NULL;
if( !pCurPage || !pCurPage->IsVisible() )
{
- bNoTabPage = TRUE;
+ bNoTabPage = sal_True;
aRect.Left()-=10;
aRect.Right()+=10;
}
- BOOL bNativeOK = FALSE;
- if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) == TRUE )
+ sal_Bool bNativeOK = sal_False;
+ if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) == sal_True )
{
const ImplControlValue aControlValue;
@@ -1207,7 +1207,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
if( !rRect.IsEmpty() )
aClipRgn.Intersect( rRect );
if( bLayout || !aClipRgn.IsEmpty() )
- ImplDrawItem( pItem, aCurRect, bLayout, (pItem==pFirstTab), (pItem==pLastTab), FALSE );
+ ImplDrawItem( pItem, aCurRect, bLayout, (pItem==pFirstTab), (pItem==pLastTab), sal_False );
}
if ( bDrawTabsRTL )
@@ -1223,7 +1223,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
if( !rRect.IsEmpty() )
aClipRgn.Intersect( rRect );
if( bLayout || !aClipRgn.IsEmpty() )
- ImplDrawItem( pCurItem, aCurRect, bLayout, (pCurItem==pFirstTab), (pCurItem==pLastTab), TRUE );
+ ImplDrawItem( pCurItem, aCurRect, bLayout, (pCurItem==pFirstTab), (pCurItem==pLastTab), sal_True );
}
}
@@ -1231,7 +1231,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
ImplShowFocus();
if( ! bLayout )
- mbSmallInvalidate = TRUE;
+ mbSmallInvalidate = sal_True;
}
// -----------------------------------------------------------------------
@@ -1255,10 +1255,10 @@ void TabControl::Resize()
mpTabCtrlData->mpListBox->SetPosSizePixel( aNewPos, aNewSize );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Aktuelle TabPage resizen/positionieren
- BOOL bTabPage = ImplPosCurTabPage();
+ sal_Bool bTabPage = ImplPosCurTabPage();
// Feststellen, was invalidiert werden muss
Size aNewSize = Control::GetOutputSizePixel();
long nNewWidth = aNewSize.Width();
@@ -1268,7 +1268,7 @@ void TabControl::Resize()
if ( !it->mbFullVisible ||
(it->maRect.Right()-2 >= nNewWidth) )
{
- mbSmallInvalidate = FALSE;
+ mbSmallInvalidate = sal_False;
break;
}
}
@@ -1325,7 +1325,7 @@ void TabControl::LoseFocus()
void TabControl::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = rHEvt.KeyboardActivated() ? mnCurPageId : GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = rHEvt.KeyboardActivated() ? mnCurPageId : GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
@@ -1414,7 +1414,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
{
Point aMenuPos;
- BOOL bMenu;
+ sal_Bool bMenu;
if ( rCEvt.IsMouseEvent() )
{
aMenuPos = rCEvt.GetMousePosPixel();
@@ -1423,7 +1423,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
else
{
aMenuPos = ImplGetTabRect( GetPagePos( mnCurPageId ) ).Center();
- bMenu = TRUE;
+ bMenu = sal_True;
}
if ( bMenu )
@@ -1438,7 +1438,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
aMenu.SetHelpId( it->mnId, it->maHelpId );
}
- USHORT nId = aMenu.Execute( this, aMenuPos );
+ sal_uInt16 nId = aMenu.Execute( this, aMenuPos );
if ( nId && (nId != mnCurPageId) )
SelectTabPage( nId );
return;
@@ -1468,17 +1468,17 @@ void TabControl::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -1494,7 +1494,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1594,7 +1594,7 @@ long TabControl::DeactivatePage()
if ( maDeactivateHdl.IsSet() )
return maDeactivateHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1621,16 +1621,16 @@ Size TabControl::GetTabPageSizePixel() const
// -----------------------------------------------------------------------
-void TabControl::InsertPage( const ResId& rResId, USHORT nPos )
+void TabControl::InsertPage( const ResId& rResId, sal_uInt16 nPos )
{
GetRes( rResId.SetRT( RSC_TABCONTROLITEM ) );
- ULONG nObjMask = ReadLongRes();
- USHORT nItemId = 1;
+ sal_uLong nObjMask = ReadLongRes();
+ sal_uInt16 nItemId = 1;
// ID
if ( nObjMask & RSC_TABCONTROLITEM_ID )
- nItemId = sal::static_int_cast<USHORT>(ReadLongRes());
+ nItemId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
// Text
XubString aTmpStr;
@@ -1642,14 +1642,14 @@ void TabControl::InsertPage( const ResId& rResId, USHORT nPos )
if ( nObjMask & RSC_TABCONTROLITEM_PAGERESID )
{
ImplTabItem& rItem = mpTabCtrlData->maItemList[ GetPagePos( nItemId ) ];
- rItem.mnTabPageResId = sal::static_int_cast<USHORT>(ReadLongRes());
+ rItem.mnTabPageResId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
}
}
// -----------------------------------------------------------------------
-void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
- USHORT nPos )
+void TabControl::InsertPage( sal_uInt16 nPageId, const XubString& rText,
+ sal_uInt16 nPos )
{
DBG_ASSERT( nPageId, "TabControl::InsertPage(): PageId == 0" );
DBG_ASSERT( GetPagePos( nPageId ) == TAB_PAGE_NOTFOUND,
@@ -1688,9 +1688,9 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
pItem->mpTabPage = NULL;
pItem->mnTabPageResId = 0;
pItem->maText = rText;
- pItem->mbFullVisible = FALSE;
+ pItem->mbFullVisible = sal_False;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
@@ -1698,14 +1698,14 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
if( mpTabCtrlData->mpListBox ) // reposition/resize listbox
Resize();
- ImplCallEventListeners( VCLEVENT_TABPAGE_INSERTED, (void*) (ULONG)nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_INSERTED, (void*) (sal_uLong)nPageId );
}
// -----------------------------------------------------------------------
-void TabControl::RemovePage( USHORT nPageId )
+void TabControl::RemovePage( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// does the item exist ?
if ( nPos != TAB_PAGE_NOTFOUND )
@@ -1739,13 +1739,13 @@ void TabControl::RemovePage( USHORT nPageId )
}
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
ImplFreeLayoutData();
- ImplCallEventListeners( VCLEVENT_TABPAGE_REMOVED, (void*) (ULONG) nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_REMOVED, (void*) (sal_uLong) nPageId );
}
}
@@ -1761,7 +1761,7 @@ void TabControl::Clear()
ImplFreeLayoutData();
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
@@ -1770,14 +1770,14 @@ void TabControl::Clear()
// -----------------------------------------------------------------------
-void TabControl::EnablePage( USHORT i_nPageId, bool i_bEnable )
+void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable )
{
ImplTabItem* pItem = ImplGetItem( i_nPageId );
if ( pItem && pItem->mbEnabled != i_bEnable )
{
pItem->mbEnabled = i_bEnable;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if( mpTabCtrlData->mpListBox )
mpTabCtrlData->mpListBox->SetEntryFlags( GetPagePos( i_nPageId ),
i_bEnable ? 0 : (LISTBOX_ENTRY_FLAG_DISABLE_SELECTION | LISTBOX_ENTRY_FLAG_DRAW_DISABLED) );
@@ -1793,14 +1793,14 @@ void TabControl::EnablePage( USHORT i_nPageId, bool i_bEnable )
// -----------------------------------------------------------------------
-USHORT TabControl::GetPageCount() const
+sal_uInt16 TabControl::GetPageCount() const
{
- return (USHORT)mpTabCtrlData->maItemList.size();
+ return (sal_uInt16)mpTabCtrlData->maItemList.size();
}
// -----------------------------------------------------------------------
-USHORT TabControl::GetPageId( USHORT nPos ) const
+sal_uInt16 TabControl::GetPageId( sal_uInt16 nPos ) const
{
if( size_t(nPos) < mpTabCtrlData->maItemList.size() )
return mpTabCtrlData->maItemList[ nPos ].mnId;
@@ -1809,13 +1809,13 @@ USHORT TabControl::GetPageId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT TabControl::GetPagePos( USHORT nPageId ) const
+sal_uInt16 TabControl::GetPagePos( sal_uInt16 nPageId ) const
{
for( std::vector< ImplTabItem >::const_iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
{
if ( it->mnId == nPageId )
- return (USHORT)(it - mpTabCtrlData->maItemList.begin());
+ return (sal_uInt16)(it - mpTabCtrlData->maItemList.begin());
}
return TAB_PAGE_NOTFOUND;
@@ -1823,11 +1823,11 @@ USHORT TabControl::GetPagePos( USHORT nPageId ) const
// -----------------------------------------------------------------------
-USHORT TabControl::GetPageId( const Point& rPos ) const
+sal_uInt16 TabControl::GetPageId( const Point& rPos ) const
{
for( size_t i = 0; i < mpTabCtrlData->maItemList.size(); ++i )
{
- if ( ((TabControl*)this)->ImplGetTabRect( static_cast<USHORT>(i) ).IsInside( rPos ) )
+ if ( ((TabControl*)this)->ImplGetTabRect( static_cast<sal_uInt16>(i) ).IsInside( rPos ) )
return mpTabCtrlData->maItemList[ i ].mnId;
}
@@ -1836,9 +1836,9 @@ USHORT TabControl::GetPageId( const Point& rPos ) const
// -----------------------------------------------------------------------
-void TabControl::SetCurPageId( USHORT nPageId )
+void TabControl::SetCurPageId( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
while( nPos != TAB_PAGE_NOTFOUND &&
! mpTabCtrlData->maItemList[nPos].mbEnabled )
{
@@ -1863,8 +1863,8 @@ void TabControl::SetCurPageId( USHORT nPageId )
mnActPageId = nPageId;
else
{
- mbFormat = TRUE;
- USHORT nOldId = mnCurPageId;
+ mbFormat = sal_True;
+ sal_uInt16 nOldId = mnCurPageId;
mnCurPageId = nPageId;
ImplChangeTabPage( nPageId, nOldId );
}
@@ -1873,7 +1873,7 @@ void TabControl::SetCurPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-USHORT TabControl::GetCurPageId() const
+sal_uInt16 TabControl::GetCurPageId() const
{
if ( mnActPageId )
return mnActPageId;
@@ -1883,13 +1883,13 @@ USHORT TabControl::GetCurPageId() const
// -----------------------------------------------------------------------
-void TabControl::SelectTabPage( USHORT nPageId )
+void TabControl::SelectTabPage( sal_uInt16 nPageId )
{
if ( nPageId && (nPageId != mnCurPageId) )
{
ImplFreeLayoutData();
- ImplCallEventListeners( VCLEVENT_TABPAGE_DEACTIVATE, (void*) (ULONG) mnCurPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_DEACTIVATE, (void*) (sal_uLong) mnCurPageId );
if ( DeactivatePage() )
{
mnActPageId = nPageId;
@@ -1900,14 +1900,14 @@ void TabControl::SelectTabPage( USHORT nPageId )
SetCurPageId( nPageId );
if( mpTabCtrlData->mpListBox )
mpTabCtrlData->mpListBox->SelectEntryPos( GetPagePos( nPageId ) );
- ImplCallEventListeners( VCLEVENT_TABPAGE_ACTIVATE, (void*) (ULONG) nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_ACTIVATE, (void*) (sal_uLong) nPageId );
}
}
}
// -----------------------------------------------------------------------
-void TabControl::SetTabPage( USHORT nPageId, TabPage* pTabPage )
+void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -1932,7 +1932,7 @@ void TabControl::SetTabPage( USHORT nPageId, TabPage* pTabPage )
// -----------------------------------------------------------------------
-TabPage* TabControl::GetTabPage( USHORT nPageId ) const
+TabPage* TabControl::GetTabPage( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -1944,7 +1944,7 @@ TabPage* TabControl::GetTabPage( USHORT nPageId ) const
// -----------------------------------------------------------------------
-USHORT TabControl::GetTabPageResId( USHORT nPageId ) const
+sal_uInt16 TabControl::GetTabPageResId( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -1956,30 +1956,30 @@ USHORT TabControl::GetTabPageResId( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetPageText( USHORT nPageId, const XubString& rText )
+void TabControl::SetPageText( sal_uInt16 nPageId, const XubString& rText )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
if ( pItem && pItem->maText != rText )
{
pItem->maText = rText;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if( mpTabCtrlData->mpListBox )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
mpTabCtrlData->mpListBox->RemoveEntry( nPos );
mpTabCtrlData->mpListBox->InsertEntry( rText, nPos );
}
if ( IsUpdateMode() )
Invalidate();
ImplFreeLayoutData();
- ImplCallEventListeners( VCLEVENT_TABPAGE_PAGETEXTCHANGED, (void*) (ULONG) nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_PAGETEXTCHANGED, (void*) (sal_uLong) nPageId );
}
}
// -----------------------------------------------------------------------
-XubString TabControl::GetPageText( USHORT nPageId ) const
+XubString TabControl::GetPageText( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -1991,7 +1991,7 @@ XubString TabControl::GetPageText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetHelpText( USHORT nPageId, const XubString& rText )
+void TabControl::SetHelpText( sal_uInt16 nPageId, const XubString& rText )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2001,7 +2001,7 @@ void TabControl::SetHelpText( USHORT nPageId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& TabControl::GetHelpText( USHORT nPageId ) const
+const XubString& TabControl::GetHelpText( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2022,7 +2022,7 @@ const XubString& TabControl::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
+void TabControl::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2032,7 +2032,7 @@ void TabControl::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
// -----------------------------------------------------------------------
-rtl::OString TabControl::GetHelpId( USHORT nPageId ) const
+rtl::OString TabControl::GetHelpId( sal_uInt16 nPageId ) const
{
rtl::OString aRet;
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2045,14 +2045,14 @@ rtl::OString TabControl::GetHelpId( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetPageImage( USHORT i_nPageId, const Image& i_rImage )
+void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage )
{
ImplTabItem* pItem = ImplGetItem( i_nPageId );
if ( pItem )
{
pItem->maTabImage = i_rImage;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
}
@@ -2060,7 +2060,7 @@ void TabControl::SetPageImage( USHORT i_nPageId, const Image& i_rImage )
// -----------------------------------------------------------------------
-const Image* TabControl::GetPageImage( USHORT i_nPageId ) const
+const Image* TabControl::GetPageImage( sal_uInt16 i_nPageId ) const
{
const ImplTabItem* pItem = ImplGetItem( i_nPageId );
return pItem ? &pItem->maTabImage : NULL;
@@ -2068,7 +2068,7 @@ const Image* TabControl::GetPageImage( USHORT i_nPageId ) const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetCharacterBounds( USHORT nPageId, long nIndex ) const
+Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const
{
Rectangle aRet;
@@ -2091,7 +2091,7 @@ Rectangle TabControl::GetCharacterBounds( USHORT nPageId, long nIndex ) const
// -----------------------------------------------------------------------
-long TabControl::GetIndexForPoint( const Point& rPoint, USHORT& rPageId ) const
+long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const
{
long nRet = -1;
@@ -2112,7 +2112,7 @@ long TabControl::GetIndexForPoint( const Point& rPoint, USHORT& rPageId ) const
if( aPair.A() <= nIndex && aPair.B() >= nIndex )
{
nRet = nIndex - aPair.A();
- rPageId = (USHORT)mpTabCtrlData->maLayoutLineToPageId[ nLine ];
+ rPageId = (sal_uInt16)mpTabCtrlData->maLayoutLineToPageId[ nLine ];
break;
}
}
@@ -2133,7 +2133,7 @@ void TabControl::FillLayoutData() const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const
+Rectangle TabControl::GetTabPageBounds( sal_uInt16 nPage ) const
{
Rectangle aRet;
@@ -2158,7 +2158,7 @@ Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetTabBounds( USHORT nPageId ) const
+Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const
{
Rectangle aRet;