[Libreoffice-commits] core.git: sfx2/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 22 19:55:44 UTC 2019
sfx2/source/doc/objmisc.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 7a6f8baa738c7ec0348015f5c423802e10a524fd
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Aug 22 17:34:42 2019 +0200
Commit: Stephan Bergmann <sbergman at 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 <sbergman at 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
{
More information about the Libreoffice-commits
mailing list