diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-17 13:20:22 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-17 13:20:22 +0100 |
commit | cd42389ad67b403a07a0dda8e2a6e213def49251 (patch) | |
tree | 51e19c743788a549502b7c801c64e11142103310 /sc/source/ui/cctrl | |
parent | 3d6a5a98cda10e18dacd96028f2bf0ec0b478988 (diff) |
removetooltypes01: #i112600# remove tooltypes from sc
Diffstat (limited to 'sc/source/ui/cctrl')
-rw-r--r-- | sc/source/ui/cctrl/cbuttonw.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/cctrl/dpcontrol.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/cctrl/popmenu.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/cctrl/tbinsert.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 46 |
5 files changed, 46 insertions, 46 deletions
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx index 6004fdfcfc51..79b9e4cb302f 100644 --- a/sc/source/ui/cctrl/cbuttonw.cxx +++ b/sc/source/ui/cctrl/cbuttonw.cxx @@ -70,28 +70,28 @@ void ScDDComboBoxButton::SetOptSizePixel() void ScDDComboBoxButton::Draw( const Point& rAt, const Size& rSize, - BOOL bState, - BOOL bBtnIn /* = FALSE */ ) + sal_Bool bState, + sal_Bool bBtnIn /* = sal_False */ ) { if ( rSize.Width() == 0 || rSize.Height() == 0 ) return; // #i43092# rectangle with size 0 would have RECT_EMPTY as end position // save old state - BOOL bHadFill = pOut->IsFillColor(); + sal_Bool bHadFill = pOut->IsFillColor(); Color aOldFill = pOut->GetFillColor(); - BOOL bHadLine = pOut->IsLineColor(); + sal_Bool bHadLine = pOut->IsLineColor(); Color aOldLine = pOut->GetLineColor(); - BOOL bOldEnable = pOut->IsMapModeEnabled(); + sal_Bool bOldEnable = pOut->IsMapModeEnabled(); Size aLogPix( 1, 1 ); Rectangle aBtnRect( rAt, rSize ); Rectangle aInnerRect = aBtnRect; - pOut->EnableMapMode( FALSE ); + pOut->EnableMapMode( sal_False ); DecorationView aDecoView( pOut); - USHORT nButtonStyle = BUTTON_DRAW_DEFAULT; + sal_uInt16 nButtonStyle = BUTTON_DRAW_DEFAULT; if( bBtnIn ) // gedrueckt? { nButtonStyle = BUTTON_DRAW_PRESSED; @@ -129,7 +129,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt, //------------------------------------------------------------------------ void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect, - BOOL bState ) + sal_Bool bState ) { // no need to save old line and fill color here (is restored after the call) diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index b90a51ed6bee..0066af5938e2 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -306,7 +306,7 @@ IMPL_LINK( ScMenuFloatingWindow::SubMenuItemData, TimeoutHdl, void*, EMPTYARG ) size_t ScMenuFloatingWindow::MENU_NOT_SELECTED = 999; -ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel) : +ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel) : PopupMenuFloatingWindow(pParent), maOpenTimer(this), maCloseTimer(this), @@ -1160,7 +1160,7 @@ void ScDPFieldPopupWindow::setAllMemberState(bool bSet) { size_t n = maMembers.size(); for (size_t i = 0; i < n; ++i) - maChecks.CheckEntryPos(static_cast< USHORT >( i ), bSet); + maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), bSet); } void ScDPFieldPopupWindow::selectCurrentMemberOnly(bool bSet) @@ -1356,7 +1356,7 @@ void ScDPFieldPopupWindow::initMembers() for (size_t i = 0; i < n; ++i) { maChecks.InsertEntry(maMembers[i].maName); - maChecks.CheckEntryPos(static_cast< USHORT >( i ), maMembers[i].mbVisible); + maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), maMembers[i].mbVisible); if (maMembers[i].mbVisible) ++nVisMemCount; } @@ -1391,7 +1391,7 @@ void ScDPFieldPopupWindow::getResult(hash_map<OUString, bool, OUStringHash>& rRe size_t n = maMembers.size(); for (size_t i = 0; i < n; ++i) { - bool bState = maChecks.IsChecked(static_cast< USHORT >( i )); + bool bState = maChecks.IsChecked(static_cast< sal_uInt16 >( i )); aResult.insert(ResultMap::value_type(maMembers[i].maName, bState)); } rResult.swap(aResult); diff --git a/sc/source/ui/cctrl/popmenu.cxx b/sc/source/ui/cctrl/popmenu.cxx index 6510fff87ead..f7eb8aa1f4e9 100644 --- a/sc/source/ui/cctrl/popmenu.cxx +++ b/sc/source/ui/cctrl/popmenu.cxx @@ -41,7 +41,7 @@ void __EXPORT ScPopupMenu::Select() { nSel = GetCurItemId(); - bHit = TRUE; + bHit = sal_True; } diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx index e27baecec115..930bddb0799f 100644 --- a/sc/source/ui/cctrl/tbinsert.cxx +++ b/sc/source/ui/cctrl/tbinsert.cxx @@ -62,7 +62,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ScTbxInsertCtrl, SfxUInt16Item); // //------------------------------------------------------------------ -ScTbxInsertCtrl::ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +ScTbxInsertCtrl::ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), nLastSlotId(0) { @@ -73,7 +73,7 @@ __EXPORT ScTbxInsertCtrl::~ScTbxInsertCtrl() { } -void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState, +void __EXPORT ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); @@ -85,7 +85,7 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt if(pItem) { nLastSlotId = pItem->GetValue(); - USHORT nImageId = nLastSlotId ? nLastSlotId : GetSlotId(); + sal_uInt16 nImageId = nLastSlotId ? nLastSlotId : GetSlotId(); rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nImageId )); Image aImage = GetImage( m_xFrame, @@ -99,8 +99,8 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() { -// USHORT nWinResId, nTbxResId; - USHORT nSlotId = GetSlotId(); +// sal_uInt16 nWinResId, nTbxResId; + sal_uInt16 nSlotId = GetSlotId(); if (nSlotId == SID_TBXCTL_INSERT) { rtl::OUString aInsertBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" )); @@ -126,7 +126,7 @@ SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() WindowAlign eNewAlign = ( GetToolBox().IsHorizontal() ) ? WINDOWALIGN_LEFT : WINDOWALIGN_TOP; ScTbxInsertPopup *pWin = new ScTbxInsertPopup( nSlotId, eNewAlign, ScResId(nWinResId), ScResId(nTbxResId), GetBindings() ); - pWin->StartPopupMode(&GetToolBox(), TRUE); + pWin->StartPopupMode(&GetToolBox(), sal_True); pWin->StartSelection(); pWin->Show(); return pWin; @@ -139,7 +139,7 @@ SfxPopupWindowType __EXPORT ScTbxInsertCtrl::GetPopupWindowType() const return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK; } -void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) +void __EXPORT ScTbxInsertCtrl::Select( sal_Bool /* bMod1 */ ) { SfxViewShell* pCurSh( SfxViewShell::Current() ); SfxDispatcher* pDispatch( 0 ); @@ -161,7 +161,7 @@ void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) // //------------------------------------------------------------------ -ScTbxInsertPopup::ScTbxInsertPopup( USHORT nId, WindowAlign eNewAlign, +ScTbxInsertPopup::ScTbxInsertPopup( sal_uInt16 nId, WindowAlign eNewAlign, const ResId& rRIdWin, const ResId& rRIdTbx, SfxBindings& rBindings ) : SfxPopupWindow ( nId, rRIdWin, rBindings), @@ -204,7 +204,7 @@ IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) { EndPopupMode(); - USHORT nLastSlotId = pBox->GetCurItemId(); + sal_uInt16 nLastSlotId = pBox->GetCurItemId(); SfxUInt16Item aItem( GetId(), nLastSlotId ); SfxDispatcher* pDisp = GetBindings().GetDispatcher(); pDisp->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); @@ -214,7 +214,7 @@ IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) IMPL_LINK(ScTbxInsertPopup, TbxClickHdl, ToolBox*, pBox) { - USHORT nLastSlotId = pBox->GetCurItemId(); + sal_uInt16 nLastSlotId = pBox->GetCurItemId(); SfxUInt16Item aItem( GetId(), nLastSlotId ); GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); if(aTbxClickHdl.IsSet()) diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 7d43b31e0b30..f2557d16e4de 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -63,8 +63,8 @@ SFX_IMPL_TOOLBOX_CONTROL( ScZoomSliderControl, SvxZoomSliderItem ); // ----------------------------------------------------------------------- ScZoomSliderControl::ScZoomSliderControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) :SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -80,10 +80,10 @@ __EXPORT ScZoomSliderControl::~ScZoomSliderControl() // ----------------------------------------------------------------------- -void ScZoomSliderControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, +void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId )); DBG_ASSERT( pBox ,"Control not found!" ); @@ -122,19 +122,19 @@ Window* ScZoomSliderControl::CreateItemWindow( Window *pParent ) struct ScZoomSliderWnd::ScZoomSliderWnd_Impl { - USHORT mnCurrentZoom; - USHORT mnMinZoom; - USHORT mnMaxZoom; - USHORT mnSliderCenter; + sal_uInt16 mnCurrentZoom; + sal_uInt16 mnMinZoom; + sal_uInt16 mnMaxZoom; + sal_uInt16 mnSliderCenter; std::vector< long > maSnappingPointOffsets; - std::vector< USHORT > maSnappingPointZooms; + std::vector< sal_uInt16 > maSnappingPointZooms; Image maSliderButton; Image maIncreaseButton; Image maDecreaseButton; bool mbValuesSet; bool mbOmitPaint; - ScZoomSliderWnd_Impl( USHORT nCurrentZoom ) : + ScZoomSliderWnd_Impl( sal_uInt16 nCurrentZoom ) : mnCurrentZoom( nCurrentZoom ), mnMinZoom( 10 ), mnMaxZoom( 400 ), @@ -167,11 +167,11 @@ const long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of two // ----------------------------------------------------------------------- -USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const +sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const { Size aSliderWindowSize = GetOutputSizePixel(); const long nControlWidth = aSliderWindowSize.Width(); - USHORT nRet = 0; + sal_uInt16 nRet = 0; if( nOffset < nSliderXOffset ) return mpImpl->mnMinZoom; @@ -179,7 +179,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const return mpImpl->mnMaxZoom; // check for snapping points: - USHORT nCount = 0; + sal_uInt16 nCount = 0; std::vector< long >::iterator aSnappingPointIter; for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin(); aSnappingPointIter != mpImpl->maSnappingPointOffsets.end(); @@ -204,7 +204,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth; const long nOffsetToSliderLeft = nOffset - nSliderXOffset; - nRet = mpImpl->mnMinZoom + USHORT( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); + nRet = mpImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); } else { @@ -213,7 +213,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth; const long nOffsetToSliderCenter = nOffset - nControlWidth/2; - nRet = mpImpl->mnSliderCenter + USHORT( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); + nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); } } @@ -228,7 +228,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const // ----------------------------------------------------------------------- -long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const +long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 nCurrentZoom ) const { Size aSliderWindowSize = GetOutputSizePixel(); const long nControlWidth = aSliderWindowSize.Width(); @@ -258,14 +258,14 @@ long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const ScZoomSliderWnd::ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom ): + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom ): Window( pParent ), mpImpl( new ScZoomSliderWnd_Impl( nCurrentZoom ) ), aLogicalSize( 115, 40 ), m_xDispatchProvider( rDispatchProvider ), m_xFrame( _xFrame ) { - BOOL bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode(); mpImpl->maSliderButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); mpImpl->maIncreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); mpImpl->maDecreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); @@ -400,20 +400,20 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ) mpImpl->maSnappingPointZooms.clear(); // get all snapping points: - std::set< USHORT > aTmpSnappingPoints; - for ( USHORT j = 0; j < rSnappingPoints.getLength(); ++j ) + std::set< sal_uInt16 > aTmpSnappingPoints; + for ( sal_uInt16 j = 0; j < rSnappingPoints.getLength(); ++j ) { const sal_Int32 nSnappingPoint = rSnappingPoints[j]; - aTmpSnappingPoints.insert( (USHORT)nSnappingPoint ); + aTmpSnappingPoints.insert( (sal_uInt16)nSnappingPoint ); } // remove snapping points that are to close to each other: - std::set< USHORT >::iterator aSnappingPointIter; + std::set< sal_uInt16 >::iterator aSnappingPointIter; long nLastOffset = 0; for ( aSnappingPointIter = aTmpSnappingPoints.begin(); aSnappingPointIter != aTmpSnappingPoints.end(); ++aSnappingPointIter ) { - const USHORT nCurrent = *aSnappingPointIter; + const sal_uInt16 nCurrent = *aSnappingPointIter; const long nCurrentOffset = Zoom2Offset( nCurrent ); if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist ) |