include/svx/svdogrp.hxx | 2 include/svx/svdview.hxx | 66 +++---- reportdesign/source/ui/report/dlgedfunc.cxx | 20 +- sc/source/ui/drawfunc/fuconpol.cxx | 6 sc/source/ui/drawfunc/fudraw.cxx | 8 sc/source/ui/drawfunc/fusel.cxx | 14 - sc/source/ui/view/gridwin5.cxx | 16 - sd/source/ui/func/fuconbez.cxx | 6 sd/source/ui/func/fudraw.cxx | 14 - sd/source/ui/func/fuediglu.cxx | 14 - sd/source/ui/func/fuformatpaintbrush.cxx | 8 sd/source/ui/func/fusel.cxx | 26 +- sd/source/ui/func/futext.cxx | 38 ++-- svx/source/form/fmshimp.cxx | 4 svx/source/svdraw/svdogrp.cxx | 28 +-- svx/source/svdraw/svdview.cxx | 254 ++++++++++++++-------------- sw/source/core/draw/dpage.cxx | 6 sw/source/uibase/docvw/edtwin.cxx | 6 sw/source/uibase/ribbar/drawbase.cxx | 10 - 19 files changed, 275 insertions(+), 271 deletions(-)
New commits: commit a572acc3dd5c0bd173ff2881b239be98f4b6ecb4 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Tue Jun 15 22:38:26 2021 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Jun 17 10:44:05 2021 +0200 svx: prefix member variables SdrViewEvent SdrView SdrObjGroup Change-Id: Ic20c9dc7b8109cb095a883f2dfcec3e4f10b2428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117352 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx index f92c5c7a1e53..eb2f620334b9 100644 --- a/include/svx/svdogrp.hxx +++ b/include/svx/svdogrp.hxx @@ -35,7 +35,7 @@ private: virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override; - Point aRefPoint; // Reference point inside the object group + Point maRefPoint; // Reference point inside the object group private: // protected destructor - due to final, make private diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index 7415e50ff7f6..7043f0f75131 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -96,30 +96,30 @@ enum class SdrMouseEventKind // helper class SdrViewEvent struct SVXCORE_DLLPUBLIC SdrViewEvent { - SdrHdl* pHdl; - SdrObject* pObj; - SdrObject* pRootObj; // mark this when SdrBeginTextEdit is executed - SdrPageView* pPV; - const SvxURLField* pURLField; - - Point aLogicPos; - SdrHitKind eHit; - SdrEventKind eEvent; - - sal_uInt16 nMouseClicks; - MouseEventModifiers nMouseMode; - sal_uInt16 nMouseCode; - sal_uInt16 nHlplIdx; - sal_uInt16 nGlueId; - - bool bMouseDown : 1; - bool bMouseUp : 1; - bool bIsAction : 1; // Action is active - bool bIsTextEdit : 1; // TextEdit runs currently - bool bAddMark : 1; - bool bUnmark : 1; - bool bPrevNextMark : 1; - bool bMarkPrev : 1; + SdrHdl* mpHdl; + SdrObject* mpObj; + SdrObject* mpRootObj; // mark this when SdrBeginTextEdit is executed + SdrPageView* mpPV; + const SvxURLField* mpURLField; + + Point maLogicPos; + SdrHitKind meHit; + SdrEventKind meEvent; + + sal_uInt16 mnMouseClicks; + MouseEventModifiers mnMouseMode; + sal_uInt16 mnMouseCode; + sal_uInt16 mnHlplIdx; + sal_uInt16 mnGlueId; + + bool mbMouseDown : 1; + bool mbMouseUp : 1; + bool mbIsAction : 1; // Action is active + bool mbIsTextEdit : 1; // TextEdit runs currently + bool mbAddMark : 1; + bool mbUnmark : 1; + bool mbPrevNextMark : 1; + bool mbMarkPrev : 1; public: SdrViewEvent(); @@ -130,7 +130,7 @@ public: class SVXCORE_DLLPUBLIC SdrDropMarkerOverlay { // The OverlayObjects - sdr::overlay::OverlayObjectList maObjects; + sdr::overlay::OverlayObjectList maObjects; void ImplCreateOverlays( const SdrView& rView, @@ -146,11 +146,11 @@ public: class SVXCORE_DLLPUBLIC SdrView : public SdrCreateView, public tools::WeakBase { - friend class SdrPageView; + friend class SdrPageView; - bool bNoExtendedMouseDispatcher : 1; - bool bNoExtendedKeyDispatcher : 1; - bool mbMasterPagePaintCaching : 1; + bool mbNoExtendedMouseDispatcher : 1; + bool mbNoExtendedKeyDispatcher : 1; + bool mbMasterPagePaintCaching : 1; SvtAccessibilityOptions maAccessibilityOptions; @@ -171,11 +171,11 @@ public: // pSdrView->DoMouseEvent(aVEvt); // SetPointer(GetPreferredPointer(...)) // CaptureMouse(...) - void EnableExtendedMouseEventDispatcher(bool bOn) { bNoExtendedMouseDispatcher = !bOn; } - bool IsExtendedMouseEventDispatcherEnabled() const { return bNoExtendedMouseDispatcher; } + void EnableExtendedMouseEventDispatcher(bool bOn) { mbNoExtendedMouseDispatcher = !bOn; } + bool IsExtendedMouseEventDispatcherEnabled() const { return mbNoExtendedMouseDispatcher; } - void EnableExtendedKeyInputDispatcher(bool bOn) { bNoExtendedKeyDispatcher=!bOn; } - bool IsExtendedKeyInputDispatcherEnabled() const { return bNoExtendedKeyDispatcher; } + void EnableExtendedKeyInputDispatcher(bool bOn) { mbNoExtendedKeyDispatcher=!bOn; } + bool IsExtendedKeyInputDispatcherEnabled() const { return mbNoExtendedKeyDispatcher; } void SetMasterPagePaintCaching(bool bOn); bool IsMasterPagePaintCaching() const { return mbMasterPagePaintCaching; } diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 961927174959..1cf3b14b58c4 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -173,8 +173,8 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) // TODO character in shapes // SdrViewEvent aVEvt; // m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - // if ( aVEvt.pRootObj && aVEvt.pRootObj->ISA(SdrTextObj) ) - // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.pRootObj),rMEvt, sal_False); + // if ( aVEvt.mpRootObj && aVEvt.pRootObj->ISA(SdrTextObj) ) + // SetInEditMode(static_cast<SdrTextObj *>(aVEvt.mpRootObj),rMEvt, sal_False); bHandled = true; } else @@ -196,8 +196,8 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) SdrViewEvent aVEvt; if ( m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt) != SdrHitKind::MarkedObject && !rMEvt.IsShift() ) m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); - if ( aVEvt.pRootObj ) - m_rView.MarkObj(aVEvt.pRootObj, pPV); + if ( aVEvt.mpRootObj ) + m_rView.MarkObj(aVEvt.mpRootObj, pPV); else m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); @@ -476,9 +476,9 @@ bool DlgEdFunc::isOverlapping(const MouseEvent& rMEvt) { SdrViewEvent aVEvt; bool bOverlapping = m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONUP, aVEvt) != SdrHitKind::NONE; - if (bOverlapping && aVEvt.pObj) + if (bOverlapping && aVEvt.mpObj) { - colorizeOverlappedObject(aVEvt.pObj); + colorizeOverlappedObject(aVEvt.mpObj); } else { @@ -596,9 +596,9 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) } } } - else if ( aVEvt.pObj && (aVEvt.pObj->GetObjIdentifier() != OBJ_CUSTOMSHAPE) && !m_bSelectionMode) + else if (aVEvt.mpObj && (aVEvt.mpObj->GetObjIdentifier() != OBJ_CUSTOMSHAPE) && !m_bSelectionMode) { - colorizeOverlappedObject(aVEvt.pObj); + colorizeOverlappedObject(aVEvt.mpObj); } else bIsSetPoint = false; @@ -721,7 +721,7 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) SdrPageView* pPV = m_rView.GetSdrPageView(); SdrViewEvent aVEvt; m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - m_rView.MarkObj(aVEvt.pRootObj, pPV); + m_rView.MarkObj(aVEvt.mpRootObj, pPV); } checkTwoClicks(rMEvt); m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView); @@ -812,7 +812,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) } else { - m_rView.SdrBeginTextEdit( aVEvt.pRootObj,m_rView.GetSdrPageView(),m_pParent ); + m_rView.SdrBeginTextEdit( aVEvt.mpRootObj,m_rView.GetSdrPageView(),m_pParent ); } } diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 3504154d7b99..22b94acfad43 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -47,10 +47,10 @@ bool FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; (void)pView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if (aVEvt.eEvent == SdrEventKind::BeginTextEdit) + if (aVEvt.meEvent == SdrEventKind::BeginTextEdit) { // Text input not allowed here - aVEvt.eEvent = SdrEventKind::BeginDragObj; + aVEvt.meEvent = SdrEventKind::BeginDragObj; pView->EnableExtendedMouseEventDispatcher(false); } else @@ -83,7 +83,7 @@ bool FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) pView->MouseButtonUp(rMEvt, pWindow->GetOutDev()); - if (aVEvt.eEvent == SdrEventKind::EndCreate) + if (aVEvt.meEvent == SdrEventKind::EndCreate) { bReturn = true; bSimple = true; // Do not pass on double-click diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 318151b1d558..ab70e9094615 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -652,13 +652,13 @@ static bool lcl_UrlHit( const SdrView* pView, const Point& rPosPixel, const vcl: MouseEvent aMEvt( rPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT ); SdrHitKind eHit = pView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); - if ( eHit != SdrHitKind::NONE && aVEvt.pObj != nullptr ) + if (eHit != SdrHitKind::NONE && aVEvt.mpObj != nullptr) { - if ( SvxIMapInfo::GetIMapInfo( aVEvt.pObj ) && SvxIMapInfo::GetHitIMapObject( - aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), pWindow->GetOutDev() ) ) + if ( SvxIMapInfo::GetIMapInfo(aVEvt.mpObj) && SvxIMapInfo::GetHitIMapObject( + aVEvt.mpObj, pWindow->PixelToLogic(rPosPixel), pWindow->GetOutDev() ) ) return true; - if ( aVEvt.eEvent == SdrEventKind::ExecuteUrl ) + if (aVEvt.meEvent == SdrEventKind::ExecuteUrl) return true; } diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index 52a5b9a4be17..6c8f753d4974 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -203,22 +203,22 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; if ( !bAlt && pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ) != SdrHitKind::NONE && - aVEvt.pObj != nullptr ) + aVEvt.mpObj != nullptr ) { - if ( SvxIMapInfo::GetIMapInfo( aVEvt.pObj ) ) // ImageMap + if ( SvxIMapInfo::GetIMapInfo( aVEvt.mpObj ) ) // ImageMap { const IMapObject* pIMapObj = - SvxIMapInfo::GetHitIMapObject( aVEvt.pObj, aMDPos, pWindow->GetOutDev() ); + SvxIMapInfo::GetHitIMapObject( aVEvt.mpObj, aMDPos, pWindow->GetOutDev() ); if ( pIMapObj && !pIMapObj->GetURL().isEmpty() ) { sURL = pIMapObj->GetURL(); sTarget = pIMapObj->GetTarget(); } } - if ( aVEvt.eEvent == SdrEventKind::ExecuteUrl && aVEvt.pURLField ) // URL + if ( aVEvt.meEvent == SdrEventKind::ExecuteUrl && aVEvt.mpURLField ) // URL { - sURL = aVEvt.pURLField->GetURL(); - sTarget = aVEvt.pURLField->GetTargetFrame(); + sURL = aVEvt.mpURLField->GetURL(); + sTarget = aVEvt.mpURLField->GetTargetFrame(); } } @@ -456,7 +456,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = pView->PickAnything( rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); - if (eHit != SdrHitKind::NONE && aVEvt.pObj == pObj) + if (eHit != SdrHitKind::NONE && aVEvt.mpObj == pObj) { sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 01a1db0d5fe6..21ecc7a1e018 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -252,14 +252,14 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) MouseEvent aMEvt( aPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT ); SdrHitKind eHit = pDrView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt ); - if ( eHit != SdrHitKind::NONE && aVEvt.pObj != nullptr ) + if ( eHit != SdrHitKind::NONE && aVEvt.mpObj != nullptr ) { // URL for IMapObject below Pointer is help text - if ( SvxIMapInfo::GetIMapInfo( aVEvt.pObj ) ) + if (SvxIMapInfo::GetIMapInfo(aVEvt.mpObj)) { Point aLogicPos = PixelToLogic( aPosPixel ); IMapObject* pIMapObj = SvxIMapInfo::GetHitIMapObject( - aVEvt.pObj, aLogicPos, GetOutDev() ); + aVEvt.mpObj, aLogicPos, GetOutDev() ); if ( pIMapObj ) { @@ -267,16 +267,16 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) aHelpText = pIMapObj->GetAltText(); if (aHelpText.isEmpty()) aHelpText = SfxHelp::GetURLHelpText(pIMapObj->GetURL()); - aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect()); + aPixRect = LogicToPixel(aVEvt.mpObj->GetLogicRect()); } } // URL in shape text or at shape itself (URL in text overrides object URL) if ( aHelpText.isEmpty() ) { - if( aVEvt.eEvent == SdrEventKind::ExecuteUrl ) + if( aVEvt.meEvent == SdrEventKind::ExecuteUrl ) { - aHelpText = SfxHelp::GetURLHelpText(aVEvt.pURLField->GetURL()); - aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect()); + aHelpText = SfxHelp::GetURLHelpText(aVEvt.mpURLField->GetURL()); + aPixRect = LogicToPixel(aVEvt.mpObj->GetLogicRect()); } else { @@ -294,7 +294,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); if ( pInfo && (pInfo->GetHlink().getLength() > 0) ) { - aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect()); + aPixRect = LogicToPixel(aVEvt.mpObj->GetLogicRect()); aHelpText = SfxHelp::GetURLHelpText(pInfo->GetHlink()); } } diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index e9eb1b2bacef..6ab9bf17c669 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -154,10 +154,10 @@ bool FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt) mpView->SetEditMode(SdrViewEditMode::Create); } - if (aVEvt.eEvent == SdrEventKind::BeginTextEdit) + if (aVEvt.meEvent == SdrEventKind::BeginTextEdit) { // here, we do not allow text input - aVEvt.eEvent = SdrEventKind::BeginDragObj; + aVEvt.meEvent = SdrEventKind::BeginDragObj; mpView->EnableExtendedMouseEventDispatcher(false); } else @@ -207,7 +207,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt ) mpView->MouseButtonUp(rMEvt, mpWindow->GetOutDev()); } - if (aVEvt.eEvent == SdrEventKind::EndCreate) + if (aVEvt.meEvent == SdrEventKind::EndCreate) { bReturn = true; diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 18cd90fb77e6..8d489d81b8e2 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -531,16 +531,16 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) } else if (eHit == SdrHitKind::UnmarkedObject) { - pObj = aVEvt.pObj; + pObj = aVEvt.mpObj; } else if (eHit == SdrHitKind::TextEditObj && dynamic_cast< const FuSelection *>( this ) != nullptr) { - sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = aVEvt.mpObj->GetObjIdentifier(); if ( nSdrObjKind != OBJ_TEXT && nSdrObjKind != OBJ_TITLETEXT && nSdrObjKind != OBJ_OUTLINETEXT && - aVEvt.pObj->IsEmptyPresObj() ) + aVEvt.mpObj->IsEmptyPresObj() ) { pObj = nullptr; bDefPointer = false; @@ -690,7 +690,7 @@ bool FuDraw::RequestHelp(const HelpEvent& rHEvt) SdrHitKind eHit = mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - SdrObject* pObj = aVEvt.pObj; + SdrObject* pObj = aVEvt.mpObj; if (eHit != SdrHitKind::NONE && pObj != nullptr) { @@ -729,12 +729,12 @@ bool FuDraw::SetHelpText(const SdrObject* pObj, const Point& rPosPixel, const Sd Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(rPosPixel))); IMapObject* pIMapObj = SvxIMapInfo::GetHitIMapObject(pObj, aPos); - if (!rVEvt.pURLField && !pIMapObj) + if (!rVEvt.mpURLField && !pIMapObj) return false; OUString aURL; - if (rVEvt.pURLField) - aURL = INetURLObject::decode(rVEvt.pURLField->GetURL(), + if (rVEvt.mpURLField) + aURL = INetURLObject::decode(rVEvt.mpURLField->GetURL(), INetURLObject::DecodeMechanism::WithCharset); else if (pIMapObj) { diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx index 25f4b9cf4b66..6a793db7a60c 100644 --- a/sd/source/ui/func/fuediglu.cxx +++ b/sd/source/ui/func/fuediglu.cxx @@ -99,18 +99,18 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt) if (eHit == SdrHitKind::Handle) { // drag handle - SdrHdl* pHdl = aVEvt.pHdl; + SdrHdl* pHdl = aVEvt.mpHdl; - if (mpView->IsGluePointMarked(aVEvt.pObj, aVEvt.nGlueId) && rMEvt.IsShift()) + if (mpView->IsGluePointMarked(aVEvt.mpObj, aVEvt.mnGlueId) && rMEvt.IsShift()) { - mpView->UnmarkGluePoint(aVEvt.pObj, aVEvt.nGlueId); + mpView->UnmarkGluePoint(aVEvt.mpObj, aVEvt.mnGlueId); pHdl = nullptr; } if (pHdl) { // drag handle - mpView->BegDragObj(aMDPos, nullptr, aVEvt.pHdl, nDrgLog); + mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog); } } else if (eHit == SdrHitKind::MarkedObject && mpView->IsInsGluePointMode()) @@ -137,8 +137,8 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt) if (!rMEvt.IsShift()) mpView->UnmarkAllGluePoints(); - mpView->MarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, false); - SdrHdl* pHdl = mpView->GetGluePointHdl(aVEvt.pObj, aVEvt.nGlueId); + mpView->MarkGluePoint(aVEvt.mpObj, aVEvt.mnGlueId, false); + SdrHdl* pHdl = mpView->GetGluePointHdl(aVEvt.mpObj, aVEvt.mnGlueId); if (pHdl) { @@ -171,7 +171,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt) (!rMEvt.IsShift() || eHit == SdrHitKind::MarkedObject)) { // move object - mpView->BegDragObj(aMDPos, nullptr, aVEvt.pHdl, nDrgLog); + mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog); } else if (mpView->AreObjectsMarked()) { diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 437af13d0270..c7a3ca604a6c 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -91,7 +91,7 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if( (eHit == SdrHitKind::TextEdit) || (eHit == SdrHitKind::TextEditObj && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != nullptr ) )) + if( (eHit == SdrHitKind::TextEdit) || (eHit == SdrHitKind::TextEditObj && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast<sdr::table::SdrTableObj*>(aVEvt.mpObj) != nullptr ) )) { SdrPageView* pPV=nullptr; sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); @@ -121,13 +121,13 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) return FuText::MouseButtonDown(aMEvt); } - if( aVEvt.pObj == nullptr ) - aVEvt.pObj = pPickObj; + if (aVEvt.mpObj == nullptr) + aVEvt.mpObj = pPickObj; } unmarkimpl( mpView ); - if( aVEvt.pObj ) + if (aVEvt.mpObj) { sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, false/*bToggle*/); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 138978339afb..045a61a725bc 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -192,7 +192,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if ( eHit == SdrHitKind::TextEditObj && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != nullptr ) ) + if (eHit == SdrHitKind::TextEditObj && (mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >(aVEvt.mpObj) != nullptr)) { bTextEdit = true; } @@ -248,13 +248,13 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } else if ( bTextEdit ) { - sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = aVEvt.mpObj->GetObjIdentifier(); - if (aVEvt.pObj->GetObjInventor() == SdrInventor::Default && + if (aVEvt.mpObj->GetObjInventor() == SdrInventor::Default && (nSdrObjKind == OBJ_TEXT || nSdrObjKind == OBJ_TITLETEXT || nSdrObjKind == OBJ_OUTLINETEXT || - !aVEvt.pObj->IsEmptyPresObj())) + !aVEvt.mpObj->IsEmptyPresObj())) { // Seamless Editing: branch to text input if (!rMEvt.IsShift()) @@ -269,7 +269,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } } else if ( !rMEvt.IsMod2() && rMEvt.GetClicks() == 1 && - aVEvt.eEvent == SdrEventKind::ExecuteUrl ) + aVEvt.meEvent == SdrEventKind::ExecuteUrl ) { mpWindow->ReleaseMouse(); @@ -277,14 +277,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (comphelper::LibreOfficeKit::isActive()) { SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); - rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.pURLField->GetURL().toUtf8().getStr()); + rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.mpURLField->GetURL().toUtf8().getStr()); return true; } if (!lcl_followHyperlinkAllowed(rMEvt)) return true; - SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL()); + SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.mpURLField->GetURL()); SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName()); SfxBoolItem aBrowseItem( SID_BROWSE, true ); SfxViewFrame* pFrame = mpViewShell->GetViewFrame(); @@ -458,13 +458,13 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == SdrHdlKind::BezierWeight) + if (eHit == SdrHitKind::Handle && aVEvt.mpHdl->GetKind() == SdrHdlKind::BezierWeight) { /****************************************************************** * Drag Handle ******************************************************************/ if ( ! rMEvt.IsRight()) - mpView->BegDragObj(aMDPos, nullptr, aVEvt.pHdl, nDrgLog); + mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog); } else if (eHit == SdrHitKind::MarkedObject && nEditMode == SID_BEZIER_INSERT) { @@ -497,7 +497,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) /****************************************************************** * Select glue point ******************************************************************/ - if (!mpView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift()) + if (!mpView->IsPointMarked(*aVEvt.mpHdl) || rMEvt.IsShift()) { if (!rMEvt.IsShift()) { @@ -506,9 +506,9 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } else { - if (mpView->IsPointMarked(*aVEvt.pHdl)) + if (mpView->IsPointMarked(*aVEvt.mpHdl)) { - mpView->UnmarkPoint(*aVEvt.pHdl); + mpView->UnmarkPoint(*aVEvt.mpHdl); pHdl = nullptr; } else @@ -563,7 +563,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { // Move object if ( ! rMEvt.IsRight()) - mpView->BegDragObj(aMDPos, nullptr, aVEvt.pHdl, nDrgLog); + mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog); } else if (mpView->AreObjectsMarked()) { diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index ec04594d3d95..945965e1b951 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -194,9 +194,9 @@ void FuText::DoExecute( SfxRequest& ) SdrPageView* pPV = mpView->GetSdrPageView(); SdrViewEvent aVEvt; mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - mpView->MarkObj(aVEvt.pRootObj, pPV); + mpView->MarkObj(aVEvt.mpRootObj, pPV); - mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) ); + mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.mpObj ) ); } else if (mpView->AreObjectsMarked()) { @@ -268,8 +268,8 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if (auto pURLField = dynamic_cast< const SvxURLField *>( pField )) { eHit = SdrHitKind::MarkedObject; - aVEvt.eEvent = SdrEventKind::ExecuteUrl; - aVEvt.pURLField = pURLField; + aVEvt.meEvent = SdrEventKind::ExecuteUrl; + aVEvt.mpURLField = pURLField; } } } @@ -322,7 +322,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if (eHit == SdrHitKind::TextEditObj && xSelectionController.is()) { const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); - if (rMarkList.GetMarkCount() == 1 && rMarkList.GetMark(0)->GetMarkedSdrObj() == aVEvt.pRootObj) + if (rMarkList.GetMarkCount() == 1 && rMarkList.GetMark(0)->GetMarkedSdrObj() == aVEvt.mpRootObj) bMarkChanges = false; } @@ -339,7 +339,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) } } - if ( aVEvt.eEvent == SdrEventKind::ExecuteUrl || + if ( aVEvt.meEvent == SdrEventKind::ExecuteUrl || eHit == SdrHitKind::Handle || eHit == SdrHitKind::MarkedObject || eHit == SdrHitKind::TextEditObj || @@ -352,20 +352,20 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) /* hit text of unmarked object: select object and set to EditMode */ if (bMarkChanges) - mpView->MarkObj(aVEvt.pRootObj, pPV); + mpView->MarkObj(aVEvt.mpRootObj, pPV); - if (auto pSdrTextObj = dynamic_cast<SdrTextObj *>( aVEvt.pObj )) + if (auto pSdrTextObj = dynamic_cast<SdrTextObj*>(aVEvt.mpObj)) { mxTextObj.reset( pSdrTextObj ); } SetInEditMode(rMEvt, true); } - else if (aVEvt.eEvent == SdrEventKind::ExecuteUrl && !rMEvt.IsMod2()) + else if (aVEvt.meEvent == SdrEventKind::ExecuteUrl && !rMEvt.IsMod2()) { // execute URL mpWindow->ReleaseMouse(); - SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL()); + SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.mpURLField->GetURL()); SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName()); SfxBoolItem aBrowseItem( SID_BROWSE, true ); SfxViewFrame* pFrame = mpViewShell->GetViewFrame(); @@ -393,7 +393,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) // #i78748# // do the EndTextEdit first, it will delete the handles and force a - // recreation. This will make aVEvt.pHdl to point to a deleted handle, + // recreation. This will make aVEvt.mpHdl to point to a deleted handle, // thus it is necessary to reset it and to get it again. // #i112855# @@ -406,23 +406,23 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) mpView->SdrEndTextEdit(); bJustEndedEdit = true; - if(aVEvt.pHdl) + if(aVEvt.mpHdl) { // force new handle identification, the pointer will be dead here // since SdrEndTextEdit has reset (deleted) the handles. - aVEvt.pHdl = nullptr; + aVEvt.mpHdl = nullptr; mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); } } - if (!aVEvt.pHdl) + if (!aVEvt.mpHdl) { if( eHit == SdrHitKind::UnmarkedObject ) { if ( !rMEvt.IsShift() ) mpView->UnmarkAll(); - mpView->MarkObj(aVEvt.pRootObj, pPV); + mpView->MarkObj(aVEvt.mpRootObj, pPV); } // Drag object @@ -437,7 +437,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if( (eHit == SdrHitKind::Handle) || (eHit == SdrHitKind::MarkedObject) ) { sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() ); - mpView->BegDragObj(aMDPos, nullptr, aVEvt.pHdl, nDrgLog); + mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog); } } bReturn = true; @@ -779,7 +779,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) SdrPageView* pPV2 = mpView->GetSdrPageView(); SdrViewEvent aVEvt; mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - mpView->MarkObj(aVEvt.pRootObj, pPV2); + mpView->MarkObj(aVEvt.mpRootObj, pPV2); } if ( !mxTextObj.is() && mpView ) @@ -1273,9 +1273,9 @@ void FuText::ReceiveRequest(SfxRequest& rReq) SdrPageView* pPV = mpView->GetSdrPageView(); SdrViewEvent aVEvt; mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - mpView->MarkObj(aVEvt.pRootObj, pPV); + mpView->MarkObj(aVEvt.mpRootObj, pPV); - if (auto pSdrTextObj = dynamic_cast< SdrTextObj *>( aVEvt.pObj )) + if (auto pSdrTextObj = dynamic_cast<SdrTextObj*>(aVEvt.mpObj)) { mxTextObj.reset( pSdrTextObj ); } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index a83625b68479..b9946f270619 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3879,9 +3879,9 @@ void FmXFormShell::handleShowPropertiesRequest_Lock() void FmXFormShell::handleMouseButtonDown_Lock(const SdrViewEvent& _rViewEvent) { // catch simple double clicks - if ( ( _rViewEvent.nMouseClicks == 2 ) && ( _rViewEvent.nMouseCode == MOUSE_LEFT ) ) + if (_rViewEvent.mnMouseClicks == 2 && _rViewEvent.mnMouseCode == MOUSE_LEFT) { - if ( _rViewEvent.eHit == SdrHitKind::MarkedObject ) + if ( _rViewEvent.meHit == SdrHitKind::MarkedObject ) { if (onlyControlsAreMarked_Lock()) ShowSelectionProperties_Lock( true ); diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 620dfc154cf8..ef53f9b58ed1 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -50,7 +50,7 @@ std::unique_ptr<sdr::contact::ViewContact> SdrObjGroup::CreateObjectSpecificView SdrObjGroup::SdrObjGroup(SdrModel& rSdrModel) : SdrObject(rSdrModel), SdrObjList(), - aRefPoint(0, 0) + maRefPoint(0, 0) { m_bClosedObj=false; } @@ -76,7 +76,7 @@ SdrObjGroup::SdrObjGroup(SdrModel& rSdrModel, SdrObjGroup const & rSource) } // copy local parameters - aRefPoint = rSource.aRefPoint; + maRefPoint = rSource.maRefPoint; } SdrObjGroup::~SdrObjGroup() @@ -348,7 +348,7 @@ void SdrObjGroup::NbcSetLogicRect(const tools::Rectangle& rRect) void SdrObjGroup::NbcMove(const Size& rSiz) { - aRefPoint.Move(rSiz); + maRefPoint.Move(rSiz); const size_t nObjCount(GetObjCount()); if(0 != nObjCount) @@ -385,7 +385,7 @@ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Frac } } - ResizePoint(aRefPoint,rRef,xFact,yFact); + ResizePoint(maRefPoint, rRef, xFact, yFact); const size_t nObjCount(GetObjCount()); if(0 != nObjCount) @@ -407,7 +407,7 @@ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Frac void SdrObjGroup::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs) { SetGlueReallyAbsolute(true); - RotatePoint(aRefPoint,rRef,sn,cs); + RotatePoint(maRefPoint, rRef, sn, cs); const size_t nObjCount(GetObjCount()); for (size_t i=0; i<nObjCount; ++i) @@ -424,7 +424,7 @@ void SdrObjGroup::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, doub void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); - MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc! + MirrorPoint(maRefPoint, rRef1, rRef2); // implementation missing in SvdEtc! const size_t nObjCount(GetObjCount()); for (size_t i=0; i<nObjCount; ++i) @@ -441,7 +441,7 @@ void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2) void SdrObjGroup::NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear) { SetGlueReallyAbsolute(true); - ShearPoint(aRefPoint,rRef,tn); + ShearPoint(maRefPoint, rRef, tn); const size_t nObjCount(GetObjCount()); for (size_t i=0; i<nObjCount; ++i) @@ -459,7 +459,7 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt) { m_aAnchor=rPnt; Size aSiz(rPnt.X()-m_aAnchor.X(),rPnt.Y()-m_aAnchor.Y()); - aRefPoint.Move(aSiz); + maRefPoint.Move(aSiz); const size_t nObjCount(GetObjCount()); for (size_t i=0; i<nObjCount; ++i) @@ -516,7 +516,7 @@ void SdrObjGroup::Move(const Size& rSiz) return; tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - aRefPoint.Move(rSiz); + maRefPoint.Move(rSiz); const size_t nObjCount(GetObjCount()); if(0 != nObjCount) @@ -569,7 +569,7 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio } } tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - ResizePoint(aRefPoint,rRef,xFact,yFact); + ResizePoint(maRefPoint, rRef, xFact, yFact); const size_t nObjCount(GetObjCount()); if(0 != nObjCount) @@ -608,7 +608,7 @@ void SdrObjGroup::Rotate(const Point& rRef, Degree100 nAngle, double sn, double SetGlueReallyAbsolute(true); tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - RotatePoint(aRefPoint,rRef,sn,cs); + RotatePoint(maRefPoint, rRef, sn, cs); // move the connectors first, everything else afterwards const size_t nObjCount(GetObjCount()); @@ -638,7 +638,7 @@ void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc! + MirrorPoint(maRefPoint, rRef1, rRef2); // implementation missing in SvdEtc! // move the connectors first, everything else afterwards const size_t nObjCount(GetObjCount()); @@ -671,7 +671,7 @@ void SdrObjGroup::Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVS SetGlueReallyAbsolute(true); tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - ShearPoint(aRefPoint,rRef,tn); + ShearPoint(maRefPoint, rRef, tn); // move the connectors first, everything else afterwards const size_t nObjCount(GetObjCount()); @@ -704,7 +704,7 @@ void SdrObjGroup::SetAnchorPos(const Point& rPnt) bool bChg=m_aAnchor!=rPnt; m_aAnchor=rPnt; Size aSiz(rPnt.X()-m_aAnchor.X(),rPnt.Y()-m_aAnchor.Y()); - aRefPoint.Move(aSiz); + maRefPoint.Move(aSiz); // move the connectors first, everything else afterwards const size_t nObjCount(GetObjCount()); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 0cfe786c8799..7f145de59d84 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -52,26 +52,26 @@ SdrViewEvent::SdrViewEvent() -: pHdl(nullptr), - pObj(nullptr), - pRootObj(nullptr), - pPV(nullptr), - pURLField(nullptr), - eHit(SdrHitKind::NONE), - eEvent(SdrEventKind::NONE), - nMouseClicks(0), - nMouseMode(MouseEventModifiers::NONE), - nMouseCode(0), - nHlplIdx(0), - nGlueId(0), - bMouseDown(false), - bMouseUp(false), - bIsAction(false), - bIsTextEdit(false), - bAddMark(false), - bUnmark(false), - bPrevNextMark(false), - bMarkPrev(false) + : mpHdl(nullptr), + mpObj(nullptr), + mpRootObj(nullptr), + mpPV(nullptr), + mpURLField(nullptr), + meHit(SdrHitKind::NONE), + meEvent(SdrEventKind::NONE), + mnMouseClicks(0), + mnMouseMode(MouseEventModifiers::NONE), + mnMouseCode(0), + mnHlplIdx(0), + mnGlueId(0), + mbMouseDown(false), + mbMouseUp(false), + mbIsAction(false), + mbIsTextEdit(false), + mbAddMark(false), + mbUnmark(false), + mbPrevNextMark(false), + mbMarkPrev(false) { } @@ -148,8 +148,8 @@ SdrView::SdrView( SdrModel& rSdrModel, OutputDevice* pOut) : SdrCreateView(rSdrModel, pOut), - bNoExtendedMouseDispatcher(false), - bNoExtendedKeyDispatcher(false), + mbNoExtendedMouseDispatcher(false), + mbNoExtendedKeyDispatcher(false), mbMasterPagePaintCaching(false) { maAccessibilityOptions.AddListener(this); @@ -252,11 +252,11 @@ void SdrView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nEventKind, SdrViewEvent& rVEvt) const { - rVEvt.bMouseDown=nEventKind==SdrMouseEventKind::BUTTONDOWN; - rVEvt.bMouseUp=nEventKind==SdrMouseEventKind::BUTTONUP; - rVEvt.nMouseClicks=rMEvt.GetClicks(); - rVEvt.nMouseMode=rMEvt.GetMode(); - rVEvt.nMouseCode=rMEvt.GetButtons() | rMEvt.GetModifier(); + rVEvt.mbMouseDown = nEventKind==SdrMouseEventKind::BUTTONDOWN; + rVEvt.mbMouseUp = nEventKind==SdrMouseEventKind::BUTTONUP; + rVEvt.mnMouseClicks = rMEvt.GetClicks(); + rVEvt.mnMouseMode = rMEvt.GetMode(); + rVEvt.mnMouseCode = rMEvt.GetButtons() | rMEvt.GetModifier(); const OutputDevice* pOut=mpActualOutDev; if (pOut==nullptr) { @@ -264,7 +264,7 @@ SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nEve } Point aPnt(rMEvt.GetPosPixel()); if (pOut!=nullptr) aPnt=pOut->PixelToLogic(aPnt); - rVEvt.aLogicPos=aPnt; + rVEvt.maLogicPos = aPnt; return PickAnything(aPnt,rVEvt); } @@ -310,9 +310,9 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co bool bIsTextEdit=IsTextEdit(); bool bTextEditHit=IsTextEditHit(aLocalLogicPosition); bool bTextEditSel=IsTextEditInSelectionMode(); - bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0; - bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0; - bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0; + bool bShift = (rVEvt.mnMouseCode & KEY_SHIFT) != 0; + bool bCtrl = (rVEvt.mnMouseCode & KEY_MOD1) != 0; + bool bAlt = (rVEvt.mnMouseCode & KEY_MOD2) != 0; SdrHitKind eHit=SdrHitKind::NONE; SdrHdl* pHdl=pOut!=nullptr && !bTextEditSel ? PickHandle(aLocalLogicPosition) : nullptr; SdrPageView* pPV=nullptr; @@ -424,7 +424,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co if (bRoot || bMid || bDeep) { // Priorities: 1. Root, 2. Mid, 3. Deep - rVEvt.pRootObj=pObj; + rVEvt.mpRootObj = pObj; if (!bRoot) pObj=pMidObj; if (!bRoot && !bMid) pObj=pHitObj; eHit=SdrHitKind::Macro; @@ -496,7 +496,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co // set HitKind and pointer to local static instance in the Event // to comply to old stuff eHit = SdrHitKind::UrlField; - rVEvt.pURLField = &aSvxURLField; + rVEvt.mpURLField = &aSvxURLField; } } } @@ -544,7 +544,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co if (bTEHit) { - rVEvt.pRootObj=pObj; + rVEvt.mpRootObj=pObj; pObj=pHitObj; eHit=SdrHitKind::TextEditObj; } @@ -555,10 +555,10 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co pObj=nullptr; pPV=nullptr; } - bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0; - bool bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0; - bool bMouseDown=rVEvt.bMouseDown; - bool bMouseUp=rVEvt.bMouseUp; + bool bMouseLeft = (rVEvt.mnMouseCode & MOUSE_LEFT) != 0; + bool bMouseRight = (rVEvt.mnMouseCode & MOUSE_RIGHT) != 0; + bool bMouseDown = rVEvt.mbMouseDown; + bool bMouseUp = rVEvt.mbMouseUp; SdrEventKind eEvent=SdrEventKind::NONE; bool bIsAction=IsAction(); @@ -587,7 +587,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co if (!maDragStat.IsMinMoved()) { eEvent=SdrEventKind::BrkMark; - rVEvt.bAddMark=MODKEY_MultiMark; + rVEvt.mbAddMark = MODKEY_MultiMark; } } } @@ -603,9 +603,9 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co } else if (bMouseDown && bMouseLeft) { - if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=nullptr && pHitObj!=nullptr && pHitObj->HasTextEdit() && eHit==SdrHitKind::MarkedObject) + if (rVEvt.mnMouseClicks == 2 && rVEvt.mnMouseCode == MOUSE_LEFT && pObj!=nullptr && pHitObj!=nullptr && pHitObj->HasTextEdit() && eHit==SdrHitKind::MarkedObject) { - rVEvt.pRootObj=pObj; + rVEvt.mpRootObj = pObj; pObj=pHitObj; eEvent=SdrEventKind::BeginTextEdit; } @@ -620,7 +620,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co else if (eHit==SdrHitKind::Gluepoint) { eEvent=SdrEventKind::MarkGluePoint; // AddMark+Drag - rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep + rVEvt.mbAddMark = MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep } else if (eHit==SdrHitKind::Handle) { @@ -633,14 +633,14 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co eEvent=bGlue ? SdrEventKind::MarkGluePoint : SdrEventKind::MarkPoint; if (MODKEY_DeepMark) { - rVEvt.bAddMark=true; - rVEvt.bPrevNextMark=true; - rVEvt.bMarkPrev=MODKEY_DeepBackw; + rVEvt.mbAddMark = true; + rVEvt.mbPrevNextMark = true; + rVEvt.mbMarkPrev = MODKEY_DeepBackw; } else if (MODKEY_MultiMark) { - rVEvt.bAddMark=true; - rVEvt.bUnmark=bMarked; // Toggle + rVEvt.mbAddMark = true; + rVEvt.mbUnmark = bMarked; // Toggle if (bGlue) { pObj=pHdl->GetObj(); @@ -709,31 +709,33 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co if (eEvent==SdrEventKind::MarkObj) { - rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep - rVEvt.bPrevNextMark=MODKEY_DeepMark; - rVEvt.bMarkPrev=MODKEY_DeepMark && MODKEY_DeepBackw; + rVEvt.mbAddMark = MODKEY_MultiMark || MODKEY_DeepMark; // if not hit with Deep + rVEvt.mbPrevNextMark = MODKEY_DeepMark; + rVEvt.mbMarkPrev = MODKEY_DeepMark && MODKEY_DeepBackw; } if (eEvent==SdrEventKind::BeginMark) { - rVEvt.bAddMark=MODKEY_MultiMark; - rVEvt.bUnmark=MODKEY_Unmark; + rVEvt.mbAddMark = MODKEY_MultiMark; + rVEvt.mbUnmark = MODKEY_Unmark; } } - rVEvt.bIsAction=bIsAction; - rVEvt.bIsTextEdit=bIsTextEdit; - rVEvt.aLogicPos=aLocalLogicPosition; - rVEvt.pHdl=pHdl; - rVEvt.pObj=pObj; - if(rVEvt.pRootObj==nullptr) - rVEvt.pRootObj=pObj; - rVEvt.pPV=pPV; - rVEvt.nHlplIdx=nHlplIdx; - rVEvt.nGlueId=nGlueId; - rVEvt.eHit=eHit; - rVEvt.eEvent=eEvent; + rVEvt.mbIsAction = bIsAction; + rVEvt.mbIsTextEdit = bIsTextEdit; + rVEvt.maLogicPos = aLocalLogicPosition; + rVEvt.mpHdl = pHdl; + rVEvt.mpObj = pObj; + if (rVEvt.mpRootObj == nullptr) + rVEvt.mpRootObj = pObj; + rVEvt.mpPV = pPV; + rVEvt.mnHlplIdx = nHlplIdx; + rVEvt.mnGlueId = nGlueId; + rVEvt.meHit = eHit; + rVEvt.meEvent = eEvent; #ifdef DGB_UTIL - if (rVEvt.pRootObj!=NULL) { - if (rVEvt.pRootObj->getParentSdrObjListFromSdrObject()!=rVEvt.pPV->GetObjList()) { + if (rVEvt.mpRootObj != nullptr) + { + if (rVEvt.mpRootObj->getParentSdrObjListFromSdrObject() != rVEvt.mpPV->GetObjList()) + { OSL_FAIL("SdrView::PickAnything(): pRootObj->getParentSdrObjListFromSdrObject()!=pPV->GetObjList() !"); } } @@ -744,15 +746,15 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) { bool bRet=false; - SdrHitKind eHit=rVEvt.eHit; - Point aLogicPos(rVEvt.aLogicPos); - - bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0; - bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0; - bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0; - bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0; - bool bMouseDown=rVEvt.bMouseDown; - bool bMouseUp=rVEvt.bMouseUp; + SdrHitKind eHit = rVEvt.meHit; + Point aLogicPos(rVEvt.maLogicPos); + + bool bShift = (rVEvt.mnMouseCode & KEY_SHIFT) != 0; + bool bCtrl = (rVEvt.mnMouseCode & KEY_MOD1) != 0; + bool bAlt = (rVEvt.mnMouseCode & KEY_MOD2) != 0; + bool bMouseLeft = (rVEvt.mnMouseCode & MOUSE_LEFT) != 0; + bool bMouseDown = rVEvt.mbMouseDown; + bool bMouseUp = rVEvt.mbMouseUp; if (bMouseDown) { if (bMouseLeft) maDragStat.SetMouseDown(true); } else if (bMouseUp) { @@ -778,12 +780,13 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) SetResizeAtCenter(MODKEY_Center); SetCrookAtCenter(MODKEY_Center); #endif - if (bMouseLeft && bMouseDown && rVEvt.bIsTextEdit && (eHit==SdrHitKind::UnmarkedObject || eHit==SdrHitKind::NONE)) { + if (bMouseLeft && bMouseDown && rVEvt.mbIsTextEdit && (eHit==SdrHitKind::UnmarkedObject || eHit==SdrHitKind::NONE)) { SdrEndTextEdit(); // User has clicked beneath object, exit edit mode. // pHdl is invalid, then, that shouldn't matter, though, as we expect // pHdl==NULL (because of eHit). } - switch (rVEvt.eEvent) { + switch (rVEvt.meEvent) + { case SdrEventKind::NONE: bRet=false; break; case SdrEventKind::TextEdit: bRet=false; break; // Events handled by the OutlinerView are not taken into account here. case SdrEventKind::MoveAction: MovAction(aLogicPos); bRet=true; break; @@ -792,31 +795,32 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) case SdrEventKind::EndMark : EndAction(); bRet=true; break; case SdrEventKind::BrkMark : { BrkAction(); - if (!MarkObj(aLogicPos,mnHitTolLog,rVEvt.bAddMark)) { + if (!MarkObj(aLogicPos, mnHitTolLog, rVEvt.mbAddMark)) + { // No object hit. Do the following: // 1. deselect any selected glue points // 2. deselect any selected polygon points // 3. deselect any selected objects - if (!rVEvt.bAddMark) UnmarkAll(); + if (!rVEvt.mbAddMark) UnmarkAll(); } bRet=true; } break; case SdrEventKind::EndCreate: { // if necessary, MarkObj SdrCreateCmd eCmd=SdrCreateCmd::NextPoint; if (MODKEY_PolyPoly) eCmd=SdrCreateCmd::NextObject; - if (rVEvt.nMouseClicks>1) eCmd=SdrCreateCmd::ForceEnd; + if (rVEvt.mnMouseClicks > 1) eCmd=SdrCreateCmd::ForceEnd; if (!EndCreateObj(eCmd)) { // Don't evaluate event for Create? -> Select if (eHit==SdrHitKind::UnmarkedObject || eHit==SdrHitKind::TextEdit) { - MarkObj(rVEvt.pRootObj,rVEvt.pPV); + MarkObj(rVEvt.mpRootObj, rVEvt.mpPV); if (eHit==SdrHitKind::TextEdit) { bool bRet2(mpActualOutDev && OUTDEV_WINDOW == mpActualOutDev->GetOutDevType() && - SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, mpActualOutDev->GetOwnerWindow())); + SdrBeginTextEdit(rVEvt.mpObj, rVEvt.mpPV, mpActualOutDev->GetOwnerWindow())); if(bRet2) { - MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos), - 1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode); + MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos), 1, + rVEvt.mnMouseMode,rVEvt.mnMouseCode,rVEvt.mnMouseCode); OutlinerView* pOLV=GetTextEditOutlinerView(); if (pOLV!=nullptr) { @@ -834,14 +838,14 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) ForceMarkedObjToAnotherPage(); // TODO: Undo+bracing missing! } break; case SdrEventKind::MarkObj: { // + (if applicable) BegDrag - if (!rVEvt.bAddMark) UnmarkAllObj(); - bool bUnmark=rVEvt.bUnmark; - if (rVEvt.bPrevNextMark) { - bRet=MarkNextObj(aLogicPos,mnHitTolLog,rVEvt.bMarkPrev); + if (!rVEvt.mbAddMark) UnmarkAllObj(); + bool bUnmark = rVEvt.mbUnmark; + if (rVEvt.mbPrevNextMark) { + bRet=MarkNextObj(aLogicPos, mnHitTolLog, rVEvt.mbMarkPrev); } else { SortMarkedObjects(); const size_t nCount0=GetMarkedObjectCount(); - bRet=MarkObj(aLogicPos,mnHitTolLog,rVEvt.bAddMark); + bRet=MarkObj(aLogicPos, mnHitTolLog, rVEvt.mbAddMark); SortMarkedObjects(); const size_t nCount1=GetMarkedObjectCount(); bUnmark=nCount1<nCount0; @@ -852,44 +856,44 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) } } break; case SdrEventKind::MarkPoint: { // + (if applicable) BegDrag - if (!rVEvt.bAddMark) UnmarkAllPoints(); - if (rVEvt.bPrevNextMark) { + if (!rVEvt.mbAddMark) UnmarkAllPoints(); + if (rVEvt.mbPrevNextMark) { MarkNextPoint(); bRet=false; } else { - bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark); + bRet = MarkPoint(*rVEvt.mpHdl, rVEvt.mbUnmark); } - if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) { - BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); + if (!rVEvt.mbUnmark && !rVEvt.mbPrevNextMark) { + BegDragObj(aLogicPos, nullptr, rVEvt.mpHdl, mnMinMovLog); bRet=true; } } break; case SdrEventKind::MarkGluePoint: { // + (if applicable) BegDrag - if (!rVEvt.bAddMark) UnmarkAllGluePoints(); - if (rVEvt.bPrevNextMark) { + if (!rVEvt.mbAddMark) UnmarkAllGluePoints(); + if (rVEvt.mbPrevNextMark) { MarkNextGluePoint(); bRet=false; } else { - bRet=MarkGluePoint(rVEvt.pObj,rVEvt.nGlueId,rVEvt.bUnmark); + bRet=MarkGluePoint(rVEvt.mpObj,rVEvt.mnGlueId,rVEvt.mbUnmark); } - if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) { - SdrHdl* pHdl=GetGluePointHdl(rVEvt.pObj,rVEvt.nGlueId); + if (!rVEvt.mbUnmark && !rVEvt.mbPrevNextMark) { + SdrHdl* pHdl = GetGluePointHdl(rVEvt.mpObj, rVEvt.mnGlueId); BegDragObj(aLogicPos,nullptr,pHdl,mnMinMovLog); bRet=true; } } break; - case SdrEventKind::BeginMark: bRet=BegMark(aLogicPos,rVEvt.bAddMark,rVEvt.bUnmark); break; + case SdrEventKind::BeginMark: bRet = BegMark(aLogicPos,rVEvt.mbAddMark,rVEvt.mbUnmark); break; case SdrEventKind::BeginInsertObjPoint: bRet = BegInsObjPoint(aLogicPos, MODKEY_PolyPoly); break; case SdrEventKind::EndInsertObjPoint: { SdrCreateCmd eCmd=SdrCreateCmd::NextPoint; if (MODKEY_PolyPoly) eCmd=SdrCreateCmd::NextObject; - if (rVEvt.nMouseClicks>1) eCmd=SdrCreateCmd::ForceEnd; + if (rVEvt.mnMouseClicks > 1) eCmd = SdrCreateCmd::ForceEnd; EndInsObjPoint(eCmd); bRet=true; } break; case SdrEventKind::BeginInsertGluePoint: bRet=BegInsGluePoint(aLogicPos); break; - case SdrEventKind::BeginDragHelpline: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break; - case SdrEventKind::BeginDragObj: bRet=BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); break; + case SdrEventKind::BeginDragHelpline: bRet = BegDragHelpLine(rVEvt.mnHlplIdx,rVEvt.mpPV); break; + case SdrEventKind::BeginDragObj: bRet=BegDragObj(aLogicPos, nullptr, rVEvt.mpHdl, mnMinMovLog); break; case SdrEventKind::BeginCreateObj: { if (nCurrentInvent==SdrInventor::Default && nCurrentIdent==OBJ_CAPTION) { tools::Long nHgt=SdrEngineDefaults::GetFontHeight(); @@ -897,22 +901,22 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) } else bRet=BegCreateObj(aLogicPos); } break; case SdrEventKind::BeginMacroObj: { - BegMacroObj(aLogicPos,mnHitTolLog,rVEvt.pObj,rVEvt.pPV,mpActualOutDev->GetOwnerWindow()); + BegMacroObj(aLogicPos, mnHitTolLog, rVEvt.mpObj, rVEvt.mpPV, mpActualOutDev->GetOwnerWindow()); bRet=false; } break; case SdrEventKind::BeginTextEdit: { - if (!IsObjMarked(rVEvt.pObj)) { + if (!IsObjMarked(rVEvt.mpObj)) { UnmarkAllObj(); - MarkObj(rVEvt.pRootObj,rVEvt.pPV); + MarkObj(rVEvt.mpRootObj,rVEvt.mpPV); } bRet = mpActualOutDev && OUTDEV_WINDOW == mpActualOutDev->GetOutDevType()&& - SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, mpActualOutDev->GetOwnerWindow()); + SdrBeginTextEdit(rVEvt.mpObj, rVEvt.mpPV, mpActualOutDev->GetOwnerWindow()); if(bRet) { MouseEvent aMEvt(mpActualOutDev->LogicToPixel(aLogicPos), - 1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode); + 1, rVEvt.mnMouseMode, rVEvt.mnMouseCode, rVEvt.mnMouseCode); OutlinerView* pOLV=GetTextEditOutlinerView(); if (pOLV!=nullptr) pOLV->MouseButtonDown(aMEvt); // event for the Outliner, but without double-click } @@ -922,17 +926,17 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) if (bRet && mpActualOutDev && mpActualOutDev->GetOutDevType()==OUTDEV_WINDOW) { vcl::Window* pWin=mpActualOutDev->GetOwnerWindow(); // left mouse button pressed? - bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown; + bool bLeftDown = (rVEvt.mnMouseCode & MOUSE_LEFT) != 0 && rVEvt.mbMouseDown; // left mouse button released? - bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp; + bool bLeftUp = (rVEvt.mnMouseCode & MOUSE_LEFT) != 0 && rVEvt.mbMouseUp; // left mouse button pressed or held? - bool bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp; - pWin->SetPointer(GetPreferredPointer(rVEvt.aLogicPos,pWin->GetOutDev(), - rVEvt.nMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1)); + bool bLeftDown1=(rVEvt.mnMouseCode & MOUSE_LEFT) != 0 && !rVEvt.mbMouseUp; + pWin->SetPointer(GetPreferredPointer(rVEvt.maLogicPos, pWin->GetOutDev(), + rVEvt.mnMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1)); bool bAction=IsAction(); if (bLeftDown && bAction) pWin->CaptureMouse(); - else if (bLeftUp || (rVEvt.bIsAction && !bAction)) + else if (bLeftUp || (rVEvt.mbIsAction && !bAction)) pWin->ReleaseMouse(); } return bRet; @@ -984,13 +988,13 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe } SdrViewEvent aVEvt; - aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // to see what would happen on MouseLeftDown - aVEvt.bMouseDown=!bLeftDown; // What if ..? - aVEvt.bMouseUp=bLeftDown; // What if ..? + aVEvt.mnMouseCode = (nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // to see what would happen on MouseLeftDown + aVEvt.mbMouseDown = !bLeftDown; // What if ..? + aVEvt.mbMouseUp = bLeftDown; // What if ..? if (pOut!=nullptr) const_cast<SdrView*>(this)->SetActualWin(pOut); SdrHitKind eHit=PickAnything(rMousePos,aVEvt); - SdrEventKind eEvent=aVEvt.eEvent; + SdrEventKind eEvent = aVEvt.meEvent; switch (eEvent) { case SdrEventKind::BeginCreateObj: @@ -1010,11 +1014,11 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe case SdrEventKind::BeginMacroObj: { SdrObjMacroHitRec aHitRec; - aHitRec.aPos=aVEvt.aLogicPos; + aHitRec.aPos = aVEvt.maLogicPos; aHitRec.nTol=mnHitTolLog; - aHitRec.pVisiLayer=&aVEvt.pPV->GetVisibleLayers(); - aHitRec.pPageView=aVEvt.pPV; - return aVEvt.pObj->GetMacroPointer(aHitRec); + aHitRec.pVisiLayer = &aVEvt.mpPV->GetVisibleLayers(); + aHitRec.pPageView = aVEvt.mpPV; + return aVEvt.mpObj->GetMacroPointer(aHitRec); } default: break; } // switch @@ -1024,13 +1028,13 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe case SdrHitKind::Cell: return PointerStyle::Arrow; case SdrHitKind::HelpLine : - return aVEvt.pPV->GetHelpLines()[aVEvt.nHlplIdx].GetPointer(); + return aVEvt.mpPV->GetHelpLines()[aVEvt.mnHlplIdx].GetPointer(); case SdrHitKind::Gluepoint: return PointerStyle::MovePoint; case SdrHitKind::TextEdit : case SdrHitKind::TextEditObj: { - SdrTextObj* pText = dynamic_cast< SdrTextObj* >( aVEvt.pObj ); + SdrTextObj* pText = dynamic_cast< SdrTextObj* >(aVEvt.mpObj); if(pText && pText->HasText()) { OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject(); @@ -1043,7 +1047,7 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe } bool bMarkHit=eHit==SdrHitKind::MarkedObject; - SdrHdl* pHdl=aVEvt.pHdl; + SdrHdl* pHdl = aVEvt.mpHdl; // now check the pointers for dragging if (pHdl!=nullptr || bMarkHit) { SdrHdlKind eHdl= pHdl!=nullptr ? pHdl->GetKind() : SdrHdlKind::Move; diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index 11b040425bf0..13e08682b23e 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -205,10 +205,10 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView, MouseEvent aMEvt(pWindow->ScreenToOutputPixel(rEvt.GetMousePosPixel()), 1, MouseEventModifiers::NONE, MOUSE_LEFT); pView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if (aVEvt.eEvent == SdrEventKind::ExecuteUrl) + if (aVEvt.meEvent == SdrEventKind::ExecuteUrl) { - sText = aVEvt.pURLField->GetURL(); - aPixRect = pWindow->LogicToPixel(aVEvt.pObj->GetLogicRect()); + sText = aVEvt.mpURLField->GetURL(); + aPixRect = pWindow->LogicToPixel(aVEvt.mpObj->GetLogicRect()); } } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 446d2faa5405..d93c1f08178c 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3165,7 +3165,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SdrViewEvent aVEvt; pSdrView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if (aVEvt.eEvent == SdrEventKind::ExecuteUrl) + if (aVEvt.meEvent == SdrEventKind::ExecuteUrl) bExecDrawTextLink = true; } } @@ -4810,10 +4810,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if (pSdrView) pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); - if (pSdrView && aVEvt.eEvent == SdrEventKind::ExecuteUrl) + if (pSdrView && aVEvt.meEvent == SdrEventKind::ExecuteUrl) { // hit URL field - const SvxURLField *pField = aVEvt.pURLField; + const SvxURLField *pField = aVEvt.mpURLField; if (pField) { const OUString& sURL(pField->GetURL()); diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index e3f6e07538c6..e7c176e72bc7 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -107,11 +107,11 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); sal_uInt16 nEditMode = m_pWin->GetBezierMode(); - if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == SdrHdlKind::BezierWeight) + if (eHit == SdrHitKind::Handle && aVEvt.mpHdl->GetKind() == SdrHdlKind::BezierWeight) { // Drag handle g_bNoInterrupt = true; - bReturn = pSdrView->BegDragObj(m_aStartPos, nullptr, aVEvt.pHdl); + bReturn = pSdrView->BegDragObj(m_aStartPos, nullptr, aVEvt.mpHdl); m_pWin->SetDrawAction(true); } else if (eHit == SdrHitKind::MarkedObject && nEditMode == SID_BEZIER_INSERT) @@ -138,7 +138,7 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) else if (eHit == SdrHitKind::Handle) { // Select gluepoint - if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift())) + if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.mpHdl) || rMEvt.IsShift())) { SdrHdl* pHdl = nullptr; @@ -149,9 +149,9 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) } else { - if (pSdrView->IsPointMarked(*aVEvt.pHdl)) + if (pSdrView->IsPointMarked(*aVEvt.mpHdl)) { - bReturn = pSdrView->UnmarkPoint(*aVEvt.pHdl); + bReturn = pSdrView->UnmarkPoint(*aVEvt.mpHdl); pHdl = nullptr; } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits