diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-04-06 15:46:47 +0200 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2018-04-06 16:46:27 +0200 |
commit | 0cd1c3789bbd50c7c8fe80066afb794a07c7c4b0 (patch) | |
tree | 2540d36450eab81eaf507104e749df6c0a16083e | |
parent | 513dfeee353743cee4e4e2f986bf59672e83865e (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>
(cherry picked from commit e112fe434df84d2367d9efb83e9e1105a1394492)
Reviewed-on: https://gerrit.libreoffice.org/52509
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index ac17db298931..e4305c383c11 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -470,8 +470,9 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) return; - // 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, rURL.toUtf8().getStr()); return; @@ -506,7 +507,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, //#39076# Silent can be removed accordingly to SFX. SfxBoolItem aBrowse( SID_BROWSE, true ); - if( nFilter & URLLOAD_NEWVIEW ) + if ((nFilter & URLLOAD_NEWVIEW) && !comphelper::LibreOfficeKit::isActive()) aTargetFrameName.SetValue( "_blank" ); const SfxPoolItem* aArr[] = { |