[Libreoffice-commits] core.git: sdext/source
Stephan Bergmann
sbergman at redhat.com
Tue Apr 22 09:22:34 PDT 2014
sdext/source/pdfimport/wrapper/wrapper.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit ef141bb147fde7915c17b336cfbc3e7ef6e72ce3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Apr 22 18:21:53 2014 +0200
Do not drop existing LD_LIBRARY_PATH
Change-Id: I5b3599596dc40d1f88c075257c466b56ed73e795
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index d024071..ddba8b3 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -59,8 +59,8 @@
#include <boost/scoped_ptr.hpp>
#include <boost/unordered_map.hpp>
#include <string.h>
-#ifdef WNT
#include <stdlib.h>
+#ifdef WNT
#include <ctype.h>
#endif
@@ -1042,6 +1042,13 @@ bool xpdf_ImportFromFile( const OUString& rURL,
OUStringBuffer aEnvBuf( aStr.getLength() + 20 );
aEnvBuf.appendAscii( "LD_LIBRARY_PATH=" );
aEnvBuf.append( aSysPath );
+ char const * path = getenv("LD_LIBRARY_PATH");
+ if (path != 0 && path[0] != 0)
+ {
+ aEnvBuf.append(':');
+ aEnvBuf.append(
+ OUString(path, strlen(path), RTL_TEXTENCODING_ISO_8859_1));
+ }
aStr = aEnvBuf.makeStringAndClear();
ppEnv = &aStr.pData;
nEnv = 1;
More information about the Libreoffice-commits
mailing list