summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-08-23 17:20:39 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-08-26 08:15:06 +0200
commitceea1f3c735b4e6d40cc0cfd8c249b6aff6b4e89 (patch)
tree56dc44403616dd759a1fb5bad76ace6843d7315a /sfx2
parent8fc9c698ee643dd4363c5ad1daa7bbc0a13982d5 (diff)
Replace use of INetURLObject::GetNewAbsURL with rtl::Uri::convertRelToAbs
Change-Id: I45bc72b30ec51cce9e07371365879e7fe89eb54c Reviewed-on: https://gerrit.libreoffice.org/78023 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appdde.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index a998b77b823c..683bbc24fb18 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -19,6 +19,8 @@
#include <config_features.h>
#include <rtl/character.hxx>
+#include <rtl/malformeduriexception.hxx>
+#include <rtl/uri.hxx>
#include <sal/log.hxx>
#include <sot/exchange.hxx>
#include <vcl/wrkwin.hxx>
@@ -131,13 +133,18 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
if( !bRet )
{
- INetURLObject aWorkPath( SvtPathOptions().GetWorkPath() );
- INetURLObject aFile;
- if ( aWorkPath.GetNewAbsURL( rNm, &aFile ) &&
- lcl_IsDocument( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
+ bool abs;
+ OUString url;
+ try {
+ url = rtl::Uri::convertRelToAbs(SvtPathOptions().GetWorkPath(), rNm);
+ abs = true;
+ } catch (rtl::MalformedUriException &) {
+ abs = false;
+ }
+ if ( abs && lcl_IsDocument( url ) )
{
// File exists? then try to load it:
- SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ SfxStringItem aName( SID_FILE_NAME, url );
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, true);
SfxBoolItem aSilent(SID_SILENT, true);