diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-08-22 17:34:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-22 21:54:52 +0200 |
commit | 7a6f8baa738c7ec0348015f5c423802e10a524fd (patch) | |
tree | 368f9e32d4f34246568abe85f4626d9d583a027c /sfx2 | |
parent | d9d096a567653d8daddedf88ec40d13113354c3b (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
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 { |