sw/source/uibase/docvw/edtdd.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit a00e45f393219b6494b53e1a908a35eba5a5d7f4 Author: Justin Luth <[email protected]> AuthorDate: Thu Nov 13 14:14:36 2025 -0500 Commit: Justin Luth <[email protected]> CommitDate: Fri Nov 14 17:33:00 2025 +0100 NFC sw edtdd: rename bStart to bStartDragging The word 'bStart' becomes mildly ambiguous since the code also checks for the start of a hyperlink. Change-Id: I00e38a1863d38779e968afbc56584a1ed74396ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193991 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 2974f230fbc5..896c6b51aae5 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -82,13 +82,13 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) if ( m_pApplyTempl || rSh.IsDrawCreate() || IsDrawAction()) return; - bool bStart = false, bDelSelect = false; + bool bStartDragging = false, bDelSelect = false; SdrObject *pObj = nullptr; Point aDocPos( PixelToLogic( rPosPixel ) ); const bool bInSelect = rSh.IsInSelect(); if (!bInSelect && rSh.TestCurrPam(aDocPos, true)) //We are not selecting and aren't at a selection - bStart = true; + bStartDragging = true; else if ( !g_bFrameDrag && rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( aDocPos ) && nullptr == m_pAnchorMarker) @@ -101,14 +101,14 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) // keep the now invalid ptr in place, next access will crash. // It is indeed wrong to enter drag mode when AnchorDrag is // already active - bStart = true; + bStartDragging = true; } else if( !g_bFrameDrag && m_rView.GetDocShell()->IsReadOnly() && OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj )) { rSh.LockPaint(LockPaintReason::StartDrag); if( rSh.SelectObj( aDocPos, 0, pObj )) - bStart = bDelSelect = true; + bStartDragging = bDelSelect = true; else rSh.UnlockPaint(); } @@ -120,18 +120,18 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) Point aCursorPoint = rSh.GetCharRect().Center(); SwContentAtPos aSwContentAtPos( IsAttrAtPos::InetAttr ); - bStart = rSh.GetContentAtPos(aCursorPoint, aSwContentAtPos); + bStartDragging = rSh.GetContentAtPos(aCursorPoint, aSwContentAtPos); // If true (cursor is in hyperlink), perhaps the cursor is at the start of the hyperlink? - if (bStart) + if (bStartDragging) { aCursorPoint.AdjustX(-1); aSwContentAtPos = SwContentAtPos(IsAttrAtPos::InetAttr); - bStart = rSh.GetContentAtPos(aCursorPoint, aSwContentAtPos); + bStartDragging = rSh.GetContentAtPos(aCursorPoint, aSwContentAtPos); } } - if ( !bStart || m_bIsInDrag ) + if ( !bStartDragging || m_bIsInDrag ) return; // If the add selection mode has been pushed in the MouseButtonDown handler it needs to be
