diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-12 10:12:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-13 11:00:17 +0100 |
commit | a2b687a88feedfae0087bfc999b3cf49b9d3d24b (patch) | |
tree | 1615bf7094f106a4f92ee4aa460599a2c84282bf /svtools | |
parent | ad6d9bce1126997750d3c3c2606d28164d63d1d8 (diff) |
Pointer is pointless
since it is just a wrapper around PointerStyle
Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267
Reviewed-on: https://gerrit.libreoffice.org/67711
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/table/tablecontrolinterface.hxx | 4 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 9 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/foldertree.cxx | 1 | ||||
-rw-r--r-- | svtools/source/control/hyperlabel.cxx | 1 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 13 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 3 | ||||
-rw-r--r-- | svtools/source/hatchwindow/ipwin.cxx | 5 | ||||
-rw-r--r-- | svtools/source/hatchwindow/ipwin.hxx | 2 | ||||
-rw-r--r-- | svtools/source/table/mousefunction.cxx | 13 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.hxx | 2 |
12 files changed, 32 insertions, 26 deletions
diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx index 201f0035642a..a15cc432138d 100644 --- a/svtools/inc/table/tablecontrolinterface.hxx +++ b/svtools/inc/table/tablecontrolinterface.hxx @@ -27,8 +27,6 @@ #include <svtools/table/tabletypes.hxx> #include <svtools/table/tablemodel.hxx> -class Pointer; - namespace svt { namespace table { @@ -207,7 +205,7 @@ namespace svt { namespace table virtual ::Size getTableSizePixel() const = 0; /// sets a new mouse pointer for the table window - virtual void setPointer( Pointer const & i_pointer ) = 0; + virtual void setPointer( PointerStyle i_pointer ) = 0; /// captures the mouse to the table window virtual void captureMouse() = 0; diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index f2aa331e18b7..70a5b24050fa 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -26,6 +26,7 @@ #include <vcl/salgtype.hxx> #include <vcl/settings.hxx> #include <vcl/commandevent.hxx> +#include <vcl/ptrstyle.hxx> #include <tools/multisel.hxx> #include <tools/fract.hxx> @@ -1324,7 +1325,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt ) bResizing = true; nResizeCol = nCol; nDragX = nResizeX = rEvtPos.X(); - SetPointer( Pointer( PointerStyle::HSplit ) ); + SetPointer( PointerStyle::HSplit ); CaptureMouse(); pDataWin->DrawLine( Point( nDragX, 0 ), Point( nDragX, pDataWin->GetSizePixel().Height() ) ); @@ -1354,7 +1355,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt ) { SAL_INFO("svtools", "BrowseBox::MouseMove( MouseEvent )" ); - Pointer aNewPointer; + PointerStyle aNewPointer = PointerStyle::Arrow; sal_uInt16 nX = 0; for ( size_t nCol = 0; @@ -1372,7 +1373,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt ) if ( bResizing || ( pCol->GetId() && std::abs( static_cast<long>(nR) - rEvt.GetPosPixel().X() ) < MIN_COLUMNWIDTH ) ) { - aNewPointer = Pointer( PointerStyle::HSplit ); + aNewPointer = PointerStyle::HSplit; if ( bResizing ) { // delete old auxiliary line @@ -1422,7 +1423,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt ) } // end action - SetPointer( Pointer() ); + SetPointer( PointerStyle::Arrow ); ReleaseMouse(); bResizing = false; } diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 046a9796506b..941ae66de4c8 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -25,6 +25,7 @@ #include <vcl/help.hxx> #include <vcl/image.hxx> #include <vcl/settings.hxx> +#include <vcl/ptrstyle.hxx> #include <rtl/string.hxx> #include <tools/debug.hxx> #include <tools/fract.hxx> @@ -452,7 +453,7 @@ void BrowserDataWin::MouseMove( const MouseEvent& rEvt ) PointerStyle ePointerStyle = PointerStyle::Arrow; if ( ImplRowDividerHitTest( aBrowserEvent ) ) ePointerStyle = PointerStyle::VSizeBar; - SetPointer( Pointer( ePointerStyle ) ); + SetPointer( ePointerStyle ); // dragging out of the visible area? if ( rEvt.IsLeft() && diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx index 81fb9c8b9789..bd4dc5812c27 100644 --- a/svtools/source/contnr/foldertree.cxx +++ b/svtools/source/contnr/foldertree.cxx @@ -14,6 +14,7 @@ #include <ucbhelper/commandenvironment.hxx> #include <vcl/dialog.hxx> #include <vcl/treelistentry.hxx> +#include <vcl/ptrstyle.hxx> #include <com/sun/star/task/InteractionHandler.hpp> #include "contentenumeration.hxx" #include <bitmaps.hlst> diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index 9a71c82b7e61..1330f82d1ef4 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -23,6 +23,7 @@ #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/tabpage.hxx> +#include <vcl/ptrstyle.hxx> namespace svt diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 4168aace293d..0792cd61bf7a 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -26,6 +26,7 @@ #include <vcl/settings.hxx> #include <vcl/vcllayout.hxx> #include <vcl/virdev.hxx> +#include <vcl/ptrstyle.hxx> #include <sal/log.hxx> #include <svtools/accessibleruler.hxx> @@ -2027,7 +2028,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt ) mbFormat = true; } - SetPointer( Pointer(ePtrStyle) ); + SetPointer( ePtrStyle ); if (mbFormat) { @@ -2262,21 +2263,21 @@ bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) { if ( ImplDocHitTest( aMousePos, eDragType, &aHitTest ) ) { - Pointer aPtr; + PointerStyle aPtr = PointerStyle::Arrow; if ( aHitTest.bSize ) { if ( mnWinStyle & WB_HORZ ) - aPtr = Pointer( PointerStyle::ESize ); + aPtr = PointerStyle::ESize; else - aPtr = Pointer( PointerStyle::SSize ); + aPtr = PointerStyle::SSize; } else if ( aHitTest.bSizeBar ) { if ( mnWinStyle & WB_HORZ ) - aPtr = Pointer( PointerStyle::HSizeBar ); + aPtr = PointerStyle::HSizeBar; else - aPtr = Pointer( PointerStyle::VSizeBar ); + aPtr = PointerStyle::VSizeBar; } SetPointer( aPtr ); return ImplStartDrag( &aHitTest, nMouseModifier ); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 9185f903d106..06d566ef3aa5 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -33,6 +33,7 @@ #include <vcl/commandevent.hxx> #include <vcl/svtaccessiblefactory.hxx> #include <vcl/accessiblefactory.hxx> +#include <vcl/ptrstyle.hxx> #include <svtools/svtresid.hxx> #include <svtools/strings.hrc> #include <limits> @@ -335,7 +336,7 @@ ImplTabSizer::ImplTabSizer( TabBar* pParent, WinBits nWinStyle ) : Window( pParent, nWinStyle & WB_3DLOOK ) , mnStartWidth(0) { - SetPointer(Pointer(PointerStyle::HSizeBar)); + SetPointer(PointerStyle::HSizeBar); SetSizePixel(Size(7 * GetDPIScaleFactor(), 0)); } diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index 7c4b0cf318df..4dd2b5a32eb6 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -23,6 +23,7 @@ #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <vcl/ptrstyle.hxx> #include "ipwin.hxx" #include <hatchwindow.hxx> @@ -483,10 +484,10 @@ void SvResizeWindow::SelectMouse( const Point & rPos ) if( m_nMoveGrab == -1 ) // the first time { m_aOldPointer = GetPointer(); - SetPointer( Pointer( aStyle ) ); + SetPointer( aStyle ); } else - SetPointer( Pointer( aStyle ) ); + SetPointer( aStyle ); } m_nMoveGrab = nGrab; } diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx index d7637869cd70..47c033cdc255 100644 --- a/svtools/source/hatchwindow/ipwin.hxx +++ b/svtools/source/hatchwindow/ipwin.hxx @@ -66,7 +66,7 @@ public: class VCLXHatchWindow; class SvResizeWindow : public vcl::Window { - Pointer m_aOldPointer; + PointerStyle m_aOldPointer; short m_nMoveGrab; // last pointer type SvResizeHelper m_aResizer; bool m_bActive; diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index ca9f088ff339..ce294aae1f40 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -24,6 +24,7 @@ #include <tools/diagnose_ex.h> #include <vcl/window.hxx> +#include <vcl/ptrstyle.hxx> namespace svt { namespace table @@ -40,11 +41,11 @@ namespace svt { namespace table if ( m_nResizingColumn == COL_INVALID ) { // if we hit a column divider, change the mouse pointer accordingly - Pointer aNewPointer( PointerStyle::Arrow ); + PointerStyle aNewPointer( PointerStyle::Arrow ); TableCell const tableCell = i_tableControl.hitTest( aPoint ); if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.eArea == ColumnDivider ) ) { - aNewPointer = Pointer( PointerStyle::HSplit ); + aNewPointer = PointerStyle::HSplit; } i_tableControl.setPointer( aNewPointer ); @@ -54,17 +55,17 @@ namespace svt { namespace table ::Size const tableSize = i_tableControl.getTableSizePixel(); // set proper pointer - Pointer aNewPointer( PointerStyle::Arrow ); + PointerStyle aNewPointer( PointerStyle::Arrow ); ColumnMetrics const & columnMetrics( i_tableControl.getColumnMetrics( m_nResizingColumn ) ); if ( ( aPoint.X() > tableSize.Width() ) || ( aPoint.X() < columnMetrics.nStartPixel ) ) { - aNewPointer = Pointer( PointerStyle::NotAllowed ); + aNewPointer = PointerStyle::NotAllowed; } else { - aNewPointer = Pointer( PointerStyle::HSplit ); + aNewPointer = PointerStyle::HSplit; } i_tableControl.setPointer( aNewPointer ); @@ -151,7 +152,7 @@ namespace svt { namespace table i_tableControl.invalidate( TableArea::All ); } - i_tableControl.setPointer( Pointer() ); + i_tableControl.setPointer( PointerStyle::Arrow ); i_tableControl.releaseMouse(); m_nResizingColumn = COL_INVALID; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 752f2816c98b..7c5a8f13ad76 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1745,7 +1745,7 @@ namespace svt { namespace table } - void TableControl_Impl::setPointer( Pointer const & i_pointer ) + void TableControl_Impl::setPointer( PointerStyle i_pointer ) { m_pDataWindow->SetPointer( i_pointer ); } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 6696c80ac167..feea3675021a 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -253,7 +253,7 @@ namespace svt { namespace table virtual RowPos getCurrentRow() const override; virtual void activateCell( ColPos const i_col, RowPos const i_row ) override; virtual ::Size getTableSizePixel() const override; - virtual void setPointer( Pointer const & i_pointer ) override; + virtual void setPointer( PointerStyle i_pointer ) override; virtual void captureMouse() override; virtual void releaseMouse() override; virtual void invalidate( TableArea const i_what ) override; |