summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/edit/edredln.cxx5
-rw-r--r--sw/source/uibase/shells/textfld.cxx5
2 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index e99aa5c36ae3..a78a54ec1698 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -120,7 +120,10 @@ bool SwEditShell::SetRedlineComment( const OUString& rS )
const SwRangeRedline* SwEditShell::GetCurrRedline() const
{
- return GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCursor()->GetPoint(), nullptr );
+ if (const SwRangeRedline* pRed = GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCursor()->GetPoint(), nullptr ))
+ return pRed;
+ // check the other side of the selection to handle completely selected changes, where the Point is at the end
+ return GetDoc()->getIDocumentRedlineAccess().GetRedline( *GetCursor()->GetMark(), nullptr );
}
void SwEditShell::UpdateRedlineAttr()
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index d0861d7ab6ae..68c49f0f2d7c 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -567,7 +567,10 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.EndAction();
rSh.ClearMark();
- rSh.SelNextRedline(); // Select current redline.
+ // Select current redline.
+ pActRed = rSh.SelNextRedline();
+ if (pActRed != pRedline)
+ rSh.SelPrevRedline();
rSh.StartAction();
rSh.Push();