sw/source/uibase/wrtsh/wrtsh2.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 69e06991dd75859db0b9165606454514d91877da
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Fri Apr 6 15:46:47 2018 +0200

    sw lok: Don't try to open TOC marks in a new window, jump instead.
    
    Change-Id: I1ecae82c4b1e08383f6957c38cb70b91fc3549d4
    Reviewed-on: https://gerrit.libreoffice.org/52504
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/52508

diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx 
b/sw/source/uibase/wrtsh/wrtsh2.cxx
index f85206f4c656..95249b6e40f1 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -531,8 +531,9 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, 
LoadUrlFlags nFilter,
             sFileURL = aURL.GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous );
     }
 
-    // We are doing tiledRendering, let the client handles the URL loading.
-    if (comphelper::LibreOfficeKit::isActive())
+    // We are doing tiledRendering, let the client handles the URL loading,
+    // unless we are jumping to a TOC mark.
+    if (comphelper::LibreOfficeKit::isActive() && !rURL.startsWith("#"))
     {
         
rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED,
 sFileURL.toUtf8().getStr());
         return;
@@ -567,7 +568,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, 
LoadUrlFlags nFilter,
     //#39076# Silent can be removed accordingly to SFX.
     SfxBoolItem aBrowse( SID_BROWSE, true );
 
-    if( nFilter & LoadUrlFlags::NewView )
+    if ((nFilter & LoadUrlFlags::NewView) && 
!comphelper::LibreOfficeKit::isActive())
         aTargetFrameName.SetValue( "_blank" );
 
     const SfxPoolItem* aArr[] = {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to