summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);