sw/source/uibase/wrtsh/wrtsh2.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit e1b247a843c5eb850fe0079819239d9883412d38 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/52507 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Jan Holesovsky <ke...@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[] = { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits