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 | |
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')
26 files changed, 151 insertions, 151 deletions
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 } } |