summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 6ecced415026..9015d1ae119c 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( vcl::Window* pParent, const OUString
// 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