summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/dinfdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/dinfdlg.cxx')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 19b4529e180b..40bd42c63f6e 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -35,6 +35,7 @@
#include <svtools/imagemgr.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
+#include <osl/file.hxx>
#include <memory>
@@ -975,7 +976,9 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
aPath.removeFinalSlash();
OUString aText( aPath.PathToFileName() ); //! (pb) MaxLen?
m_xFileValEd->set_label(aText);
- m_xFileValEd->set_uri("file://" + aText);
+ OUString aURLStr;
+ osl::FileBase::getFileURLFromSystemPath(aText, aURLStr);
+ m_xFileValEd->set_uri(aURLStr);
}
else if (aURL.GetProtocol() != INetProtocol::PrivSoffice)
{