diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-08-12 13:10:44 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-08-12 16:15:47 +0000 |
commit | 9d06ed4aff19bf16afb9ac448899187724766b88 (patch) | |
tree | 86aa4a7014c0f0923d14b4d89c9ba0f88c80bf0c | |
parent | f16c803e7f5186632adeffc2dad579cf2c720b15 (diff) |
tdf#91832: ensure GETLINK reports proper contents for reverse selections too
Change-Id: I4e77a55de012b5edd0d922b5e534e4dd6bb714b6
Reviewed-on: https://gerrit.libreoffice.org/28077
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.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 e97993d1980d..2524dfb38d16 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); |