summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 16:09:31 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 16:09:31 +0100
commit5c074d83b64382cedc2d9cc7bdb7b528d27daa5a (patch)
tree9c76a2b44644745076932d213c8abd8b72fc251d /fpicker
parent091e4aee3386f3bfee081dc8646494e0eb97f88a (diff)
parentb6cc0b0c18e6ce985d200d801c6b4f64ca705d75 (diff)
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/libs-core
Diffstat (limited to 'fpicker')
-rwxr-xr-xfpicker/source/unx/kde_unx/UnxFilePicker.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/fpicker/source/unx/kde_unx/UnxFilePicker.cxx b/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
index 8c7cd91a9ec0..c2756ee716c4 100755
--- a/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
+++ b/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
@@ -38,8 +38,10 @@
#include <cppuhelper/interfacecontainer.h>
#include <osl/diagnose.h>
+#include <osl/file.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/bootstrap.hxx>
#include <tools/resmgr.hxx>
#include <svtools/svtools.hrc>
@@ -715,7 +717,11 @@ void UnxFilePicker::initFilePicker()
#endif
// The executable name
- const char *pFname = "kdefilepicker";
+ rtl::OUString helperurl( RTL_CONSTASCII_USTRINGPARAM("${ORIGIN}/kdefilepicker"));
+ rtl::Bootstrap::expandMacros( helperurl );
+ rtl::OUString helperpath;
+ osl::FileBase::getSystemPathFromFileURL( helperurl, helperpath );
+ rtl::OString helper( rtl::OUStringToOString( helperpath, osl_getThreadTextEncoding()));
// ID of the main window
const int nIdLen = 20;
@@ -736,7 +742,7 @@ void UnxFilePicker::initFilePicker()
}
// Execute the fpicker implementation
- execlp( pFname, pFname, "--winid", pWinId, NULL );
+ execlp( helper.getStr(), helper.getStr(), "--winid", pWinId, NULL );
// Error, finish the child
exit( -1 );