Kaydet (Commit) e112fe43 authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Ashod Nakashian

sw lok: Don't try to open TOC marks in a new window, jump instead.

Change-Id: I1ecae82c4b1e08383f6957c38cb70b91fc3549d4
Reviewed-on: https://gerrit.libreoffice.org/52504Reviewed-by: 's avatarAshod Nakashian <ashnakash@gmail.com>
Tested-by: 's avatarAshod Nakashian <ashnakash@gmail.com>
üst 3d9f4e8f
...@@ -470,8 +470,9 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, ...@@ -470,8 +470,9 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr )
return; return;
// We are doing tiledRendering, let the client handles the URL loading. // We are doing tiledRendering, let the client handles the URL loading,
if (comphelper::LibreOfficeKit::isActive()) // unless we are jumping to a TOC mark.
if (comphelper::LibreOfficeKit::isActive() && !rURL.startsWith("#"))
{ {
rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr());
return; return;
...@@ -506,7 +507,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, ...@@ -506,7 +507,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
//#39076# Silent can be removed accordingly to SFX. //#39076# Silent can be removed accordingly to SFX.
SfxBoolItem aBrowse( SID_BROWSE, true ); SfxBoolItem aBrowse( SID_BROWSE, true );
if( nFilter & URLLOAD_NEWVIEW ) if ((nFilter & URLLOAD_NEWVIEW) && !comphelper::LibreOfficeKit::isActive())
aTargetFrameName.SetValue( "_blank" ); aTargetFrameName.SetValue( "_blank" );
const SfxPoolItem* aArr[] = { const SfxPoolItem* aArr[] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment