sfx2/source/doc/objmisc.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 7a6f8baa738c7ec0348015f5c423802e10a524fd Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Aug 22 17:34:42 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Aug 22 21:54:52 2019 +0200 Replace use of INetURLObject::GetNewAbsURL with rtl::Uri::convertRelToAbs Change-Id: Ida2a0553ede3d6d9d7ff4a50bca6256a70286bc2 Reviewed-on: https://gerrit.libreoffice.org/77970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index df52c23c0b7c..33341b58a3a3 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -80,6 +80,7 @@ #include <svl/sharecontrolfile.hxx> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> +#include <rtl/uri.hxx> #include <vcl/svapp.hxx> #include <framework/interaction.hxx> #include <framework/documentundoguard.hxx> @@ -1477,10 +1478,12 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV ) pDoc->getDocProperties()); if( aURL.startsWithIgnoreAsciiCase( "url=" ) ) { - INetURLObject aObj; - INetURLObject( pDoc->GetMedium()->GetName() ).GetNewAbsURL( aURL.copy( 4 ), &aObj ); - xDocProps->setAutoloadURL( - aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); + try { + xDocProps->setAutoloadURL( + rtl::Uri::convertRelToAbs(pDoc->GetMedium()->GetName(), aURL.copy( 4 )) ); + } catch (rtl::MalformedUriException &) { + TOOLS_WARN_EXCEPTION("sfx", ""); + } } try { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits