diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 14:05:50 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-22 06:32:35 +0000 |
commit | e929194317a7debb1c5467282230cbbabe61a710 (patch) | |
tree | 89f7bfe3a00003c0fa96113b77abbf76c92f80bf /sc/source/ui/view | |
parent | edcd1d5a9c88455fd1d52ab25815fc8d439f31ec (diff) |
convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19
Reviewed-on: https://gerrit.libreoffice.org/15825
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 48 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/hdrcont.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 102 | ||||
-rw-r--r-- | sc/source/ui/view/tabsplit.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/tabview5.cxx | 2 |
8 files changed, 92 insertions, 92 deletions
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 } } |