summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx60
1 files changed, 30 insertions, 30 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index cff9cdfa05af..1ff9766af6c3 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,13 +65,13 @@ using namespace jfw_plugin;
namespace {
-struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
+struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
#if defined UNX
OString getPluginJarPath(
const OUString & sVendor,
const OUString& sLocation,
- const OUString& sVersion)
+ const OUString& sVersion)
{
OString ret;
OUString sName1(RTL_CONSTASCII_USTRINGPARAM("javaplugin.jar"));
@@ -83,7 +83,7 @@ OString getPluginJarPath(
SunVersion ver150("1.5.0-ea");
SunVersion ver(sVersion);
OSL_ASSERT(ver142 && ver150 && ver);
-
+
OUString sName;
if (ver < ver142)
{
@@ -116,12 +116,12 @@ OString getPluginJarPath(
== osl_File_E_None)
{
sPath = sPath1 + OUString::createFromAscii(sep) + sPath2;
- }
+ }
}
OSL_ASSERT(sPath.getLength());
}
ret = rtl::OUStringToOString(sPath, osl_getThreadTextEncoding());
-
+
return ret;
}
#endif // UNX
@@ -151,7 +151,7 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
buf.append(info->getLibraryPaths());
buf.appendAscii("\n");
}
-
+
rtl::OUString sVendorData = buf.makeStringAndClear();
rtl::ByteSequence byteSeq( (sal_Int8*) sVendorData.pData->buffer,
sVendorData.getLength() * sizeof(sal_Unicode));
@@ -159,7 +159,7 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
rtl_byte_sequence_acquire(pInfo->arVendorData);
return pInfo;
-}
+}
rtl::OUString getRuntimeLib(const rtl::ByteSequence & data)
{
@@ -169,7 +169,7 @@ rtl::OUString getRuntimeLib(const rtl::ByteSequence & data)
//the runtime lib is on the first line
sal_Int32 index = 0;
rtl::OUString aToken = sData.getToken( 0, '\n', index);
-
+
return aToken;
}
@@ -228,14 +228,14 @@ javaPluginError jfw_plugin_getAllJavaInfos(
getAllJREInfos();
vector<rtl::Reference<VendorBase> > vecVerifiedInfos;
- typedef vector<rtl::Reference<VendorBase> >::iterator it;
+ typedef vector<rtl::Reference<VendorBase> >::iterator it;
for (it i= vecInfos.begin(); i != vecInfos.end(); i++)
{
const rtl::Reference<VendorBase>& cur = *i;
-
+
if (ouVendor.equals(cur->getVendor()) == sal_False)
continue;
-
+
if (ouMinVer.getLength() > 0)
{
try
@@ -249,11 +249,11 @@ javaPluginError jfw_plugin_getAllJavaInfos(
JFW_ENSURE(
0,OUSTR("[Java framework]sunjavaplugin does not know version: ")
+ ouMinVer + OUSTR(" for vendor: ") + cur->getVendor()
- + OUSTR(" .Check minimum Version.") );
+ + OUSTR(" .Check minimum Version.") );
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
}
}
-
+
if (ouMaxVer.getLength() > 0)
{
try
@@ -271,7 +271,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
return JFW_PLUGIN_E_WRONG_VERSION_FORMAT;
}
}
-
+
if (arExcludeList > 0)
{
bool bExclude = false;
@@ -328,7 +328,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
JavaInfo ** ppInfo)
{
javaPluginError errcode = JFW_PLUGIN_E_NONE;
-
+
OSL_ASSERT(path);
OSL_ASSERT(sVendor);
OSL_ASSERT(sMinVersion);
@@ -345,7 +345,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
OSL_ASSERT( ! (arExcludeList == NULL && nLenList > 0));
if (arExcludeList == NULL && nLenList > 0)
return JFW_PLUGIN_E_INVALID_ARG;
-
+
OUString ouVendor(sVendor);
OUString ouMinVer(sMinVersion);
OUString ouMaxVer(sMaxVersion);
@@ -353,15 +353,15 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
OSL_ASSERT(ouVendor.getLength() > 0);
if (ouVendor.getLength() == 0)
return JFW_PLUGIN_E_INVALID_ARG;
-
+
rtl::Reference<VendorBase> aVendorInfo = getJREInfoByPath(ouPath);
if (aVendorInfo.is() == sal_False)
return JFW_PLUGIN_E_NO_JRE;
-
+
//Check if the detected JRE matches the version requirements
if (ouVendor.equals(aVendorInfo->getVendor()) == sal_False)
return JFW_PLUGIN_E_NO_JRE;
-
+
if (ouMinVer.getLength() > 0)
{
int nRes = 0;
@@ -381,7 +381,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
if (nRes < 0)
return JFW_PLUGIN_E_FAILED_VERSION;
}
-
+
if (ouMaxVer.getLength() > 0)
{
int nRes = 0;
@@ -401,7 +401,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
if (nRes > 0)
return JFW_PLUGIN_E_FAILED_VERSION;
}
-
+
if (arExcludeList > 0)
{
for (int i = 0; i < nLenList; i++)
@@ -438,7 +438,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
*/
extern "C"
javaPluginError jfw_plugin_startJavaVirtualMachine(
- const JavaInfo *pInfo,
+ const JavaInfo *pInfo,
const JavaVMOption* arOptions,
sal_Int32 cOptions,
JavaVM ** ppVm,
@@ -493,7 +493,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
typedef jint JNICALL JNI_CreateVM_Type(JavaVM **, JNIEnv **, void *);
rtl::OUString sSymbolCreateJava(
RTL_CONSTASCII_USTRINGPARAM("JNI_CreateJavaVM"));
-
+
JNI_CreateVM_Type * pCreateJavaVM = (JNI_CreateVM_Type *) osl_getFunctionSymbol(
moduleRt, sSymbolCreateJava.pData);
if (!pCreateJavaVM)
@@ -516,7 +516,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
boost::scoped_array<JavaVMOption> sarOptions(
new JavaVMOption[cOptions + 1]);
JavaVMOption * options = sarOptions.get();
-
+
// We set an abort handler which is called when the VM calls _exit during
// JNI_CreateJavaVM. This happens when the LD_LIBRARY_PATH does not contain
// all some directories of the Java installation. This is necessary for
@@ -544,7 +544,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
}
else
{
-#endif
+#endif
options[i+1].optionString = arOptions[i].optionString;
options[i+1].extraInfo = arOptions[i].extraInfo;
#ifdef UNX
@@ -588,7 +588,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
// set err to a positive number, so as or recognize that an abort (longjmp)
//occurred
err= 1;
-
+
if(err != 0)
{
rtl::OUString message;
@@ -610,8 +610,8 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
*ppVm = pJavaVM;
JFW_TRACE2("[Java framework] sunjavaplugin"SAL_DLLEXTENSION " has created a VM.\n");
}
-
-
+
+
return errcode;
}
@@ -647,7 +647,7 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
{
rtl::OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData);
JFW_TRACE2(OUSTR("[Java framework] Checking existence of Java runtime library.\n"));
-
+
::osl::DirectoryItem itemRt;
::osl::File::RC rc_itemRt = ::osl::DirectoryItem::get(sRuntimeLib, itemRt);
if (::osl::File::E_None == rc_itemRt)