[Libreoffice-commits] core.git: svx/source

Andras Timar andras.timar at collabora.com
Mon Dec 15 01:23:57 PST 2014


 svx/source/dialog/linkwarn.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit efe3e06dd1b99215d82b6373aa7434a8f25a22f2
Author: Andras Timar <andras.timar at collabora.com>
Date:   Mon Dec 15 10:19:14 2014 +0100

    fdo#87292 use system dependent path instead of file URL
    
    Change-Id: I3da4cd7af16a8ecfb19ce23e01117e735e9dd8d6

diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 6ecced4..9015d1a 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


More information about the Libreoffice-commits mailing list