summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-05-17 16:05:11 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2021-05-18 08:55:30 +0200
commita7be44be49ddc0a501f31f13e545a921a3dcc5c4 (patch)
tree350c0da7b2926c994ce6918a6063e989b7c7cedf /sfx2
parentb0228e4d39656c487300a607117a9e1c6c14620b (diff)
Resolves tdf#142041 - Hyperlink to file location
Follow-up fix to 334838efc12cd1e4a451a8dd7542b93fdaf30bb9 Change-Id: Ic63edcc88401d3db8f3a7737f562deb328485fab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115710 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2')
-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)
{