summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2014-12-15 10:19:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-07 13:31:02 +0000
commitab5e09164df88bbfe6060d095678b20898fcec3e (patch)
tree2ab95897a7dc5a4ecbed19a0748225e23cbe9025
parent40ec3aa2d5f9ecf713cce0fd7c89fdd5f830f664 (diff)
fdo#87292 use system dependent path instead of file URL
Change-Id: I3da4cd7af16a8ecfb19ce23e01117e735e9dd8d6 (cherry picked from commit efe3e06dd1b99215d82b6373aa7434a8f25a22f2) Reviewed-on: https://gerrit.libreoffice.org/13479 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/dialog/linkwarn.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 1f223ce251e1..c1cc76432f2f 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <osl/file.hxx>
#include <svx/linkwarn.hxx>
#include <svtools/miscopt.hxx>
@@ -27,7 +28,10 @@ SvxLinkWarningDialog::SvxLinkWarningDialog( Window* pParent, const OUString& _rF
// replace filename
OUString sInfoText = get_primary_text();
- sInfoText = sInfoText.replaceAll("%FILENAME", _rFileName);
+ OUString aPath;
+ if ( osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL( _rFileName, aPath ) )
+ aPath = _rFileName;
+ sInfoText = sInfoText.replaceAll("%FILENAME", aPath);
set_primary_text( sInfoText );
// load state of "warning on" checkbox from misc options