From f9cac88fc24539eb5f7fa501b2499ddf5a46d7f2 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 20 Nov 2024 21:32:16 +0500 Subject: Let ESelection use EPaM for simplification And drop EPosition, which duplicates EPaM, except for its default ctor (used in a single place). Change-Id: I48bb6dafcba84465d61579df0ec71b815945532a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177075 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- sd/source/ui/view/drviews4.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sd/source/ui/view/drviews4.cxx') diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 6652f8d64e9c..6db20f982c80 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -603,7 +603,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) if( pOLV->GetOutliner() ) { ESelection aSelection( pOLV->GetSelection() ); - eLanguage = pOLV->GetOutliner()->GetLanguage( aSelection.nStartPara, aSelection.nStartPos ); + eLanguage = pOLV->GetOutliner()->GetLanguage( aSelection.start.nPara, aSelection.start.nIndex ); } //fdo#44998 if the outliner has captured the mouse events release the lock @@ -627,10 +627,10 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) // select field, so that it will be deleted on insert ESelection aSel = pOLV->GetSelection(); bool bSel = true; - if( aSel.nStartPos == aSel.nEndPos ) + if (aSel.start.nIndex == aSel.end.nIndex) { bSel = false; - aSel.nEndPos++; + aSel.end.nIndex++; } pOLV->SetSelection( aSel ); @@ -638,7 +638,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) // reset selection back to original state if( !bSel ) - aSel.nEndPos--; + aSel.end.nIndex--; pOLV->SetSelection( aSel ); } } -- cgit