[Libreoffice-commits] core.git: sw/source
Jan Holesovsky
kendy at collabora.com
Fri Apr 6 19:30:36 UTC 2018
sw/source/uibase/wrtsh/wrtsh2.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit e1b247a843c5eb850fe0079819239d9883412d38
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/52507
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index d038cf89f1ba..a2e328ed4c4a 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -528,8 +528,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;
@@ -564,7 +565,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