sw/source/uibase/wrtsh/wrtsh2.cxx | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)
New commits: commit bb9bad31b9e9f741fed91b2a4b3043814cb07f13 Author: Tünde Tóth <tund...@gmail.com> AuthorDate: Thu Aug 1 15:26:55 2019 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Thu Aug 15 11:36:39 2019 +0200 tdf#125041 fix hyperlinks to IDN websites Revert "tdf#86087 Open relative links in Writer" This reverts commit 4b9e237850efe36f7e35d65e14d6953f1e1f3a45. The reverted commit caused a regression in the handling of internationalized domain names: these non-ASCII URLs were converted to file URIs. Change-Id: Ia481aa1199d20083b72f9f8571992e40b3fc2e77 Reviewed-on: https://gerrit.libreoffice.org/76804 Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: László Németh <nem...@numbertext.org> diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index e46a1d6c03b8..034e987591de 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -499,28 +499,11 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) return; - OUString sFileURL = rURL; - INetURLObject aURL( sFileURL ); - if( aURL.GetProtocol() == INetProtocol::NotValid && !sFileURL.startsWith("#") ) - { - // May be the relative link -> try to convert to absolute path - OUString sParentPath = - rVSh.GetDoc()->GetDocShell()->GetMedium()->GetURLObject().GetPath(); - - bool bCorrectURL = true; - aURL = INetURLObject(); - bCorrectURL &= aURL.setFSysPath( sParentPath, FSysStyle::Detect ); - bCorrectURL &= aURL.insertName( sFileURL ); - - if( bCorrectURL ) - sFileURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ); - } - // 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()); + rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); return; } @@ -545,7 +528,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, sReferer = pDShell->GetMedium()->GetName(); SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame(); SfxFrameItem aView( SID_DOCFRAME, pViewFrame ); - SfxStringItem aName( SID_FILE_NAME, sFileURL ); + SfxStringItem aName( SID_FILE_NAME, rURL ); SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); SfxStringItem aReferer( SID_REFERER, sReferer ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits