sw/source/uibase/shells/textsh.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 9d06ed4aff19bf16afb9ac448899187724766b88
Author: Bjoern Michaelsen <bjoern.michael...@canonical.com>
Date:   Fri Aug 12 13:10:44 2016 +0200

    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.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com>

diff --git a/sw/source/uibase/shells/textsh.cxx 
b/sw/source/uibase/shells/textsh.cxx
index e97993d..2524dfb 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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to