diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-08-12 13:10:44 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-17 07:46:22 +0000 |
commit | e24ab8340c9e903431a724ea6559517bbdd9e99e (patch) | |
tree | 02894a4550d596dcf11dc995a3d27211ceba3393 | |
parent | f41b8757910e1c1c4838c0f884c6a29496321cb0 (diff) |
tdf#91832: ensure GETLINK reports proper contents for reverse selections too
Change-Id: I4e77a55de012b5edd0d922b5e534e4dd6bb714b6
Reviewed-on: https://gerrit.libreoffice.org/28088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index fe8b8277bfa5..9a71d4fce7b0 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -664,7 +664,12 @@ void SwTextShell::StateInsert( SfxItemSet &rSet ) // Get the text of the Link. rSh.StartAction(); + const bool bAtEnd(rSh.IsCursorPtAtEnd()); + if(!bAtEnd) // tdf#91832: ensure forward selection + rSh.SwapPam(); rSh.CreateCursor(); + if(!bAtEnd) + rSh.SwapPam(); rSh.SwCursorShell::SelectTextAttr(RES_TXTATR_INETFMT,true); OUString sLinkName = rSh.GetSelText(); aHLinkItem.SetName(sLinkName); |