diff options
Diffstat (limited to 'vcl/source/control/tabctrl.cxx')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 441 |
1 files changed, 158 insertions, 283 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 5658d39cd3eb..bb60e7e5eea9 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -43,7 +43,6 @@ #include "vcl/controldata.hxx" #include "vcl/sound.hxx" #include "vcl/lstbox.hxx" -#include "vcl/smartid.hxx" #include "vcl/window.h" @@ -54,22 +53,22 @@ struct ImplTabItem { - USHORT mnId; - USHORT mnTabPageResId; + sal_uInt16 mnId; + sal_uInt16 mnTabPageResId; TabPage* mpTabPage; String maText; String maFormatText; String maHelpText; - ULONG mnHelpId; + rtl::OString maHelpId; Rectangle maRect; - USHORT mnLine; + sal_uInt16 mnLine; bool mbFullVisible; bool mbEnabled; Image maTabImage; ImplTabItem() - : mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ), mnHelpId( 0 ), - mnLine( 0 ), mbFullVisible( FALSE ), mbEnabled( true ) + : mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ), + mnLine( 0 ), mbFullVisible( sal_False ), mbEnabled( true ) {} }; @@ -77,8 +76,6 @@ struct ImplTabItem struct ImplTabCtrlData { - PushButton* mpLeftBtn; - PushButton* mpRightBtn; boost::unordered_map< int, int > maLayoutPageIdToLine; boost::unordered_map< int, int > maLayoutLineToPageId; std::vector< Rectangle > maTabRectangles; @@ -113,9 +110,6 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) if ( !(nStyle & WB_NODIALOGCONTROL) ) nStyle |= WB_DIALOGCONTROL; - // no single line tabs since NWF - nStyle &= ~WB_SINGLELINE; - Control::ImplInit( pParent, nStyle, NULL ); mnLastWidth = 0; @@ -124,23 +118,16 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) mnMaxPageWidth = 0; mnActPageId = 0; mnCurPageId = 0; - mnFirstPagePos = 0; - mnLastFirstPagePos = 0; - mbFormat = TRUE; - mbRestoreHelpId = FALSE; - mbRestoreUnqId = FALSE; - mbSingleLine = FALSE; - mbScroll = FALSE; - mbRestoreSmartId = FALSE; - mbSmallInvalidate = FALSE; - mbExtraSpace = FALSE; + mbFormat = sal_True; + mbRestoreHelpId = sal_False; + mbRestoreUnqId = sal_False; + mbSmallInvalidate = sal_False; + mbExtraSpace = sal_False; mpTabCtrlData = new ImplTabCtrlData; - mpTabCtrlData->mpLeftBtn = NULL; - mpTabCtrlData->mpRightBtn = NULL; mpTabCtrlData->mpListBox = NULL; - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); if( (nStyle & WB_DROPDOWN) ) { @@ -153,7 +140,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 ) ); @@ -186,8 +173,8 @@ WinBits TabControl::ImplInitStyle( WinBits nStyle ) // ----------------------------------------------------------------------- -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 ); @@ -202,17 +189,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() ); @@ -220,8 +207,6 @@ void TabControl::ImplInitSettings( BOOL bFont, SetBackground( pParent->GetBackground() ); } } - - ImplScrollBtnsColor(); } // ----------------------------------------------------------------------- @@ -265,14 +250,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() ) ); @@ -294,17 +279,13 @@ TabControl::~TabControl() { if( mpTabCtrlData->mpListBox ) delete mpTabCtrlData->mpListBox; - if ( mpTabCtrlData->mpLeftBtn ) - delete mpTabCtrlData->mpLeftBtn; - if ( mpTabCtrlData->mpRightBtn ) - delete mpTabCtrlData->mpRightBtn; delete mpTabCtrlData; } } // ----------------------------------------------------------------------- -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 ) @@ -318,74 +299,6 @@ ImplTabItem* TabControl::ImplGetItem( USHORT nId ) const // ----------------------------------------------------------------------- -void TabControl::ImplScrollBtnsColor() -{ - if ( mpTabCtrlData && mpTabCtrlData->mpLeftBtn ) - { - mpTabCtrlData->mpLeftBtn->SetControlForeground(); - mpTabCtrlData->mpRightBtn->SetControlForeground(); - } -} - -// ----------------------------------------------------------------------- - -void TabControl::ImplSetScrollBtnsState() -{ - if ( mbScroll ) - { - mpTabCtrlData->mpLeftBtn->Enable( mnFirstPagePos != 0 ); - mpTabCtrlData->mpRightBtn->Enable( mnFirstPagePos < mnLastFirstPagePos ); - } -} - -// ----------------------------------------------------------------------- - -void TabControl::ImplPosScrollBtns() -{ - if ( mbScroll ) - { - if ( !mpTabCtrlData->mpLeftBtn ) - { - mpTabCtrlData->mpLeftBtn = new PushButton( this, WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOPOINTERFOCUS | WB_REPEAT ); - mpTabCtrlData->mpLeftBtn->SetSymbol( SYMBOL_PREV ); - mpTabCtrlData->mpLeftBtn->SetClickHdl( LINK( this, TabControl, ImplScrollBtnHdl ) ); - } - if ( !mpTabCtrlData->mpRightBtn ) - { - mpTabCtrlData->mpRightBtn = new PushButton( this, WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOPOINTERFOCUS | WB_REPEAT ); - mpTabCtrlData->mpRightBtn->SetSymbol( SYMBOL_NEXT ); - mpTabCtrlData->mpRightBtn->SetClickHdl( LINK( this, TabControl, ImplScrollBtnHdl ) ); - } - - Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); - aRect.Left() -= TAB_OFFSET; - aRect.Top() -= TAB_OFFSET; - aRect.Right() += TAB_OFFSET; - aRect.Bottom() += TAB_OFFSET; - long nX = aRect.Right()-mnBtnSize+1; - long nY = aRect.Top()-mnBtnSize; - mpTabCtrlData->mpRightBtn->SetPosSizePixel( nX, nY, mnBtnSize, mnBtnSize ); - nX -= mnBtnSize; - mpTabCtrlData->mpLeftBtn->SetPosSizePixel( nX, nY, mnBtnSize, mnBtnSize ); - ImplScrollBtnsColor(); - ImplSetScrollBtnsState(); - mpTabCtrlData->mpLeftBtn->Show(); - mpTabCtrlData->mpRightBtn->Show(); - } - else - { - if ( mpTabCtrlData ) - { - if ( mpTabCtrlData->mpLeftBtn ) - mpTabCtrlData->mpLeftBtn->Hide(); - if ( mpTabCtrlData->mpRightBtn ) - mpTabCtrlData->mpRightBtn->Hide(); - } - } -} - -// ----------------------------------------------------------------------- - Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ) { pItem->maFormatText = pItem->maText; @@ -453,7 +366,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 < 0 ) @@ -472,7 +385,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 @@ -496,9 +409,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 @@ -518,18 +431,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(); - mbScroll = FALSE; - - 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; @@ -552,10 +463,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(); @@ -571,8 +482,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; @@ -588,7 +499,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 ) { @@ -649,9 +560,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight mnLastWidth = nWidth; mnLastHeight = nHeight; - mbFormat = FALSE; - - ImplPosScrollBtns(); + mbFormat = sal_False; } return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle(); @@ -659,7 +568,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(); @@ -671,7 +580,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) ) @@ -703,11 +612,9 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId ) if ( pOldPage ) { if ( mbRestoreHelpId ) - pCtrlParent->SetHelpId( 0 ); + pCtrlParent->SetHelpId( rtl::OString() ); if ( mbRestoreUnqId ) - pCtrlParent->SetUniqueId( 0 ); - if( mbRestoreSmartId ) - pCtrlParent->SetSmartHelpId( SmartId() ); + pCtrlParent->SetUniqueId( rtl::OString() ); pOldPage->DeactivatePage(); } @@ -723,27 +630,22 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId ) // activate page here so the conbtrols can be switched // also set the help id of the parent window to that of the tab page - if ( !GetHelpId() ) + if ( !GetHelpId().getLength() ) { - mbRestoreHelpId = TRUE; + mbRestoreHelpId = sal_True; pCtrlParent->SetHelpId( pPage->GetHelpId() ); } - if ( !pCtrlParent->GetUniqueId() ) + if ( !pCtrlParent->GetUniqueId().getLength() ) { - mbRestoreUnqId = TRUE; + mbRestoreUnqId = sal_True; pCtrlParent->SetUniqueId( pPage->GetUniqueId() ); } - if( ! GetSmartHelpId().HasAny() ) - { - mbRestoreSmartId = TRUE; - pCtrlParent->SetSmartHelpId( pPage->GetSmartHelpId() ); - } pPage->ActivatePage(); if ( pOldPage && pOldPage->HasChildPathFocus() ) { - USHORT n = 0; + sal_uInt16 n = 0; Window* pFirstChild = pPage->ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFirstChild ) pFirstChild->ImplControlFocus( GETFOCUS_INIT ); @@ -773,7 +675,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId ) // ----------------------------------------------------------------------- -BOOL TabControl::ImplPosCurTabPage() +sal_Bool TabControl::ImplPosCurTabPage() { // Aktuelle TabPage resizen/positionieren ImplTabItem* pItem = ImplGetItem( GetCurPageId() ); @@ -783,21 +685,21 @@ BOOL TabControl::ImplPosCurTabPage() { Rectangle aRectNoTab( (const Point&)Point( 0, 0 ), GetSizePixel() ); pItem->mpTabPage->SetPosSizePixel( aRectNoTab.TopLeft(), aRectNoTab.GetSize() ); - return TRUE; + return sal_True; } 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(); @@ -814,13 +716,6 @@ void TabControl::ImplActivateTabPage( BOOL bNext ) // ----------------------------------------------------------------------- -void TabControl::ImplSetFirstPagePos( USHORT ) -{ - return; // was only required for single line -} - -// ----------------------------------------------------------------------- - void TabControl::ImplShowFocus() { if ( !GetPageCount() || mpTabCtrlData->mpListBox ) @@ -834,14 +729,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; @@ -903,13 +798,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; @@ -931,10 +826,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 { @@ -945,7 +840,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; @@ -1044,7 +939,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 ); @@ -1062,7 +957,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 ), @@ -1091,7 +986,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() ) { @@ -1099,7 +994,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) { if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) ) { - ImplActivateTabPage( FALSE ); + ImplActivateTabPage( sal_False ); nRet = 1; } } @@ -1107,7 +1002,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) { if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) ) { - ImplActivateTabPage( TRUE ); + ImplActivateTabPage( sal_True ); nRet = 1; } } @@ -1120,14 +1015,6 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) // ----------------------------------------------------------------------- -IMPL_LINK( TabControl, ImplScrollBtnHdl, PushButton*, EMPTYARG ) -{ - ImplSetScrollBtnsState(); - return 0; -} - -// ----------------------------------------------------------------------- - IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG ) { SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) ); @@ -1160,7 +1047,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 ); @@ -1177,11 +1064,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 ); } } @@ -1231,17 +1118,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; @@ -1352,7 +1239,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 ) @@ -1368,7 +1255,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 ); } } @@ -1376,7 +1263,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) ImplShowFocus(); if( ! bLayout ) - mbSmallInvalidate = TRUE; + mbSmallInvalidate = sal_True; } // ----------------------------------------------------------------------- @@ -1400,26 +1287,21 @@ 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(); - if ( mbScroll ) - mbSmallInvalidate = FALSE; - else + for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin(); + it != mpTabCtrlData->maItemList.end(); ++it ) { - for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin(); - it != mpTabCtrlData->maItemList.end(); ++it ) + if ( !it->mbFullVisible || + (it->maRect.Right()-2 >= nNewWidth) ) { - if ( !it->mbFullVisible || - (it->maRect.Right()-2 >= nNewWidth) ) - { - mbSmallInvalidate = FALSE; - break; - } + mbSmallInvalidate = sal_False; + break; } } @@ -1475,7 +1357,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 ) { @@ -1497,13 +1379,13 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { - ULONG nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -1564,7 +1446,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(); @@ -1573,7 +1455,7 @@ void TabControl::Command( const CommandEvent& rCEvt ) else { aMenuPos = ImplGetTabRect( GetPagePos( mnCurPageId ) ).Center(); - bMenu = TRUE; + bMenu = sal_True; } if ( bMenu ) @@ -1585,10 +1467,10 @@ void TabControl::Command( const CommandEvent& rCEvt ) aMenu.InsertItem( it->mnId, it->maText, MIB_CHECKABLE | MIB_RADIOCHECK ); if ( it->mnId == mnCurPageId ) aMenu.CheckItem( it->mnId ); - aMenu.SetHelpId( it->mnId, it->mnHelpId ); + 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; @@ -1618,17 +1500,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(); } else if ( nType == STATE_CHANGE_STYLE ) @@ -1648,7 +1530,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(); } } @@ -1748,7 +1630,7 @@ long TabControl::DeactivatePage() if ( maDeactivateHdl.IsSet() ) return maDeactivateHdl.Call( this ); else - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -1775,16 +1657,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; @@ -1796,14 +1678,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, @@ -1841,11 +1723,10 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText, pItem->mnId = nPageId; pItem->mpTabPage = NULL; pItem->mnTabPageResId = 0; - pItem->mnHelpId = 0; pItem->maText = rText; - pItem->mbFullVisible = FALSE; + pItem->mbFullVisible = sal_False; - mbFormat = TRUE; + mbFormat = sal_True; if ( IsUpdateMode() ) Invalidate(); @@ -1853,14 +1734,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 ) @@ -1894,13 +1775,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 ); } } @@ -1916,7 +1797,7 @@ void TabControl::Clear() ImplFreeLayoutData(); - mbFormat = TRUE; + mbFormat = sal_True; if ( IsUpdateMode() ) Invalidate(); @@ -1925,14 +1806,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) ); @@ -1948,14 +1829,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; @@ -1964,13 +1845,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; @@ -1978,11 +1859,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; } @@ -1991,9 +1872,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 ) { @@ -2018,8 +1899,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 ); } @@ -2028,7 +1909,7 @@ void TabControl::SetCurPageId( USHORT nPageId ) // ----------------------------------------------------------------------- -USHORT TabControl::GetCurPageId() const +sal_uInt16 TabControl::GetCurPageId() const { if ( mnActPageId ) return mnActPageId; @@ -2038,20 +1919,13 @@ USHORT TabControl::GetCurPageId() const // ----------------------------------------------------------------------- -void TabControl::SetFirstPageId( USHORT ) -{ - return; // was only required for single line -} - -// ----------------------------------------------------------------------- - -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; @@ -2062,14 +1936,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 ); @@ -2094,7 +1968,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 ); @@ -2106,7 +1980,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 ); @@ -2118,30 +1992,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 ); @@ -2153,7 +2027,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 ); @@ -2163,17 +2037,17 @@ 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 ); if ( pItem ) { - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } return pItem->maHelpText; @@ -2184,36 +2058,37 @@ const XubString& TabControl::GetHelpText( USHORT nPageId ) const // ----------------------------------------------------------------------- -void TabControl::SetHelpId( USHORT nPageId, ULONG nHelpId ) +void TabControl::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId ) { ImplTabItem* pItem = ImplGetItem( nPageId ); if ( pItem ) - pItem->mnHelpId = nHelpId; + pItem->maHelpId = rHelpId; } // ----------------------------------------------------------------------- -ULONG TabControl::GetHelpId( USHORT nPageId ) const +rtl::OString TabControl::GetHelpId( sal_uInt16 nPageId ) const { + rtl::OString aRet; ImplTabItem* pItem = ImplGetItem( nPageId ); if ( pItem ) - return pItem->mnHelpId; - else - return 0; + aRet = pItem->maHelpId; + + return aRet; } // ----------------------------------------------------------------------- -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(); } @@ -2221,7 +2096,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; @@ -2229,7 +2104,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; @@ -2252,7 +2127,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; @@ -2273,7 +2148,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; } } @@ -2294,7 +2169,7 @@ void TabControl::FillLayoutData() const // ----------------------------------------------------------------------- -Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const +Rectangle TabControl::GetTabPageBounds( sal_uInt16 nPage ) const { Rectangle aRet; @@ -2319,7 +2194,7 @@ Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const // ----------------------------------------------------------------------- -Rectangle TabControl::GetTabBounds( USHORT nPageId ) const +Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const { Rectangle aRet; |