diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 14:05:50 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-22 06:32:35 +0000 |
commit | e929194317a7debb1c5467282230cbbabe61a710 (patch) | |
tree | 89f7bfe3a00003c0fa96113b77abbf76c92f80bf /svtools | |
parent | edcd1d5a9c88455fd1d52ab25815fc8d439f31ec (diff) |
convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19
Reviewed-on: https://gerrit.libreoffice.org/15825
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 4 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/headbar.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/hyperlabel.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 26 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 2 | ||||
-rw-r--r-- | svtools/source/hatchwindow/ipwin.cxx | 10 | ||||
-rw-r--r-- | svtools/source/table/mousefunction.cxx | 10 | ||||
-rw-r--r-- | svtools/source/toolpanel/toolpaneldrawer.cxx | 2 |
9 files changed, 34 insertions, 34 deletions
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index dc1e92145369..1fa03aa9f59d 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -1423,7 +1423,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt ) bResizing = true; nResizeCol = nCol; nDragX = nResizeX = rEvtPos.X(); - SetPointer( Pointer( POINTER_HSPLIT ) ); + SetPointer( Pointer( PointerStyle::HSplit ) ); CaptureMouse(); pDataWin->DrawLine( Point( nDragX, 0 ), Point( nDragX, pDataWin->GetSizePixel().Height() ) ); @@ -1472,7 +1472,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt ) if ( bResizing || ( pCol->GetId() && std::abs( ((long) nR ) - rEvt.GetPosPixel().X() ) < MIN_COLUMNWIDTH ) ) { - aNewPointer = Pointer( POINTER_HSPLIT ); + aNewPointer = Pointer( PointerStyle::HSplit ); if ( bResizing ) { // delete old auxiliary line diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 74f2f25c4ac7..4d037e21ca34 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -482,9 +482,9 @@ void BrowserDataWin::MouseMove( const MouseEvent& rEvt ) GetParent()->MouseMove( aBrowserEvent ); // pointer shape - PointerStyle ePointerStyle = POINTER_ARROW; + PointerStyle ePointerStyle = PointerStyle::Arrow; if ( ImplRowDividerHitTest( aBrowserEvent ) ) - ePointerStyle = POINTER_VSIZEBAR; + ePointerStyle = PointerStyle::VSizeBar; SetPointer( Pointer( ePointerStyle ) ); // dragging out of the visible area? diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 8bde905c7857..87e9f5831455 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -831,7 +831,7 @@ void HeaderBar::ImplEndDrag( bool bCancel ) { if ( mbItemDrag ) { - Pointer aPointer( POINTER_ARROW ); + Pointer aPointer( PointerStyle::Arrow ); SetPointer( aPointer ); if ( (mnItemDragPos != nPos) && (mnItemDragPos != HEADERBAR_ITEM_NOTFOUND) ) @@ -900,11 +900,11 @@ void HeaderBar::MouseMove( const MouseEvent& rMEvt ) { long nTemp1; sal_uInt16 nTemp2; - PointerStyle eStyle = POINTER_ARROW; + PointerStyle eStyle = PointerStyle::Arrow; sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 ); if ( nHitTest & HEAD_HITTEST_DIVIDER ) - eStyle = POINTER_HSIZEBAR; + eStyle = PointerStyle::HSizeBar; Pointer aPtr( eStyle ); SetPointer( aPtr ); } diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index fa826230e2ec..1814bc03da64 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -115,7 +115,7 @@ namespace svt { aFont.SetUnderline(UNDERLINE_SINGLE); m_pImpl->m_bHyperMode = true; - SetPointer( POINTER_REFHAND ); + SetPointer( PointerStyle::RefHand ); SetControlFont( aFont); SetTextColor( aColor); @@ -125,7 +125,7 @@ namespace svt { m_pImpl->m_bHyperMode = false; aFont.SetUnderline(UNDERLINE_NONE); - SetPointer( POINTER_ARROW ); + SetPointer( PointerStyle::Arrow ); SetControlFont( aFont); SetTextColor( aColor); } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index b6ff5aaf9ae4..83c78b691832 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2088,7 +2088,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt ) void Ruler::MouseMove( const MouseEvent& rMEvt ) { - PointerStyle ePtrStyle = POINTER_ARROW; + PointerStyle ePtrStyle = PointerStyle::Arrow; mxCurrentHitTest.reset(new RulerSelection); @@ -2103,28 +2103,28 @@ void Ruler::MouseMove( const MouseEvent& rMEvt ) if (mnWinStyle & WB_HORZ) { if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_1) - ePtrStyle = POINTER_TAB_SELECT_W; + ePtrStyle = PointerStyle::TabSelectW; else if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_2) - ePtrStyle = POINTER_TAB_SELECT_E; + ePtrStyle = PointerStyle::TabSelectE; else - ePtrStyle = POINTER_ESIZE; + ePtrStyle = PointerStyle::ESize; } else { if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_1) - ePtrStyle = POINTER_WINDOW_NSIZE; + ePtrStyle = PointerStyle::WindowNSize; else if (mxCurrentHitTest->mnDragSize == RULER_DRAGSIZE_2) - ePtrStyle = POINTER_WINDOW_SSIZE; + ePtrStyle = PointerStyle::WindowSSize; else - ePtrStyle = POINTER_SSIZE; + ePtrStyle = PointerStyle::SSize; } } else if (mxCurrentHitTest->bSizeBar) { if (mnWinStyle & WB_HORZ) - ePtrStyle = POINTER_HSIZEBAR; + ePtrStyle = PointerStyle::HSizeBar; else - ePtrStyle = POINTER_VSIZEBAR; + ePtrStyle = PointerStyle::VSizeBar; } } @@ -2379,16 +2379,16 @@ bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) if ( aHitTest.bSize ) { if ( mnWinStyle & WB_HORZ ) - aPtr = Pointer( POINTER_ESIZE ); + aPtr = Pointer( PointerStyle::ESize ); else - aPtr = Pointer( POINTER_SSIZE ); + aPtr = Pointer( PointerStyle::SSize ); } else if ( aHitTest.bSizeBar ) { if ( mnWinStyle & WB_HORZ ) - aPtr = Pointer( POINTER_HSIZEBAR ); + aPtr = Pointer( PointerStyle::HSizeBar ); else - aPtr = Pointer( POINTER_VSIZEBAR ); + aPtr = Pointer( PointerStyle::VSizeBar ); } SetPointer( aPtr ); return ImplStartDrag( &aHitTest, nMouseModifier ); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 7df57d144e67..a0a0fe38cd31 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -333,7 +333,7 @@ ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle ) , mnStartWidth(0) { sal_Int32 nScaleFactor = GetDPIScaleFactor(); - SetPointer(Pointer(POINTER_HSIZEBAR)); + SetPointer(Pointer(PointerStyle::HSizeBar)); SetSizePixel(Size(7 * nScaleFactor, 0)); } diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index a04dd8f3e257..62ea003ff58e 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -498,15 +498,15 @@ void SvResizeWindow::SelectMouse( const Point & rPos ) SetPointer( m_aOldPointer ); else { - PointerStyle aStyle = POINTER_MOVE; + PointerStyle aStyle = PointerStyle::Move; if( nGrab == 3 ) - aStyle = POINTER_ESIZE; + aStyle = PointerStyle::ESize; else if( nGrab == 2 ) - aStyle = POINTER_NESIZE; + aStyle = PointerStyle::NESize; else if( nGrab == 1 ) - aStyle = POINTER_SSIZE; + aStyle = PointerStyle::SSize; else if( nGrab == 0 ) - aStyle = POINTER_SESIZE; + aStyle = PointerStyle::SESize; if( m_nMoveGrab == -1 ) // the first time { m_aOldPointer = GetPointer(); diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index dcd55b0797ae..5a17fbc7d2b6 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -40,11 +40,11 @@ namespace svt { namespace table if ( m_nResizingColumn == COL_INVALID ) { // if we hit a column divider, change the mosue pointer accordingly - Pointer aNewPointer( POINTER_ARROW ); + Pointer aNewPointer( PointerStyle::Arrow ); TableCell const tableCell = i_tableControl.hitTest( aPoint ); if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.eArea == ColumnDivider ) ) { - aNewPointer = Pointer( POINTER_HSPLIT ); + aNewPointer = Pointer( PointerStyle::HSplit ); } i_tableControl.setPointer( aNewPointer ); @@ -54,17 +54,17 @@ namespace svt { namespace table ::Size const tableSize = i_tableControl.getTableSizePixel(); // set proper pointer - Pointer aNewPointer( POINTER_ARROW ); + Pointer aNewPointer( PointerStyle::Arrow ); ColumnMetrics const & columnMetrics( i_tableControl.getColumnMetrics( m_nResizingColumn ) ); if ( ( aPoint.X() > tableSize.Width() ) || ( aPoint.X() < columnMetrics.nStartPixel ) ) { - aNewPointer = Pointer( POINTER_NOTALLOWED ); + aNewPointer = Pointer( PointerStyle::NotAllowed ); } else { - aNewPointer = Pointer( POINTER_HSPLIT ); + aNewPointer = Pointer( PointerStyle::HSplit ); } i_tableControl.setPointer( aNewPointer ); diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx index 85ce017612d8..4fc0d97dc559 100644 --- a/svtools/source/toolpanel/toolpaneldrawer.cxx +++ b/svtools/source/toolpanel/toolpaneldrawer.cxx @@ -75,7 +75,7 @@ namespace svt { EnableMapMode( false ); SetBackground( Wallpaper() ); - SetPointer( POINTER_REFHAND ); + SetPointer( PointerStyle::RefHand ); SetAccessibleRole( AccessibleRole::LIST_ITEM ); |