summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-04-06 15:46:47 +0200
committerJan Holesovsky <kendy@collabora.com>2018-04-06 21:30:13 +0200
commite1b247a843c5eb850fe0079819239d9883412d38 (patch)
tree43befa620475c11f3dde00e5ea141e1efd95a334
parent36d56a9c86fa559b202602a079d057162292300d (diff)
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@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/52507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx7
1 files changed, 4 insertions, 3 deletions
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[] = {