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 /vcl | |
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 'vcl')
-rw-r--r-- | vcl/inc/window.h | 2 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/fixedhyper.cxx | 1 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 4 | ||||
-rw-r--r-- | vcl/source/treelist/headbar.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/mouse.cxx | 14 | ||||
-rw-r--r-- | vcl/source/window/scrwnd.cxx | 1 | ||||
-rw-r--r-- | vcl/source/window/split.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/splitwin.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 1 | ||||
-rw-r--r-- | vcl/win/window/salframe.cxx | 1 |
14 files changed, 32 insertions, 26 deletions
diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 5dec19b7dc47..ecc28c7dcc98 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -248,7 +248,7 @@ public: css::uno::WeakReference< css::rendering::XCanvas > mxCanvas; vcl::Cursor* mpCursor; - Pointer maPointer; + PointerStyle maPointer; Fraction maZoom; OUString maText; std::unique_ptr<vcl::Font> diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index bd5c6c8c55fc..d9d9d3d9730d 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -28,6 +28,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/uitest/uiobject.hxx> +#include <vcl/ptrstyle.hxx> #include <window.h> #include <svdata.hxx> @@ -323,7 +324,7 @@ void Edit::ImplInit(vcl::Window* pParent, WinBits nStyle) SetCursor( new vcl::Cursor ); - SetPointer( Pointer( PointerStyle::Text ) ); + SetPointer( PointerStyle::Text ); uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY ); uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer(); diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index 15fb85ad35a0..9905327a72f7 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -22,6 +22,7 @@ #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> +#include <vcl/ptrstyle.hxx> #include <comphelper/anytostring.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/exc_hlp.hxx> diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 3ba002e6cdff..77a168e9ef14 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -28,6 +28,8 @@ #include <vcl/vclmedit.hxx> #include <vcl/xtextedt.hxx> #include <vcl/textview.hxx> +#include <vcl/ptrstyle.hxx> + #include <svl/undo.hxx> #include <svl/lstner.hxx> #include <vcl/uitest/uiobject.hxx> @@ -672,7 +674,7 @@ TextWindow::TextWindow(Edit* pParent) mbActivePopup = false; mbSelectOnTab = true; - SetPointer( Pointer( PointerStyle::Text ) ); + SetPointer( PointerStyle::Text ); mpExtTextEngine.reset(new ExtTextEngine); mpExtTextEngine->SetMaxTextLen(EDIT_NOLIMIT); diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx index 32a0316dbbd6..3eaaba9ef76c 100644 --- a/vcl/source/treelist/headbar.cxx +++ b/vcl/source/treelist/headbar.cxx @@ -27,6 +27,8 @@ #include <vcl/settings.hxx> #include <vcl/commandevent.hxx> #include <vcl/event.hxx> +#include <vcl/ptrstyle.hxx> + #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> @@ -776,8 +778,7 @@ void HeaderBar::ImplEndDrag( bool bCancel ) { if ( mbItemDrag ) { - Pointer aPointer( PointerStyle::Arrow ); - SetPointer( aPointer ); + SetPointer( PointerStyle::Arrow ); if ( (mnItemDragPos != nPos) && (mnItemDragPos != HEADERBAR_ITEM_NOTFOUND) ) { @@ -850,8 +851,7 @@ void HeaderBar::MouseMove( const MouseEvent& rMEvt ) if ( nHitTest & HEAD_HITTEST_DIVIDER ) eStyle = PointerStyle::HSizeBar; - Pointer aPtr( eStyle ); - SetPointer( aPtr ); + SetPointer( eStyle ); } void HeaderBar::Tracking( const TrackingEvent& rTEvt ) diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 549db302ba9f..6315b5dbc918 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -37,6 +37,7 @@ #include <vcl/metric.hxx> #include <vcl/settings.hxx> #include <vcl/toolbox.hxx> +#include <vcl/ptrstyle.hxx> using namespace ::com::sun::star::uno; @@ -283,7 +284,7 @@ void ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous else if ( nHitTest & BorderWindowHitTest::Title && pData->mnTitleType == BorderWindowTitleType::Tearoff && !rMEvt.IsLeaveWindow() ) ePtrStyle = PointerStyle::Move; - pData->mpBorderWindow->SetPointer( Pointer( ePtrStyle ) ); + pData->mpBorderWindow->SetPointer( ePtrStyle ); if( pData->mnCloseState != oldCloseState ) pData->mpBorderWindow->Invalidate( pData->maCloseRect ); @@ -1124,7 +1125,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) if ( maFrameData.mnHitTest & BorderWindowHitTest::Title ) { - maFrameData.mpBorderWindow->SetPointer( Pointer( PointerStyle::Move ) ); + maFrameData.mpBorderWindow->SetPointer( PointerStyle::Move ); Point aPos = pBorderWindow->GetPosPixel(); aPos.AdjustX(aMousePos.X() ); diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index f0297d26a1e4..c0e5a385b626 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -97,7 +97,7 @@ PointerStyle Window::ImplGetMousePointer() const bool bWait = false; if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() ) - ePointerStyle = GetPointer().GetStyle(); + ePointerStyle = GetPointer(); else ePointerStyle = PointerStyle::Arrow; @@ -119,7 +119,7 @@ PointerStyle Window::ImplGetMousePointer() const else { if ( pWindow->mpWindowImpl->mbChildPtrOverwrite ) - ePointerStyle = pWindow->GetPointer().GetStyle(); + ePointerStyle = pWindow->GetPointer(); } } @@ -472,12 +472,12 @@ bool Window::IsMouseCaptured() const return (this == ImplGetSVData()->maWinData.mpCaptureWin); } -void Window::SetPointer( const Pointer& rPointer ) +void Window::SetPointer( PointerStyle nPointer ) { - if ( mpWindowImpl->maPointer == rPointer ) + if ( mpWindowImpl->maPointer == nPointer ) return; - mpWindowImpl->maPointer = rPointer; + mpWindowImpl->maPointer = nPointer; // possibly immediately move pointer if ( !mpWindowImpl->mpFrameData->mbInMouseMove && ImplTestMousePointerSet() ) @@ -485,10 +485,10 @@ void Window::SetPointer( const Pointer& rPointer ) if (VclPtr<vcl::Window> pWin = GetParentWithLOKNotifier()) { - Pointer aPointer = GetPointer(); + PointerStyle aPointer = GetPointer(); // We don't map all possible pointers hence we need a default OString aPointerString = "default"; - auto aIt = vcl::gaLOKPointerMap.find(aPointer.GetStyle()); + auto aIt = vcl::gaLOKPointerMap.find(aPointer); if (aIt != vcl::gaLOKPointerMap.end()) { aPointerString = aIt->second; diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index b5aec1cfb009..e81ad0205cca 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -28,6 +28,7 @@ #include <vcl/timer.hxx> #include <vcl/commandevent.hxx> #include <vcl/event.hxx> +#include <vcl/ptrstyle.hxx> #include <sal/log.hxx> #include <math.h> diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 5955ea174ab8..facd6fdd7603 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -27,6 +27,7 @@ #include <vcl/gradient.hxx> #include <vcl/lineinfo.hxx> #include <vcl/settings.hxx> +#include <vcl/ptrstyle.hxx> #include <rtl/instance.hxx> @@ -69,7 +70,7 @@ void Splitter::ImplInitHorVer(bool bNew) SetSizePixel( Size( rSettings.GetScrollBarSize(), StyleSettings::GetSplitSize() ) ); } - SetPointer( Pointer( ePointerStyle ) ); + SetPointer( ePointerStyle ); } void Splitter::ImplInit( vcl::Window* pParent, WinBits nWinStyle ) diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index f2201341d781..080a6ae38a7a 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -30,6 +30,7 @@ #include <vcl/help.hxx> #include <vcl/splitwin.hxx> #include <vcl/settings.hxx> +#include <vcl/ptrstyle.hxx> #include <vcl/vclenum.hxx> @@ -1849,9 +1850,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) else if ( mnSplitTest & SPLIT_VERT ) eStyle = PointerStyle::VSplit; - Pointer aPtr( eStyle ); - SetPointer( aPtr ); - + SetPointer( eStyle ); } void SplitWindow::StartSplit() @@ -1946,9 +1945,7 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) } } - Pointer aPtr( eStyle ); - SetPointer( aPtr ); - + SetPointer( eStyle ); } void SplitWindow::Tracking( const TrackingEvent& rTEvt ) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index ae3ce232557d..c324b3fd19c7 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -31,6 +31,7 @@ #include <vcl/menu.hxx> #include <vcl/settings.hxx> #include <vcl/vclstatuslistener.hxx> +#include <vcl/ptrstyle.hxx> #include <tools/poly.hxx> #include <svl/imageitm.hxx> @@ -3374,8 +3375,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( meLastStyle != eStyle ) { meLastStyle = eStyle; - Pointer aPtr( eStyle ); - SetPointer( aPtr ); + SetPointer( eStyle ); } DockingWindow::MouseMove( rMEvt ); diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 3d5b1b16368c..66df5fa5781f 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1220,7 +1220,7 @@ void Window::SetCreatedWithToolkit( bool b ) mpWindowImpl->mbCreatedWithToolkit = b; } -const Pointer& Window::GetPointer() const +PointerStyle Window::GetPointer() const { return mpWindowImpl->maPointer; } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 8fdfdede0bcd..dccd084f668d 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -40,6 +40,7 @@ #include <vcl/virdev.hxx> #include <vcl/lazydelete.hxx> #include <vcl/uitest/logger.hxx> +#include <vcl/ptrstyle.hxx> #include <svdata.hxx> #include <salwtype.hxx> diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 27b55ffffa2e..c6d4d9057981 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -51,6 +51,7 @@ #include <vcl/window.hxx> #include <vcl/wrkwin.hxx> #include <vcl/svapp.hxx> +#include <vcl/ptrstyle.hxx> #include <win/wincomp.hxx> #include <win/salids.hrc> |