diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-24 15:55:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:40 +0200 |
commit | 0a9f331de48e63d7188f7e253770debd5e3c180e (patch) | |
tree | b3d9c778eff2c49ac8a716fe4c7399bf97f970f2 | |
parent | 2a6806a81b3fd9218af18c685b2ede36a86956f6 (diff) |
convert SDRMOUSE constants to scoped enum
Change-Id: Ia5389095683a1c012a988ed71bf769a1f25d80fb
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 2 | ||||
-rw-r--r-- | include/svx/svdview.hxx | 18 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuconpol.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fudraw.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fusel.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin5.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fudraw.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuediglu.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuformatpaintbrush.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 16 | ||||
-rw-r--r-- | svx/source/dialog/graphctl.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmview.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 12 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/conform.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/drawbase.cxx | 2 |
20 files changed, 58 insertions, 54 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 76e80d21dadc..685560558603 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -587,7 +587,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) SdrViewEvent aVEvt; if ( pDrawViewWrapper->IsTextEditHit( aMPos, HITPIX ) || // #i12587# support for shapes in chart - ( rMEvt.IsRight() && pDrawViewWrapper->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ) == SDRHIT_MARKEDOBJECT ) ) + ( rMEvt.IsRight() && pDrawViewWrapper->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) == SDRHIT_MARKEDOBJECT ) ) { pDrawViewWrapper->MouseButtonDown(rMEvt,m_pChartWindow); return; diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index bb9db821d2fa..f583301726f9 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -82,9 +82,13 @@ enum SdrEventKind {SDREVENT_NONE, SDREVENT_BRKMARK, SDREVENT_EXECUTEURL}; -#define SDRMOUSEBUTTONDOWN 1 -#define SDRMOUSEMOVE 2 -#define SDRMOUSEBUTTONUP 3 +/* for PickAnything() */ +enum class SdrMouseEventKind +{ + BUTTONDOWN = 1, + MOVE = 2, + BUTTONUP = 3, +}; // helper class SdrViewEvent struct SVX_DLLPUBLIC SdrViewEvent @@ -126,8 +130,8 @@ public: SdrViewEvent(); ~SdrViewEvent(); - // nEventKind is SDRMOUSEBUTTONDOWN, SDRMOUSEMOVE oder SDRMOUSEBUTTONUP - void SetMouseEvent(const MouseEvent& rMEvt, sal_uInt16 nEventKind); + // nEventKind is SdrMouseEventKind::BUTTONDOWN, SdrMouseEventKind::MOVE or SdrMouseEventKind::BUTTONUP + void SetMouseEvent(const MouseEvent& rMEvt, SdrMouseEventKind nEventKind); }; // helper class for all D&D overlays @@ -174,7 +178,7 @@ public: // deactivate the MouseDispatcher with the help of the methode below and you have // to implement it yourself. Example for MouseButtonDown: // SdrViewEvent aVEvt; - // SdrHitKind eHit=pSdrView->PickAnything(rMEvt,SDRMOUSEBUTTONDOWN,aVEvt); + // SdrHitKind eHit=pSdrView->PickAnything(rMEvt,SdrMouseEventKind::BUTTONDOWN,aVEvt); // ... hier Applikationsspezifischer Eingriff ... // pSdrView->DoMouseEvent(aVEvt); // SetPointer(GetPreferredPointer(...)) @@ -214,7 +218,7 @@ public: // OutputDevice is necessary to determine HandleSize. // If NULL the first signed on Win is used. Pointer GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const; - SdrHitKind PickAnything(const MouseEvent& rMEvt, sal_uInt16 nMouseDownOrMoveOrUp, SdrViewEvent& rVEvt) const; + SdrHitKind PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent& rVEvt) const; SdrHitKind PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const; bool DoMouseEvent(const SdrViewEvent& rVEvt); virtual SdrViewContext GetContext() const; diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index b9dff989a31f..a1d2676f971a 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -184,7 +184,7 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView); // TODO character in shapes // SdrViewEvent aVEvt; - // m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + // m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); // if ( aVEvt.pRootObj && aVEvt.pRootObj->ISA(SdrTextObj) ) // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.pRootObj),rMEvt, sal_False); bHandled = true; @@ -207,7 +207,7 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) { SdrPageView* pPV = m_rView.GetSdrPageView(); SdrViewEvent aVEvt; - if ( m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt) != SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() ) + if ( m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt) != SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() ) m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); if ( aVEvt.pRootObj ) m_rView.MarkObj(aVEvt.pRootObj, pPV); @@ -500,7 +500,7 @@ void DlgEdFunc::unColorizeOverlappedObj() bool DlgEdFunc::isOverlapping(const MouseEvent& rMEvt) { SdrViewEvent aVEvt; - bool bOverlapping = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt) != SDRHIT_NONE; + bool bOverlapping = m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONUP, aVEvt) != SDRHIT_NONE; if (bOverlapping && aVEvt.pObj) { colorizeOverlappedObject(aVEvt.pObj); @@ -579,7 +579,7 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) } SdrViewEvent aVEvt; - const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEMOVE, aVEvt); + const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SdrMouseEventKind::MOVE, aVEvt); bool bIsSetPoint = (eHit == SDRHIT_UNMARKEDOBJECT); if ( !bIsSetPoint ) { @@ -670,7 +670,7 @@ bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) SdrViewEvent aVEvt; sal_Int16 nId = m_rView.GetCurrentObjIdentifier(); - const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_UNMARKEDOBJECT && nId != OBJ_CUSTOMSHAPE) { @@ -746,7 +746,7 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) { SdrPageView* pPV = m_rView.GetSdrPageView(); SdrViewEvent aVEvt; - m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); m_rView.MarkObj(aVEvt.pRootObj, pPV); } checkTwoCklicks(rMEvt); @@ -812,7 +812,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) return true; SdrViewEvent aVEvt; - const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if( eHit == SDRHIT_UNMARKEDOBJECT ) { // if not multi selection, unmark all diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index babcafd315e7..33a456ff4182 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -63,7 +63,7 @@ bool FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) bool bReturn = FuConstruct::MouseButtonDown(rMEvt); SdrViewEvent aVEvt; - (void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + (void)pView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (aVEvt.eEvent == SDREVENT_BEGTEXTEDIT) { // Texteingabe hier nicht zulassen @@ -108,7 +108,7 @@ bool FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) bool bSimple = false; SdrViewEvent aVEvt; - (void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt); + (void)pView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONUP, aVEvt); pView->MouseButtonUp(rMEvt, pWindow); diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 5e4ceefb49e7..25bfd25fc3f8 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -708,7 +708,7 @@ static bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, vcl::Window* pWi { SdrViewEvent aVEvt; MouseEvent aMEvt( rPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT ); - SdrHitKind eHit = pView->PickAnything( aMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); + SdrHitKind eHit = pView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); if ( eHit != SDRHIT_NONE && aVEvt.pObj != NULL ) { diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index db5e7f2765b4..a51363d91865 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -228,7 +228,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; if ( !bAlt && - pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ) != SDRHIT_NONE && + pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) != SDRHIT_NONE && aVEvt.pObj != NULL ) { if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) ) // ImageMap @@ -513,7 +513,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) // selektierten Objekt steht SdrViewEvent aVEvt; - SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); + SdrHitKind eHit = pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); if (eHit != SDRHIT_NONE && aVEvt.pObj == pObj && pViewShell) { sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index ccbede095d93..2e209546c362 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -300,7 +300,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) { SdrViewEvent aVEvt; MouseEvent aMEvt( aPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT ); - SdrHitKind eHit = pDrView->PickAnything( aMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); + SdrHitKind eHit = pDrView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); if ( eHit != SDRHIT_NONE && aVEvt.pObj != NULL ) { diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index 974b49e9d323..f8dbe856a728 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -89,7 +89,7 @@ bool FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt) bool bReturn = FuConstruct::MouseButtonDown(rMEvt); SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_HANDLE || rMEvt.IsMod1()) { @@ -144,7 +144,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt ) bool bCreated = false; SdrViewEvent aVEvt; - mpView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt); + mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONUP, aVEvt); const size_t nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount(); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index e1a6ae50d74d..013a5117a55a 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -546,7 +546,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) if (pMEvt) { - eHit = mpView->PickAnything(*pMEvt, SDRMOUSEMOVE, aVEvt); + eHit = mpView->PickAnything(*pMEvt, SdrMouseEventKind::MOVE, aVEvt); } if ((eDragMode == SDRDRAG_ROTATE) && (eHit == SDRHIT_MARKEDOBJECT)) @@ -767,7 +767,7 @@ bool FuDraw::RequestHelp(const HelpEvent& rHEvt) MouseEvent aMEvt(mpWindow->GetPointerPosPixel(), 1, MouseEventModifiers::NONE, MOUSE_LEFT); - SdrHitKind eHit = mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); SdrObject* pObj = aVEvt.pObj; diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx index fd00f1568517..8d0169eb6ee5 100644 --- a/sd/source/ui/func/fuediglu.cxx +++ b/sd/source/ui/func/fuediglu.cxx @@ -99,7 +99,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt) mpWindow->CaptureMouse(); SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_HANDLE) { @@ -240,7 +240,7 @@ bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt) !rMEvt.IsShift() && !rMEvt.IsMod2()) { SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_NONE) { diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 0d6cfc76e117..5177664529b2 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -96,7 +96,7 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) if(mpView&&mpWindow) { SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if( (eHit == SDRHIT_TEXTEDIT) || (eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) )) { diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index f880f74aa237..9c965f7622a5 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -201,7 +201,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) bool bTextEdit = false; SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if ( eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) ) { @@ -438,7 +438,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) **********************************************************************/ mpWindow->CaptureMouse(); SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT) { @@ -882,7 +882,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) !rMEvt.IsShift() && !rMEvt.IsMod2()) { SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_NONE) { diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 24801ef7827a..ac6fb7180214 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -196,7 +196,7 @@ void FuText::DoExecute( SfxRequest& ) // Try to select an object SdrPageView* pPV = mpView->GetSdrPageView(); SdrViewEvent aVEvt; - mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); mpView->MarkObj(aVEvt.pRootObj, pPV); mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) ); @@ -255,7 +255,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) mpView->SetMarkHdlWhenTextEdit(true); SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_TEXTEDIT) { @@ -280,7 +280,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) object. As a simple fix, we determine eHit after SdrEndTextEdit again, this returns then SDRHIT_NONE. */ mxTextObj.reset( NULL ); - eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); } mpView->SetCurrentObj(OBJ_TEXT); @@ -377,7 +377,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) // force new handle identification, the pointer will be dead here // since SdrEndTextEdit has resetted (deleted) the handles. aVEvt.pHdl = 0; - mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); } } @@ -399,7 +399,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if ( ! rMEvt.IsRight()) { // we need to pick again since SdrEndTextEdit can rebuild the handles list - eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if( (eHit == SDRHIT_HANDLE) || (eHit == SDRHIT_MARKEDOBJECT) ) { sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() ); @@ -743,7 +743,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) { SdrPageView* pPV2 = mpView->GetSdrPageView(); SdrViewEvent aVEvt; - mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); mpView->MarkObj(aVEvt.pRootObj, pPV2); } @@ -1067,7 +1067,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) nSdrObjKind = mxTextObj->GetObjIdentifier(); SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_TEXTEDIT) { @@ -1228,7 +1228,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq) // Try to select an object SdrPageView* pPV = mpView->GetSdrPageView(); SdrViewEvent aVEvt; - mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); mpView->MarkObj(aVEvt.pRootObj, pPV); if (aVEvt.pObj && aVEvt.pObj->ISA(SdrTextObj)) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 997c3ee38e13..98561d20faf0 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -617,7 +617,7 @@ void GraphCtrl::MouseButtonDown( const MouseEvent& rMEvt ) if ( nPolyEdit ) { SdrViewEvent aVEvt; - SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); + SdrHitKind eHit = pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); if ( nPolyEdit == SID_BEZIER_INSERT && eHit == SDRHIT_MARKEDOBJECT ) pView->BegInsObjPoint( aLogPt, rMEvt.IsMod1()); diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index b4900cee83a4..9fd3a38a7bea 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -548,7 +548,7 @@ bool FmFormView::MouseButtonDown( const MouseEvent& _rMEvt, vcl::Window* _pWin ) if ( pFormShell && pFormShell->GetImpl() ) { SdrViewEvent aViewEvent; - PickAnything( _rMEvt, SDRMOUSEBUTTONDOWN, aViewEvent ); + PickAnything( _rMEvt, SdrMouseEventKind::BUTTONDOWN, aViewEvent ); pFormShell->GetImpl()->handleMouseButtonDown( aViewEvent ); } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 0f8b42428bd3..14fdff48c207 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -225,7 +225,7 @@ bool SdrView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin) bool bRet = SdrCreateView::MouseButtonDown(rMEvt,pWin); if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) { SdrViewEvent aVEvt; - PickAnything(rMEvt,SDRMOUSEBUTTONDOWN,aVEvt); + PickAnything(rMEvt,SdrMouseEventKind::BUTTONDOWN,aVEvt); bRet = DoMouseEvent(aVEvt); } return bRet; @@ -239,7 +239,7 @@ bool SdrView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) bool bRet = !bAction && SdrCreateView::MouseButtonUp(rMEvt,pWin); if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) { SdrViewEvent aVEvt; - PickAnything(rMEvt,SDRMOUSEBUTTONUP,aVEvt); + PickAnything(rMEvt,SdrMouseEventKind::BUTTONUP,aVEvt); bRet = DoMouseEvent(aVEvt); } return bRet; @@ -252,7 +252,7 @@ bool SdrView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) bool bRet = SdrCreateView::MouseMove(rMEvt,pWin); if (!IsExtendedMouseEventDispatcherEnabled() && !IsTextEditInSelectionMode()) { SdrViewEvent aVEvt; - PickAnything(rMEvt,SDRMOUSEMOVE,aVEvt); + PickAnything(rMEvt,SdrMouseEventKind::MOVE,aVEvt); if (DoMouseEvent(aVEvt)) bRet=true; } @@ -276,10 +276,10 @@ SfxStyleSheet* SdrView::GetStyleSheet() const return SdrCreateView::GetStyleSheet(); } -SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, sal_uInt16 nEventKind, SdrViewEvent& rVEvt) const +SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nEventKind, SdrViewEvent& rVEvt) const { - rVEvt.bMouseDown=nEventKind==SDRMOUSEBUTTONDOWN; - rVEvt.bMouseUp=nEventKind==SDRMOUSEBUTTONUP; + rVEvt.bMouseDown=nEventKind==SdrMouseEventKind::BUTTONDOWN; + rVEvt.bMouseUp=nEventKind==SdrMouseEventKind::BUTTONUP; rVEvt.nMouseClicks=rMEvt.GetClicks(); rVEvt.nMouseMode=rMEvt.GetMode(); rVEvt.nMouseCode=rMEvt.GetButtons() | rMEvt.GetModifier(); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 9848f65e8692..1adcc3131e4a 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -264,7 +264,7 @@ bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window* return false; SdrViewEvent aVEvt; - if( !rMEvt.IsRight() && mpView->PickAnything(rMEvt,SDRMOUSEBUTTONDOWN, aVEvt) == SDRHIT_HANDLE ) + if( !rMEvt.IsRight() && mpView->PickAnything(rMEvt,SdrMouseEventKind::BUTTONDOWN, aVEvt) == SDRHIT_HANDLE ) return false; TableHitKind eHit = static_cast< SdrTableObj* >(mxTableObj.get())->CheckTableHit( pWindow->PixelToLogic(rMEvt.GetPosPixel()), maMouseDownPos.mnCol, maMouseDownPos.mnRow, 0 ); @@ -1894,7 +1894,7 @@ void SvxTableController::EditCell( const CellPos& rPos, vcl::Window* pWindow, co ::MouseEvent aMEvt( *pMouseEvent ); SdrViewEvent aVEvt; - SdrHitKind eHit = mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (eHit == SDRHIT_TEXTEDIT) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index e3b39d40f600..fbb6e061f209 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3100,7 +3100,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if (bExecHyperlinks && pSdrView) { SdrViewEvent aVEvt; - pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (aVEvt.eEvent == SDREVENT_EXECUTEURL) bExecDrawTextLink = true; @@ -4591,7 +4591,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SdrViewEvent aVEvt; if (pSdrView) - pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); if (pSdrView && aVEvt.eEvent == SDREVENT_EXECUTEURL) { @@ -4817,7 +4817,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { // When tiled rendering, single click on a shape text starts editing already. SdrViewEvent aViewEvent; - SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aViewEvent); + SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONUP, aViewEvent); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); if (eHit == SDRHIT_TEXTEDITOBJ && rMarkList.GetMarkCount() == 1) { diff --git a/sw/source/uibase/ribbar/conform.cxx b/sw/source/uibase/ribbar/conform.cxx index 95612c2697c0..cbaf34cf3d75 100644 --- a/sw/source/uibase/ribbar/conform.cxx +++ b/sw/source/uibase/ribbar/conform.cxx @@ -56,7 +56,7 @@ bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) } SdrViewEvent aVEvt; - SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); // Only new object; if not in base mode (or pure selection mode) if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() && diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index 3c122cafb818..77e34ac668fd 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -81,7 +81,7 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) } SdrViewEvent aVEvt; - SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); // Only new object, if not in the basic mode (or pure selection mode). if (rMEvt.IsLeft() && !m_pWin->IsDrawAction()) |