diff options
105 files changed, 964 insertions, 975 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 9f0591bb0919..1a670242d967 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -563,16 +563,16 @@ void MediaWindowImpl::setPointer(const Pointer& rPointer) switch (rPointer.GetStyle()) { - case POINTER_CROSS: + case PointerStyle::Cross: nPointer = awt::SystemPointer::CROSS; break; - case POINTER_HAND: + case PointerStyle::Hand: nPointer = awt::SystemPointer::HAND; break; - case POINTER_MOVE: + case PointerStyle::Move: nPointer = awt::SystemPointer::MOVE; break; - case POINTER_WAIT: + case PointerStyle::Wait: nPointer = awt::SystemPointer::WAIT; break; default: diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index fe617dd87c5c..2c98fdea94d5 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -230,7 +230,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : pCodeCompleteWnd(VclPtr<CodeCompleteWindow>::Create(this)) { SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor())); - SetPointer( Pointer( POINTER_TEXT ) ); + SetPointer( Pointer( PointerStyle::Text ) ); SetHelpId( HID_BASICIDE_EDITORWINDOW ); listener_ = new ChangesListener(*this); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 8d8a22c73163..114f7e605835 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1864,25 +1864,25 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) switch( aPointer.GetStyle()) { - case POINTER_NSIZE: - case POINTER_SSIZE: - case POINTER_WSIZE: - case POINTER_ESIZE: - case POINTER_NWSIZE: - case POINTER_NESIZE: - case POINTER_SWSIZE: - case POINTER_SESIZE: + case PointerStyle::NSize: + case PointerStyle::SSize: + case PointerStyle::WSize: + case PointerStyle::ESize: + case PointerStyle::NWSize: + case PointerStyle::NESize: + case PointerStyle::SWSize: + case PointerStyle::SESize: if( ! m_aSelection.isResizeableObjectSelected() ) bForceArrowPointer = true; break; - case POINTER_MOVE: + case PointerStyle::Move: if ( !aOID.isDragableObject() ) bForceArrowPointer = true; break; - case POINTER_MOVEPOINT: - case POINTER_MOVEBEZIERWEIGHT: + case PointerStyle::MovePoint: + case PointerStyle::MoveBezierWeight: // there is no point-editing in a chart - // the POINTER_MOVEBEZIERWEIGHT appears in 3d data points + // the PointerStyle::MoveBezierWeight appears in 3d data points bForceArrowPointer = true; break; default: @@ -1890,7 +1890,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) } if( bForceArrowPointer ) - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); else m_pChartWindow->SetPointer( aPointer ); @@ -1901,44 +1901,44 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if ( m_eDrawMode == CHARTDRAW_INSERT && ( !m_pDrawViewWrapper->IsMarkedHit( aMousePos ) || !m_aSelection.isDragableObjectSelected() ) ) { - PointerStyle ePointerStyle = POINTER_DRAW_RECT; + PointerStyle ePointerStyle = PointerStyle::DrawRect; SdrObjKind eKind = static_cast< SdrObjKind >( m_pDrawViewWrapper->GetCurrentObjIdentifier() ); switch ( eKind ) { case OBJ_LINE: { - ePointerStyle = POINTER_DRAW_LINE; + ePointerStyle = PointerStyle::DrawLine; } break; case OBJ_RECT: case OBJ_CUSTOMSHAPE: { - ePointerStyle = POINTER_DRAW_RECT; + ePointerStyle = PointerStyle::DrawRect; } break; case OBJ_CIRC: { - ePointerStyle = POINTER_DRAW_ELLIPSE; + ePointerStyle = PointerStyle::DrawEllipse; } break; case OBJ_FREELINE: { - ePointerStyle = POINTER_DRAW_POLYGON; + ePointerStyle = PointerStyle::DrawPolygon; } break; case OBJ_TEXT: { - ePointerStyle = POINTER_DRAW_TEXT; + ePointerStyle = PointerStyle::DrawText; } break; case OBJ_CAPTION: { - ePointerStyle = POINTER_DRAW_CAPTION; + ePointerStyle = PointerStyle::DrawCaption; } break; default: { - ePointerStyle = POINTER_DRAW_RECT; + ePointerStyle = PointerStyle::DrawRect; } break; } @@ -1954,7 +1954,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) { if( aHitObjectCID.equals(m_aSelection.getSelectedCID()) ) { - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); return; } } @@ -1962,14 +1962,14 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if( aHitObjectCID.isEmpty() ) { //additional shape was hit - m_pChartWindow->SetPointer( POINTER_MOVE ); + m_pChartWindow->SetPointer( PointerStyle::Move ); } else if( ObjectIdentifier::isDragableObject( aHitObjectCID ) ) { if( (m_eDragMode == SDRDRAG_ROTATE) && SelectionHelper::isRotateableObject( aHitObjectCID , getModel() ) ) - m_pChartWindow->SetPointer( Pointer( POINTER_ROTATE ) ); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Rotate ) ); else { ObjectType eHitObjectType = ObjectIdentifier::getObjectType( aHitObjectCID ); @@ -1978,15 +1978,15 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) if( !ObjectIdentifier::areSiblings(aHitObjectCID,m_aSelection.getSelectedCID()) && !ObjectIdentifier::areIdenticalObjects(aHitObjectCID,m_aSelection.getSelectedCID()) ) { - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); return; } } - m_pChartWindow->SetPointer( POINTER_MOVE ); + m_pChartWindow->SetPointer( PointerStyle::Move ); } } else - m_pChartWindow->SetPointer( Pointer( POINTER_ARROW )); + m_pChartWindow->SetPointer( Pointer( PointerStyle::Arrow )); } } //namespace chart diff --git a/chart2/source/controller/main/DragMethod_Base.cxx b/chart2/source/controller/main/DragMethod_Base.cxx index f0213a97956a..d333197f695a 100644 --- a/chart2/source/controller/main/DragMethod_Base.cxx +++ b/chart2/source/controller/main/DragMethod_Base.cxx @@ -71,9 +71,9 @@ void DragMethod_Base::TakeSdrDragComment(OUString& rStr) const Pointer DragMethod_Base::GetSdrDragPointer() const { if( IsDraggingPoints() || IsDraggingGluePoints() ) - return Pointer(POINTER_MOVEPOINT); + return Pointer(PointerStyle::MovePoint); else - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } } //namespace chart diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index e444861d5b77..571067e061d6 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -619,7 +619,7 @@ void OJoinTableView::BeginChildMove( OTableWindow* pTabWin, const Point& rMouseP return; m_pDragWin = pTabWin; - SetPointer(Pointer(POINTER_MOVE)); + SetPointer(Pointer(PointerStyle::Move)); Point aMousePos = ScreenToOutputPixel( rMousePos ); m_aDragOffset = aMousePos - pTabWin->GetPosPixel(); m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST); @@ -767,7 +767,7 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) m_pDragWin->GrabFocus(); } m_pDragWin = NULL; - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); } // else we handle the resizing else if( m_pSizingWin ) diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 971ff21bf21f..8448027032eb 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -420,22 +420,22 @@ void OTableWindow::MouseMove( const MouseEvent& rEvt ) { case SIZING_TOP: case SIZING_BOTTOM: - aPointer = Pointer( POINTER_SSIZE ); + aPointer = Pointer( PointerStyle::SSize ); break; case SIZING_LEFT: case SIZING_RIGHT: - aPointer = Pointer( POINTER_ESIZE ); + aPointer = Pointer( PointerStyle::ESize ); break; case SIZING_LEFT+SIZING_TOP: case SIZING_RIGHT+SIZING_BOTTOM: - aPointer = Pointer( POINTER_SESIZE ); + aPointer = Pointer( PointerStyle::SESize ); break; case SIZING_RIGHT+SIZING_TOP: case SIZING_LEFT+SIZING_BOTTOM: - aPointer = Pointer( POINTER_NESIZE ); + aPointer = Pointer( PointerStyle::NESize ); break; } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 93f2b8ff2f95..c6186b9b8e91 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -1189,19 +1189,19 @@ inline const Pointer& ImpEditView::GetPointer() { if ( !pPointer ) { - pPointer = new Pointer( IsVertical() ? POINTER_TEXT_VERTICAL : POINTER_TEXT ); + pPointer = new Pointer( IsVertical() ? PointerStyle::TextVertical : PointerStyle::Text ); return *pPointer; } - if(POINTER_TEXT == pPointer->GetStyle() && IsVertical()) + if(PointerStyle::Text == pPointer->GetStyle() && IsVertical()) { delete pPointer; - pPointer = new Pointer(POINTER_TEXT_VERTICAL); + pPointer = new Pointer(PointerStyle::TextVertical); } - else if(POINTER_TEXT_VERTICAL == pPointer->GetStyle() && !IsVertical()) + else if(PointerStyle::TextVertical == pPointer->GetStyle() && !IsVertical()) { delete pPointer; - pPointer = new Pointer(POINTER_TEXT); + pPointer = new Pointer(PointerStyle::Text); } return *pPointer; diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 7e5450d7be28..92f967877e24 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -734,18 +734,18 @@ Pointer OutlinerView::GetPointer( const Point& rPosPixel ) MouseTarget eTarget; ImpCheckMousePos( rPosPixel, eTarget ); - PointerStyle ePointerStyle = POINTER_ARROW; + PointerStyle ePointerStyle = PointerStyle::Arrow; if ( eTarget == MouseTarget::Text ) { - ePointerStyle = GetOutliner()->IsVertical() ? POINTER_TEXT_VERTICAL : POINTER_TEXT; + ePointerStyle = GetOutliner()->IsVertical() ? PointerStyle::TextVertical : PointerStyle::Text; } else if ( eTarget == MouseTarget::Hypertext ) { - ePointerStyle = POINTER_REFHAND; + ePointerStyle = PointerStyle::RefHand; } else if ( eTarget == MouseTarget::Bullet ) { - ePointerStyle = POINTER_MOVE; + ePointerStyle = PointerStyle::Move; } return Pointer( ePointerStyle ); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 2f14dafd7566..03db0ce9e895 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -349,12 +349,12 @@ namespace pcr { Edit::MouseMove( rMEvt ); - PointerStyle ePointerStyle( POINTER_TEXT ); + PointerStyle ePointerStyle( PointerStyle::Text ); if ( !rMEvt.IsLeaveWindow() ) { if ( impl_textHitTest( rMEvt.GetPosPixel() ) ) - ePointerStyle = POINTER_REFHAND; + ePointerStyle = PointerStyle::RefHand; } SetPointer( Pointer( ePointerStyle ) ); diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx index d4a0de15ea36..bf413bac0c42 100644 --- a/include/vbahelper/vbahelper.hxx +++ b/include/vbahelper/vbahelper.hxx @@ -104,7 +104,7 @@ namespace ooo VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPixels, bool bVertical); VBAHELPER_DLLPUBLIC sal_Int32 PointsToHmm( double fPoints ); VBAHELPER_DLLPUBLIC double HmmToPoints( sal_Int32 nHmm ); - VBAHELPER_DLLPUBLIC sal_Int32 getPointerStyle( const css::uno::Reference< css::frame::XModel >& ); + VBAHELPER_DLLPUBLIC PointerStyle getPointerStyle( const css::uno::Reference< css::frame::XModel >& ); VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, const Pointer& rPointer, bool bOverWrite ); VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection( const css::uno::Any& aObj, const css::uno::Any& aValue ) throw ( css::uno::RuntimeException ); VBAHELPER_DLLPUBLIC css::uno::Any getPropertyValue( const css::uno::Sequence< css::beans::PropertyValue >& aProp, const OUString& aName ); diff --git a/include/vcl/pointr.hxx b/include/vcl/pointr.hxx index 751739714dad..c82fb2236db0 100644 --- a/include/vcl/pointr.hxx +++ b/include/vcl/pointr.hxx @@ -31,7 +31,7 @@ class VCL_DLLPUBLIC Pointer public: Pointer() - { meStyle = POINTER_ARROW; } + { meStyle = PointerStyle::Arrow; } Pointer( PointerStyle eStyle ) { meStyle = eStyle; } diff --git a/include/vcl/ptrstyle.hxx b/include/vcl/ptrstyle.hxx index ece5af232b86..d63d44b55a5a 100644 --- a/include/vcl/ptrstyle.hxx +++ b/include/vcl/ptrstyle.hxx @@ -20,108 +20,104 @@ #ifndef INCLUDED_VCL_PTRSTYLE_HXX #define INCLUDED_VCL_PTRSTYLE_HXX -typedef sal_uInt16 PointerStyle; - -#define POINTER_ARROW ((PointerStyle)0) -#define POINTER_NULL ((PointerStyle)1) -#define POINTER_WAIT ((PointerStyle)2) -#define POINTER_TEXT ((PointerStyle)3) -#define POINTER_HELP ((PointerStyle)4) -#define POINTER_CROSS ((PointerStyle)5) -#define POINTER_MOVE ((PointerStyle)6) -#define POINTER_NSIZE ((PointerStyle)7) -#define POINTER_SSIZE ((PointerStyle)8) -#define POINTER_WSIZE ((PointerStyle)9) -#define POINTER_ESIZE ((PointerStyle)10) -#define POINTER_NWSIZE ((PointerStyle)11) -#define POINTER_NESIZE ((PointerStyle)12) -#define POINTER_SWSIZE ((PointerStyle)13) -#define POINTER_SESIZE ((PointerStyle)14) -#define POINTER_WINDOW_NSIZE ((PointerStyle)15) -#define POINTER_WINDOW_SSIZE ((PointerStyle)16) -#define POINTER_WINDOW_WSIZE ((PointerStyle)17) -#define POINTER_WINDOW_ESIZE ((PointerStyle)18) -#define POINTER_WINDOW_NWSIZE ((PointerStyle)19) -#define POINTER_WINDOW_NESIZE ((PointerStyle)20) -#define POINTER_WINDOW_SWSIZE ((PointerStyle)21) -#define POINTER_WINDOW_SESIZE ((PointerStyle)22) -#define POINTER_HSPLIT ((PointerStyle)23) -#define POINTER_VSPLIT ((PointerStyle)24) -#define POINTER_HSIZEBAR ((PointerStyle)25) -#define POINTER_VSIZEBAR ((PointerStyle)26) -#define POINTER_HAND ((PointerStyle)27) -#define POINTER_REFHAND ((PointerStyle)28) -#define POINTER_PEN ((PointerStyle)29) -#define POINTER_MAGNIFY ((PointerStyle)30) -#define POINTER_FILL ((PointerStyle)31) -#define POINTER_ROTATE ((PointerStyle)32) -#define POINTER_HSHEAR ((PointerStyle)33) -#define POINTER_VSHEAR ((PointerStyle)34) -#define POINTER_MIRROR ((PointerStyle)35) -#define POINTER_CROOK ((PointerStyle)36) -#define POINTER_CROP ((PointerStyle)37) -#define POINTER_MOVEPOINT ((PointerStyle)38) -#define POINTER_MOVEBEZIERWEIGHT ((PointerStyle)39) -#define POINTER_MOVEDATA ((PointerStyle)40) -#define POINTER_COPYDATA ((PointerStyle)41) -#define POINTER_LINKDATA ((PointerStyle)42) -#define POINTER_MOVEDATALINK ((PointerStyle)43) -#define POINTER_COPYDATALINK ((PointerStyle)44) -#define POINTER_MOVEFILE ((PointerStyle)45) -#define POINTER_COPYFILE ((PointerStyle)46) -#define POINTER_LINKFILE ((PointerStyle)47) -#define POINTER_MOVEFILELINK ((PointerStyle)48) -#define POINTER_COPYFILELINK ((PointerStyle)49) -#define POINTER_MOVEFILES ((PointerStyle)50) -#define POINTER_COPYFILES ((PointerStyle)51) -#define POINTER_NOTALLOWED ((PointerStyle)52) -#define POINTER_DRAW_LINE ((PointerStyle)53) -#define POINTER_DRAW_RECT ((PointerStyle)54) -#define POINTER_DRAW_POLYGON ((PointerStyle)55) -#define POINTER_DRAW_BEZIER ((PointerStyle)56) -#define POINTER_DRAW_ARC ((PointerStyle)57) -#define POINTER_DRAW_PIE ((PointerStyle)58) -#define POINTER_DRAW_CIRCLECUT ((PointerStyle)59) -#define POINTER_DRAW_ELLIPSE ((PointerStyle)60) -#define POINTER_DRAW_FREEHAND ((PointerStyle)61) -#define POINTER_DRAW_CONNECT ((PointerStyle)62) -#define POINTER_DRAW_TEXT ((PointerStyle)63) -#define POINTER_DRAW_CAPTION ((PointerStyle)64) -#define POINTER_CHART ((PointerStyle)65) -#define POINTER_DETECTIVE ((PointerStyle)66) -#define POINTER_PIVOT_COL ((PointerStyle)67) -#define POINTER_PIVOT_ROW ((PointerStyle)68) -#define POINTER_PIVOT_FIELD ((PointerStyle)69) -#define POINTER_CHAIN ((PointerStyle)70) -#define POINTER_CHAIN_NOTALLOWED ((PointerStyle)71) -#define POINTER_TIMEEVENT_MOVE ((PointerStyle)72) -#define POINTER_TIMEEVENT_SIZE ((PointerStyle)73) -#define POINTER_AUTOSCROLL_N ((PointerStyle)74) -#define POINTER_AUTOSCROLL_S ((PointerStyle)75) -#define POINTER_AUTOSCROLL_W ((PointerStyle)76) -#define POINTER_AUTOSCROLL_E ((PointerStyle)77) -#define POINTER_AUTOSCROLL_NW ((PointerStyle)78) -#define POINTER_AUTOSCROLL_NE ((PointerStyle)79) -#define POINTER_AUTOSCROLL_SW ((PointerStyle)80) -#define POINTER_AUTOSCROLL_SE ((PointerStyle)81) -#define POINTER_AUTOSCROLL_NS ((PointerStyle)82) -#define POINTER_AUTOSCROLL_WE ((PointerStyle)83) -#define POINTER_AUTOSCROLL_NSWE ((PointerStyle)84) -#define POINTER_AIRBRUSH ((PointerStyle)85) -#define POINTER_TEXT_VERTICAL ((PointerStyle)86) -#define POINTER_PIVOT_DELETE ((PointerStyle)87) - -// #i32329# -#define POINTER_TAB_SELECT_S ((PointerStyle)88) -#define POINTER_TAB_SELECT_E ((PointerStyle)89) -#define POINTER_TAB_SELECT_SE ((PointerStyle)90) -#define POINTER_TAB_SELECT_W ((PointerStyle)91) -#define POINTER_TAB_SELECT_SW ((PointerStyle)92) - -// #i20119# -#define POINTER_PAINTBRUSH ((PointerStyle)93) - -#define POINTER_COUNT 94 +enum class PointerStyle +{ + Arrow = 0, + Null = 1, + Wait = 2, + Text = 3, + Help = 4, + Cross = 5, + Move = 6, + NSize = 7, + SSize = 8, + WSize = 9, + ESize = 10, + NWSize = 11, + NESize = 12, + SWSize = 13, + SESize = 14, + WindowNSize = 15, + WindowSSize = 16, + WindowWSize = 17, + WindowESize = 18, + WindowNWSize = 19, + WindowNESize = 20, + WindowSWSize = 21, + WindowSESize = 22, + HSplit = 23, + VSplit = 24, + HSizeBar = 25, + VSizeBar = 26, + Hand = 27, + RefHand = 28, + Pen = 29, + Magnify = 30, + Fill = 31, + Rotate = 32, + HShear = 33, + VShear = 34, + Mirror = 35, + Crook = 36, + Crop = 37, + MovePoint = 38, + MoveBezierWeight = 39, + MoveData = 40, + CopyData = 41, + LinkData = 42, + MoveDataLink = 43, + CopyDataLink = 44, + MoveFile = 45, + CopyFile = 46, + LinkFile = 47, + MoveFileLink = 48, + CopyFileLink = 49, + MoveFiles = 50, + CopyFiles = 51, + NotAllowed = 52, + DrawLine = 53, + DrawRect = 54, + DrawPolygon = 55, + DrawBezier = 56, + DrawArc = 57, + DrawPie = 58, + DrawCircleCut = 59, + DrawEllipse = 60, + DrawFreehand = 61, + DrawConnect = 62, + DrawText = 63, + DrawCaption = 64, + Chart = 65, + Detective = 66, + PivotCol = 67, + PivotRow = 68, + PivotField = 69, + Chain = 70, + ChainNotAllowed = 71, + TimeEventMove = 72, + TimeEventSize = 73, + AutoScrollN = 74, + AutoScrollS = 75, + AutoScrollW = 76, + AutoScrollE = 77, + AutoScrollNW = 78, + AutoScrollNE = 79, + AutoScrollSW = 80, + AutoScrollSE = 81, + AutoScrollNS = 82, + AutoScrollWE = 83, + AutoScrollNSWE = 84, + Airbrush = 85, + TextVertical = 86, + PivotDelete = 87, + TabSelectS = 88, + TabSelectE = 89, + TabSelectSE = 90, + TabSelectW = 91, + TabSelectSW = 92, + Paintbrush = 93, + LAST = Paintbrush, +}; #endif // INCLUDED_VCL_PTRSTYLE_HXX diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 6182625745e6..6b7791a306e0 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -631,14 +631,14 @@ bool DlgEdFunc::setMovementPointer(const MouseEvent& rMEvt) { bool bIsSetPoint = isRectangleHit(rMEvt); if ( bIsSetPoint ) - m_pParent->SetPointer( Pointer(POINTER_NOTALLOWED)); + m_pParent->SetPointer( Pointer(PointerStyle::NotAllowed)); else { bool bCtrlKey = rMEvt.IsMod1(); (void)bCtrlKey; if (bCtrlKey) { - m_pParent->SetPointer( Pointer(POINTER_MOVEDATALINK )); + m_pParent->SetPointer( Pointer(PointerStyle::MoveDataLink )); bIsSetPoint = true; } } diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index d7ae24e611b2..53767d8cfee0 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -830,9 +830,9 @@ void ScInputWindow::MouseMove( const MouseEvent& rMEvt ) ScInputBarGroup* pGroupBar = dynamic_cast< ScInputBarGroup* > ( pRuntimeWindow.get() ); if ( bInResize || IsPointerAtResizePos() ) - SetPointer( Pointer( POINTER_WINDOW_SSIZE ) ); + SetPointer( Pointer( PointerStyle::WindowSSize ) ); else - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); if ( bInResize ) { @@ -1492,7 +1492,7 @@ ScTextWnd::ScTextWnd( vcl::Window* pParent, ScTabViewShell* pViewSh ) SetBackground(aBgColor); SetLineColor(COL_BLACK); SetMapMode(MAP_TWIP); - SetPointer(POINTER_TEXT); + SetPointer(PointerStyle::Text); SetFont(aTextFont); } diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index a8f172a263de..fb139634a1a2 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -649,7 +649,7 @@ void ScCsvRuler::ImplDrawTrackingRect() void ScCsvRuler::ImplSetMousePointer( sal_Int32 nPos ) { - SetPointer( Pointer( HasSplit( nPos ) ? POINTER_HSPLIT : POINTER_ARROW ) ); + SetPointer( Pointer( HasSplit( nPos ) ? PointerStyle::HSplit : PointerStyle::Arrow ) ); } // accessibility ============================================================== diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index e63ac13b4abb..5f990a93a712 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -664,12 +664,12 @@ IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton ) if( (pButton == pRbFixed) || (pButton == pRbSeparated) ) { - SetPointer( Pointer( POINTER_WAIT ) ); + SetPointer( Pointer( PointerStyle::Wait ) ); if( pRbFixed->IsChecked() ) mpTableBox->SetFixedWidthMode(); else mpTableBox->SetSeparatorsMode(); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); SetupSeparatorCtrls(); } @@ -707,7 +707,7 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) if( (pCharSetBox == pLbCharSet) && (pCharSetBox->GetSelectEntryCount() == 1) ) { - SetPointer( Pointer( POINTER_WAIT ) ); + SetPointer( Pointer( PointerStyle::Wait ) ); rtl_TextEncoding eOldCharSet = meCharSet; SetSelectedCharSet(); // switching char-set invalidates 8bit -> String conversions @@ -715,7 +715,7 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) UpdateVertical(); mpTableBox->Execute( CSVCMD_NEWCELLTEXTS ); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); } return 0; } diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx index f1994f109050..c916a5177cf9 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -136,22 +136,22 @@ void FuConstArc::Activate() switch (aSfxRequest.GetSlot() ) { case SID_DRAW_ARC: - aNewPointer = Pointer( POINTER_DRAW_ARC ); + aNewPointer = Pointer( PointerStyle::DrawArc ); aObjKind = OBJ_CARC; break; case SID_DRAW_PIE: - aNewPointer = Pointer( POINTER_DRAW_PIE ); + aNewPointer = Pointer( PointerStyle::DrawPie ); aObjKind = OBJ_SECT; break; case SID_DRAW_CIRCLECUT: - aNewPointer = Pointer( POINTER_DRAW_CIRCLECUT ); + aNewPointer = Pointer( PointerStyle::DrawCircleCut ); aObjKind = OBJ_CCUT; break; default: - aNewPointer = Pointer( POINTER_CROSS ); + aNewPointer = Pointer( PointerStyle::Cross ); aObjKind = OBJ_CARC; break; } diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index e64b107a3e78..d48f6da8937a 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -155,7 +155,7 @@ void FuConstCustomShape::Activate() { pView->SetCurrentObj( OBJ_CUSTOMSHAPE, SdrInventor ); - aNewPointer = Pointer( POINTER_DRAW_RECT ); + aNewPointer = Pointer( PointerStyle::DrawRect ); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 33a456ff4182..2132b081d9eb 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -206,7 +206,7 @@ void FuConstPolygon::Activate() FuConstruct::Activate(); - aNewPointer = Pointer( POINTER_DRAW_POLYGON ); + aNewPointer = Pointer( PointerStyle::DrawPolygon ); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); } diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index d0282f2abfd1..e93322753be3 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -169,28 +169,28 @@ void FuConstRectangle::Activate() switch (aSfxRequest.GetSlot() ) { case SID_DRAW_LINE: - aNewPointer = Pointer( POINTER_DRAW_LINE ); + aNewPointer = Pointer( PointerStyle::DrawLine ); aObjKind = OBJ_LINE; break; case SID_DRAW_RECT: - aNewPointer = Pointer( POINTER_DRAW_RECT ); + aNewPointer = Pointer( PointerStyle::DrawRect ); aObjKind = OBJ_RECT; break; case SID_DRAW_ELLIPSE: - aNewPointer = Pointer( POINTER_DRAW_ELLIPSE ); + aNewPointer = Pointer( PointerStyle::DrawEllipse ); aObjKind = OBJ_CIRC; break; case SID_DRAW_CAPTION: case SID_DRAW_CAPTION_VERTICAL: - aNewPointer = Pointer( POINTER_DRAW_CAPTION ); + aNewPointer = Pointer( PointerStyle::DrawCaption ); aObjKind = OBJ_CAPTION; break; default: - aNewPointer = Pointer( POINTER_CROSS ); + aNewPointer = Pointer( PointerStyle::Cross ); aObjKind = OBJ_RECT; break; } diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index 94a86b523232..34002b8273ca 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -193,7 +193,7 @@ bool FuConstruct::MouseMove(const MouseEvent& rMEvt) } else if ( pView->IsMarkedHit(aPnt) ) { - pViewShell->SetActivePointer(Pointer(POINTER_MOVE)); + pViewShell->SetActivePointer(Pointer(PointerStyle::Move)); } else { diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index 83e8c18ed06f..3c9828d4bba6 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -138,7 +138,7 @@ void FuConstUnoControl::Activate() { pView->SetCurrentObj( nIdentifier, nInventor ); - aNewPointer = Pointer( POINTER_DRAW_RECT ); + aNewPointer = Pointer( PointerStyle::DrawRect ); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 25bfd25fc3f8..2817e527b8e5 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -50,8 +50,8 @@ FuDraw::FuDraw(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq) : FuPoor (pViewSh, pWin, pViewP, pDoc, rReq), - aNewPointer ( POINTER_ARROW ), - aOldPointer ( POINTER_ARROW ) + aNewPointer ( PointerStyle::Arrow ), + aOldPointer ( PointerStyle::Arrow ) { } @@ -748,7 +748,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) if ( pView->IsTextEdit() ) { - pViewShell->SetActivePointer(Pointer(POINTER_TEXT)); // can't be ? + pViewShell->SetActivePointer(Pointer(PointerStyle::Text)); // can't be ? } else if ( pHdl ) { @@ -757,13 +757,13 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) } else if ( pView->IsMarkedHit(aPnt) ) { - pViewShell->SetActivePointer( Pointer(POINTER_MOVE) ); + pViewShell->SetActivePointer( Pointer(PointerStyle::Move) ); } else if ( !bAlt && ( !pMEvt || !pMEvt->GetButtons() ) && lcl_UrlHit( pView, aPosPixel, pWindow ) ) { // could be suppressed with ALT - pWindow->SetPointer( Pointer( POINTER_REFHAND ) ); // Text-URL / ImageMap + pWindow->SetPointer( Pointer( PointerStyle::RefHand ) ); // Text-URL / ImageMap } else if ( !bAlt && pView->PickObj(aPnt, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMACRO) ) { @@ -772,9 +772,9 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) ); } else if ( !bAlt && pInfo && (!pInfo->GetMacro().isEmpty() || !pInfo->GetHlink().isEmpty()) ) - pWindow->SetPointer( Pointer( POINTER_REFHAND ) ); + pWindow->SetPointer( Pointer( PointerStyle::RefHand ) ); else if ( IsDetectiveHit( aPnt ) ) - pViewShell->SetActivePointer( Pointer( POINTER_DETECTIVE ) ); + pViewShell->SetActivePointer( Pointer( PointerStyle::Detective ) ); else pViewShell->SetActivePointer( aNewPointer ); //! in Gridwin? } diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index 17d50953da40..4bec72d4e398 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -596,7 +596,7 @@ void FuText::Activate() pView->SetCreateMode(); } - aNewPointer = Pointer(POINTER_TEXT); + aNewPointer = Pointer(PointerStyle::Text); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx index 779b6cda5143..e568ed5f7638 100644 --- a/sc/source/ui/formdlg/privsplt.cxx +++ b/sc/source/ui/formdlg/privsplt.cxx @@ -56,11 +56,11 @@ ScPrivatSplit::ScPrivatSplit(vcl::Window* pParent, const ResId& rResId, aMovingFlag=false; if(eScSplit==SC_SPLIT_HORZ) { - aWinPointer=Pointer(POINTER_HSPLIT); + aWinPointer=Pointer(PointerStyle::HSplit); } else { - aWinPointer=Pointer(POINTER_VSPLIT); + aWinPointer=Pointer(PointerStyle::VSplit); } SetPointer(aWinPointer); } diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index 13d5ba52395a..a4ca81b9d3aa 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -132,8 +132,8 @@ public: bool GetPageMargins() const { return bPageMargin; } void SetPageMargins( bool bVal ) { bPageMargin = bVal; } - void DrawInvert( long nDragPos, sal_uInt16 nFlags ); - void DragMove( long nDragMovePos, sal_uInt16 nFlags ); + void DrawInvert( long nDragPos, PointerStyle nFlags ); + void DragMove( long nDragMovePos, PointerStyle nFlags ); const ScPreviewLocationData& GetLocationData(); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 01d8e419477a..43124921d407 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -774,7 +774,7 @@ void ScAcceptChgDlg::UpdateView() const ScChangeAction* pScChangeAction=NULL; bAcceptEnableFlag=true; bRejectEnableFlag=true; - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); pTheView->SetUpdateMode(false); bool bFilterFlag = pTPFilter->IsDate() || pTPFilter->IsRange() || pTPFilter->IsAuthor() || pTPFilter->IsComment(); @@ -859,7 +859,7 @@ void ScAcceptChgDlg::UpdateView() pParent->EnableChildrenOnDemand(true); } pTheView->SetUpdateMode(true); - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); SvTreeListEntry* pEntry=pTheView->First(); if(pEntry!=NULL) pTheView->Select(pEntry); @@ -940,7 +940,7 @@ IMPL_LINK( ScAcceptChgDlg, FilterHandle, SvxTPFilter*, pRef ) IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef ) { - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); bIgnoreMsg=true; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -971,14 +971,14 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef ) ClearView(); UpdateView(); } - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); bIgnoreMsg=false; return 0; } IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) { - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); ScChangeTrack* pChanges=pDoc->GetChangeTrack(); bIgnoreMsg=true; @@ -1057,7 +1057,7 @@ void ScAcceptChgDlg::AcceptFiltered() IMPL_LINK_NOARG(ScAcceptChgDlg, RejectAllHandle) { - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); bIgnoreMsg=true; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pChanges!=NULL) @@ -1077,7 +1077,7 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, RejectAllHandle) ClearView(); UpdateView(); } - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); bIgnoreMsg=false; @@ -1086,7 +1086,7 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, RejectAllHandle) IMPL_LINK_NOARG(ScAcceptChgDlg, AcceptAllHandle) { - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); bIgnoreMsg=true; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -1105,7 +1105,7 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, AcceptAllHandle) UpdateView(); } bIgnoreMsg=false; - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); return 0; } @@ -1351,7 +1351,7 @@ bool ScAcceptChgDlg::Expand( IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable ) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); if(pTable!=NULL && pChanges!=NULL) { ScChangeActionMap aActionMap; @@ -1410,7 +1410,7 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable ) } } - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); return (sal_uLong) true; } @@ -1422,7 +1422,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio SvTreeListEntry* pParent=NULL; bAcceptEnableFlag=true; bRejectEnableFlag=true; - SetPointer(Pointer(POINTER_WAIT)); + SetPointer(Pointer(PointerStyle::Wait)); pTheView->SetUpdateMode(false); bool bTheFlag = false; @@ -1488,7 +1488,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio pTPView->EnableRejectAll(bTheFlag); pTheView->SetUpdateMode(true); - SetPointer(Pointer(POINTER_ARROW)); + SetPointer(Pointer(PointerStyle::Arrow)); } } diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index a7c46448e2b4..23704b345a29 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -620,11 +620,11 @@ void ScConflictsDlg::KeepHandler( bool bMine ) { return; } - SetPointer( Pointer( POINTER_WAIT ) ); + SetPointer( Pointer( PointerStyle::Wait ) ); ScConflictAction eConflictAction = ( bMine ? SC_CONFLICT_ACTION_KEEP_MINE : SC_CONFLICT_ACTION_KEEP_OTHER ); SetConflictAction( pRootEntry, eConflictAction ); m_pLbConflicts->RemoveEntry( pRootEntry ); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); if ( m_pLbConflicts->GetEntryCount() == 0 ) { EndDialog( RET_OK ); @@ -639,7 +639,7 @@ void ScConflictsDlg::KeepAllHandler( bool bMine ) { return; } - SetPointer( Pointer( POINTER_WAIT ) ); + SetPointer( Pointer( PointerStyle::Wait ) ); ScConflictAction eConflictAction = ( bMine ? SC_CONFLICT_ACTION_KEEP_MINE : SC_CONFLICT_ACTION_KEEP_OTHER ); while ( pRootEntry ) { @@ -649,7 +649,7 @@ void ScConflictsDlg::KeepAllHandler( bool bMine ) m_pLbConflicts->SetUpdateMode( false ); m_pLbConflicts->Clear(); m_pLbConflicts->SetUpdateMode( true ); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); EndDialog( RET_OK ); } diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 13e3c3b17387..fd92d08981e9 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -342,7 +342,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg aDocShTablesRef = pDocShTables; Pointer aOldPtr( GetPointer() ); - SetPointer( Pointer( POINTER_WAIT ) ); + SetPointer( Pointer( PointerStyle::Wait ) ); pDocShTables->DoLoad( pMed ); SetPointer( aOldPtr ); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index dd8cb954e980..a44818341e0c 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -80,7 +80,7 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc Color aBgColor = rStyleSettings.GetWindowColor(); SetMapMode( MAP_TWIP ); - SetPointer( POINTER_TEXT ); + SetPointer( PointerStyle::Text ); SetBackground( aBgColor ); Size aSize( GetOutputSize() ); diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index d496dce067b2..cc51da63adeb 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -631,17 +631,17 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro sal_Int32 SAL_CALL ScVbaApplication::getCursor() throw (uno::RuntimeException, std::exception) { - sal_Int32 nPointerStyle = getPointerStyle(getCurrentDocument()); + PointerStyle nPointerStyle = getPointerStyle(getCurrentDocument()); switch( nPointerStyle ) { - case POINTER_ARROW: + case PointerStyle::Arrow: return excel::XlMousePointer::xlNorthwestArrow; - case POINTER_NULL: + case PointerStyle::Null: return excel::XlMousePointer::xlDefault; - case POINTER_WAIT: + case PointerStyle::Wait: return excel::XlMousePointer::xlWait; - case POINTER_TEXT: + case PointerStyle::Text: return excel::XlMousePointer::xlIBeam; default: return excel::XlMousePointer::xlDefault; @@ -658,7 +658,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, s { case excel::XlMousePointer::xlNorthwestArrow: { - const Pointer& rPointer( POINTER_ARROW ); + const Pointer& rPointer( PointerStyle::Arrow ); setCursorHelper( xModel, rPointer, false ); break; } @@ -672,7 +672,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, s } case excel::XlMousePointer::xlDefault: { - const Pointer& rPointer( POINTER_NULL ); + const Pointer& rPointer( PointerStyle::Null ); setCursorHelper( xModel, rPointer, false ); break; } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index b987c53e2684..586a2364b4ee 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -465,13 +465,13 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( !bWaterCan && pStyleSheet ) { pScMod->SetWaterCan( true ); - pTabViewShell->SetActivePointer( Pointer(POINTER_FILL) ); + pTabViewShell->SetActivePointer( Pointer(PointerStyle::Fill) ); rReq.Done(); } else { pScMod->SetWaterCan( false ); - pTabViewShell->SetActivePointer( Pointer(POINTER_ARROW) ); + pTabViewShell->SetActivePointer( Pointer(PointerStyle::Arrow) ); rReq.Done(); } } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 2228a66a18b4..9eb4dfc91e20 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1598,7 +1598,7 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction ) Point aMousePos = rMEvt.GetPosPixel(); if (mpAutoFillRect->IsInside(aMousePos)) { - SetPointer( Pointer( POINTER_CROSS ) ); //! dickeres Kreuz ? + SetPointer( Pointer( PointerStyle::Cross ) ); //! dickeres Kreuz ? if (bAction) { SCCOL nX = aMarkRange.aEnd.Col(); @@ -1642,7 +1642,7 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction ) aMousePos.Y() >= aEndPos.Y()-3 && aMousePos.Y() <= aEndPos.Y()+1 ); if ( bTop || bBottom ) { - SetPointer( Pointer( POINTER_CROSS ) ); + SetPointer( Pointer( PointerStyle::Cross ) ); if (bAction) { sal_uInt8 nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB; @@ -2068,7 +2068,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta if ( !bAlt && rMEvt.IsLeft() && GetEditUrl(rMEvt.GetPosPixel()) ) // Klick auf Link: Cursor nicht bewegen { - SetPointer( Pointer( POINTER_REFHAND ) ); + SetPointer( Pointer( PointerStyle::RefHand ) ); nMouseStatus = SC_GM_URLDOWN; // auch nur dann beim ButtonUp ausfuehren return; } @@ -2177,7 +2177,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) { RFMouseMove( rMEvt, true ); // Range wieder richtigherum bRFMouse = false; - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); ReleaseMouse(); return; } @@ -2186,7 +2186,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) { PagebreakMove( rMEvt, true ); nPagebreakMouse = SC_PD_NONE; - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); ReleaseMouse(); return; } @@ -2217,7 +2217,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) rMark.SetMarking(false); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); if (pViewData->IsFillMode() || ( pViewData->GetFillMode() == SC_FILL_MATRIX && rMEvt.IsMod1() )) @@ -2615,7 +2615,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if ( pViewData->GetViewShell()->IsAuditShell() ) // Detektiv-Fuell-Modus { - SetPointer( Pointer( POINTER_FILL ) ); + SetPointer( Pointer( PointerStyle::Fill ) ); return; } @@ -2687,18 +2687,18 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) // Field can only be URL field bool bAlt = rMEvt.IsMod2(); if ( !bAlt && !nButtonDown && pEditView && pEditView->GetFieldUnderMousePointer() ) - SetPointer( Pointer( POINTER_REFHAND ) ); + SetPointer( Pointer( PointerStyle::RefHand ) ); else if ( pEditView && pEditView->GetEditEngine()->IsVertical() ) - SetPointer( Pointer( POINTER_TEXT_VERTICAL ) ); + SetPointer( Pointer( PointerStyle::TextVertical ) ); else - SetPointer( Pointer( POINTER_TEXT ) ); + SetPointer( Pointer( PointerStyle::Text ) ); return; } } bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush(); if (bWater) - SetPointer( Pointer(POINTER_FILL) ); + SetPointer( Pointer(PointerStyle::Fill) ); if (!bWater) { @@ -2710,9 +2710,9 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if ( HitRangeFinder( rMEvt.GetPosPixel(), rCorner ) ) { if (rCorner != NONE) - SetPointer( Pointer( POINTER_CROSS ) ); + SetPointer( Pointer( PointerStyle::Cross ) ); else - SetPointer( Pointer( POINTER_HAND ) ); + SetPointer( Pointer( PointerStyle::Hand ) ); bCross = true; } @@ -2722,26 +2722,26 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if ( !nButtonDown && pViewData->IsPagebreakMode() && ( nBreakType = HitPageBreak( rMEvt.GetPosPixel() ) ) != 0 ) { - PointerStyle eNew = POINTER_ARROW; + PointerStyle eNew = PointerStyle::Arrow; switch ( nBreakType ) { case SC_PD_RANGE_L: case SC_PD_RANGE_R: case SC_PD_BREAK_H: - eNew = POINTER_ESIZE; + eNew = PointerStyle::ESize; break; case SC_PD_RANGE_T: case SC_PD_RANGE_B: case SC_PD_BREAK_V: - eNew = POINTER_SSIZE; + eNew = PointerStyle::SSize; break; case SC_PD_RANGE_TL: case SC_PD_RANGE_BR: - eNew = POINTER_SESIZE; + eNew = PointerStyle::SESize; break; case SC_PD_RANGE_TR: case SC_PD_RANGE_BL: - eNew = POINTER_NESIZE; + eNew = PointerStyle::NESize; break; } SetPointer( Pointer( eNew ) ); @@ -2756,7 +2756,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if ( nButtonDown && pViewData->IsAnyFillMode() ) { - SetPointer( Pointer( POINTER_CROSS ) ); + SetPointer( Pointer( PointerStyle::Cross ) ); bCross = true; nScFillModeMouseModifier = rMEvt.GetModifier(); // ausgewertet bei AutoFill und Matrix } @@ -2766,10 +2766,10 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) bool bAlt = rMEvt.IsMod2(); if (bEditMode) // Edit-Mode muss zuerst kommen! - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); else if ( !bAlt && !nButtonDown && GetEditUrl(rMEvt.GetPosPixel()) ) - SetPointer( Pointer( POINTER_REFHAND ) ); + SetPointer( Pointer( PointerStyle::RefHand ) ); else if ( DrawMouseMove(rMEvt) ) // setzt Pointer um return; } @@ -2889,7 +2889,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt ) nPagebreakMouse = SC_PD_NONE; } - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); StopMarking(); MouseButtonUp( rMEvt ); // mit Status SC_GM_IGNORE aus StopMarking @@ -5146,9 +5146,9 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp ) // Mauszeiger if (bRFSize) - SetPointer( Pointer( POINTER_CROSS ) ); + SetPointer( Pointer( PointerStyle::Cross ) ); else - SetPointer( Pointer( POINTER_HAND ) ); + SetPointer( Pointer( PointerStyle::Hand ) ); // Scrolling diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 03e215074d3e..cd7d66d88830 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -293,16 +293,16 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) if (bMove) // set mouse pointer { - PointerStyle ePointer = POINTER_PIVOT_DELETE; + PointerStyle ePointer = PointerStyle::PivotDelete; if ( !bAllowed ) - ePointer = POINTER_NOTALLOWED; + ePointer = PointerStyle::NotAllowed; else if ( bHasRange ) switch (nOrient) { - case DataPilotFieldOrientation_COLUMN: ePointer = POINTER_PIVOT_COL; break; - case DataPilotFieldOrientation_ROW: ePointer = POINTER_PIVOT_ROW; break; + case DataPilotFieldOrientation_COLUMN: ePointer = PointerStyle::PivotCol; break; + case DataPilotFieldOrientation_ROW: ePointer = PointerStyle::PivotRow; break; case DataPilotFieldOrientation_PAGE: - case DataPilotFieldOrientation_DATA: ePointer = POINTER_PIVOT_FIELD; break; + case DataPilotFieldOrientation_DATA: ePointer = PointerStyle::PivotField; break; } SetPointer( ePointer ); } @@ -640,7 +640,7 @@ void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt ) ReleaseMouse(); DPTestMouse( rMEvt, false ); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); } void ScGridWindow::UpdateDragRect( bool bShowRange, const Rectangle& rPosRect ) diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 2ebc698b097e..b1e7b6fa7805 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -116,7 +116,7 @@ bool ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt) } else { - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); return false; } } diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index fe37b96044fa..1b094cbe34b2 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -663,7 +663,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) if ( nClicks && nClicks%2==0 ) { SetEntrySize( nDragNo, HDR_SIZE_OPTIMUM ); - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); } else { @@ -763,7 +763,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt ) { if ( IsDisabled() ) { - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); return; } @@ -787,9 +787,9 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt ) (void)GetMousePos( rMEvt, bIsBorder ); if ( bIsBorder && rMEvt.GetButtons()==0 && ResizeAllowed() ) - SetPointer( Pointer( bVertical ? POINTER_VSIZEBAR : POINTER_HSIZEBAR ) ); + SetPointer( Pointer( bVertical ? PointerStyle::VSizeBar : PointerStyle::HSizeBar ) ); else - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); if (!bIgnoreMove) pSelEngine->SelMouseMove( rMEvt ); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 0feb97d64502..54c186492a99 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -544,17 +544,17 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) { SetMapMode(aMMMode); SetLineColor( COL_BLACK ); - DrawInvert( (long)( nTopMargin - aOffset.Y() ), POINTER_VSIZEBAR ); - DrawInvert( (long)(nPageEndY - nBottomMargin ), POINTER_VSIZEBAR ); - DrawInvert( (long)( nLeftMargin - aOffset.X() ), POINTER_HSIZEBAR ); - DrawInvert( (long)( nPageEndX - nRightMargin ) , POINTER_HSIZEBAR ); + DrawInvert( (long)( nTopMargin - aOffset.Y() ), PointerStyle::VSizeBar ); + DrawInvert( (long)(nPageEndY - nBottomMargin ), PointerStyle::VSizeBar ); + DrawInvert( (long)( nLeftMargin - aOffset.X() ), PointerStyle::HSizeBar ); + DrawInvert( (long)( nPageEndX - nRightMargin ) , PointerStyle::HSizeBar ); if( bHeaderOn ) { - DrawInvert( nHeaderHeight - aOffset.Y(), POINTER_VSIZEBAR ); + DrawInvert( nHeaderHeight - aOffset.Y(), PointerStyle::VSizeBar ); } if( bFooterOn ) { - DrawInvert( nPageEndY - nFooterHeight, POINTER_VSIZEBAR ); + DrawInvert( nPageEndY - nFooterHeight, PointerStyle::VSizeBar ); } SetMapMode( MapMode( MAP_PIXEL ) ); @@ -974,53 +974,53 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) CaptureMouse(); - if( rMEvt.IsLeft() && GetPointer() == POINTER_HSIZEBAR ) + if( rMEvt.IsLeft() && GetPointer() == PointerStyle::HSizeBar ) { SetMapMode( aMMMode ); if( bLeftRulerChange ) { - DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR ); + DrawInvert( aButtonDownChangePoint.X(), PointerStyle::HSizeBar ); bLeftRulerMove = true; bRightRulerMove = false; } else if( bRightRulerChange ) { - DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR ); + DrawInvert( aButtonDownChangePoint.X(), PointerStyle::HSizeBar ); bLeftRulerMove = false; bRightRulerMove = true; } } - if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR ) + if( rMEvt.IsLeft() && GetPointer() == PointerStyle::VSizeBar ) { SetMapMode( aMMMode ); if( bTopRulerChange ) { - DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); + DrawInvert( aButtonDownChangePoint.Y(), PointerStyle::VSizeBar ); bTopRulerMove = true; bBottomRulerMove = false; } else if( bBottomRulerChange ) { - DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); + DrawInvert( aButtonDownChangePoint.Y(), PointerStyle::VSizeBar ); bTopRulerMove = false; bBottomRulerMove = true; } else if( bHeaderRulerChange ) { - DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); + DrawInvert( aButtonDownChangePoint.Y(), PointerStyle::VSizeBar ); bHeaderRulerMove = true; bFooterRulerMove = false; } else if( bFooterRulerChange ) { - DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); + DrawInvert( aButtonDownChangePoint.Y(), PointerStyle::VSizeBar ); bHeaderRulerMove = false; bFooterRulerMove = true; } } - if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT ) + if( rMEvt.IsLeft() && GetPointer() == PointerStyle::HSplit ) { Point aNowPt = rMEvt.GetPosPixel(); SCCOL i = 0; @@ -1037,11 +1037,11 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) SetMapMode( aMMMode ); if( nColNumberButttonDown == aPageArea.aStart.Col() ) - DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT ); + DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,PointerStyle::HSplit ); else - DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT ); + DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,PointerStyle::HSplit ); - DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT ); + DrawInvert( aButtonDownChangePoint.X(), PointerStyle::HSplit ); bColRulerMove = true; } } @@ -1057,9 +1057,9 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) long nWidth = (long) lcl_GetDocPageSize(&pDocShell->GetDocument(), nTab).Width(); long nHeight = (long) lcl_GetDocPageSize(&pDocShell->GetDocument(), nTab).Height(); - if( rMEvt.IsLeft() && GetPointer() == POINTER_HSIZEBAR ) + if( rMEvt.IsLeft() && GetPointer() == PointerStyle::HSizeBar ) { - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); ScDocument& rDoc = pDocShell->GetDocument(); OUString aOldName = rDoc.GetPageStyle( nTab ); @@ -1096,7 +1096,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) else if( aButtonDownPt.X() == aButtonUpPt.X() ) { bMoveRulerAction = false; - DrawInvert( aButtonUpPt.X(), POINTER_HSIZEBAR ); + DrawInvert( aButtonUpPt.X(), PointerStyle::HSizeBar ); } if( bMoveRulerAction ) { @@ -1140,9 +1140,9 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) bRightRulerMove = false; } - if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR ) + if( rMEvt.IsLeft() && GetPointer() == PointerStyle::VSizeBar ) { - SetPointer( POINTER_ARROW ); + SetPointer( PointerStyle::Arrow ); bool bMoveRulerAction = true; if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) ) @@ -1153,7 +1153,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) else if( aButtonDownPt.Y() == aButtonUpPt.Y() ) { bMoveRulerAction = false; - DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR ); + DrawInvert( aButtonUpPt.Y(), PointerStyle::VSizeBar ); } if( bMoveRulerAction ) { @@ -1245,9 +1245,9 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) bHeaderRulerMove = false; bFooterRulerMove = false; } - if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT ) + if( rMEvt.IsLeft() && GetPointer() == PointerStyle::HSplit ) { - SetPointer(POINTER_ARROW); + SetPointer(PointerStyle::Arrow); ScDocument& rDoc = pDocShell->GetDocument(); bool bLayoutRTL = rDoc.IsLayoutRTL( nTab ); bool bMoveRulerAction = true; @@ -1255,10 +1255,10 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) { bMoveRulerAction = false; if( nColNumberButttonDown == aPageArea.aStart.Col() ) - DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT ); + DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,PointerStyle::HSplit ); else - DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT ); - DrawInvert( aButtonUpPt.X(), POINTER_HSPLIT ); + DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,PointerStyle::HSplit ); + DrawInvert( aButtonUpPt.X(), PointerStyle::HSplit ); } if( bMoveRulerAction ) { @@ -1362,7 +1362,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt ) && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { bOnColRulerChange = true; - if( !rMEvt.GetButtons() && GetPointer() == POINTER_HSPLIT ) + if( !rMEvt.GetButtons() && GetPointer() == PointerStyle::HSplit ) nColNumberButttonDown = i; break; } @@ -1415,31 +1415,31 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt ) { if( bOnColRulerChange || bColRulerMove ) { - SetPointer( Pointer( POINTER_HSPLIT ) ); + SetPointer( Pointer( PointerStyle::HSplit ) ); if( bColRulerMove ) { if( aMouseMovePoint.X() > -aOffset.X() && aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() ) - DragMove( aMouseMovePoint.X(), POINTER_HSPLIT ); + DragMove( aMouseMovePoint.X(), PointerStyle::HSplit ); } } else { if( bLeftRulerChange && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - SetPointer( Pointer( POINTER_HSIZEBAR ) ); + SetPointer( Pointer( PointerStyle::HSizeBar ) ); if( bLeftRulerMove ) { if( aMouseMovePoint.X() > -aOffset.X() && aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() ) - DragMove( aMouseMovePoint.X(), POINTER_HSIZEBAR ); + DragMove( aMouseMovePoint.X(), PointerStyle::HSizeBar ); } } else if( bRightRulerChange && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - SetPointer( Pointer( POINTER_HSIZEBAR ) ); + SetPointer( Pointer( PointerStyle::HSizeBar ) ); if( bRightRulerMove ) { if( aMouseMovePoint.X() > -aOffset.X() && aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() ) - DragMove( aMouseMovePoint.X(), POINTER_HSIZEBAR ); + DragMove( aMouseMovePoint.X(), PointerStyle::HSizeBar ); } } } @@ -1454,43 +1454,43 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt ) { if( bTopRulerChange ) { - SetPointer( Pointer( POINTER_VSIZEBAR ) ); + SetPointer( Pointer( PointerStyle::VSizeBar ) ); if( bTopRulerMove ) { if( aMouseMovePoint.Y() > -aOffset.Y() && aMouseMovePoint.Y() < nHeight * HMM_PER_TWIPS - aOffset.Y() ) - DragMove( aMouseMovePoint.Y(), POINTER_VSIZEBAR ); + DragMove( aMouseMovePoint.Y(), PointerStyle::VSizeBar ); } } else if( bBottomRulerChange ) { - SetPointer( Pointer( POINTER_VSIZEBAR ) ); + SetPointer( Pointer( PointerStyle::VSizeBar ) ); if( bBottomRulerMove ) { if( aMouseMovePoint.Y() > -aOffset.Y() && aMouseMovePoint.Y() < nHeight * HMM_PER_TWIPS - aOffset.Y() ) - DragMove( aMouseMovePoint.Y(), POINTER_VSIZEBAR ); + DragMove( aMouseMovePoint.Y(), PointerStyle::VSizeBar ); } } else if( bHeaderRulerChange ) { - SetPointer( Pointer( POINTER_VSIZEBAR ) ); + SetPointer( Pointer( PointerStyle::VSizeBar ) ); if( bHeaderRulerMove ) { if( aMouseMovePoint.Y() > -aOffset.Y() && aMouseMovePoint.Y() < nHeight * HMM_PER_TWIPS - aOffset.Y() ) - DragMove( aMouseMovePoint.Y(), POINTER_VSIZEBAR ); + DragMove( aMouseMovePoint.Y(), PointerStyle::VSizeBar ); } } else if( bFooterRulerChange ) { - SetPointer( Pointer( POINTER_VSIZEBAR ) ); + SetPointer( Pointer( PointerStyle::VSizeBar ) ); if( bFooterRulerMove ) { if( aMouseMovePoint.Y() > -aOffset.Y() && aMouseMovePoint.Y() < nHeight * HMM_PER_TWIPS - aOffset.Y() ) - DragMove( aMouseMovePoint.Y(), POINTER_VSIZEBAR ); + DragMove( aMouseMovePoint.Y(), PointerStyle::VSizeBar ); } } } else - SetPointer( Pointer( POINTER_ARROW ) ); + SetPointer( Pointer( PointerStyle::Arrow ) ); } } } @@ -1533,14 +1533,14 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre return xAcc; } -void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) +void ScPreview::DragMove( long nDragMovePos, PointerStyle nFlags ) { Fraction aPreviewZoom( nZoom, 100 ); Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); SetMapMode( aMMMode ); long nPos = nDragMovePos; - if( nFlags == POINTER_HSIZEBAR || nFlags == POINTER_HSPLIT ) + if( nFlags == PointerStyle::HSizeBar || nFlags == PointerStyle::HSplit ) { if( nDragMovePos != aButtonDownChangePoint.X() ) { @@ -1549,7 +1549,7 @@ void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) DrawInvert( aButtonDownChangePoint.X(), nFlags ); } } - else if( nFlags == POINTER_VSIZEBAR ) + else if( nFlags == PointerStyle::VSizeBar ) { if( nDragMovePos != aButtonDownChangePoint.Y() ) { @@ -1560,16 +1560,16 @@ void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) } } -void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags ) +void ScPreview::DrawInvert( long nDragPos, PointerStyle nFlags ) { long nHeight = (long) lcl_GetDocPageSize( &pDocShell->GetDocument(), nTab ).Height(); long nWidth = (long) lcl_GetDocPageSize( &pDocShell->GetDocument(), nTab ).Width(); - if( nFlags == POINTER_HSIZEBAR || nFlags == POINTER_HSPLIT ) + if( nFlags == PointerStyle::HSizeBar || nFlags == PointerStyle::HSplit ) { Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( ( nHeight * HMM_PER_TWIPS ) - aOffset.Y())); Invert( aRect,INVERT_50 ); } - else if( nFlags == POINTER_VSIZEBAR ) + else if( nFlags == PointerStyle::VSizeBar ) { Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth * HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 ); Invert( aRect,INVERT_50 ); diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx index 0a5710075fa1..2ba86b514965 100644 --- a/sc/source/ui/view/tabsplit.cxx +++ b/sc/source/ui/view/tabsplit.cxx @@ -47,11 +47,11 @@ void ScTabSplitter::SetFixed(bool bSet) { bFixed = bSet; if (bSet) - SetPointer(POINTER_ARROW); + SetPointer(PointerStyle::Arrow); else if (IsHorizontal()) - SetPointer(POINTER_HSPLIT); + SetPointer(PointerStyle::HSplit); else - SetPointer(POINTER_VSPLIT); + SetPointer(PointerStyle::VSplit); } void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 07262e175ce4..7f4508555a2b 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -610,7 +610,7 @@ void ScTabView::ResetBrushDocument() if ( HasPaintBrush() ) { SetBrushDocument( NULL, false ); - SetActivePointer( Pointer( POINTER_ARROW ) ); // switch pointers also when ended with escape key + SetActivePointer( Pointer( PointerStyle::Arrow ) ); // switch pointers also when ended with escape key } } diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 1b08e48aecd4..bcad03da6ab8 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -308,7 +308,7 @@ void AnnotationWindow::InitControls() { // actual window which holds the user text mpTextWindow = VclPtr<AnnotationTextWindow>::Create(this, WB_NODIALOGCONTROL); - mpTextWindow->SetPointer(Pointer(POINTER_TEXT)); + mpTextWindow->SetPointer(Pointer(PointerStyle::Text)); // window control for author and date mpMeta = VclPtr<MultiLineEdit>::Create(this,0); diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index 74dac4c7f3d9..df901883103d 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -131,7 +131,7 @@ void FuConstructUnoControl::Activate() { mpView->SetCurrentObj( nIdentifier, nInventor ); - aNewPointer = Pointer(POINTER_DRAW_RECT); + aNewPointer = Pointer(PointerStyle::DrawRect); aOldPointer = mpWindow->GetPointer(); mpWindow->SetPointer( aNewPointer ); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 013a5117a55a..a00a513190ff 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -511,7 +511,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) { // water can mode bDefPointer = false; - mpWindow->SetPointer(Pointer(POINTER_FILL)); + mpWindow->SetPointer(Pointer(PointerStyle::Fill)); } } else @@ -522,7 +522,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) { // water can mode bDefPointer = false; - mpWindow->SetPointer(Pointer(POINTER_FILL)); + mpWindow->SetPointer(Pointer(PointerStyle::Fill)); } else if (!pHdl && mpViewShell->GetViewFrame()->HasChildWindow(SvxBmpMaskChildWindow::GetChildWindowId())) @@ -533,7 +533,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) if (pMask && pMask->IsEyedropping()) { bDefPointer = false; - mpWindow->SetPointer(Pointer(POINTER_REFHAND)); + mpWindow->SetPointer(Pointer(PointerStyle::RefHand)); } } else if (!mpView->IsAction()) @@ -559,7 +559,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) SdrObject* pObject = rMarkList.GetMark(0)->GetMarkedSdrObj(); if ((pObject->ISA(E3dObject)) && (rMarkList.GetMarkCount() == 1)) { - mpWindow->SetPointer(Pointer(POINTER_ROTATE)); + mpWindow->SetPointer(Pointer(PointerStyle::Rotate)); bDefPointer = false; // Otherwise it'll be calles Joes routine and the mousepointer will reconfigurate again } } @@ -584,7 +584,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) { pObj = NULL; bDefPointer = false; - mpWindow->SetPointer(Pointer(POINTER_ARROW)); + mpWindow->SetPointer(Pointer(PointerStyle::Arrow)); } } @@ -680,7 +680,7 @@ bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos) { // Animation object bSet = true; - mpWindow->SetPointer(Pointer(POINTER_REFHAND)); + mpWindow->SetPointer(Pointer(PointerStyle::RefHand)); } } else if (bImageMapInfo && @@ -690,7 +690,7 @@ bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos) * ImageMap ******************************************************/ bSet = true; - mpWindow->SetPointer(Pointer(POINTER_REFHAND)); + mpWindow->SetPointer(Pointer(PointerStyle::RefHand)); } } } diff --git a/sd/source/ui/func/fudspord.cxx b/sd/source/ui/func/fudspord.cxx index c8b70fec4226..3f4f3a11b218 100644 --- a/sd/source/ui/func/fudspord.cxx +++ b/sd/source/ui/func/fudspord.cxx @@ -125,7 +125,7 @@ bool FuDisplayOrder::MouseButtonUp(const MouseEvent& rMEvt) void FuDisplayOrder::Activate() { maPtr = mpWindow->GetPointer(); - mpWindow->SetPointer( Pointer( POINTER_REFHAND ) ); + mpWindow->SetPointer( Pointer( PointerStyle::RefHand ) ); } void FuDisplayOrder::Deactivate() diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 5177664529b2..380bcef2bd1f 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -155,7 +155,7 @@ bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt) if ( mpView->IsTextEdit() ) { bReturn = FuText::MouseMove( rMEvt ); - mpWindow->SetPointer(Pointer(POINTER_FILL)); + mpWindow->SetPointer(Pointer(PointerStyle::Fill)); } else { @@ -165,9 +165,9 @@ bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt) bool bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SdrSearchOptions::PICKMARKABLE); if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) - mpWindow->SetPointer(Pointer(POINTER_FILL)); + mpWindow->SetPointer(Pointer(PointerStyle::Fill)); else - mpWindow->SetPointer(Pointer(POINTER_ARROW)); + mpWindow->SetPointer(Pointer(PointerStyle::Arrow)); } } return bReturn; diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx index daf1f168cb93..782c32e5ab44 100644 --- a/sd/source/ui/func/fuzoom.cxx +++ b/sd/source/ui/func/fuzoom.cxx @@ -91,9 +91,9 @@ bool FuZoom::MouseButtonDown(const MouseEvent& rMEvt) bool FuZoom::MouseMove(const MouseEvent& rMEvt) { if (rMEvt.IsShift()) - mpWindow->SetPointer(Pointer(POINTER_HAND)); + mpWindow->SetPointer(Pointer(PointerStyle::Hand)); else if (nSlotId != SID_ZOOM_PANNING) - mpWindow->SetPointer(Pointer(POINTER_MAGNIFY)); + mpWindow->SetPointer(Pointer(PointerStyle::Magnify)); if (bStartDrag) { @@ -198,11 +198,11 @@ void FuZoom::Activate() if (nSlotId == SID_ZOOM_PANNING) { - mpWindow->SetPointer(Pointer(POINTER_HAND)); + mpWindow->SetPointer(Pointer(PointerStyle::Hand)); } else { - mpWindow->SetPointer(Pointer(POINTER_MAGNIFY)); + mpWindow->SetPointer(Pointer(PointerStyle::Magnify)); } } diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index efadfa322174..7a456824b01a 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -1289,7 +1289,7 @@ MultiSelectionModeHandler::MultiSelectionModeHandler ( void MultiSelectionModeHandler::Initialize(const sal_uInt32 nEventCode) { #endif - const Pointer aSelectionPointer (POINTER_TEXT); + const Pointer aSelectionPointer (PointerStyle::Text); mrSlideSorter.GetContentWindow()->SetPointer(aSelectionPointer); SetSelectionModeFromModifier(nEventCode); } diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 333d3386142a..11ac62bfcf4b 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -270,7 +270,7 @@ bool ImageButtonHdl::isMarkable() const Pointer ImageButtonHdl::GetPointer() const { - return Pointer( POINTER_ARROW ); + return Pointer( PointerStyle::Arrow ); } ChangePlaceholderTag::ChangePlaceholderTag( ::sd::View& rView, SdrObject& rPlaceholderObj ) diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index 69c4a545505c..0165b8b82ba2 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -180,7 +180,7 @@ void RecentDocsViewItem::MouseButtonUp(const MouseEvent& rMEvt) void RecentDocsViewItem::OpenDocument() { // show busy mouse pointer - mrParent.SetPointer(Pointer(POINTER_WAIT)); + mrParent.SetPointer(Pointer(PointerStyle::Wait)); Reference<frame::XDispatch> xDispatch; Reference<frame::XDispatchProvider> xDispatchProvider; 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 ); diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 691dc737dcb5..742e7c1dfb21 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -164,7 +164,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt ) if ( aPipetteLink.IsSet() && Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) ) { - SetPointer( POINTER_REFHAND ); + SetPointer( PointerStyle::RefHand ); aPipetteLink.Call( this ); } } diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 5d690ed8827b..17dcc15269cf 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -653,7 +653,7 @@ void GraphCtrl::MouseMove(const MouseEvent& rMEvt) !pView->PickHandle( aLogPos ) && !pView->IsInsObjPoint() ) { - SetPointer( POINTER_CROSS ); + SetPointer( PointerStyle::Cross ); } else SetPointer( pView->GetPreferredPointer( aLogPos, this ) ); diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 64ba1761f4ae..7e090c3fc941 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -425,7 +425,7 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt) Pointer E3dDragRotate::GetSdrDragPointer() const { - return Pointer(POINTER_ROTATE); + return Pointer(PointerStyle::Rotate); } // E3dDragMove. This drag method is only required for translations inside @@ -697,7 +697,7 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt) Pointer E3dDragMove::GetSdrDragPointer() const { - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 0c9db46473d7..cd9f8880cbac 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -201,7 +201,7 @@ void SdrCreateView::ImpClearVars() pCreatePV=NULL; bAutoTextEdit=false; b1stPointAsCenter=false; - aAktCreatePointer=Pointer(POINTER_CROSS); + aAktCreatePointer=Pointer(PointerStyle::Cross); bUseIncompatiblePathCreateInterface=false; bAutoClosePolys=true; nAutoCloseDistPix=5; @@ -370,7 +370,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent) { // Here the correct pointer needs to be used // if the default is set to vertical writing - aAktCreatePointer = POINTER_TEXT; + aAktCreatePointer = PointerStyle::Text; } else aAktCreatePointer = pObj->GetCreatePointer(); @@ -379,7 +379,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, sal_uInt32 nInvent) } else { - aAktCreatePointer = Pointer(POINTER_CROSS); + aAktCreatePointer = Pointer(PointerStyle::Cross); } } diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 884a05fb9c6f..fd0077da5dd0 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1176,7 +1176,7 @@ Pointer SdrDragMovHdl::GetSdrDragPointer() const return pHdl->GetPointer(); } - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } @@ -1483,7 +1483,7 @@ Pointer SdrDragObjOwn::GetSdrDragPointer() const return pHdl->GetPointer(); } - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } @@ -1757,11 +1757,11 @@ Pointer SdrDragMove::GetSdrDragPointer() const { if (IsDraggingPoints() || IsDraggingGluePoints()) { - return Pointer(POINTER_MOVEPOINT); + return Pointer(PointerStyle::MovePoint); } else { - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } } @@ -2099,7 +2099,7 @@ Pointer SdrDragResize::GetSdrDragPointer() const return pHdl->GetPointer(); } - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } @@ -2236,7 +2236,7 @@ bool SdrDragRotate::EndSdrDrag(bool bCopy) Pointer SdrDragRotate::GetSdrDragPointer() const { - return Pointer(POINTER_ROTATE); + return Pointer(PointerStyle::Rotate); } @@ -2516,9 +2516,9 @@ bool SdrDragShear::EndSdrDrag(bool bCopy) Pointer SdrDragShear::GetSdrDragPointer() const { if (bVertical) - return Pointer(POINTER_VSHEAR); + return Pointer(PointerStyle::VShear); else - return Pointer(POINTER_HSHEAR); + return Pointer(PointerStyle::HShear); } @@ -2649,7 +2649,7 @@ bool SdrDragMirror::EndSdrDrag(bool bCopy) Pointer SdrDragMirror::GetSdrDragPointer() const { - return Pointer(POINTER_MIRROR); + return Pointer(PointerStyle::Mirror); } @@ -2810,7 +2810,7 @@ void SdrDragGradient::CancelSdrDrag() Pointer SdrDragGradient::GetSdrDragPointer() const { - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } @@ -3447,7 +3447,7 @@ bool SdrDragCrook::EndSdrDrag(bool bCopy) Pointer SdrDragCrook::GetSdrDragPointer() const { - return Pointer(POINTER_CROOK); + return Pointer(PointerStyle::Crook); } @@ -3585,7 +3585,7 @@ bool SdrDragDistort::EndSdrDrag(bool bCopy) Pointer SdrDragDistort::GetSdrDragPointer() const { - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } void SdrDragDistort::applyCurrentTransformationToSdrObject(SdrObject& rTarget) @@ -4068,7 +4068,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) Pointer SdrDragCrop::GetSdrDragPointer() const { - return Pointer(POINTER_CROP); + return Pointer(PointerStyle::Crop); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index f7d32624db90..c007892e64cc 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -856,16 +856,16 @@ bool SdrHdl::IsHdlHit(const Point& rPnt) const Pointer SdrHdl::GetPointer() const { - PointerStyle ePtr=POINTER_MOVE; + PointerStyle ePtr=PointerStyle::Move; const bool bSize=eKind>=HDL_UPLFT && eKind<=HDL_LWRGT; const bool bRot=pHdlList!=NULL && pHdlList->IsRotateShear(); const bool bDis=pHdlList!=NULL && pHdlList->IsDistortShear(); if (bSize && pHdlList!=NULL && (bRot || bDis)) { switch (eKind) { case HDL_UPLFT: case HDL_UPRGT: - case HDL_LWLFT: case HDL_LWRGT: ePtr=bRot ? POINTER_ROTATE : POINTER_REFHAND; break; - case HDL_LEFT : case HDL_RIGHT: ePtr=POINTER_VSHEAR; break; - case HDL_UPPER: case HDL_LOWER: ePtr=POINTER_HSHEAR; break; + case HDL_LWLFT: case HDL_LWRGT: ePtr=bRot ? PointerStyle::Rotate : PointerStyle::RefHand; break; + case HDL_LEFT : case HDL_RIGHT: ePtr=PointerStyle::VShear; break; + case HDL_UPPER: case HDL_LOWER: ePtr=PointerStyle::HShear; break; default: break; } @@ -890,33 +890,33 @@ Pointer SdrHdl::GetPointer() const while (nHdlAngle>=36000) nHdlAngle-=36000; nHdlAngle/=4500; switch ((sal_uInt8)nHdlAngle) { - case 0: ePtr=POINTER_ESIZE; break; - case 1: ePtr=POINTER_NESIZE; break; - case 2: ePtr=POINTER_NSIZE; break; - case 3: ePtr=POINTER_NWSIZE; break; - case 4: ePtr=POINTER_WSIZE; break; - case 5: ePtr=POINTER_SWSIZE; break; - case 6: ePtr=POINTER_SSIZE; break; - case 7: ePtr=POINTER_SESIZE; break; + case 0: ePtr=PointerStyle::ESize; break; + case 1: ePtr=PointerStyle::NESize; break; + case 2: ePtr=PointerStyle::NSize; break; + case 3: ePtr=PointerStyle::NWSize; break; + case 4: ePtr=PointerStyle::WSize; break; + case 5: ePtr=PointerStyle::SWSize; break; + case 6: ePtr=PointerStyle::SSize; break; + case 7: ePtr=PointerStyle::SESize; break; } // switch } else { switch (eKind) { - case HDL_UPLFT: ePtr=POINTER_NWSIZE; break; - case HDL_UPPER: ePtr=POINTER_NSIZE; break; - case HDL_UPRGT: ePtr=POINTER_NESIZE; break; - case HDL_LEFT : ePtr=POINTER_WSIZE; break; - case HDL_RIGHT: ePtr=POINTER_ESIZE; break; - case HDL_LWLFT: ePtr=POINTER_SWSIZE; break; - case HDL_LOWER: ePtr=POINTER_SSIZE; break; - case HDL_LWRGT: ePtr=POINTER_SESIZE; break; - case HDL_POLY : ePtr=POINTER_MOVEPOINT; break; - case HDL_CIRC : ePtr=POINTER_HAND; break; - case HDL_REF1 : ePtr=POINTER_REFHAND; break; - case HDL_REF2 : ePtr=POINTER_REFHAND; break; - case HDL_BWGT : ePtr=POINTER_MOVEBEZIERWEIGHT; break; - case HDL_GLUE : ePtr=POINTER_MOVEPOINT; break; - case HDL_GLUE_DESELECTED : ePtr=POINTER_MOVEPOINT; break; - case HDL_CUSTOMSHAPE1 : ePtr=POINTER_HAND; break; + case HDL_UPLFT: ePtr=PointerStyle::NWSize; break; + case HDL_UPPER: ePtr=PointerStyle::NSize; break; + case HDL_UPRGT: ePtr=PointerStyle::NESize; break; + case HDL_LEFT : ePtr=PointerStyle::WSize; break; + case HDL_RIGHT: ePtr=PointerStyle::ESize; break; + case HDL_LWLFT: ePtr=PointerStyle::SWSize; break; + case HDL_LOWER: ePtr=PointerStyle::SSize; break; + case HDL_LWRGT: ePtr=PointerStyle::SESize; break; + case HDL_POLY : ePtr=PointerStyle::MovePoint; break; + case HDL_CIRC : ePtr=PointerStyle::Hand; break; + case HDL_REF1 : ePtr=PointerStyle::RefHand; break; + case HDL_REF2 : ePtr=PointerStyle::RefHand; break; + case HDL_BWGT : ePtr=PointerStyle::MoveBezierWeight; break; + case HDL_GLUE : ePtr=PointerStyle::MovePoint; break; + case HDL_GLUE_DESELECTED : ePtr=PointerStyle::MovePoint; break; + case HDL_CUSTOMSHAPE1 : ePtr=PointerStyle::Hand; break; default: break; } @@ -1362,7 +1362,7 @@ void SdrHdlLine::CreateB2dIAObject() Pointer SdrHdlLine::GetPointer() const { - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } @@ -1560,11 +1560,11 @@ Pointer ImpEdgeHdl::GetPointer() const if (pEdge==NULL) return SdrHdl::GetPointer(); if (nObjHdlNum<=1) - return Pointer(POINTER_MOVEPOINT); + return Pointer(PointerStyle::MovePoint); if (IsHorzDrag()) - return Pointer(POINTER_ESIZE); + return Pointer(PointerStyle::ESize); else - return Pointer(POINTER_SSIZE); + return Pointer(PointerStyle::SSize); } bool ImpEdgeHdl::IsHorzDrag() const @@ -1662,11 +1662,11 @@ Pointer ImpMeasureHdl::GetPointer() const { switch (nObjHdlNum) { - case 0: case 1: return Pointer(POINTER_HAND); - case 2: case 3: return Pointer(POINTER_MOVEPOINT); + case 0: case 1: return Pointer(PointerStyle::Hand); + case 2: case 3: return Pointer(PointerStyle::MovePoint); case 4: case 5: return SdrHdl::GetPointer(); // will then be rotated appropriately } // switch - return Pointer(POINTER_NOTALLOWED); + return Pointer(PointerStyle::NotAllowed); } diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx index 0aa9fb1261a3..0204b580e7c7 100644 --- a/svx/source/svdraw/svdhlpln.cxx +++ b/svx/source/svdraw/svdhlpln.cxx @@ -30,9 +30,9 @@ Pointer SdrHelpLine::GetPointer() const { switch (eKind) { - case SDRHELPLINE_VERTICAL : return Pointer(POINTER_ESIZE); - case SDRHELPLINE_HORIZONTAL: return Pointer(POINTER_SSIZE); - default : return Pointer(POINTER_MOVE); + case SDRHELPLINE_VERTICAL : return Pointer(PointerStyle::ESize); + case SDRHELPLINE_HORIZONTAL: return Pointer(PointerStyle::SSize); + default : return Pointer(PointerStyle::Move); } // switch } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 59c86253942d..b6d382745d57 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1423,7 +1423,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) cons Pointer SdrObject::GetCreatePointer() const { - return Pointer(POINTER_CROSS); + return Pointer(PointerStyle::Cross); } // transformations @@ -1864,7 +1864,7 @@ SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec&) const { - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& , const SdrObjMacroHitRec& ) const diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 8c37b809ae1d..342f392c8f80 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -597,7 +597,7 @@ basegfx::B2DPolyPolygon SdrCaptionObj::TakeCreatePoly(const SdrDragStat& /*rDrag Pointer SdrCaptionObj::GetCreatePointer() const { - return Pointer(POINTER_DRAW_CAPTION); + return Pointer(PointerStyle::DrawCaption); } void SdrCaptionObj::NbcMove(const Size& rSiz) diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 0434d6918a2a..c0677ccc2c54 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -795,13 +795,13 @@ basegfx::B2DPolyPolygon SdrCircObj::TakeCreatePoly(const SdrDragStat& rDrag) con Pointer SdrCircObj::GetCreatePointer() const { switch (meCircleKind) { - case OBJ_CIRC: return Pointer(POINTER_DRAW_ELLIPSE); - case OBJ_SECT: return Pointer(POINTER_DRAW_PIE); - case OBJ_CARC: return Pointer(POINTER_DRAW_ARC); - case OBJ_CCUT: return Pointer(POINTER_DRAW_CIRCLECUT); + case OBJ_CIRC: return Pointer(PointerStyle::DrawEllipse); + case OBJ_SECT: return Pointer(PointerStyle::DrawPie); + case OBJ_CARC: return Pointer(PointerStyle::DrawArc); + case OBJ_CCUT: return Pointer(PointerStyle::DrawCircleCut); default: break; } // switch - return Pointer(POINTER_CROSS); + return Pointer(PointerStyle::Cross); } void SdrCircObj::NbcMove(const Size& aSiz) diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 55d6968838d4..ed8c82003ca0 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -2094,7 +2094,7 @@ basegfx::B2DPolyPolygon SdrEdgeObj::TakeCreatePoly(const SdrDragStat& /*rStatDra Pointer SdrEdgeObj::GetCreatePointer() const { - return Pointer(POINTER_DRAW_CONNECT); + return Pointer(PointerStyle::DrawConnect); } bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut) diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index be529e4fa46e..5479193a0199 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -1024,7 +1024,7 @@ basegfx::B2DPolyPolygon SdrMeasureObj::TakeCreatePoly(const SdrDragStat& /*rDrag Pointer SdrMeasureObj::GetCreatePointer() const { - return Pointer(POINTER_CROSS); + return Pointer(PointerStyle::Cross); } void SdrMeasureObj::NbcMove(const Size& rSiz) diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 71d3c15ea6a4..b570e7ffccb2 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1630,20 +1630,20 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeDragPolyPolygon(const SdrDr Pointer ImpPathForDragAndCreate::GetCreatePointer() const { switch (meObjectKind) { - case OBJ_LINE : return Pointer(POINTER_DRAW_LINE); - case OBJ_POLY : return Pointer(POINTER_DRAW_POLYGON); - case OBJ_PLIN : return Pointer(POINTER_DRAW_POLYGON); - case OBJ_PATHLINE: return Pointer(POINTER_DRAW_BEZIER); - case OBJ_PATHFILL: return Pointer(POINTER_DRAW_BEZIER); - case OBJ_FREELINE: return Pointer(POINTER_DRAW_FREEHAND); - case OBJ_FREEFILL: return Pointer(POINTER_DRAW_FREEHAND); - case OBJ_SPLNLINE: return Pointer(POINTER_DRAW_FREEHAND); - case OBJ_SPLNFILL: return Pointer(POINTER_DRAW_FREEHAND); - case OBJ_PATHPOLY: return Pointer(POINTER_DRAW_POLYGON); - case OBJ_PATHPLIN: return Pointer(POINTER_DRAW_POLYGON); + case OBJ_LINE : return Pointer(PointerStyle::DrawLine); + case OBJ_POLY : return Pointer(PointerStyle::DrawPolygon); + case OBJ_PLIN : return Pointer(PointerStyle::DrawPolygon); + case OBJ_PATHLINE: return Pointer(PointerStyle::DrawBezier); + case OBJ_PATHFILL: return Pointer(PointerStyle::DrawBezier); + case OBJ_FREELINE: return Pointer(PointerStyle::DrawFreehand); + case OBJ_FREEFILL: return Pointer(PointerStyle::DrawFreehand); + case OBJ_SPLNLINE: return Pointer(PointerStyle::DrawFreehand); + case OBJ_SPLNFILL: return Pointer(PointerStyle::DrawFreehand); + case OBJ_PATHPOLY: return Pointer(PointerStyle::DrawPolygon); + case OBJ_PATHPLIN: return Pointer(PointerStyle::DrawPolygon); default: break; } // switch - return Pointer(POINTER_CROSS); + return Pointer(PointerStyle::Cross); } SdrPathObjGeoData::SdrPathObjGeoData() diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 7e33566f3513..19e87c9134ec 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -488,8 +488,8 @@ basegfx::B2DPolyPolygon SdrRectObj::TakeCreatePoly(const SdrDragStat& rDrag) con Pointer SdrRectObj::GetCreatePointer() const { - if (IsTextFrame()) return Pointer(POINTER_DRAW_TEXT); - return Pointer(POINTER_DRAW_RECT); + if (IsTextFrame()) return Pointer(PointerStyle::DrawText); + return Pointer(PointerStyle::DrawRect); } void SdrRectObj::NbcMove(const Size& rSiz) diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 4bfeff4098d4..d28fc2e74708 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -244,8 +244,8 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) con Pointer SdrTextObj::GetCreatePointer() const { - if (IsTextFrame()) return Pointer(POINTER_DRAW_TEXT); - return Pointer(POINTER_CROSS); + if (IsTextFrame()) return Pointer(PointerStyle::DrawText); + return Pointer(PointerStyle::Cross); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 5d108d102ab0..070f4c40397e 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -591,13 +591,13 @@ Pointer SdrSnapView::GetDraggedHelpLinePointer() const { switch(mpHelpLineOverlay->GetHelpLineKind()) { - case SDRHELPLINE_VERTICAL : return Pointer(POINTER_ESIZE); - case SDRHELPLINE_HORIZONTAL: return Pointer(POINTER_SSIZE); - default : return Pointer(POINTER_MOVE); + case SDRHELPLINE_VERTICAL : return Pointer(PointerStyle::ESize); + case SDRHELPLINE_HORIZONTAL: return Pointer(PointerStyle::SSize); + default : return Pointer(PointerStyle::Move); } } - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); } void SdrSnapView::MovDragHelpLine(const Point& rPnt) diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index b79f39f26197..9b8952c59711 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -957,11 +957,11 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* if (mpCurrentSdrDragMethod) { if ((IsDraggingPoints() || IsDraggingGluePoints()) && IsMouseHideWhileDraggingPoints()) - return Pointer(POINTER_NULL); + return Pointer(PointerStyle::Null); return mpCurrentSdrDragMethod->GetSdrDragPointer(); } - if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsSetPageOrg()) return Pointer(POINTER_ARROW); + if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsSetPageOrg()) return Pointer(PointerStyle::Arrow); if (IsDragHelpLine()) return GetDraggedHelpLinePointer(); if (IsMacroObj()) { SdrObjMacroHitRec aHitRec; @@ -981,19 +981,19 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* if(!pOut || IsTextEditInSelectionMode()) { if(pTextEditOutliner->IsVertical()) - return Pointer(POINTER_TEXT_VERTICAL); + return Pointer(PointerStyle::TextVertical); else - return Pointer(POINTER_TEXT); + return Pointer(PointerStyle::Text); } // Outliner should return something here... Point aPos(pOut->LogicToPixel(rMousePos)); Pointer aPointer(pTextEditOutlinerView->GetPointer(aPos)); - if (aPointer==POINTER_ARROW) + if (aPointer==PointerStyle::Arrow) { if(pTextEditOutliner->IsVertical()) - aPointer = POINTER_TEXT_VERTICAL; + aPointer = PointerStyle::TextVertical; else - aPointer = POINTER_TEXT; + aPointer = PointerStyle::Text; } return aPointer; } @@ -1011,17 +1011,17 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* case SDREVENT_BEGCREATEOBJ: return aAktCreatePointer; case SDREVENT_MARKOBJ: - return Pointer(POINTER_MOVE); + return Pointer(PointerStyle::Move); case SDREVENT_BEGMARK: - return Pointer(POINTER_ARROW); + return Pointer(PointerStyle::Arrow); case SDREVENT_MARKPOINT: case SDREVENT_MARKGLUEPOINT: - return Pointer(POINTER_MOVEPOINT); + return Pointer(PointerStyle::MovePoint); case SDREVENT_BEGINSOBJPOINT: case SDREVENT_BEGINSGLUEPOINT: - return Pointer(POINTER_CROSS); + return Pointer(PointerStyle::Cross); case SDREVENT_EXECUTEURL: - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); case SDREVENT_BEGMACROOBJ: { SdrObjMacroHitRec aHitRec; @@ -1039,11 +1039,11 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* switch(eHit) { case SDRHIT_CELL: - return Pointer(POINTER_ARROW); + return Pointer(PointerStyle::Arrow); case SDRHIT_HELPLINE : return aVEvt.pPV->GetHelpLines()[aVEvt.nHlplIdx].GetPointer(); case SDRHIT_GLUEPOINT: - return Pointer(POINTER_MOVEPOINT); + return Pointer(PointerStyle::MovePoint); case SDRHIT_TEXTEDIT : case SDRHIT_TEXTEDITOBJ: { @@ -1052,9 +1052,9 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* { OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject(); if(pParaObj && pParaObj->IsVertical()) - return Pointer(POINTER_TEXT_VERTICAL); + return Pointer(PointerStyle::TextVertical); } - return Pointer(POINTER_TEXT); + return Pointer(PointerStyle::Text); } default: break; } @@ -1068,13 +1068,13 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* bool bVertex=pHdl!=NULL && pHdl->IsVertexHdl(); bool bMov=eHdl==HDL_MOVE; if (bMov && (eDragMode==SDRDRAG_MOVE || eDragMode==SDRDRAG_RESIZE || bMarkedHitMovesAlways)) { - if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible - return Pointer(POINTER_MOVE); + if (!IsMoveAllowed()) return Pointer(PointerStyle::Arrow); // because double click or drag & drop is possible + return Pointer(PointerStyle::Move); } switch (eDragMode) { case SDRDRAG_ROTATE: { if ((bCorner || bMov) && !IsRotateAllowed(true)) - return Pointer(POINTER_NOTALLOWED); + return Pointer(PointerStyle::NotAllowed); // are 3D objects selected? bool b3DObjSelected = false; @@ -1086,19 +1086,19 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* // If we have a 3D object, go on despite !IsShearAllowed, // because then we have a rotation instead of a shear. if (bVertex && !IsShearAllowed() && !b3DObjSelected) - return Pointer(POINTER_NOTALLOWED); + return Pointer(PointerStyle::NotAllowed); if (bMov) - return Pointer(POINTER_ROTATE); + return Pointer(PointerStyle::Rotate); } break; case SDRDRAG_SHEAR: case SDRDRAG_DISTORT: { if (bCorner) { - if (!IsDistortAllowed(true) && !IsDistortAllowed(false)) return Pointer(POINTER_NOTALLOWED); - else return Pointer(POINTER_REFHAND); + if (!IsDistortAllowed(true) && !IsDistortAllowed(false)) return Pointer(PointerStyle::NotAllowed); + else return Pointer(PointerStyle::RefHand); } - if (bVertex && !IsShearAllowed()) return Pointer(POINTER_NOTALLOWED); + if (bVertex && !IsShearAllowed()) return Pointer(PointerStyle::NotAllowed); if (bMov) { - if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible - return Pointer(POINTER_MOVE); + if (!IsMoveAllowed()) return Pointer(PointerStyle::Arrow); // because double click or drag & drop is possible + return Pointer(PointerStyle::Move); } } break; case SDRDRAG_MIRROR: { @@ -1117,54 +1117,54 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* if (!IsMirrorAllowed(true,true)) bNo=true; // any mirroring is forbidden if (!IsMirrorAllowed(false,false) && !b45) bNo=true; // mirroring freely is forbidden if (!IsMirrorAllowed(true,false) && !b90) bNo=true; // mirroring horizontally/vertically is allowed - if (bNo) return Pointer(POINTER_NOTALLOWED); + if (bNo) return Pointer(PointerStyle::NotAllowed); if (b90) { - return Pointer(POINTER_MIRROR); + return Pointer(PointerStyle::Mirror); } - return Pointer(POINTER_MIRROR); + return Pointer(PointerStyle::Mirror); } } break; case SDRDRAG_TRANSPARENCE: { if(!IsTransparenceAllowed()) - return Pointer(POINTER_NOTALLOWED); + return Pointer(PointerStyle::NotAllowed); - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } case SDRDRAG_GRADIENT: { if(!IsGradientAllowed()) - return Pointer(POINTER_NOTALLOWED); + return Pointer(PointerStyle::NotAllowed); - return Pointer(POINTER_REFHAND); + return Pointer(PointerStyle::RefHand); } case SDRDRAG_CROOK: { if (bCorner || bVertex || bMov) { - if (!IsCrookAllowed(true) && !IsCrookAllowed(false)) return Pointer(POINTER_NOTALLOWED); - return Pointer(POINTER_CROOK); + if (!IsCrookAllowed(true) && !IsCrookAllowed(false)) return Pointer(PointerStyle::NotAllowed); + return Pointer(PointerStyle::Crook); } } case SDRDRAG_CROP: { - return Pointer(POINTER_CROP); + return Pointer(PointerStyle::Crop); } default: { - if ((bCorner || bVertex) && !IsResizeAllowed(true)) return Pointer(POINTER_NOTALLOWED); + if ((bCorner || bVertex) && !IsResizeAllowed(true)) return Pointer(PointerStyle::NotAllowed); } } if (pHdl!=NULL) return pHdl->GetPointer(); if (bMov) { - if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible - return Pointer(POINTER_MOVE); + if (!IsMoveAllowed()) return Pointer(PointerStyle::Arrow); // because double click or drag & drop is possible + return Pointer(PointerStyle::Move); } } if (eEditMode==SDREDITMODE_CREATE) return aAktCreatePointer; - return Pointer(POINTER_ARROW); + return Pointer(PointerStyle::Arrow); } #define STR_NOTHING "nothing" diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 52b1edde6f25..a308c34f03de 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2437,7 +2437,7 @@ basegfx::B2DPolyPolygon SdrTableObj::TakeCreatePoly(const SdrDragStat& rDrag) co Pointer SdrTableObj::GetCreatePointer() const { - return Pointer(POINTER_CROSS); + return Pointer(PointerStyle::Cross); } diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 8b6453f76143..8ffde7ce0282 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -84,9 +84,9 @@ void TableEdgeHdl::SetEdge( sal_Int32 nEdge, sal_Int32 nStart, sal_Int32 nEnd, T Pointer TableEdgeHdl::GetPointer() const { if( mbHorizontal ) - return POINTER_VSPLIT; + return PointerStyle::VSplit; else - return POINTER_HSPLIT; + return PointerStyle::HSplit; } sal_Int32 TableEdgeHdl::GetValidDragOffset( const SdrDragStat& rDrag ) const @@ -257,7 +257,7 @@ TableBorderHdl::TableBorderHdl( Pointer TableBorderHdl::GetPointer() const { - return POINTER_MOVE; + return PointerStyle::Move; } // create marker for this kind diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index ad6062f25ada..2df0aa05bddc 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -962,7 +962,7 @@ void SwVirtFlyDrawObj::addCropHandles(SdrHdlList& rTarget) const Pointer SwVirtFlyDrawObj::GetMacroPointer( const SdrObjMacroHitRec& ) const { - return Pointer( POINTER_REFHAND ); + return Pointer( PointerStyle::RefHand ); } bool SwVirtFlyDrawObj::HasMacro() const diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 7eea0d52e4f1..22080650ec63 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -178,17 +178,17 @@ SwVbaSystem::~SwVbaSystem() sal_Int32 SAL_CALL SwVbaSystem::getCursor() throw (uno::RuntimeException, std::exception) { - sal_Int32 nPointerStyle = getPointerStyle( getCurrentWordDoc(mxContext) ); + PointerStyle nPointerStyle = getPointerStyle( getCurrentWordDoc(mxContext) ); switch( nPointerStyle ) { - case POINTER_ARROW: + case PointerStyle::Arrow: return word::WdCursorType::wdCursorNorthwestArrow; - case POINTER_NULL: + case PointerStyle::Null: return word::WdCursorType::wdCursorNormal; - case POINTER_WAIT: + case PointerStyle::Wait: return word::WdCursorType::wdCursorWait; - case POINTER_TEXT: + case PointerStyle::Text: return word::WdCursorType::wdCursorIBeam; default: return word::WdCursorType::wdCursorNormal; @@ -204,27 +204,27 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, std::e { case word::WdCursorType::wdCursorNorthwestArrow: { - const Pointer& rPointer( POINTER_ARROW ); + const Pointer& rPointer( PointerStyle::Arrow ); setCursorHelper( getCurrentWordDoc(mxContext), rPointer, false ); break; } case word::WdCursorType::wdCursorWait: { - const Pointer& rPointer( static_cast< PointerStyle >( POINTER_WAIT ) ); + const Pointer& rPointer( static_cast< PointerStyle >( PointerStyle::Wait ) ); //It will set the edit window, toobar and statusbar's mouse pointer. setCursorHelper( getCurrentWordDoc(mxContext), rPointer, true ); break; } case word::WdCursorType::wdCursorIBeam: { - const Pointer& rPointer( static_cast< PointerStyle >( POINTER_TEXT ) ); + const Pointer& rPointer( static_cast< PointerStyle >( PointerStyle::Text ) ); //It will set the edit window, toobar and statusbar's mouse pointer. setCursorHelper( getCurrentWordDoc( mxContext ), rPointer, true ); break; } case word::WdCursorType::wdCursorNormal: { - const Pointer& rPointer( POINTER_NULL ); + const Pointer& rPointer( PointerStyle::Null ); setCursorHelper( getCurrentWordDoc( mxContext ), rPointer, false ); break; } diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index c8fa94544303..e6cf4393e8e6 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -355,7 +355,7 @@ void SwSidebarWin::InitControls() mpSidebarTextControl = VclPtr<SidebarTextControl>::Create( *this, WB_NODIALOGCONTROL, mrView, mrMgr ); - mpSidebarTextControl->SetPointer(Pointer(POINTER_TEXT)); + mpSidebarTextControl->SetPointer(Pointer(PointerStyle::Text)); // window controls for author and date mpMetadataAuthor = VclPtr<Edit>::Create( this, 0 ); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index b6a7f4079634..995c2900b6a7 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -333,13 +333,13 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) SwWrtShell &rSh = m_rView.GetWrtShell(); if( m_pApplyTempl ) { - PointerStyle eStyle = POINTER_FILL; + PointerStyle eStyle = PointerStyle::Fill; if ( rSh.IsOverReadOnlyPos( rLPt ) ) { delete m_pUserMarker; m_pUserMarker = 0L; - eStyle = POINTER_NOTALLOWED; + eStyle = PointerStyle::NotAllowed; } else { @@ -387,7 +387,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) SwRect aRect; SwChainRet nChainable = rSh.Chainable( aRect, *rSh.GetFlyFrameFormat(), rLPt ); PointerStyle eStyle = nChainable != SwChainRet::OK - ? POINTER_CHAIN_NOTALLOWED : POINTER_CHAIN; + ? PointerStyle::ChainNotAllowed : PointerStyle::Chain; if ( nChainable == SwChainRet::OK ) { Rectangle aTmp( aRect.SVRect() ); @@ -426,7 +426,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && rSh.IsCrsrReadonly(); m_aActHitType = SDRHIT_NONE; - PointerStyle eStyle = POINTER_TEXT; + PointerStyle eStyle = PointerStyle::Text; if ( !pSdrView ) bCntAtPos = true; else if ( (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) ) @@ -441,7 +441,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) { m_aActHitType = SDRHIT_OBJECT; if (IsObjectSelect()) - eStyle = POINTER_ARROW; + eStyle = PointerStyle::Arrow; else bPrefSdrPointer = true; } @@ -494,7 +494,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) SdrObject* pSelectableObj = rSh.GetObjAt(rLPt); // Don't update pointer if this is a background image only. if (pSelectableObj->GetLayer() != rSh.GetDoc()->getIDocumentDrawModelAccess().GetHellId()) - eStyle = bMovable ? POINTER_MOVE : POINTER_ARROW; + eStyle = bMovable ? PointerStyle::Move : PointerStyle::Arrow; m_aActHitType = SDRHIT_OBJECT; } } @@ -512,9 +512,9 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) // rLPt is inside a selected object, then obviously // rLPt is over a selectable object. if (rSh.IsSelObjProtected(FLYPROTECT_SIZE)) - eStyle = POINTER_NOTALLOWED; + eStyle = PointerStyle::NotAllowed; else - eStyle = POINTER_MOVE; + eStyle = PointerStyle::Move; m_aActHitType = SDRHIT_OBJECT; } else @@ -531,11 +531,11 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) if ( bPrefSdrPointer ) { if (bIsDocReadOnly || (rSh.IsObjSelected() && rSh.IsSelObjProtected(FLYPROTECT_CONTENT))) - SetPointer( POINTER_NOTALLOWED ); + SetPointer( PointerStyle::NotAllowed ); else { if (m_rView.GetDrawFuncPtr() && m_rView.GetDrawFuncPtr()->IsInsertForm() && !bHitHandle) - SetPointer( POINTER_DRAW_RECT ); + SetPointer( PointerStyle::DrawRect ); else SetPointer( pSdrView->GetPreferredPointer( rLPt, rSh.GetOut() ) ); } @@ -543,7 +543,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) else { if( !rSh.IsPageAtPos( rLPt ) || m_pAnchorMarker ) - eStyle = POINTER_ARROW; + eStyle = PointerStyle::Arrow; else { // Even if we already have something, prefer URLs if possible. @@ -566,7 +566,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) { const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL; if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField())) - eStyle = POINTER_REFHAND; + eStyle = PointerStyle::RefHand; } } else @@ -576,15 +576,15 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) if( !bClickToFollow || (SwContentAtPos::SW_INETATTR == aSwContentAtPos.eContentAtPos && bExecHyperlinks) || (SwContentAtPos::SW_SMARTTAG == aSwContentAtPos.eContentAtPos && bExecSmarttags) ) - eStyle = POINTER_REFHAND; + eStyle = PointerStyle::RefHand; } } } } // which kind of text pointer have we to show - horz / vert - ? - if( POINTER_TEXT == eStyle && rSh.IsInVerticalText( &rLPt )) - eStyle = POINTER_TEXT_VERTICAL; + if( PointerStyle::Text == eStyle && rSh.IsInVerticalText( &rLPt )) + eStyle = PointerStyle::TextVertical; SetPointer( eStyle ); } @@ -3529,7 +3529,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // don't start a selection when an // URL field or a graphic is clicked bool bSttSelect = rSh.HasSelection() || - Pointer(POINTER_REFHAND) != GetPointer(); + Pointer(PointerStyle::RefHand) != GetPointer(); if( !bSttSelect ) { @@ -3724,7 +3724,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( !bIsDocReadOnly && pSdrView && pSdrView->MouseMove(rMEvt,this) ) { - SetPointer( POINTER_TEXT ); + SetPointer( PointerStyle::Text ); return; // evaluate SdrView's event } @@ -3795,44 +3795,44 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) if ( SwTab::COL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPt ) ) && !rSh.IsObjSelectable( aDocPt ) ) { - sal_uInt16 nPointer = USHRT_MAX; + PointerStyle nPointer = PointerStyle::Null; bool bChkTableSel = false; switch ( nMouseTabCol ) { case SwTab::COL_VERT : case SwTab::ROW_HORI : - nPointer = POINTER_VSIZEBAR; + nPointer = PointerStyle::VSizeBar; bChkTableSel = true; break; case SwTab::ROW_VERT : case SwTab::COL_HORI : - nPointer = POINTER_HSIZEBAR; + nPointer = PointerStyle::HSizeBar; bChkTableSel = true; break; // Enhanced table selection case SwTab::SEL_HORI : - nPointer = POINTER_TAB_SELECT_SE; + nPointer = PointerStyle::TabSelectSE; break; case SwTab::SEL_HORI_RTL : case SwTab::SEL_VERT : - nPointer = POINTER_TAB_SELECT_SW; + nPointer = PointerStyle::TabSelectSW; break; case SwTab::COLSEL_HORI : case SwTab::ROWSEL_VERT : - nPointer = POINTER_TAB_SELECT_S; + nPointer = PointerStyle::TabSelectS; break; case SwTab::ROWSEL_HORI : - nPointer = POINTER_TAB_SELECT_E; + nPointer = PointerStyle::TabSelectE; break; case SwTab::ROWSEL_HORI_RTL : case SwTab::COLSEL_VERT : - nPointer = POINTER_TAB_SELECT_W; + nPointer = PointerStyle::TabSelectW; break; default: break; // prevent compiler warning } - if ( USHRT_MAX != nPointer && + if ( PointerStyle::Null != nPointer && // i#35543 - Enhanced table selection is explicitly allowed in table mode ( !bChkTableSel || !rSh.IsTableMode() ) ) { @@ -3845,10 +3845,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { // i#42921 - consider vertical mode SwTextNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt ); - const sal_uInt16 nPointer = + const PointerStyle nPointer = SwFEShell::IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt ) - ? POINTER_VSIZEBAR - : POINTER_HSIZEBAR; + ? PointerStyle::VSizeBar + : PointerStyle::HSizeBar; SetPointer( nPointer ); return; @@ -4848,7 +4848,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) if(rTempl.m_pFormatClipboard) { m_pApplyTempl = new SwApplyTemplate( rTempl ); - SetPointer( POINTER_FILL );//@todo #i20119# maybe better a new brush pointer here in future + SetPointer( PointerStyle::Fill );//@todo #i20119# maybe better a new brush pointer here in future rSh.NoEdit( false ); bIdle = rSh.GetViewOptions()->IsIdle(); rSh.GetViewOptions()->SetIdle( false ); @@ -4856,7 +4856,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) else if(rTempl.nColor) { m_pApplyTempl = new SwApplyTemplate( rTempl ); - SetPointer( POINTER_FILL ); + SetPointer( PointerStyle::Fill ); rSh.NoEdit( false ); bIdle = rSh.GetViewOptions()->IsIdle(); rSh.GetViewOptions()->SetIdle( false ); @@ -4864,14 +4864,14 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) else if( rTempl.eType ) { m_pApplyTempl = new SwApplyTemplate( rTempl ); - SetPointer( POINTER_FILL ); + SetPointer( PointerStyle::Fill ); rSh.NoEdit( false ); bIdle = rSh.GetViewOptions()->IsIdle(); rSh.GetViewOptions()->SetIdle( false ); } else { - SetPointer( POINTER_TEXT ); + SetPointer( PointerStyle::Text ); rSh.UnSetVisCrsr(); rSh.GetViewOptions()->SetIdle( bIdle ); @@ -4946,7 +4946,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): SetMapMode(MapMode(MAP_TWIP)); - SetPointer( POINTER_TEXT ); + SetPointer( PointerStyle::Text ); m_aTimer.SetTimeoutHdl(LINK(this, SwEditWin, TimerHandler)); m_bTableInsDelMode = false; diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 968760543e4d..eb9dbf4b5259 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -490,7 +490,7 @@ void SwSrcEditWindow::CreateTextEngine() const Color &rCol = GetSettings().GetStyleSettings().GetWindowColor(); pOutWin = VclPtr<TextViewOutWin>::Create(this, 0); pOutWin->SetBackground(Wallpaper(rCol)); - pOutWin->SetPointer(Pointer(POINTER_TEXT)); + pOutWin->SetPointer(Pointer(PointerStyle::Text)); pOutWin->Show(); // create Scrollbars diff --git a/sw/source/uibase/ribbar/conform.cxx b/sw/source/uibase/ribbar/conform.cxx index cbaf34cf3d75..29b1a343770b 100644 --- a/sw/source/uibase/ribbar/conform.cxx +++ b/sw/source/uibase/ribbar/conform.cxx @@ -65,7 +65,7 @@ bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) g_bNoInterrupt = true; m_pWin->CaptureMouse(); - m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); + m_pWin->SetPointer(Pointer(PointerStyle::DrawRect)); m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); @@ -85,7 +85,7 @@ void ConstFormControl::Activate(const sal_uInt16 nSlotId) SwDrawBase::Activate(nSlotId); m_pSh->GetDrawView()->SetCurrentObj(nSlotId); - m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); + m_pWin->SetPointer(Pointer(PointerStyle::DrawRect)); } void ConstFormControl::CreateDefaultObject() diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 0b2d78a89a95..36d5907f69a6 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -439,7 +439,7 @@ void SwView::ExitDraw() GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); } - GetEditWin().SetPointer(Pointer(POINTER_TEXT)); + GetEditWin().SetPointer(Pointer(PointerStyle::Text)); } } } diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index 42fc9d34b299..56bc102c6a15 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -449,21 +449,21 @@ struct PointerStyles // 1 -> 1 map of styles ( some dubious choices in there though ) PointerStyles styles[] = { /// assuming pointer default is Arrow - { msforms::fmMousePointer::fmMousePointerDefault, POINTER_ARROW }, - { msforms::fmMousePointer::fmMousePointerArrow, POINTER_ARROW }, - { msforms::fmMousePointer::fmMousePointerCross, POINTER_CROSS }, - { msforms::fmMousePointer::fmMousePointerIBeam, POINTER_TEXT }, - { msforms::fmMousePointer::fmMousePointerSizeNESW, POINTER_AUTOSCROLL_NSWE }, // #TODO not correct, need to check, need to find the right one - { msforms::fmMousePointer::fmMousePointerSizeNS, POINTER_AUTOSCROLL_NS }, - { msforms::fmMousePointer::fmMousePointerSizeNWSE, POINTER_AUTOSCROLL_NSWE }, // #TODO not correct, need to check, need to find the right one - { msforms::fmMousePointer::fmMousePointerSizeWE, POINTER_AUTOSCROLL_WE }, - { msforms::fmMousePointer::fmMousePointerUpArrow, POINTER_WINDOW_NSIZE }, - { msforms::fmMousePointer::fmMousePointerHourGlass, POINTER_WAIT }, - { msforms::fmMousePointer::fmMousePointerNoDrop, POINTER_NOTALLOWED }, - { msforms::fmMousePointer::fmMousePointerAppStarting, POINTER_WAIT }, - { msforms::fmMousePointer::fmMousePointerHelp, POINTER_HELP }, - { msforms::fmMousePointer::fmMousePointerSizeAll, POINTER_CROSS }, - { msforms::fmMousePointer::fmMousePointerCustom, POINTER_ARROW }, // not supported I guess + { msforms::fmMousePointer::fmMousePointerDefault, PointerStyle::Arrow }, + { msforms::fmMousePointer::fmMousePointerArrow, PointerStyle::Arrow }, + { msforms::fmMousePointer::fmMousePointerCross, PointerStyle::Cross }, + { msforms::fmMousePointer::fmMousePointerIBeam, PointerStyle::Text }, + { msforms::fmMousePointer::fmMousePointerSizeNESW, PointerStyle::AutoScrollNSWE }, // #TODO not correct, need to check, need to find the right one + { msforms::fmMousePointer::fmMousePointerSizeNS, PointerStyle::AutoScrollNS }, + { msforms::fmMousePointer::fmMousePointerSizeNWSE, PointerStyle::AutoScrollNSWE }, // #TODO not correct, need to check, need to find the right one + { msforms::fmMousePointer::fmMousePointerSizeWE, PointerStyle::AutoScrollWE }, + { msforms::fmMousePointer::fmMousePointerUpArrow, PointerStyle::WindowNSize }, + { msforms::fmMousePointer::fmMousePointerHourGlass, PointerStyle::Wait }, + { msforms::fmMousePointer::fmMousePointerNoDrop, PointerStyle::NotAllowed }, + { msforms::fmMousePointer::fmMousePointerAppStarting, PointerStyle::Wait }, + { msforms::fmMousePointer::fmMousePointerHelp, PointerStyle::Help }, + { msforms::fmMousePointer::fmMousePointerSizeAll, PointerStyle::Cross }, + { msforms::fmMousePointer::fmMousePointerCustom, PointerStyle::Arrow }, // not supported I guess }; @@ -483,7 +483,7 @@ static long lcl_loPointerToMsoPointer( PointerStyle eType ) static Pointer lcl_msoPointerToLOPointer( long msoPointerStyle ) { - Pointer aPointer( POINTER_ARROW ); + Pointer aPointer( PointerStyle::Arrow ); for ( int i = 0, nElems = SAL_N_ELEMENTS( styles ); i < nElems; ++i ) { if ( styles[ i ].msoPointerStyle == msoPointerStyle ) @@ -498,7 +498,7 @@ static Pointer lcl_msoPointerToLOPointer( long msoPointerStyle ) ::sal_Int32 SAL_CALL ScVbaControl::getMousePointer() throw (::com::sun::star::uno::RuntimeException, std::exception) { - PointerStyle eType = POINTER_ARROW; // default ? + PointerStyle eType = PointerStyle::Arrow; // default ? vcl::Window* pWindow = VCLUnoHelper::GetWindow( getWindowPeer() ); if ( pWindow ) { @@ -513,7 +513,7 @@ ScVbaControl::setMousePointer( ::sal_Int32 _mousepointer ) throw (::com::sun::st vcl::Window* pWindow = VCLUnoHelper::GetWindow( getWindowPeer() ); if ( pWindow ) { - Pointer aPointer( POINTER_ARROW ); + Pointer aPointer( PointerStyle::Arrow ); aPointer = lcl_msoPointerToLOPointer( _mousepointer ); pWindow->SetPointer( aPointer ); } diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index a4759d267019..b2192bb4d19e 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -676,10 +676,10 @@ ConcreteXShapeGeometryAttributes::~ConcreteXShapeGeometryAttributes() { } -sal_Int32 getPointerStyle( const uno::Reference< frame::XModel >& xModel ) +PointerStyle getPointerStyle( const uno::Reference< frame::XModel >& xModel ) { - sal_Int32 nPointerStyle( POINTER_ARROW ); + PointerStyle nPointerStyle( PointerStyle::Arrow ); try { const uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx index babb1b44301a..fc8d3e82779a 100644 --- a/vcl/inc/osx/saldata.hxx +++ b/vcl/inc/osx/saldata.hxx @@ -39,6 +39,7 @@ #include <map> #include <unordered_set> #include <vector> +#include <o3tl/enumarray.hxx> #include <cstdio> #include <cstdarg> @@ -83,7 +84,7 @@ public: CGColorSpaceRef mxRGBSpace; CGColorSpaceRef mxGraySpace; - std::vector< NSCursor* > maCursors; + o3tl::enumarray< PointerStyle, NSCursor* > maCursors; std::vector< NSMenuItem* > maFallbackMenu; std::map< NSEvent*, bool > maKeyEventAnswer; diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 9269132c4502..697fecee0eef 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -34,6 +34,7 @@ #include <vcl/ptrstyle.hxx> #include <osl/conditn.h> #include "saltimer.hxx" +#include <o3tl/enumarray.hxx> #include <list> @@ -134,7 +135,7 @@ class GtkSalDisplay : public SalDisplay { GtkSalSystem* m_pSys; GdkDisplay* m_pGdkDisplay; - GdkCursor *m_aCursors[ POINTER_COUNT ]; + o3tl::enumarray<PointerStyle, GdkCursor*> m_aCursors; bool m_bStartupCompleted; bool m_bX11Display; diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index f4e1fea16b56..a304a4b3718b 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -38,6 +38,7 @@ class SalXLib; #include <salwtype.hxx> #include <generic/gendata.hxx> #include <generic/gendisp.hxx> +#include <o3tl/enumarray.hxx> #include <vclpluginapi.h> @@ -243,7 +244,7 @@ protected: // until x bytes - Cursor aPointerCache_[POINTER_COUNT]; + o3tl::enumarray<PointerStyle, Cursor> aPointerCache_; // Keyboard bool bNumLockFromXS_; // Num Lock handled by X Server @@ -303,7 +304,7 @@ public: Status *pStatus, XIC = NULL ) const; - Cursor GetPointer( int ePointerStyle ); + Cursor GetPointer( PointerStyle ePointerStyle ); virtual int CaptureMouse( SalFrame *pCapture ); void Remove( XEvent *pEvent ); diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx index 762bc67641be..7008011d4df8 100644 --- a/vcl/osx/saldata.cxx +++ b/vcl/osx/saldata.cxx @@ -22,6 +22,7 @@ #include "osx/saldata.hxx" #include "osx/salnsmenu.h" #include "osx/salinst.h" +#include "o3tl/enumarray.hxx" #import "apple_remote/RemoteMainController.h" @@ -44,7 +45,7 @@ SalData::SalData() mpStatusItem( nil ), mxRGBSpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB) ), mxGraySpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericGray) ), - maCursors( POINTER_COUNT, INVALID_CURSOR_PTR ), + maCursors(), mbIsScrollbarDoubleMax( false ), #if !HAVE_FEATURE_MACOSX_SANDBOX mpAppleRemoteMainController( NULL ), @@ -53,6 +54,7 @@ SalData::SalData() mnDPIX( 0 ), mnDPIY( 0 ) { + maCursors.fill( INVALID_CURSOR_PTR ); if( s_aAutoReleaseKey == 0 ) s_aAutoReleaseKey = osl_createThreadKey( releasePool ); } @@ -61,9 +63,8 @@ SalData::~SalData() { CGColorSpaceRelease( mxRGBSpace ); CGColorSpaceRelease( mxGraySpace ); - for( unsigned int i = 0; i < maCursors.size(); i++ ) + for( NSCursor* pCurs : maCursors ) { - NSCursor* pCurs = maCursors[i]; if( pCurs && pCurs != INVALID_CURSOR_PTR ) [pCurs release]; } @@ -105,114 +106,112 @@ void SalData::ensureThreadAutoreleasePool() } } -struct curs_ent +typedef struct { const char* pBaseName; const NSPoint aHotSpot; -} -const aCursorTab[ POINTER_COUNT ] = +} curs_ent; + +const o3tl::enumarray<PointerStyle, curs_ent> aCursorTab = { -{ NULL, { 0, 0 } }, //POINTER_ARROW -{ "nullptr", { 16, 16 } }, //POINTER_NULL -{ "hourglass", { 15, 15 } }, //POINTER_WAIT -{ NULL, { 0, 0 } }, //POINTER_TEXT -{ "help", { 0, 0 } }, //POINTER_HELP -{ NULL, { 0, 0 } }, //POINTER_CROSS -{ NULL, { 0, 0 } }, //POINTER_MOVE -{ NULL, { 0, 0 } }, //POINTER_NSIZE -{ NULL, { 0, 0 } }, //POINTER_SSIZE -{ NULL, { 0, 0 } }, //POINTER_WSIZE -{ NULL, { 0, 0 } }, //POINTER_ESIZE -{ "nwsesize", { 15, 15 } }, //POINTER_NWSIZE -{ "neswsize", { 15, 15 } }, //POINTER_NESIZE -{ "neswsize", { 15, 15 } }, //POINTER_SWSIZE -{ "nwsesize", { 15, 15 } }, //POINTER_SESIZE -{ NULL, { 0, 0 } }, //POINTER_WINDOW_NSIZE -{ NULL, { 0, 0 } }, //POINTER_WINDOW_SSIZE -{ NULL, { 0, 0 } }, //POINTER_WINDOW_WSIZE -{ NULL, { 0, 0 } }, //POINTER_WINDOW_ESIZE -{ "nwsesize", { 15, 15 } }, //POINTER_WINDOW_NWSIZE -{ "neswsize", { 15, 15 } }, //POINTER_WINDOW_NESIZE -{ "neswsize", { 15, 15 } }, //POINTER_WINDOW_SWSIZE -{ "nwsesize", { 15, 15 } }, //POINTER_WINDOW_SESIZE -{ NULL, { 0, 0 } }, //POINTER_HSPLIT -{ NULL, { 0, 0 } }, //POINTER_VSPLIT -{ NULL, { 0, 0 } }, //POINTER_HSIZEBAR -{ NULL, { 0, 0 } }, //POINTER_VSIZEBAR -{ NULL, { 0, 0 } }, //POINTER_HAND -{ NULL, { 0, 0 } }, //POINTER_REFHAND -{ "pen", { 3, 27 } }, //POINTER_PEN -{ "magnify", { 12, 13 } }, //POINTER_MAGNIFY -{ "fill", { 10, 22 } }, //POINTER_FILL -{ "rotate", { 15, 15 } }, //POINTER_ROTATE -{ "hshear", { 15, 15 } }, //POINTER_HSHEAR -{ "vshear", { 15, 15 } }, //POINTER_VSHEAR -{ "mirror", { 14, 12 } }, //POINTER_MIRROR -{ "crook", { 15, 14 } }, //POINTER_CROOK -{ "crop", { 9, 9 } }, //POINTER_CROP -{ "movept", { 0, 0 } }, //POINTER_MOVEPOINT -{ "movebw", { 0, 0 } }, //POINTER_MOVEBEZIERWEIGHT -{ "movedata", { 0, 0 } }, //POINTER_MOVEDATA -{ "copydata", { 0, 0 } }, //POINTER_COPYDATA -{ "linkdata", { 0, 0 } }, //POINTER_LINKDATA -{ "movedlnk", { 0, 0 } }, //POINTER_MOVEDATALINK -{ "copydlnk", { 0, 0 } }, //POINTER_COPYDATALINK -{ "movef", { 8, 8 } }, //POINTER_MOVEFILE -{ "copyf", { 8, 8 } }, //POINTER_COPYFILE -{ "linkf", { 8, 8 } }, //POINTER_LINKFILE -{ "moveflnk", { 8, 8 } }, //POINTER_MOVEFILELINK -{ "copyflnk", { 8, 8 } }, //POINTER_COPYFILELINK -{ "movef2", { 7, 8 } }, //POINTER_MOVEFILES -{ "copyf2", { 7, 8 } }, //POINTER_COPYFILES -{ "notallow", { 15, 15 } }, //POINTER_NOTALLOWED -{ "dline", { 8, 8 } }, //POINTER_DRAW_LINE -{ "drect", { 8, 8 } }, //POINTER_DRAW_RECT -{ "dpolygon", { 8, 8 } }, //POINTER_DRAW_POLYGON -{ "dbezier", { 8, 8 } }, //POINTER_DRAW_BEZIER -{ "darc", { 8, 8 } }, //POINTER_DRAW_ARC -{ "dpie", { 8, 8 } }, //POINTER_DRAW_PIE -{ "dcirccut", { 8, 8 } }, //POINTER_DRAW_CIRCLECUT -{ "dellipse", { 8, 8 } }, //POINTER_DRAW_ELLIPSE -{ "dfree", { 8, 8 } }, //POINTER_DRAW_FREEHAND -{ "dconnect", { 8, 8 } }, //POINTER_DRAW_CONNECT -{ "dtext", { 8, 8 } }, //POINTER_DRAW_TEXT -{ "dcapt", { 8, 8 } }, //POINTER_DRAW_CAPTION -{ "chart", { 15, 16 } }, //POINTER_CHART -{ "detectiv", { 12, 13 } }, //POINTER_DETECTIVE -{ "pivotcol", { 7, 5 } }, //POINTER_PIVOT_COL -{ "pivotrow", { 8, 7 } }, //POINTER_PIVOT_ROW -{ "pivotfld", { 8, 7 } }, //POINTER_PIVOT_FIELD -{ "chain", { 0, 2 } }, //POINTER_CHAIN -{ "chainnot", { 2, 2 } }, //POINTER_CHAIN_NOTALLOWED -{ "timemove", { 16, 16 } }, //POINTER_TIMEEVENT_MOVE -{ "timesize", { 16, 17 } }, //POINTER_TIMEEVENT_SIZE -{ "asn", { 16, 12 } }, //POINTER_AUTOSCROLL_N -{ "ass", { 15, 19 } }, //POINTER_AUTOSCROLL_S -{ "asw", { 12, 15 } }, //POINTER_AUTOSCROLL_W -{ "ase", { 19, 16 } }, //POINTER_AUTOSCROLL_E -{ "asnw", { 10, 10 } }, //POINTER_AUTOSCROLL_NW -{ "asne", { 21, 10 } }, //POINTER_AUTOSCROLL_NE -{ "assw", { 21, 21 } }, //POINTER_AUTOSCROLL_SW -{ "asse", { 21, 21 } }, //POINTER_AUTOSCROLL_SE -{ "asns", { 15, 15 } }, //POINTER_AUTOSCROLL_NS -{ "aswe", { 15, 15 } }, //POINTER_AUTOSCROLL_WE -{ "asnswe", { 15, 15 } }, //POINTER_AUTOSCROLL_NSWE -{ "airbrush", { 5, 22 } }, //POINTER_AIRBRUSH -{ "vtext", { 15, 15 } }, //POINTER_TEXT_VERTICAL -{ "pivotdel", { 18, 15 } }, //POINTER_PIVOT_DELETE -{ "tblsels", { 15, 30 } }, //POINTER_TAB_SELECT_S -{ "tblsele", { 30, 16 } }, //POINTER_TAB_SELECT_E -{ "tblselse", { 30, 30 } }, //POINTER_TAB_SELECT_SE -{ "tblselw", { 1, 16 } }, //POINTER_TAB_SELECT_W -{ "tblselsw", { 1, 30 } }, //POINTER_TAB_SELECT_SW -{ "pntbrsh", { 9, 16 } } //POINTER_PAINTBRUSH +curs_ent{ NULL, { 0, 0 } }, //PointerStyle::Arrow +{ "nullptr", { 16, 16 } }, //PointerStyle::Null +{ "hourglass", { 15, 15 } }, //PointerStyle::Wait +{ NULL, { 0, 0 } }, //PointerStyle::Text +{ "help", { 0, 0 } }, //PointerStyle::Help +{ NULL, { 0, 0 } }, //PointerStyle::Cross +{ NULL, { 0, 0 } }, //PointerStyle::Move +{ NULL, { 0, 0 } }, //PointerStyle::NSize +{ NULL, { 0, 0 } }, //PointerStyle::SSize +{ NULL, { 0, 0 } }, //PointerStyle::WSize +{ NULL, { 0, 0 } }, //PointerStyle::ESize +{ "nwsesize", { 15, 15 } }, //PointerStyle::NWSize +{ "neswsize", { 15, 15 } }, //PointerStyle::NESize +{ "neswsize", { 15, 15 } }, //PointerStyle::SWSize +{ "nwsesize", { 15, 15 } }, //PointerStyle::SESize +{ NULL, { 0, 0 } }, //PointerStyle::WindowNSize +{ NULL, { 0, 0 } }, //PointerStyle::WindowSSize +{ NULL, { 0, 0 } }, //PointerStyle::WindowWSize +{ NULL, { 0, 0 } }, //PointerStyle::WindowESize +{ "nwsesize", { 15, 15 } }, //PointerStyle::WindowNWSize +{ "neswsize", { 15, 15 } }, //PointerStyle::WindowNESize +{ "neswsize", { 15, 15 } }, //PointerStyle::WindowSWSize +{ "nwsesize", { 15, 15 } }, //PointerStyle::WindowSESize +{ NULL, { 0, 0 } }, //PointerStyle::HSplit +{ NULL, { 0, 0 } }, //PointerStyle::VSplit +{ NULL, { 0, 0 } }, //PointerStyle::HSizeBar +{ NULL, { 0, 0 } }, //PointerStyle::VSizeBar +{ NULL, { 0, 0 } }, //PointerStyle::Hand +{ NULL, { 0, 0 } }, //PointerStyle::RefHand +{ "pen", { 3, 27 } }, //PointerStyle::Pen +{ "magnify", { 12, 13 } }, //PointerStyle::Magnify +{ "fill", { 10, 22 } }, //PointerStyle::Fill +{ "rotate", { 15, 15 } }, //PointerStyle::Rotate +{ "hshear", { 15, 15 } }, //PointerStyle::HShear +{ "vshear", { 15, 15 } }, //PointerStyle::VShear +{ "mirror", { 14, 12 } }, //PointerStyle::Mirror +{ "crook", { 15, 14 } }, //PointerStyle::Crook +{ "crop", { 9, 9 } }, //PointerStyle::Crop +{ "movept", { 0, 0 } }, //PointerStyle::MovePoint +{ "movebw", { 0, 0 } }, //PointerStyle::MoveBezierWeight +{ "movedata", { 0, 0 } }, //PointerStyle::MoveData +{ "copydata", { 0, 0 } }, //PointerStyle::CopyData +{ "linkdata", { 0, 0 } }, //PointerStyle::LinkData +{ "movedlnk", { 0, 0 } }, //PointerStyle::MoveDataLink +{ "copydlnk", { 0, 0 } }, //PointerStyle::CopyDataLink +{ "movef", { 8, 8 } }, //PointerStyle::MoveFile +{ "copyf", { 8, 8 } }, //PointerStyle::CopyFile +{ "linkf", { 8, 8 } }, //PointerStyle::LinkFile +{ "moveflnk", { 8, 8 } }, //PointerStyle::MoveFileLink +{ "copyflnk", { 8, 8 } }, //PointerStyle::CopyFileLink +{ "movef2", { 7, 8 } }, //PointerStyle::MoveFiles +{ "copyf2", { 7, 8 } }, //PointerStyle::CopyFiles +{ "notallow", { 15, 15 } }, //PointerStyle::NotAllowed +{ "dline", { 8, 8 } }, //PointerStyle::DrawLine +{ "drect", { 8, 8 } }, //PointerStyle::DrawRect +{ "dpolygon", { 8, 8 } }, //PointerStyle::DrawPolygon +{ "dbezier", { 8, 8 } }, //PointerStyle::DrawBezier +{ "darc", { 8, 8 } }, //PointerStyle::DrawArc +{ "dpie", { 8, 8 } }, //PointerStyle::DrawPie +{ "dcirccut", { 8, 8 } }, //PointerStyle::DrawCircleCut +{ "dellipse", { 8, 8 } }, //PointerStyle::DrawEllipse +{ "dfree", { 8, 8 } }, //PointerStyle::DrawFreehand +{ "dconnect", { 8, 8 } }, //PointerStyle::DrawConnect +{ "dtext", { 8, 8 } }, //PointerStyle::DrawText +{ "dcapt", { 8, 8 } }, //PointerStyle::DrawCaption +{ "chart", { 15, 16 } }, //PointerStyle::Chart +{ "detectiv", { 12, 13 } }, //PointerStyle::Detective +{ "pivotcol", { 7, 5 } }, //PointerStyle::PivotCol +{ "pivotrow", { 8, 7 } }, //PointerStyle::PivotRow +{ "pivotfld", { 8, 7 } }, //PointerStyle::PivotField +{ "chain", { 0, 2 } }, //PointerStyle::Chain +{ "chainnot", { 2, 2 } }, //PointerStyle::ChainNotAllowed +{ "timemove", { 16, 16 } }, //PointerStyle::TimeEventMove +{ "timesize", { 16, 17 } }, //PointerStyle::TimeEventSize +{ "asn", { 16, 12 } }, //PointerStyle::AutoScrollN +{ "ass", { 15, 19 } }, //PointerStyle::AutoScrollS +{ "asw", { 12, 15 } }, //PointerStyle::AutoScrollW +{ "ase", { 19, 16 } }, //PointerStyle::AutoScrollE +{ "asnw", { 10, 10 } }, //PointerStyle::AutoScrollNW +{ "asne", { 21, 10 } }, //PointerStyle::AutoScrollNE +{ "assw", { 21, 21 } }, //PointerStyle::AutoScrollSW +{ "asse", { 21, 21 } }, //PointerStyle::AutoScrollSE +{ "asns", { 15, 15 } }, //PointerStyle::AutoScrollNS +{ "aswe", { 15, 15 } }, //PointerStyle::AutoScrollWE +{ "asnswe", { 15, 15 } }, //PointerStyle::AutoScrollNSWE +{ "airbrush", { 5, 22 } }, //PointerStyle::Airbrush +{ "vtext", { 15, 15 } }, //PointerStyle::TextVertical +{ "pivotdel", { 18, 15 } }, //PointerStyle::PivotDelete +{ "tblsels", { 15, 30 } }, //PointerStyle::TabSelectS +{ "tblsele", { 30, 16 } }, //PointerStyle::TabSelectE +{ "tblselse", { 30, 30 } }, //PointerStyle::TabSelectSE +{ "tblselw", { 1, 16 } }, //PointerStyle::TabSelectW +{ "tblselsw", { 1, 30 } }, //PointerStyle::TabSelectSW +{ "pntbrsh", { 9, 16 } } //PointerStyle::Paintbrush }; NSCursor* SalData::getCursor( PointerStyle i_eStyle ) { - if( i_eStyle >= POINTER_COUNT ) - return nil; - NSCursor* pCurs = maCursors[ i_eStyle ]; if( pCurs == INVALID_CURSOR_PTR ) { diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 98b49e803ca8..8a41aa769cac 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -73,7 +73,7 @@ AquaSalFrame::AquaSalFrame( SalFrame* pParent, sal_uLong salFrameStyle ) : mnLastModifierFlags( 0 ), mpMenu( NULL ), mnExtStyle( 0 ), - mePointerStyle( POINTER_ARROW ), + mePointerStyle( PointerStyle::Arrow ), mnTrackingRectTag( 0 ), mrClippingPath( 0 ), mnICOptions( InputContextFlags::NONE ) @@ -805,26 +805,26 @@ NSCursor* AquaSalFrame::getCurrentCursor() const NSCursor* pCursor = nil; switch( mePointerStyle ) { - case POINTER_TEXT: pCursor = [NSCursor IBeamCursor]; break; - case POINTER_CROSS: pCursor = [NSCursor crosshairCursor]; break; - case POINTER_HAND: - case POINTER_MOVE: pCursor = [NSCursor openHandCursor]; break; - case POINTER_NSIZE: pCursor = [NSCursor resizeUpCursor]; break; - case POINTER_SSIZE: pCursor = [NSCursor resizeDownCursor]; break; - case POINTER_ESIZE: pCursor = [NSCursor resizeRightCursor]; break; - case POINTER_WSIZE: pCursor = [NSCursor resizeLeftCursor]; break; - case POINTER_ARROW: pCursor = [NSCursor arrowCursor]; break; - case POINTER_VSPLIT: - case POINTER_VSIZEBAR: - case POINTER_WINDOW_NSIZE: - case POINTER_WINDOW_SSIZE: + case PointerStyle::Text: pCursor = [NSCursor IBeamCursor]; break; + case PointerStyle::Cross: pCursor = [NSCursor crosshairCursor]; break; + case PointerStyle::Hand: + case PointerStyle::Move: pCursor = [NSCursor openHandCursor]; break; + case PointerStyle::NSize: pCursor = [NSCursor resizeUpCursor]; break; + case PointerStyle::SSize: pCursor = [NSCursor resizeDownCursor]; break; + case PointerStyle::ESize: pCursor = [NSCursor resizeRightCursor]; break; + case PointerStyle::WSize: pCursor = [NSCursor resizeLeftCursor]; break; + case PointerStyle::Arrow: pCursor = [NSCursor arrowCursor]; break; + case PointerStyle::VSplit: + case PointerStyle::VSizeBar: + case PointerStyle::WindowNSize: + case PointerStyle::WindowSSize: pCursor = [NSCursor resizeUpDownCursor]; break; - case POINTER_HSPLIT: - case POINTER_HSIZEBAR: - case POINTER_WINDOW_ESIZE: - case POINTER_WINDOW_WSIZE: + case PointerStyle::HSplit: + case PointerStyle::HSizeBar: + case PointerStyle::WindowESize: + case PointerStyle::WindowWSize: pCursor = [NSCursor resizeLeftRightCursor]; break; - case POINTER_REFHAND: pCursor = [NSCursor pointingHandCursor]; break; + case PointerStyle::RefHand: pCursor = [NSCursor pointingHandCursor]; break; default: pCursor = GetSalData()->getCursor( mePointerStyle ); @@ -846,7 +846,7 @@ void AquaSalFrame::SetPointer( PointerStyle ePointerStyle ) // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - if( ePointerStyle >= POINTER_COUNT || ePointerStyle == mePointerStyle ) + if( ePointerStyle == mePointerStyle ) return; mePointerStyle = ePointerStyle; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 1cc602be1b51..1ab836427781 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -355,7 +355,7 @@ void Edit::ImplInit(vcl::Window* pParent, WinBits nStyle) SetCursor( new vcl::Cursor ); - SetPointer( Pointer( POINTER_TEXT ) ); + SetPointer( Pointer( PointerStyle::Text ) ); uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY ); uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer(); @@ -2712,7 +2712,7 @@ void Edit::SetSubEdit(Edit* pEdit) if (mpSubEdit) { - SetPointer(POINTER_ARROW); // Nur das SubEdit hat den BEAM... + SetPointer(PointerStyle::Arrow); // Nur das SubEdit hat den BEAM... mpSubEdit->mbIsSubEdit = true; mpSubEdit->SetReadOnly(mbReadOnly); diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index 74309848605a..4fb5af42c491 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -68,7 +68,7 @@ void FixedHyperlink::MouseMove( const MouseEvent& rMEvt ) { // changes the pointer if the control is enabled and the mouse is over the text. if ( !rMEvt.IsLeaveWindow() && IsEnabled() && ImplIsOverText(GetPointerPosPixel()) ) - SetPointer( POINTER_REFHAND ); + SetPointer( PointerStyle::RefHand ); else SetPointer( m_aOldPointer ); } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 66ae92933be6..8f27b0334d29 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -713,7 +713,7 @@ TextWindow::TextWindow( vcl::Window* pParent ) : Window( pParent ) mbSelectOnTab = true; mbTextSelectable = true; - SetPointer( Pointer( POINTER_TEXT ) ); + SetPointer( Pointer( PointerStyle::Text ) ); mpExtTextEngine = new ExtTextEngine; mpExtTextEngine->SetMaxTextLen(EDIT_NOLIMIT); diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 0777ad34587a..5d19d6dd8cb8 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -296,23 +296,23 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous Point aMousePos = rMEvt.GetPosPixel(); sal_uInt16 nHitTest = ImplHitTest( pData, aMousePos ); - PointerStyle ePtrStyle = POINTER_ARROW; + PointerStyle ePtrStyle = PointerStyle::Arrow; if ( nHitTest & BORDERWINDOW_HITTEST_LEFT ) - ePtrStyle = POINTER_WINDOW_WSIZE; + ePtrStyle = PointerStyle::WindowWSize; else if ( nHitTest & BORDERWINDOW_HITTEST_RIGHT ) - ePtrStyle = POINTER_WINDOW_ESIZE; + ePtrStyle = PointerStyle::WindowESize; else if ( nHitTest & BORDERWINDOW_HITTEST_TOP ) - ePtrStyle = POINTER_WINDOW_NSIZE; + ePtrStyle = PointerStyle::WindowNSize; else if ( nHitTest & BORDERWINDOW_HITTEST_BOTTOM ) - ePtrStyle = POINTER_WINDOW_SSIZE; + ePtrStyle = PointerStyle::WindowSSize; else if ( nHitTest & BORDERWINDOW_HITTEST_TOPLEFT ) - ePtrStyle = POINTER_WINDOW_NWSIZE; + ePtrStyle = PointerStyle::WindowNWSize; else if ( nHitTest & BORDERWINDOW_HITTEST_BOTTOMRIGHT ) - ePtrStyle = POINTER_WINDOW_SESIZE; + ePtrStyle = PointerStyle::WindowSESize; else if ( nHitTest & BORDERWINDOW_HITTEST_TOPRIGHT ) - ePtrStyle = POINTER_WINDOW_NESIZE; + ePtrStyle = PointerStyle::WindowNESize; else if ( nHitTest & BORDERWINDOW_HITTEST_BOTTOMLEFT ) - ePtrStyle = POINTER_WINDOW_SWSIZE; + ePtrStyle = PointerStyle::WindowSWSize; else if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE ) pData->mnCloseState |= DrawButtonFlags::Highlight; else if ( nHitTest & BORDERWINDOW_HITTEST_MENU ) @@ -746,7 +746,7 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track if ( pData->mnHitTest & BORDERWINDOW_HITTEST_TITLE ) { - pData->mpBorderWindow->SetPointer( Pointer( POINTER_MOVE ) ); + pData->mpBorderWindow->SetPointer( Pointer( PointerStyle::Move ) ); Point aPos = pBorderWindow->GetPosPixel(); aPos.X() += aMousePos.X(); diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 6dd6014f0df8..6aabd81653f2 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -98,7 +98,7 @@ PointerStyle Window::ImplGetMousePointer() const if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() ) ePointerStyle = GetPointer().GetStyle(); else - ePointerStyle = POINTER_ARROW; + ePointerStyle = PointerStyle::Arrow; const vcl::Window* pWindow = this; do @@ -106,13 +106,13 @@ PointerStyle Window::ImplGetMousePointer() const // when the pointer is not visible stop the search, as // this status should not be overwritten if ( pWindow->mpWindowImpl->mbNoPtrVisible ) - return POINTER_NULL; + return PointerStyle::Null; if ( !bWait ) { if ( pWindow->mpWindowImpl->mnWaitCount ) { - ePointerStyle = POINTER_WAIT; + ePointerStyle = PointerStyle::Wait; bWait = true; } else diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index da613bd330ae..8ddc748891e7 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -246,11 +246,11 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY ) if( mnActDist < WHEEL_RADIUS ) { if( bHorz && bVert ) - eStyle = POINTER_AUTOSCROLL_NSWE; + eStyle = PointerStyle::AutoScrollNSWE; else if( bHorz ) - eStyle = POINTER_AUTOSCROLL_WE; + eStyle = PointerStyle::AutoScrollWE; else - eStyle = POINTER_AUTOSCROLL_NS; + eStyle = PointerStyle::AutoScrollNS; } else { @@ -262,40 +262,40 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY ) if( bHorz && bVert ) { if( fAngle >= 22.5 && fAngle <= 67.5 ) - eStyle = POINTER_AUTOSCROLL_NE; + eStyle = PointerStyle::AutoScrollNE; else if( fAngle >= 67.5 && fAngle <= 112.5 ) - eStyle = POINTER_AUTOSCROLL_N; + eStyle = PointerStyle::AutoScrollN; else if( fAngle >= 112.5 && fAngle <= 157.5 ) - eStyle = POINTER_AUTOSCROLL_NW; + eStyle = PointerStyle::AutoScrollNW; else if( fAngle >= 157.5 && fAngle <= 202.5 ) - eStyle = POINTER_AUTOSCROLL_W; + eStyle = PointerStyle::AutoScrollW; else if( fAngle >= 202.5 && fAngle <= 247.5 ) - eStyle = POINTER_AUTOSCROLL_SW; + eStyle = PointerStyle::AutoScrollSW; else if( fAngle >= 247.5 && fAngle <= 292.5 ) - eStyle = POINTER_AUTOSCROLL_S; + eStyle = PointerStyle::AutoScrollS; else if( fAngle >= 292.5 && fAngle <= 337.5 ) - eStyle = POINTER_AUTOSCROLL_SE; + eStyle = PointerStyle::AutoScrollSE; else - eStyle = POINTER_AUTOSCROLL_E; + eStyle = PointerStyle::AutoScrollE; } else if( bHorz ) { if( fAngle >= 270. || fAngle <= 90. ) - eStyle = POINTER_AUTOSCROLL_E; + eStyle = PointerStyle::AutoScrollE; else - eStyle = POINTER_AUTOSCROLL_W; + eStyle = PointerStyle::AutoScrollW; } else { if( fAngle >= 0. && fAngle <= 180. ) - eStyle = POINTER_AUTOSCROLL_N; + eStyle = PointerStyle::AutoScrollN; else - eStyle = POINTER_AUTOSCROLL_S; + eStyle = PointerStyle::AutoScrollS; } } } else - eStyle = POINTER_ARROW; + eStyle = PointerStyle::Arrow; return eStyle; } @@ -325,14 +325,14 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt ) { switch( eActStyle ) { - case( POINTER_AUTOSCROLL_N ): mnActDeltaX = +0L, mnActDeltaY = +1L; break; - case( POINTER_AUTOSCROLL_S ): mnActDeltaX = +0L, mnActDeltaY = -1L; break; - case( POINTER_AUTOSCROLL_W ): mnActDeltaX = +1L, mnActDeltaY = +0L; break; - case( POINTER_AUTOSCROLL_E ): mnActDeltaX = -1L, mnActDeltaY = +0L; break; - case( POINTER_AUTOSCROLL_NW ): mnActDeltaX = +1L, mnActDeltaY = +1L; break; - case( POINTER_AUTOSCROLL_NE ): mnActDeltaX = -1L, mnActDeltaY = +1L; break; - case( POINTER_AUTOSCROLL_SW ): mnActDeltaX = +1L, mnActDeltaY = -1L; break; - case( POINTER_AUTOSCROLL_SE ): mnActDeltaX = -1L, mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollN ): mnActDeltaX = +0L, mnActDeltaY = +1L; break; + case( PointerStyle::AutoScrollS ): mnActDeltaX = +0L, mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollW ): mnActDeltaX = +1L, mnActDeltaY = +0L; break; + case( PointerStyle::AutoScrollE ): mnActDeltaX = -1L, mnActDeltaY = +0L; break; + case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1L, mnActDeltaY = +1L; break; + case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1L, mnActDeltaY = +1L; break; + case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1L, mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1L, mnActDeltaY = -1L; break; default: break; diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 026b40fbbbb2..6c97de76aa5c 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -74,12 +74,12 @@ void Splitter::ImplInitHorVer(bool bNew) if ( mbHorzSplit ) { - ePointerStyle = POINTER_HSPLIT; + ePointerStyle = PointerStyle::HSplit; SetSizePixel( Size( rSettings.GetSplitSize(), rSettings.GetScrollBarSize() ) ); } else { - ePointerStyle = POINTER_VSPLIT; + ePointerStyle = PointerStyle::VSplit; SetSizePixel( Size( rSettings.GetScrollBarSize(), rSettings.GetSplitSize() ) ); } diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index ac4ca2a3a68e..55108d670cf9 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2184,11 +2184,11 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) } mnMStartPos = mnMSplitPos; - PointerStyle eStyle = POINTER_ARROW; + PointerStyle eStyle = PointerStyle::Arrow; if ( mnSplitTest & SPLIT_HORZ ) - eStyle = POINTER_HSPLIT; + eStyle = PointerStyle::HSplit; else if ( mnSplitTest & SPLIT_VERT ) - eStyle = POINTER_VSPLIT; + eStyle = PointerStyle::VSplit; Pointer aPtr( eStyle ); SetPointer( aPtr ); @@ -2286,7 +2286,7 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) ImplSplitSet* pTempSplitSet; sal_uInt16 nTempSplitPos; sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos ); - PointerStyle eStyle = POINTER_ARROW; + PointerStyle eStyle = PointerStyle::Arrow; Rectangle aAutoHideRect; Rectangle aFadeInRect; Rectangle aFadeOutRect; @@ -2301,9 +2301,9 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) if ( nSplitTest && !(nSplitTest & SPLIT_NOSPLIT) ) { if ( nSplitTest & SPLIT_HORZ ) - eStyle = POINTER_HSPLIT; + eStyle = PointerStyle::HSplit; else if ( nSplitTest & SPLIT_VERT ) - eStyle = POINTER_VSPLIT; + eStyle = PointerStyle::VSplit; } } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 09d5403ad63a..4034b8c6b11e 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1395,7 +1395,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) mbChangingHighlight = false; meButtonType = ButtonType::SYMBOLONLY; meAlign = WINDOWALIGN_TOP; - meLastStyle = POINTER_ARROW; + meLastStyle = PointerStyle::Arrow; mnWinStyle = nStyle; meLayoutMode = TBX_LAYOUT_NORMAL; mnLastFocusItemId = 0; @@ -3666,12 +3666,12 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) return; } - PointerStyle eStyle = POINTER_ARROW; + PointerStyle eStyle = PointerStyle::Arrow; // change mouse cursor over drag area ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper && pWrapper->GetDragArea().IsInside( rMEvt.GetPosPixel() ) ) - eStyle = POINTER_MOVE; + eStyle = PointerStyle::Move; if ( (mnWinStyle & TB_WBLINESIZING) == TB_WBLINESIZING ) { @@ -3681,21 +3681,21 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( nLinePtr & DOCK_LINEHSIZE ) { if ( meAlign == WINDOWALIGN_LEFT ) - eStyle = POINTER_WINDOW_ESIZE; + eStyle = PointerStyle::WindowESize; else - eStyle = POINTER_WINDOW_WSIZE; + eStyle = PointerStyle::WindowWSize; } else if ( nLinePtr & DOCK_LINEVSIZE ) { if ( meAlign == WINDOWALIGN_TOP ) - eStyle = POINTER_WINDOW_SSIZE; + eStyle = PointerStyle::WindowSSize; else - eStyle = POINTER_WINDOW_NSIZE; + eStyle = PointerStyle::WindowNSize; } } } - if ( (eStyle == POINTER_ARROW) && mbCustomizeMode ) + if ( (eStyle == PointerStyle::Arrow) && mbCustomizeMode ) { // search the item which was clicked std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -3707,7 +3707,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( it->maRect.IsInside( aMousePos ) ) { if ( it->maRect.Right()-TB_RESIZE_OFFSET <= aMousePos.X() ) - eStyle = POINTER_HSIZEBAR; + eStyle = PointerStyle::HSizeBar; break; } } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index ccbbb620fc61..d314ebd112ae 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -86,7 +86,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo { if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) ImplDestroyHelpWindow( true ); - pChild->ImplGetFrame()->SetPointer( POINTER_ARROW ); + pChild->ImplGetFrame()->SetPointer( PointerStyle::Arrow ); return true; } } @@ -191,7 +191,7 @@ static void ImplSetMousePointer( vcl::Window* pChild ) { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maHelpData.mbExtHelpMode ) - pChild->ImplGetFrame()->SetPointer( POINTER_HELP ); + pChild->ImplGetFrame()->SetPointer( PointerStyle::Help ); else pChild->ImplGetFrame()->SetPointer( pChild->ImplGetMousePointer() ); } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index eedbadbbfb5d..08106412e268 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -335,10 +335,10 @@ void SalDisplay::doDestruct() } } - for( size_t i = 0; i < POINTER_COUNT; i++ ) + for( Cursor & aCsr : aPointerCache_ ) { - if( aPointerCache_[i] ) - XFreeCursor( pDisp_, aPointerCache_[i] ); + if( aCsr ) + XFreeCursor( pDisp_, aCsr ); } if( pXLib_ ) @@ -556,8 +556,8 @@ SalDisplay::initScreen( SalX11Screen nXScreen ) const void SalDisplay::Init() { - for( size_t i = 0; i < POINTER_COUNT; i++ ) - aPointerCache_[i] = None; + for( Cursor & aCsr : aPointerCache_ ) + aCsr = None; mpFactory = (AttributeProvider*)NULL; m_bXinerama = false; @@ -1477,11 +1477,8 @@ KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent, nXHot = name##curs_x_hot; \ nYHot = name##curs_y_hot -Cursor SalDisplay::GetPointer( int ePointerStyle ) +Cursor SalDisplay::GetPointer( PointerStyle ePointerStyle ) { - if( ePointerStyle >= POINTER_COUNT ) - return 0; - Cursor &aCur = aPointerCache_[ePointerStyle]; if( aCur != None ) @@ -1492,310 +1489,310 @@ Cursor SalDisplay::GetPointer( int ePointerStyle ) switch( ePointerStyle ) { - case POINTER_NULL: + case PointerStyle::Null: MAKE_CURSOR( null ); break; - case POINTER_ARROW: + case PointerStyle::Arrow: aCur = XCreateFontCursor( pDisp_, XC_left_ptr ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WAIT: + case PointerStyle::Wait: aCur = XCreateFontCursor( pDisp_, XC_watch ); break; - case POINTER_TEXT: // Mouse Pointer is a "I" Beam + case PointerStyle::Text: // Mouse Pointer is a "I" Beam aCur = XCreateFontCursor( pDisp_, XC_xterm ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_HELP: + case PointerStyle::Help: aCur = XCreateFontCursor( pDisp_, XC_question_arrow ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_CROSS: // Mouse Pointer is a cross + case PointerStyle::Cross: // Mouse Pointer is a cross aCur = XCreateFontCursor( pDisp_, XC_crosshair ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_NSIZE: + case PointerStyle::NSize: aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_SSIZE: + case PointerStyle::SSize: aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WSIZE: + case PointerStyle::WSize: aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_ESIZE: + case PointerStyle::ESize: aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_NSIZE: + case PointerStyle::WindowNSize: aCur = XCreateFontCursor( pDisp_, XC_top_side ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_SSIZE: + case PointerStyle::WindowSSize: aCur = XCreateFontCursor( pDisp_, XC_bottom_side ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_WSIZE: + case PointerStyle::WindowWSize: aCur = XCreateFontCursor( pDisp_, XC_left_side ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_ESIZE: + case PointerStyle::WindowESize: aCur = XCreateFontCursor( pDisp_, XC_right_side ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_NWSIZE: + case PointerStyle::NWSize: aCur = XCreateFontCursor( pDisp_, XC_top_left_corner ); break; - case POINTER_NESIZE: + case PointerStyle::NESize: aCur = XCreateFontCursor( pDisp_, XC_top_right_corner ); break; - case POINTER_SWSIZE: + case PointerStyle::SWSize: aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner ); break; - case POINTER_SESIZE: + case PointerStyle::SESize: aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner ); break; - case POINTER_WINDOW_NWSIZE: + case PointerStyle::WindowNWSize: aCur = XCreateFontCursor( pDisp_, XC_top_left_corner ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_NESIZE: + case PointerStyle::WindowNESize: aCur = XCreateFontCursor( pDisp_, XC_top_right_corner ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_SWSIZE: + case PointerStyle::WindowSWSize: aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_WINDOW_SESIZE: + case PointerStyle::WindowSESize: aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_HSPLIT: + case PointerStyle::HSplit: aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); break; - case POINTER_VSPLIT: + case PointerStyle::VSplit: aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); break; - case POINTER_HSIZEBAR: + case PointerStyle::HSizeBar: aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); // ??? DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_VSIZEBAR: + case PointerStyle::VSizeBar: aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); // ??? DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_REFHAND: + case PointerStyle::RefHand: aCur = XCreateFontCursor( pDisp_, XC_hand1 ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_HAND: + case PointerStyle::Hand: aCur = XCreateFontCursor( pDisp_, XC_hand2 ); break; - case POINTER_MAGNIFY: + case PointerStyle::Magnify: MAKE_CURSOR( magnify_ ); break; - case POINTER_FILL: + case PointerStyle::Fill: MAKE_CURSOR( fill_ ); break; - case POINTER_MOVE: + case PointerStyle::Move: aCur = XCreateFontCursor( pDisp_, XC_fleur ); break; - case POINTER_MOVEDATA: + case PointerStyle::MoveData: MAKE_CURSOR( movedata_ ); break; - case POINTER_COPYDATA: + case PointerStyle::CopyData: MAKE_CURSOR( copydata_ ); break; - case POINTER_MOVEFILE: + case PointerStyle::MoveFile: MAKE_CURSOR( movefile_ ); break; - case POINTER_COPYFILE: + case PointerStyle::CopyFile: MAKE_CURSOR( copyfile_ ); break; - case POINTER_MOVEFILES: + case PointerStyle::MoveFiles: MAKE_CURSOR( movefiles_ ); break; - case POINTER_COPYFILES: + case PointerStyle::CopyFiles: MAKE_CURSOR( copyfiles_ ); break; - case POINTER_NOTALLOWED: + case PointerStyle::NotAllowed: MAKE_CURSOR( nodrop_ ); break; - case POINTER_ROTATE: + case PointerStyle::Rotate: MAKE_CURSOR( rotate_ ); break; - case POINTER_HSHEAR: + case PointerStyle::HShear: MAKE_CURSOR( hshear_ ); break; - case POINTER_VSHEAR: + case PointerStyle::VShear: MAKE_CURSOR( vshear_ ); break; - case POINTER_DRAW_LINE: + case PointerStyle::DrawLine: MAKE_CURSOR( drawline_ ); break; - case POINTER_DRAW_RECT: + case PointerStyle::DrawRect: MAKE_CURSOR( drawrect_ ); break; - case POINTER_DRAW_POLYGON: + case PointerStyle::DrawPolygon: MAKE_CURSOR( drawpolygon_ ); break; - case POINTER_DRAW_BEZIER: + case PointerStyle::DrawBezier: MAKE_CURSOR( drawbezier_ ); break; - case POINTER_DRAW_ARC: + case PointerStyle::DrawArc: MAKE_CURSOR( drawarc_ ); break; - case POINTER_DRAW_PIE: + case PointerStyle::DrawPie: MAKE_CURSOR( drawpie_ ); break; - case POINTER_DRAW_CIRCLECUT: + case PointerStyle::DrawCircleCut: MAKE_CURSOR( drawcirclecut_ ); break; - case POINTER_DRAW_ELLIPSE: + case PointerStyle::DrawEllipse: MAKE_CURSOR( drawellipse_ ); break; - case POINTER_DRAW_CONNECT: + case PointerStyle::DrawConnect: MAKE_CURSOR( drawconnect_ ); break; - case POINTER_DRAW_TEXT: + case PointerStyle::DrawText: MAKE_CURSOR( drawtext_ ); break; - case POINTER_MIRROR: + case PointerStyle::Mirror: MAKE_CURSOR( mirror_ ); break; - case POINTER_CROOK: + case PointerStyle::Crook: MAKE_CURSOR( crook_ ); break; - case POINTER_CROP: + case PointerStyle::Crop: MAKE_CURSOR( crop_ ); break; - case POINTER_MOVEPOINT: + case PointerStyle::MovePoint: MAKE_CURSOR( movepoint_ ); break; - case POINTER_MOVEBEZIERWEIGHT: + case PointerStyle::MoveBezierWeight: MAKE_CURSOR( movebezierweight_ ); break; - case POINTER_DRAW_FREEHAND: + case PointerStyle::DrawFreehand: MAKE_CURSOR( drawfreehand_ ); break; - case POINTER_DRAW_CAPTION: + case PointerStyle::DrawCaption: MAKE_CURSOR( drawcaption_ ); break; - case POINTER_PEN: // Mouse Pointer is a pencil + case PointerStyle::Pen: // Mouse Pointer is a pencil aCur = XCreateFontCursor( pDisp_, XC_pencil ); DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" ); break; - case POINTER_LINKDATA: + case PointerStyle::LinkData: MAKE_CURSOR( linkdata_ ); break; - case POINTER_MOVEDATALINK: + case PointerStyle::MoveDataLink: MAKE_CURSOR( movedlnk_ ); break; - case POINTER_COPYDATALINK: + case PointerStyle::CopyDataLink: MAKE_CURSOR( copydlnk_ ); break; - case POINTER_LINKFILE: + case PointerStyle::LinkFile: MAKE_CURSOR( linkfile_ ); break; - case POINTER_MOVEFILELINK: + case PointerStyle::MoveFileLink: MAKE_CURSOR( moveflnk_ ); break; - case POINTER_COPYFILELINK: + case PointerStyle::CopyFileLink: MAKE_CURSOR( copyflnk_ ); break; - case POINTER_CHART: + case PointerStyle::Chart: MAKE_CURSOR( chart_ ); break; - case POINTER_DETECTIVE: + case PointerStyle::Detective: MAKE_CURSOR( detective_ ); break; - case POINTER_PIVOT_COL: + case PointerStyle::PivotCol: MAKE_CURSOR( pivotcol_ ); break; - case POINTER_PIVOT_ROW: + case PointerStyle::PivotRow: MAKE_CURSOR( pivotrow_ ); break; - case POINTER_PIVOT_FIELD: + case PointerStyle::PivotField: MAKE_CURSOR( pivotfld_ ); break; - case POINTER_PIVOT_DELETE: + case PointerStyle::PivotDelete: MAKE_CURSOR( pivotdel_ ); break; - case POINTER_CHAIN: + case PointerStyle::Chain: MAKE_CURSOR( chain_ ); break; - case POINTER_CHAIN_NOTALLOWED: + case PointerStyle::ChainNotAllowed: MAKE_CURSOR( chainnot_ ); break; - case POINTER_TIMEEVENT_MOVE: + case PointerStyle::TimeEventMove: MAKE_CURSOR( timemove_ ); break; - case POINTER_TIMEEVENT_SIZE: + case PointerStyle::TimeEventSize: MAKE_CURSOR( timesize_ ); break; - case POINTER_AUTOSCROLL_N: + case PointerStyle::AutoScrollN: MAKE_CURSOR(asn_ ); break; - case POINTER_AUTOSCROLL_S: + case PointerStyle::AutoScrollS: MAKE_CURSOR( ass_ ); break; - case POINTER_AUTOSCROLL_W: + case PointerStyle::AutoScrollW: MAKE_CURSOR( asw_ ); break; - case POINTER_AUTOSCROLL_E: + case PointerStyle::AutoScrollE: MAKE_CURSOR( ase_ ); break; - case POINTER_AUTOSCROLL_NW: + case PointerStyle::AutoScrollNW: MAKE_CURSOR( asnw_ ); break; - case POINTER_AUTOSCROLL_NE: + case PointerStyle::AutoScrollNE: MAKE_CURSOR( asne_ ); break; - case POINTER_AUTOSCROLL_SW: + case PointerStyle::AutoScrollSW: MAKE_CURSOR( assw_ ); break; - case POINTER_AUTOSCROLL_SE: + case PointerStyle::AutoScrollSE: MAKE_CURSOR( asse_ ); break; - case POINTER_AUTOSCROLL_NS: + case PointerStyle::AutoScrollNS: MAKE_CURSOR( asns_ ); break; - case POINTER_AUTOSCROLL_WE: + case PointerStyle::AutoScrollWE: MAKE_CURSOR( aswe_ ); break; - case POINTER_AUTOSCROLL_NSWE: + case PointerStyle::AutoScrollNSWE: MAKE_CURSOR( asnswe_ ); break; - case POINTER_AIRBRUSH: + case PointerStyle::Airbrush: MAKE_CURSOR( airbrush_ ); break; - case POINTER_TEXT_VERTICAL: + case PointerStyle::TextVertical: MAKE_CURSOR( vertcurs_ ); break; // #i32329# Enhanced table selection - case POINTER_TAB_SELECT_S: + case PointerStyle::TabSelectS: MAKE_CURSOR( tblsels_ ); break; - case POINTER_TAB_SELECT_E: + case PointerStyle::TabSelectE: MAKE_CURSOR( tblsele_ ); break; - case POINTER_TAB_SELECT_SE: + case PointerStyle::TabSelectSE: MAKE_CURSOR( tblselse_ ); break; - case POINTER_TAB_SELECT_W: + case PointerStyle::TabSelectW: MAKE_CURSOR( tblselw_ ); break; - case POINTER_TAB_SELECT_SW: + case PointerStyle::TabSelectSW: MAKE_CURSOR( tblselsw_ ); break; // #i20119# Paintbrush tool - case POINTER_PAINTBRUSH : + case PointerStyle::Paintbrush : MAKE_CURSOR( paintbrush_ ); break; diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 4f428dcdec2b..14e11d5be9ef 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -745,7 +745,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP m_nWorkArea = GetDisplay()->getWMAdaptor()->getCurrentWorkArea(); // Pointer - SetPointer( POINTER_ARROW ); + SetPointer( PointerStyle::Arrow ); } X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uLong nSalFrameStyle, diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index 0d5aea096127..df1546ac9e43 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -69,8 +69,8 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) : m_pGdkDisplay( pDisplay ), m_bStartupCompleted( false ) { - for(int i = 0; i < POINTER_COUNT; i++) - m_aCursors[ i ] = NULL; + for(GdkCursor* & rpCsr : m_aCursors) + rpCsr = NULL; #if !GTK_CHECK_VERSION(3,0,0) m_bUseRandRWrapper = false; // use gdk signal instead Init (); @@ -101,9 +101,9 @@ GtkSalDisplay::~GtkSalDisplay() pDisp_ = NULL; #endif - for(int i = 0; i < POINTER_COUNT; i++) - if( m_aCursors[ i ] ) - gdk_cursor_unref( m_aCursors[ i ] ); + for(GdkCursor* & rpCsr : m_aCursors) + if( rpCsr ) + gdk_cursor_unref( rpCsr ); } extern "C" { @@ -338,125 +338,122 @@ GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap, GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle ) { - if( ePointerStyle >= POINTER_COUNT ) - return NULL; - if ( !m_aCursors[ ePointerStyle ] ) { GdkCursor *pCursor = NULL; switch( ePointerStyle ) { - MAP_BUILTIN( POINTER_ARROW, GDK_LEFT_PTR ); - MAP_BUILTIN( POINTER_TEXT, GDK_XTERM ); - MAP_BUILTIN( POINTER_HELP, GDK_QUESTION_ARROW ); - MAP_BUILTIN( POINTER_CROSS, GDK_CROSSHAIR ); - MAP_BUILTIN( POINTER_WAIT, GDK_WATCH ); - - MAP_BUILTIN( POINTER_NSIZE, GDK_SB_V_DOUBLE_ARROW ); - MAP_BUILTIN( POINTER_SSIZE, GDK_SB_V_DOUBLE_ARROW ); - MAP_BUILTIN( POINTER_WSIZE, GDK_SB_H_DOUBLE_ARROW ); - MAP_BUILTIN( POINTER_ESIZE, GDK_SB_H_DOUBLE_ARROW ); - - MAP_BUILTIN( POINTER_NWSIZE, GDK_TOP_LEFT_CORNER ); - MAP_BUILTIN( POINTER_NESIZE, GDK_TOP_RIGHT_CORNER ); - MAP_BUILTIN( POINTER_SWSIZE, GDK_BOTTOM_LEFT_CORNER ); - MAP_BUILTIN( POINTER_SESIZE, GDK_BOTTOM_RIGHT_CORNER ); - - MAP_BUILTIN( POINTER_WINDOW_NSIZE, GDK_TOP_SIDE ); - MAP_BUILTIN( POINTER_WINDOW_SSIZE, GDK_BOTTOM_SIDE ); - MAP_BUILTIN( POINTER_WINDOW_WSIZE, GDK_LEFT_SIDE ); - MAP_BUILTIN( POINTER_WINDOW_ESIZE, GDK_RIGHT_SIDE ); - - MAP_BUILTIN( POINTER_WINDOW_NWSIZE, GDK_TOP_LEFT_CORNER ); - MAP_BUILTIN( POINTER_WINDOW_NESIZE, GDK_TOP_RIGHT_CORNER ); - MAP_BUILTIN( POINTER_WINDOW_SWSIZE, GDK_BOTTOM_LEFT_CORNER ); - MAP_BUILTIN( POINTER_WINDOW_SESIZE, GDK_BOTTOM_RIGHT_CORNER ); - - MAP_BUILTIN( POINTER_HSIZEBAR, GDK_SB_H_DOUBLE_ARROW ); - MAP_BUILTIN( POINTER_VSIZEBAR, GDK_SB_V_DOUBLE_ARROW ); - - MAP_BUILTIN( POINTER_REFHAND, GDK_HAND2 ); - MAP_BUILTIN( POINTER_HAND, GDK_HAND2 ); - MAP_BUILTIN( POINTER_PEN, GDK_PENCIL ); - - MAP_BUILTIN( POINTER_HSPLIT, GDK_SB_H_DOUBLE_ARROW ); - MAP_BUILTIN( POINTER_VSPLIT, GDK_SB_V_DOUBLE_ARROW ); - - MAP_BUILTIN( POINTER_MOVE, GDK_FLEUR ); - - MAKE_CURSOR( POINTER_NULL, null ); - MAKE_CURSOR( POINTER_MAGNIFY, magnify_ ); - MAKE_CURSOR( POINTER_FILL, fill_ ); - MAKE_CURSOR( POINTER_MOVEDATA, movedata_ ); - MAKE_CURSOR( POINTER_COPYDATA, copydata_ ); - MAKE_CURSOR( POINTER_MOVEFILE, movefile_ ); - MAKE_CURSOR( POINTER_COPYFILE, copyfile_ ); - MAKE_CURSOR( POINTER_MOVEFILES, movefiles_ ); - MAKE_CURSOR( POINTER_COPYFILES, copyfiles_ ); - MAKE_CURSOR( POINTER_NOTALLOWED, nodrop_ ); - MAKE_CURSOR( POINTER_ROTATE, rotate_ ); - MAKE_CURSOR( POINTER_HSHEAR, hshear_ ); - MAKE_CURSOR( POINTER_VSHEAR, vshear_ ); - MAKE_CURSOR( POINTER_DRAW_LINE, drawline_ ); - MAKE_CURSOR( POINTER_DRAW_RECT, drawrect_ ); - MAKE_CURSOR( POINTER_DRAW_POLYGON, drawpolygon_ ); - MAKE_CURSOR( POINTER_DRAW_BEZIER, drawbezier_ ); - MAKE_CURSOR( POINTER_DRAW_ARC, drawarc_ ); - MAKE_CURSOR( POINTER_DRAW_PIE, drawpie_ ); - MAKE_CURSOR( POINTER_DRAW_CIRCLECUT, drawcirclecut_ ); - MAKE_CURSOR( POINTER_DRAW_ELLIPSE, drawellipse_ ); - MAKE_CURSOR( POINTER_DRAW_CONNECT, drawconnect_ ); - MAKE_CURSOR( POINTER_DRAW_TEXT, drawtext_ ); - MAKE_CURSOR( POINTER_MIRROR, mirror_ ); - MAKE_CURSOR( POINTER_CROOK, crook_ ); - MAKE_CURSOR( POINTER_CROP, crop_ ); - MAKE_CURSOR( POINTER_MOVEPOINT, movepoint_ ); - MAKE_CURSOR( POINTER_MOVEBEZIERWEIGHT, movebezierweight_ ); - MAKE_CURSOR( POINTER_DRAW_FREEHAND, drawfreehand_ ); - MAKE_CURSOR( POINTER_DRAW_CAPTION, drawcaption_ ); - MAKE_CURSOR( POINTER_LINKDATA, linkdata_ ); - MAKE_CURSOR( POINTER_MOVEDATALINK, movedlnk_ ); - MAKE_CURSOR( POINTER_COPYDATALINK, copydlnk_ ); - MAKE_CURSOR( POINTER_LINKFILE, linkfile_ ); - MAKE_CURSOR( POINTER_MOVEFILELINK, moveflnk_ ); - MAKE_CURSOR( POINTER_COPYFILELINK, copyflnk_ ); - MAKE_CURSOR( POINTER_CHART, chart_ ); - MAKE_CURSOR( POINTER_DETECTIVE, detective_ ); - MAKE_CURSOR( POINTER_PIVOT_COL, pivotcol_ ); - MAKE_CURSOR( POINTER_PIVOT_ROW, pivotrow_ ); - MAKE_CURSOR( POINTER_PIVOT_FIELD, pivotfld_ ); - MAKE_CURSOR( POINTER_PIVOT_DELETE, pivotdel_ ); - MAKE_CURSOR( POINTER_CHAIN, chain_ ); - MAKE_CURSOR( POINTER_CHAIN_NOTALLOWED, chainnot_ ); - MAKE_CURSOR( POINTER_TIMEEVENT_MOVE, timemove_ ); - MAKE_CURSOR( POINTER_TIMEEVENT_SIZE, timesize_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_N, asn_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_S, ass_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_W, asw_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_E, ase_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_NW, asnw_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_NE, asne_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_SW, assw_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_SE, asse_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_NS, asns_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_WE, aswe_ ); - MAKE_CURSOR( POINTER_AUTOSCROLL_NSWE, asnswe_ ); - MAKE_CURSOR( POINTER_AIRBRUSH, airbrush_ ); - MAKE_CURSOR( POINTER_TEXT_VERTICAL, vertcurs_ ); + MAP_BUILTIN( PointerStyle::Arrow, GDK_LEFT_PTR ); + MAP_BUILTIN( PointerStyle::Text, GDK_XTERM ); + MAP_BUILTIN( PointerStyle::Help, GDK_QUESTION_ARROW ); + MAP_BUILTIN( PointerStyle::Cross, GDK_CROSSHAIR ); + MAP_BUILTIN( PointerStyle::Wait, GDK_WATCH ); + + MAP_BUILTIN( PointerStyle::NSize, GDK_SB_V_DOUBLE_ARROW ); + MAP_BUILTIN( PointerStyle::SSize, GDK_SB_V_DOUBLE_ARROW ); + MAP_BUILTIN( PointerStyle::WSize, GDK_SB_H_DOUBLE_ARROW ); + MAP_BUILTIN( PointerStyle::ESize, GDK_SB_H_DOUBLE_ARROW ); + + MAP_BUILTIN( PointerStyle::NWSize, GDK_TOP_LEFT_CORNER ); + MAP_BUILTIN( PointerStyle::NESize, GDK_TOP_RIGHT_CORNER ); + MAP_BUILTIN( PointerStyle::SWSize, GDK_BOTTOM_LEFT_CORNER ); + MAP_BUILTIN( PointerStyle::SESize, GDK_BOTTOM_RIGHT_CORNER ); + + MAP_BUILTIN( PointerStyle::WindowNSize, GDK_TOP_SIDE ); + MAP_BUILTIN( PointerStyle::WindowSSize, GDK_BOTTOM_SIDE ); + MAP_BUILTIN( PointerStyle::WindowWSize, GDK_LEFT_SIDE ); + MAP_BUILTIN( PointerStyle::WindowESize, GDK_RIGHT_SIDE ); + + MAP_BUILTIN( PointerStyle::WindowNWSize, GDK_TOP_LEFT_CORNER ); + MAP_BUILTIN( PointerStyle::WindowNESize, GDK_TOP_RIGHT_CORNER ); + MAP_BUILTIN( PointerStyle::WindowSWSize, GDK_BOTTOM_LEFT_CORNER ); + MAP_BUILTIN( PointerStyle::WindowSESize, GDK_BOTTOM_RIGHT_CORNER ); + + MAP_BUILTIN( PointerStyle::HSizeBar, GDK_SB_H_DOUBLE_ARROW ); + MAP_BUILTIN( PointerStyle::VSizeBar, GDK_SB_V_DOUBLE_ARROW ); + + MAP_BUILTIN( PointerStyle::RefHand, GDK_HAND2 ); + MAP_BUILTIN( PointerStyle::Hand, GDK_HAND2 ); + MAP_BUILTIN( PointerStyle::Pen, GDK_PENCIL ); + + MAP_BUILTIN( PointerStyle::HSplit, GDK_SB_H_DOUBLE_ARROW ); + MAP_BUILTIN( PointerStyle::VSplit, GDK_SB_V_DOUBLE_ARROW ); + + MAP_BUILTIN( PointerStyle::Move, GDK_FLEUR ); + + MAKE_CURSOR( PointerStyle::Null, null ); + MAKE_CURSOR( PointerStyle::Magnify, magnify_ ); + MAKE_CURSOR( PointerStyle::Fill, fill_ ); + MAKE_CURSOR( PointerStyle::MoveData, movedata_ ); + MAKE_CURSOR( PointerStyle::CopyData, copydata_ ); + MAKE_CURSOR( PointerStyle::MoveFile, movefile_ ); + MAKE_CURSOR( PointerStyle::CopyFile, copyfile_ ); + MAKE_CURSOR( PointerStyle::MoveFiles, movefiles_ ); + MAKE_CURSOR( PointerStyle::CopyFiles, copyfiles_ ); + MAKE_CURSOR( PointerStyle::NotAllowed, nodrop_ ); + MAKE_CURSOR( PointerStyle::Rotate, rotate_ ); + MAKE_CURSOR( PointerStyle::HShear, hshear_ ); + MAKE_CURSOR( PointerStyle::VShear, vshear_ ); + MAKE_CURSOR( PointerStyle::DrawLine, drawline_ ); + MAKE_CURSOR( PointerStyle::DrawRect, drawrect_ ); + MAKE_CURSOR( PointerStyle::DrawPolygon, drawpolygon_ ); + MAKE_CURSOR( PointerStyle::DrawBezier, drawbezier_ ); + MAKE_CURSOR( PointerStyle::DrawArc, drawarc_ ); + MAKE_CURSOR( PointerStyle::DrawPie, drawpie_ ); + MAKE_CURSOR( PointerStyle::DrawCircleCut, drawcirclecut_ ); + MAKE_CURSOR( PointerStyle::DrawEllipse, drawellipse_ ); + MAKE_CURSOR( PointerStyle::DrawConnect, drawconnect_ ); + MAKE_CURSOR( PointerStyle::DrawText, drawtext_ ); + MAKE_CURSOR( PointerStyle::Mirror, mirror_ ); + MAKE_CURSOR( PointerStyle::Crook, crook_ ); + MAKE_CURSOR( PointerStyle::Crop, crop_ ); + MAKE_CURSOR( PointerStyle::MovePoint, movepoint_ ); + MAKE_CURSOR( PointerStyle::MoveBezierWeight, movebezierweight_ ); + MAKE_CURSOR( PointerStyle::DrawFreehand, drawfreehand_ ); + MAKE_CURSOR( PointerStyle::DrawCaption, drawcaption_ ); + MAKE_CURSOR( PointerStyle::LinkData, linkdata_ ); + MAKE_CURSOR( PointerStyle::MoveDataLink, movedlnk_ ); + MAKE_CURSOR( PointerStyle::CopyDataLink, copydlnk_ ); + MAKE_CURSOR( PointerStyle::LinkFile, linkfile_ ); + MAKE_CURSOR( PointerStyle::MoveFileLink, moveflnk_ ); + MAKE_CURSOR( PointerStyle::CopyFileLink, copyflnk_ ); + MAKE_CURSOR( PointerStyle::Chart, chart_ ); + MAKE_CURSOR( PointerStyle::Detective, detective_ ); + MAKE_CURSOR( PointerStyle::PivotCol, pivotcol_ ); + MAKE_CURSOR( PointerStyle::PivotRow, pivotrow_ ); + MAKE_CURSOR( PointerStyle::PivotField, pivotfld_ ); + MAKE_CURSOR( PointerStyle::PivotDelete, pivotdel_ ); + MAKE_CURSOR( PointerStyle::Chain, chain_ ); + MAKE_CURSOR( PointerStyle::ChainNotAllowed, chainnot_ ); + MAKE_CURSOR( PointerStyle::TimeEventMove, timemove_ ); + MAKE_CURSOR( PointerStyle::TimeEventSize, timesize_ ); + MAKE_CURSOR( PointerStyle::AutoScrollN, asn_ ); + MAKE_CURSOR( PointerStyle::AutoScrollS, ass_ ); + MAKE_CURSOR( PointerStyle::AutoScrollW, asw_ ); + MAKE_CURSOR( PointerStyle::AutoScrollE, ase_ ); + MAKE_CURSOR( PointerStyle::AutoScrollNW, asnw_ ); + MAKE_CURSOR( PointerStyle::AutoScrollNE, asne_ ); + MAKE_CURSOR( PointerStyle::AutoScrollSW, assw_ ); + MAKE_CURSOR( PointerStyle::AutoScrollSE, asse_ ); + MAKE_CURSOR( PointerStyle::AutoScrollNS, asns_ ); + MAKE_CURSOR( PointerStyle::AutoScrollWE, aswe_ ); + MAKE_CURSOR( PointerStyle::AutoScrollNSWE, asnswe_ ); + MAKE_CURSOR( PointerStyle::Airbrush, airbrush_ ); + MAKE_CURSOR( PointerStyle::TextVertical, vertcurs_ ); // #i32329# - MAKE_CURSOR( POINTER_TAB_SELECT_S, tblsels_ ); - MAKE_CURSOR( POINTER_TAB_SELECT_E, tblsele_ ); - MAKE_CURSOR( POINTER_TAB_SELECT_SE, tblselse_ ); - MAKE_CURSOR( POINTER_TAB_SELECT_W, tblselw_ ); - MAKE_CURSOR( POINTER_TAB_SELECT_SW, tblselsw_ ); + MAKE_CURSOR( PointerStyle::TabSelectS, tblsels_ ); + MAKE_CURSOR( PointerStyle::TabSelectE, tblsele_ ); + MAKE_CURSOR( PointerStyle::TabSelectSE, tblselse_ ); + MAKE_CURSOR( PointerStyle::TabSelectW, tblselw_ ); + MAKE_CURSOR( PointerStyle::TabSelectSW, tblselsw_ ); // #i20119# - MAKE_CURSOR( POINTER_PAINTBRUSH, paintbrush_ ); + MAKE_CURSOR( PointerStyle::Paintbrush, paintbrush_ ); default: - SAL_WARN( "vcl.gtk", "pointer " << ePointerStyle << "not implemented" ); + SAL_WARN( "vcl.gtk", "pointer " << static_cast<int>(ePointerStyle) << "not implemented" ); break; } if( !pCursor ) diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 5e519f492c3a..286d212b6f3f 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -1037,7 +1037,7 @@ void GtkSalFrame::InitCommon() m_nGSMCookie = 0; m_nExtStyle = 0; m_pRegion = NULL; - m_ePointerStyle = 0xffff; + m_ePointerStyle = static_cast<PointerStyle>(0xffff); m_bSetFocusOnMap = false; m_pSalMenu = NULL; m_nWatcherId = 0; diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 79f4e6ee0dd6..25058c5d2edd 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -39,6 +39,7 @@ #include <osl/module.h> #include <tools/debug.hxx> +#include <o3tl/enumarray.hxx> #include <vcl/sysdata.hxx> #include <vcl/timer.hxx> @@ -2061,9 +2062,9 @@ void WinSalFrame::SetPointer( PointerStyle ePointerStyle ) UINT mnOwnId; }; - static ImplPtrData aImplPtrTab[POINTER_COUNT] = + static o3tl::enumarray<PointerStyle, ImplPtrData> aImplPtrTab = { - { 0, IDC_ARROW, 0 }, // POINTER_ARROW + ImplPtrData{ 0, IDC_ARROW, 0 }, // POINTER_ARROW { 0, 0, SAL_RESID_POINTER_NULL }, // POINTER_NULL { 0, IDC_WAIT, 0 }, // POINTER_WAIT { 0, IDC_IBEAM, 0 }, // POINTER_TEXT @@ -2152,22 +2153,18 @@ void WinSalFrame::SetPointer( PointerStyle ePointerStyle ) { 0, 0, SAL_RESID_POINTER_TEXT_VERTICAL }, // POINTER_TEXT_VERTICAL { 0, 0, SAL_RESID_POINTER_PIVOT_DELETE }, // POINTER_PIVOT_DELETE - // #i32329# + // #i32329# { 0, 0, SAL_RESID_POINTER_TAB_SELECT_S }, // POINTER_TAB_SELECT_S { 0, 0, SAL_RESID_POINTER_TAB_SELECT_E }, // POINTER_TAB_SELECT_E { 0, 0, SAL_RESID_POINTER_TAB_SELECT_SE }, // POINTER_TAB_SELECT_SE { 0, 0, SAL_RESID_POINTER_TAB_SELECT_W }, // POINTER_TAB_SELECT_W { 0, 0, SAL_RESID_POINTER_TAB_SELECT_SW }, // POINTER_TAB_SELECT_SW - // #i20119# + // #i20119# { 0, 0, SAL_RESID_POINTER_PAINTBRUSH } // POINTER_PAINTBRUSH }; -#if POINTER_COUNT != 94 -#error New Pointer must be defined! -#endif - // Mousepointer loaded ? if ( !aImplPtrTab[ePointerStyle].mhCursor ) { |