[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/source
Jan Holesovsky
kendy at collabora.com
Fri Apr 6 14:47:08 UTC 2018
sw/source/uibase/wrtsh/wrtsh2.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 69e06991dd75859db0b9165606454514d91877da
Author: Jan Holesovsky <kendy at 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 <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at 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[] = {
More information about the Libreoffice-commits
mailing list