summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk')
-rwxr-xr-xjvmfwk/distributions/OpenOfficeorg/makefile.mk2
-rw-r--r--jvmfwk/inc/jvmfwk/framework.h3
-rw-r--r--jvmfwk/inc/jvmfwk/vendorplugin.h3
-rw-r--r--jvmfwk/inc/pch/precompiled_jvmfwk.cxx2
-rw-r--r--jvmfwk/inc/pch/precompiled_jvmfwk.hxx2
-rw-r--r--[-rwxr-xr-x]jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx8
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx18
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/makefile.mk9
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx7
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx128
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx12
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx11
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx21
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.hxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx12
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx9
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx12
-rw-r--r--jvmfwk/source/elements.cxx27
-rw-r--r--jvmfwk/source/elements.hxx3
-rw-r--r--jvmfwk/source/framework.cxx33
-rw-r--r--jvmfwk/source/framework.hxx4
-rw-r--r--jvmfwk/source/fwkbase.cxx10
-rw-r--r--jvmfwk/source/fwkbase.hxx3
-rw-r--r--jvmfwk/source/fwkutil.cxx16
-rw-r--r--jvmfwk/source/fwkutil.hxx9
-rw-r--r--jvmfwk/source/libxmlutil.cxx3
-rw-r--r--jvmfwk/source/libxmlutil.hxx22
-rw-r--r--jvmfwk/source/makefile.mk3
34 files changed, 295 insertions, 118 deletions
diff --git a/jvmfwk/distributions/OpenOfficeorg/makefile.mk b/jvmfwk/distributions/OpenOfficeorg/makefile.mk
index a6ba7a23725a..36e8e8d6cbf5 100755
--- a/jvmfwk/distributions/OpenOfficeorg/makefile.mk
+++ b/jvmfwk/distributions/OpenOfficeorg/makefile.mk
@@ -43,7 +43,7 @@ $(BIN)$/javavendors.xml: javavendors_unx.xml javavendors_wnt.xml javavendors_mac
-$(COPY) javavendors_freebsd.xml $(BIN)$/javavendors.xml
.ELIF "$(OS)"=="MACOSX"
-$(COPY) javavendors_macosx.xml $(BIN)$/javavendors.xml
-.ELIF "$(OS)"=="LINUX"
+.ELIF "$(OS)"=="LINUX" || "$(OS)"=="AIX"
-$(COPY) javavendors_linux.xml $(BIN)$/javavendors.xml
.ELSE
-$(COPY) javavendors_unx.xml $(BIN)$/javavendors.xml
diff --git a/jvmfwk/inc/jvmfwk/framework.h b/jvmfwk/inc/jvmfwk/framework.h
index 7c3551f70116..11cca539cb05 100644
--- a/jvmfwk/inc/jvmfwk/framework.h
+++ b/jvmfwk/inc/jvmfwk/framework.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -866,3 +867,5 @@ void SAL_CALL jfw_unlock();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/inc/jvmfwk/vendorplugin.h b/jvmfwk/inc/jvmfwk/vendorplugin.h
index 15707b1bbe88..3ccbb0e487f4 100644
--- a/jvmfwk/inc/jvmfwk/vendorplugin.h
+++ b/jvmfwk/inc/jvmfwk/vendorplugin.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -263,3 +264,5 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/inc/pch/precompiled_jvmfwk.cxx b/jvmfwk/inc/pch/precompiled_jvmfwk.cxx
index ec7c6af9d6b4..80c3bb3ee344 100644
--- a/jvmfwk/inc/pch/precompiled_jvmfwk.cxx
+++ b/jvmfwk/inc/pch/precompiled_jvmfwk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_jvmfwk.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/inc/pch/precompiled_jvmfwk.hxx b/jvmfwk/inc/pch/precompiled_jvmfwk.hxx
index 460710679af4..8b4018782e42 100644
--- a/jvmfwk/inc/pch/precompiled_jvmfwk.hxx
+++ b/jvmfwk/inc/pch/precompiled_jvmfwk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,4 @@
#ifdef PRECOMPILED_HEADERS
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index 3b73f88f7963..8e8bfb94ea32 100755..100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,14 +39,14 @@
#include "rtl/byteseq.hxx"
#include "jvmfwk/framework.h"
-using namespace rtl;
-
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
#define OUSTR(x) OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
static sal_Bool hasOption(char const * szOption, int argc, char** argv);
static rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData);
static bool findAndSelect(JavaInfo**);
-//static sal_Bool printPaths(const OUString& sPathFile);
#define HELP_TEXT \
"\njavaldx is necessary to make Java work on some UNIX platforms." \
@@ -186,3 +187,4 @@ static bool findAndSelect(JavaInfo ** ppInfo)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h
index 47b6504ee6e2..6a8ef3232bc4 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h
+++ b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@ inline void jfw_trace(const rtl::OString& message)
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 41ba8b2e27a8..933e3d19e1d5 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,10 @@
#include "gnujre.hxx"
#include "util.hxx"
-using namespace rtl;
using namespace std;
using namespace osl;
+using ::rtl::OUString;
+using ::rtl::Reference;
namespace jfw_plugin
{
@@ -103,7 +105,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
bool bAccess = false;
typedef vector<pair<OUString, OUString> >::const_iterator it_prop;
- for (it_prop i = props.begin(); i != props.end(); i++)
+ for (it_prop i = props.begin(); i != props.end(); ++i)
{
if(! bVendor && sVendorProperty.equals(i->first))
{
@@ -170,7 +172,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
bool bRt = false;
typedef vector<OUString>::const_iterator i_path;
- for(i_path ip = libpaths.begin(); ip != libpaths.end(); ip++)
+ for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
{
//Construct an absolute path to the possible runtime
OUString usRt= m_sHome + *ip;
@@ -187,7 +189,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
if (!bRt)
{
m_sHome = m_sJavaHome;
- for(i_path ip = libpaths.begin(); ip != libpaths.end(); ip++)
+ for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
{
//Construct an absolute path to the possible runtime
OUString usRt= m_sHome + *ip;
@@ -206,7 +208,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
if (!bRt && m_sJavaHome != sJavaLibraryPath)
{
m_sHome = sJavaLibraryPath;
- for(i_path ip = libpaths.begin(); ip != libpaths.end(); ip++)
+ for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
{
//Construct an absolute path to the possible runtime
OUString usRt= m_sHome + *ip;
@@ -226,7 +228,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
if (!bRt && m_sJavaHome != rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib")))
{
m_sHome = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib64"));
- for(i_path ip = libpaths.begin(); ip != libpaths.end(); ip++)
+ for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
{
//Construct an absolute path to the possible runtime
OUString usRt= m_sHome + *ip;
@@ -255,7 +257,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
OUString sPathSep= OUString::createFromAscii(arSep);
bool bLdPath = true;
int c = 0;
- for(i_path il = ld_paths.begin(); il != ld_paths.end(); il ++, c++)
+ for(i_path il = ld_paths.begin(); il != ld_paths.end(); ++il, ++c)
{
OUString usAbsUrl= m_sHome + *il;
// convert to system path
@@ -285,3 +287,5 @@ int GnuInfo::compareVersions(const rtl::OUString&) const
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx
index 687be19d771f..413ff4bd1c38 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/makefile.mk b/jvmfwk/plugins/sunmajor/pluginlib/makefile.mk
index 25ff106973ec..4fdb1ba92567 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/makefile.mk
+++ b/jvmfwk/plugins/sunmajor/pluginlib/makefile.mk
@@ -27,13 +27,9 @@
PRJ=..$/..$/..
PRJNAME= jvmfwk
-
TARGET = plugin
-
ENABLE_EXCEPTIONS=TRUE
-
LIBTARGET=NO
-
UNOCOMPONENT1=sunjavaplugin
# --- Settings -----------------------------------------------------
@@ -43,7 +39,6 @@ DLLPRE =
# ------------------------------------------------------------------
-#.INCLUDE : ..$/cppumaker.mk
.IF "$(SOLAR_JAVA)"!=""
SLOFILES= \
@@ -58,8 +53,6 @@ SLOFILES= \
LIB1OBJFILES= $(SLOFILES)
-
-
LIB1TARGET=$(SLB)$/$(UNOCOMPONENT1).lib
SHL1TARGET= $(UNOCOMPONENT1)
@@ -95,8 +88,6 @@ JAVAFILES = $(subst,$(CLASSDIR)$/, $(subst,.class,.java $(JAVACLASSFILES)))
.ENDIF # SOLAR_JAVA
-
-
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
index 3ae1c0f16b92..1fd28a18e603 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,10 +32,10 @@
#include "osl/thread.h"
#include "otherjre.hxx"
-using namespace rtl;
using namespace std;
-
+using ::rtl::OUString;
+using ::rtl::Reference;
namespace jfw_plugin
{
@@ -128,3 +129,5 @@ int OtherInfo::compareVersions(const rtl::OUString& /*sSecond*/) const
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx
index 2a09681eb63c..9f54cf0ea5eb 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index b43edf53b3bc..eaaaf3a35aff 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_jvmfwk.hxx"
+
+#ifdef WNT
+# include <stdio.h>
+# include <sys/stat.h>
+# include <windows.h>
+#endif
+
#if OSL_DEBUG_LEVEL > 0
#include <stdio.h>
#endif
@@ -58,10 +66,13 @@
#define SUN_MICRO "Sun Microsystems Inc."
using namespace osl;
-using namespace rtl;
using namespace std;
using namespace jfw_plugin;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using ::rtl::OString;
+
namespace {
struct PluginMutex: public ::rtl::Static<osl::Mutex, PluginMutex> {};
@@ -228,7 +239,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
vector<rtl::Reference<VendorBase> > vecVerifiedInfos;
typedef vector<rtl::Reference<VendorBase> >::iterator it;
- for (it i= vecInfos.begin(); i != vecInfos.end(); i++)
+ for (it i= vecInfos.begin(); i != vecInfos.end(); ++i)
{
const rtl::Reference<VendorBase>& cur = *i;
@@ -305,7 +316,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
arInfo = (JavaInfo**) rtl_allocateMemory(vecVerifiedInfos.size() * sizeof (JavaInfo*));
int j = 0;
typedef vector<rtl::Reference<VendorBase> >::const_iterator cit;
- for (cit ii = vecVerifiedInfos.begin(); ii != vecVerifiedInfos.end(); ii++, j++)
+ for (cit ii = vecVerifiedInfos.begin(); ii != vecVerifiedInfos.end(); ++ii, ++j)
{
arInfo[j] = createJavaInfo(*ii);
}
@@ -429,6 +440,113 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
return errcode;
}
+#if defined(WNT)
+
+// Load msvcr71.dll using an explicit full path from where it is
+// present as bundled with the JRE. In case it is not found where we
+// think it should be, do nothing, and just let the implicit loading
+// that happens when loading the JVM take care of it.
+
+static void load_msvcr71(LPCWSTR jvm_dll)
+{
+ wchar_t msvcr71_dll[MAX_PATH];
+ wchar_t *slash;
+
+ if (wcslen(jvm_dll) > MAX_PATH - 15)
+ return;
+
+ wcscpy(msvcr71_dll, jvm_dll);
+
+ // First check if msvcr71.dll is in the same folder as jvm.dll. It
+ // normally isn't, at least up to 1.6.0_22, but who knows if it
+ // might be in the future.
+ slash = wcsrchr(msvcr71_dll, L'\\');
+
+ if (!slash)
+ {
+ // Huh, weird path to jvm.dll. Oh well.
+ return;
+ }
+
+ wcscpy(slash+1, L"msvcr71.dll");
+ if (LoadLibraryW(msvcr71_dll))
+ return;
+
+ // Then check if msvcr71.dll is in the parent folder of where
+ // jvm.dll is. That is currently (1.6.0_22) as far as I know the
+ // normal case.
+ *slash = 0;
+ slash = wcsrchr(msvcr71_dll, L'\\');
+
+ if (!slash)
+ return;
+
+ wcscpy(slash+1, L"msvcr71.dll");
+ LoadLibraryW(msvcr71_dll);
+}
+
+// Check if the jvm DLL imports msvcr71.dll, and in that case try
+// loading it explicitly. In case something goes wrong, do nothing,
+// and just let the implicit loading try to take care of it.
+static void do_msvcr71_magic(rtl_uString *jvm_dll)
+{
+ FILE *f;
+ rtl_uString* Module;
+ oslFileError nError;
+ struct stat st;
+ PIMAGE_DOS_HEADER dos_hdr;
+ IMAGE_NT_HEADERS *nt_hdr;
+ IMAGE_IMPORT_DESCRIPTOR *imports;
+
+ nError = osl_getSystemPathFromFileURL(jvm_dll, &Module);
+
+ if ( osl_File_E_None != nError )
+ rtl_uString_assign(&Module, jvm_dll);
+
+ f = _wfopen(reinterpret_cast<LPCWSTR>(Module->buffer), L"rb");
+
+ if (fstat(fileno(f), &st) == -1)
+ {
+ fclose(f);
+ return;
+ }
+
+ dos_hdr = (PIMAGE_DOS_HEADER) malloc(st.st_size);
+
+ if (fread(dos_hdr, st.st_size, 1, f) != 1 ||
+ memcmp(dos_hdr, "MZ", 2) != 0 ||
+ dos_hdr->e_lfanew < 0 ||
+ dos_hdr->e_lfanew > (LONG) (st.st_size - sizeof(IMAGE_NT_HEADERS)))
+ {
+ free(dos_hdr);
+ fclose(f);
+ return;
+ }
+
+ fclose(f);
+
+ nt_hdr = (IMAGE_NT_HEADERS *) ((char *)dos_hdr + dos_hdr->e_lfanew);
+
+ imports = (IMAGE_IMPORT_DESCRIPTOR *) ((char *) dos_hdr + nt_hdr->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
+
+ while (imports <= (IMAGE_IMPORT_DESCRIPTOR *) ((char *) dos_hdr + st.st_size - sizeof (IMAGE_IMPORT_DESCRIPTOR)) &&
+ imports->Name != 0 &&
+ imports->Name < (DWORD) st.st_size)
+ {
+ // Intentional use of sizeof("msvcr71.dll") here to include the terminating zero byte
+ if (strnicmp((char *) dos_hdr + imports->Name, "msvcr71.dll", sizeof("msvcr71.dll")) == 0)
+ {
+ load_msvcr71(reinterpret_cast<LPCWSTR>(Module->buffer));
+ break;
+ }
+ imports++;
+ }
+
+ free(dos_hdr);
+}
+
+#endif
+
/** starts a Java Virtual Machine.
<p>
The function shall ensure, that the VM does not abort the process
@@ -465,6 +583,9 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
if ((moduleRt = osl_loadModule(sRuntimeLib.pData,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_NOW)) == 0 )
#else
+#if defined(WNT)
+ do_msvcr71_magic(sRuntimeLib.pData);
+#endif
if ((moduleRt = osl_loadModule(sRuntimeLib.pData, SAL_LOADMODULE_DEFAULT)) == 0)
#endif
{
@@ -674,3 +795,4 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
index 4fd74df90723..56cb5c7bd7e7 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,11 @@
#include "sunversion.hxx"
#include "diagnostics.h"
-using namespace rtl;
using namespace std;
+using ::rtl::OUString;
+using ::rtl::Reference;
+
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace jfw_plugin
{
@@ -68,7 +71,9 @@ char const* const* SunInfo::getRuntimePaths(int * size)
#if defined(WNT)
"/bin/client/jvm.dll",
"/bin/hotspot/jvm.dll",
- "/bin/classic/jvm.dll"
+ "/bin/classic/jvm.dll",
+ // The 64-bit JRE has the jvm in bin/server
+ "/bin/server/jvm.dll"
#elif defined(OS2)
"/bin/classic/jvm.dll",
#elif UNX
@@ -88,6 +93,7 @@ char const* const* SunInfo::getLibraryPaths(int* size)
static char const * ar[] = {
"/lib/" JFW_PLUGIN_ARCH "/client",
+ "/lib/" JFW_PLUGIN_ARCH "/server",
"/lib/" JFW_PLUGIN_ARCH "/native_threads",
"/lib/" JFW_PLUGIN_ARCH
@@ -122,3 +128,5 @@ int SunInfo::compareVersions(const rtl::OUString& sSecond) const
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx
index 54c1d5b8829a..5851b16c8143 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 5d52046c705e..bb3e1765a030 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,12 +36,14 @@
#include <string.h>
#include <ctype.h>
#include "diagnostics.h"
-using namespace rtl;
using namespace osl;
+
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
namespace jfw_plugin { //stoc_javadetect
-//extern OUString ::Impl::usPathDelim();
#define OUSTR( x ) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
#if OSL_DEBUG_LEVEL >= 2
@@ -125,7 +128,7 @@ bool SunVersion::init(const char *szVersion)
//check next character
if (! ( (pCur < pEnd)
- && ( (nPart < 3) && isdigit(*pCur)))) //(*pCur >= 48 && *pCur <=57))))
+ && ( (nPart < 3) && isdigit(*pCur))))
return false;
}
else
@@ -425,3 +428,5 @@ SelfTest::SelfTest()
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
index 61d5da488a7e..4e51f7a0a7a6 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,5 @@ protected:
}
#endif // INCLUDED_JVMACCESS_SUNVERSION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index fc2a5b98215a..b34d486a4b2e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,10 +59,15 @@
#include "sunjre.hxx"
#include "vendorlist.hxx"
#include "diagnostics.h"
-using namespace rtl;
using namespace osl;
using namespace std;
+using ::rtl::OUString;
+using ::rtl::Reference;
+using ::rtl::OString;
+using ::rtl::OUStringBuffer;
+using ::rtl::OUStringToOString;
+
#define CHAR_POINTER(oustr) ::rtl::OUStringToOString(oustr,RTL_TEXTENCODING_UTF8).pData->buffer
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
#ifdef WNT
@@ -151,7 +157,6 @@ namespace
{
OUString const & operator()()
{
- // osl::Guard<osl::Mutex> g(osl::GetGlobalMutex());
static OUString sIni;
rtl::OUStringBuffer buf( 255);
buf.append( getLibraryLocation());
@@ -450,8 +455,6 @@ bool getJavaProps(const OUString & exePath,
rs = stdoutReader.readLine( & aLine);
if (rs != FileHandleReader::RESULT_OK)
break;
-// JFW_TRACE2(OString("[Java framework] line:\" ")
-// + aLine + OString(" \".\n"));
OUString sLine;
if (!decodeOutput(aLine, &sLine))
continue;
@@ -509,7 +512,6 @@ bool decodeOutput(const rtl::OString& s, rtl::OUString* out)
} while (nIndex >= 0);
*out = buff.makeStringAndClear();
-// JFW_TRACE2(*out);
return true;
}
@@ -553,7 +555,6 @@ bool getJavaInfoFromRegistry(const wchar_t* szRegKey,
DWORD dwIndex = 0;
const DWORD BUFFSIZE = 1024;
wchar_t bufVersion[BUFFSIZE];
-// char bufVersion[BUFFSIZE];
DWORD nNameLen = BUFFSIZE;
FILETIME fileTime;
nNameLen = sizeof(bufVersion);
@@ -704,7 +705,7 @@ bool getJREInfoFromBinPath(
sBinPath = path.copy(0, path.getLength() - 1);
typedef vector<OUString>::const_iterator c_it;
- for (c_it i = vecPaths.begin(); i != vecPaths.end(); i++)
+ for (c_it i = vecPaths.begin(); i != vecPaths.end(); ++i)
{
//the map contains e.g. jre/bin/java.exe
//get the directory where the executable is contained
@@ -900,7 +901,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
bool bBreak = false;
typedef vector<OUString>::const_iterator c_it;
- for (c_it i = vecPaths.begin(); i != vecPaths.end(); i++)
+ for (c_it i = vecPaths.begin(); i != vecPaths.end(); ++i)
{
//if the path is a link, then resolve it
//check if the executable exists at all
@@ -993,7 +994,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
OUString sVendor(RTL_CONSTASCII_USTRINGPARAM("java.vendor"));
OUString sVendorName;
- for (c_ip i = props.begin(); i != props.end(); i++)
+ for (c_ip i = props.begin(); i != props.end(); ++i)
{
if (sVendor.equals(i->first))
{
@@ -1265,3 +1266,5 @@ void createJavaInfoDirScan(vector<rtl::Reference<VendorBase> >& vecInfos)
#endif // ifdef SOLARIS
#endif // ifdef UNX
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
index c312372e5fa2..eedd51c16e33 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,3 +129,5 @@ rtl::Bootstrap* getBootstrap();
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index 0106981a0a32..9025266571fd 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,9 +36,10 @@
#include "sunjre.hxx"
using namespace std;
-using namespace rtl;
using namespace osl;
+using ::rtl::OUString;
+
namespace jfw_plugin
{
rtl::Reference<VendorBase> createInstance(createInstance_func pFunc,
@@ -115,7 +117,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
bool bAccess = false;
typedef vector<pair<OUString, OUString> >::const_iterator it_prop;
- for (it_prop i = props.begin(); i != props.end(); i++)
+ for (it_prop i = props.begin(); i != props.end(); ++i)
{
if(! bVendor && sVendorProperty.equals(i->first))
{
@@ -168,7 +170,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
bool bRt = false;
typedef vector<OUString>::const_iterator i_path;
- for(i_path ip = libpaths.begin(); ip != libpaths.end(); ip++)
+ for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
{
//Construct an absolute path to the possible runtime
OUString usRt= m_sHome + *ip;
@@ -194,7 +196,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
OUString sPathSep= OUString::createFromAscii(arSep);
bool bLdPath = true;
int c = 0;
- for(i_path il = ld_paths.begin(); il != ld_paths.end(); il ++, c++)
+ for(i_path il = ld_paths.begin(); il != ld_paths.end(); ++il, ++c)
{
OUString usAbsUrl= m_sHome + *il;
// convert to system path
@@ -274,3 +276,5 @@ int VendorBase::compareVersions(const rtl::OUString& /*sSecond*/) const
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
index 3302fe42e90c..ae204e227ac0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,5 @@ protected:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
index 1ff82db205d4..f24b6ff166e4 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,11 @@
#include <stdio.h>
using namespace com::sun::star::uno;
-using namespace rtl;
+
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OStringToOUString;
+using ::rtl::OString;
namespace jfw_plugin
{
@@ -89,3 +94,5 @@ bool isVendorSupported(const rtl::OUString& sVendor)
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx
index 7cc00fd1787b..7edc5fa00735 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,18 +35,9 @@
namespace jfw_plugin
{
-//extern VendorSupportMapEntry gVendorMap[];
-
typedef char const * const * (* getJavaExePaths_func)(int*);
typedef rtl::Reference<VendorBase> (* createInstance_func) ();
-// struct Blas
-// {
-// char const * sVendorName;
-// getJavaExePaths_func getJavaFunc;
-// createInstance_func createFunc;
-// };
-
struct VendorSupportMapEntry
{
char const * sVendorName;
@@ -73,3 +65,5 @@ bool isVendorSupported(const rtl::OUString & sVendor);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 8ed982f34523..52ea89176d12 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,8 +44,6 @@
#include "rtl/bootstrap.hxx"
#include "boost/optional.hpp"
#include <string.h>
-// #define NS_JAVA_FRAMEWORK "http://openoffice.org/2004/java/framework/1.0"
-// #define NS_SCHEMA_INSTANCE "http://www.w3.org/2001/XMLSchema-instance"
using namespace osl;
@@ -175,13 +174,12 @@ void createSettingsStructure(xmlDoc * document, bool * bNeedsSave)
nodeCrLf = xmlNewText((xmlChar*) "\n");
xmlAddChild(root, nodeCrLf);
- //<javaInfo xsi:nil="true" autoSelect="true">
+ //<javaInfo xsi:nil="true">
xmlNode * nodeJava = xmlNewTextChild(
root,NULL, (xmlChar*) "javaInfo", (xmlChar*) "");
if (nodeJava == NULL)
throw FrameworkException(JFW_E_ERROR, sExcMsg);
xmlSetNsProp(nodeJava,nsXsi,(xmlChar*) "nil",(xmlChar*) "true");
-// xmlSetProp(nodeJava,(xmlChar*) "autoSelect",(xmlChar*) "true");
//add a new line
nodeCrLf = xmlNewText((xmlChar*) "\n");
xmlAddChild(root, nodeCrLf);
@@ -213,7 +211,7 @@ rtl_uString** VersionInfo::getExcludeVersions()
int j=0;
typedef std::vector<rtl::OUString>::const_iterator it;
for (it i = vecExcludeVersions.begin(); i != vecExcludeVersions.end();
- i++, j++)
+ ++i, ++j)
{
arVersions[j] = vecExcludeVersions[j].pData;
}
@@ -274,7 +272,7 @@ void NodeJava::load()
}
else
{
- OSL_ASSERT("[Java framework] Unknown enum used.");
+ OSL_FAIL("[Java framework] Unknown enum used.");
}
@@ -402,7 +400,7 @@ void NodeJava::load()
case INSTALL: ret = getInstallSettingsPath(); break;
case SHARED: ret = getSharedSettingsPath(); break;
default:
- OSL_ASSERT("[Java framework] NodeJava::getSettingsPath()");
+ OSL_FAIL("[Java framework] NodeJava::getSettingsPath()");
}
return ret;
}
@@ -416,7 +414,7 @@ void NodeJava::load()
case INSTALL: ret = BootParams::getInstallData(); break;
case SHARED: ret = BootParams::getSharedData(); break;
default:
- OSL_ASSERT("[Java framework] NodeJava::getSettingsURL()");
+ OSL_FAIL("[Java framework] NodeJava::getSettingsURL()");
}
return ret;
}
@@ -551,7 +549,7 @@ void NodeJava::write() const
}
typedef std::vector<rtl::OUString>::const_iterator cit;
- for (cit i = m_vmParameters->begin(); i != m_vmParameters->end(); i++)
+ for (cit i = m_vmParameters->begin(); i != m_vmParameters->end(); ++i)
{
xmlNewTextChild(vmParameters, NULL, (xmlChar*) "param",
CXmlCharPtr(*i));
@@ -592,7 +590,7 @@ void NodeJava::write() const
}
typedef std::vector<rtl::OUString>::const_iterator cit;
- for (cit i = m_JRELocations->begin(); i != m_JRELocations->end(); i++)
+ for (cit i = m_JRELocations->begin(); i != m_JRELocations->end(); ++i)
{
xmlNewTextChild(jreLocationsNode, NULL, (xmlChar*) "location",
CXmlCharPtr(*i));
@@ -769,7 +767,6 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const
//that after removing the file and shortly later creating it again
//did not change the creation time. That is the newly created file
//had the creation time of the former file.
- // ::TimeValue modTime = stat.getModifyTime();
::TimeValue curTime = {0,0};
ret = FILE_OK;
if (sal_True == ::osl_getSystemTime(& curTime))
@@ -791,7 +788,7 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const
#endif
//delete file
File f(sURL);
- if (File::E_None == f.open(OpenFlag_Write | OpenFlag_Read)
+ if (File::E_None == f.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Read)
&& File::E_None == f.setPos(0, 0)
&& File::E_None == f.setSize(0))
ret = FILE_DOES_NOT_EXIST;
@@ -1260,7 +1257,7 @@ void MergedSettings::getVmParametersArray(
int j=0;
typedef std::vector<rtl::OUString>::const_iterator it;
for (it i = m_vmParams.begin(); i != m_vmParams.end();
- i++, j++)
+ ++i, ++j)
{
(*parParams)[j] = i->pData;
rtl_uString_acquire(i->pData);
@@ -1282,7 +1279,7 @@ void MergedSettings::getJRELocations(
int j=0;
typedef std::vector<rtl::OUString>::const_iterator it;
for (it i = m_JRELocations.begin(); i != m_JRELocations.end();
- i++, j++)
+ ++i, ++j)
{
(*parLocations)[j] = i->pData;
rtl_uString_acquire(i->pData);
@@ -1294,3 +1291,5 @@ const std::vector<rtl::OUString> & MergedSettings::getJRELocations() const
return m_JRELocations;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx
index ec0e06dc5bab..6efedbf96647 100644
--- a/jvmfwk/source/elements.hxx
+++ b/jvmfwk/source/elements.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -417,3 +418,5 @@ struct PluginLibrary
} //end namespace
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 1194e73402dd..59f1942f13af 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,7 +101,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//Use every plug-in library to get Java installations.
typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
int cModule = 0;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); i++, cModule++)
+ for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); ++i, ++cModule)
{
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
@@ -159,10 +160,8 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
typedef std::vector<rtl::OUString>::const_iterator citLoc;
//Check every manually added location
for (citLoc ii = vecJRELocations.begin();
- ii != vecJRELocations.end(); ii++)
+ ii != vecJRELocations.end(); ++ii)
{
-// rtl::OUString sLocation =
-// rtl::OStringToOUString(*ii, RTL_TEXTENCODING_UTF8);
jfw::CJavaInfo aInfo;
plerr = (*jfw_plugin_getJavaInfoByPathFunc)(
ii->pData,
@@ -196,9 +195,9 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//To obtain the JavaInfos for the manually added JRE locations the function
//jfw_getJavaInfoByPath is called which can return a JavaInfo of any vendor.
std::vector<jfw::CJavaInfo> vecInfoManual2;
- for (it_info ivm = vecInfoManual.begin(); ivm != vecInfoManual.end(); ivm++)
+ for (it_info ivm = vecInfoManual.begin(); ivm != vecInfoManual.end(); ++ivm)
{
- for (ci_pl ii = vecPlugins.begin(); ii != vecPlugins.end(); ii++)
+ for (ci_pl ii = vecPlugins.begin(); ii != vecPlugins.end(); ++ii)
{
if ( ii->sVendor.equals((*ivm)->sVendor))
{
@@ -210,7 +209,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//Check which JavaInfo from vector vecInfoManual2 is already
//contained in vecInfo. If it already exists then remove it from
//vecInfoManual2
- for (it_info j = vecInfo.begin(); j != vecInfo.end(); j++)
+ for (it_info j = vecInfo.begin(); j != vecInfo.end(); ++j)
{
it_info it_duplicate =
std::find_if(vecInfoManual2.begin(), vecInfoManual2.end(),
@@ -228,10 +227,10 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
typedef std::vector<jfw::CJavaInfo>::iterator it;
int index = 0;
//Add the automatically detected JREs
- for (it k = vecInfo.begin(); k != vecInfo.end(); k++)
+ for (it k = vecInfo.begin(); k != vecInfo.end(); ++k)
(*pparInfo)[index++] = k->detach();
//Add the manually detected JREs
- for (it l = vecInfoManual2.begin(); l != vecInfoManual2.end(); l++)
+ for (it l = vecInfoManual2.begin(); l != vecInfoManual2.end(); ++l)
(*pparInfo)[index++] = l->detach();
*pSize = nSize;
@@ -383,7 +382,7 @@ javaFrameworkError SAL_CALL jfw_startVM(JavaVMOption *arOptions, sal_Int32 cOpti
//add the options set by options dialog
int index = 2;
typedef std::vector<rtl::OString>::const_iterator cit;
- for (cit i = vmParams.begin(); i != vmParams.end(); i ++)
+ for (cit i = vmParams.begin(); i != vmParams.end(); ++i)
{
arOpt[index].optionString = const_cast<sal_Char*>(i->getStr());
arOpt[index].extraInfo = 0;
@@ -461,7 +460,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
//Java the loop will break
typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
int cModule = 0;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); i++, cModule++)
+ for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); ++i, ++cModule)
{
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
@@ -543,7 +542,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
settings.getJRELocations();
//use every plug-in to determine the JavaInfo objects
bool bInfoFound = false;
- for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); i++)
+ for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end(); ++i)
{
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
@@ -565,7 +564,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
typedef std::vector<rtl::OUString>::const_iterator citLoc;
for (citLoc it = vecJRELocations.begin();
- it != vecJRELocations.end(); it++)
+ it != vecJRELocations.end(); ++it)
{
jfw::CJavaInfo aInfo;
javaPluginError err = (*jfw_plugin_getJavaInfoByPathFunc)(
@@ -763,7 +762,7 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
typedef std::vector<jfw::PluginLibrary>::const_iterator ci_pl;
int cModule = 0;
for (ci_pl i = vecPlugins.begin(); i != vecPlugins.end();
- i++, cModule++)
+ ++i, ++cModule)
{
const jfw::PluginLibrary & library = *i;
jfw::VersionInfo versionInfo =
@@ -1255,10 +1254,6 @@ CJavaInfo::operator JavaInfo const * () const
{
return pInfo;
}
-// ::JavaInfo** CJavaInfo::operator & ()
-// {
-// return & pInfo;
-// }
rtl::OUString CJavaInfo::getVendor() const
{
@@ -1285,3 +1280,5 @@ sal_uInt64 CJavaInfo::getFeatures() const
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx
index 163d12e85938..0ba8c6b29583 100644
--- a/jvmfwk/source/framework.hxx
+++ b/jvmfwk/source/framework.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,7 +104,6 @@ public:
void attach(::JavaInfo* pInfo);
::JavaInfo * detach();
const ::JavaInfo* operator ->() const;
-// ::JavaInfo** operator & ();
operator ::JavaInfo* ();
operator ::JavaInfo const * () const;
::JavaInfo* cloneJavaInfo() const;
@@ -126,3 +126,5 @@ public:
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 88579765442a..e6856747f348 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,12 @@
#include "fwkbase.hxx"
using namespace osl;
-using namespace rtl;
+
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using ::rtl::OString;
+using ::rtl::OUStringToOString;
+using ::rtl::OStringToOUString;
#define JAVASETTINGS "javasettings"
#define JAVASETTINGS_XML "javasettings.xml"
#define VENDORSETTINGS "javavendors.xml"
@@ -716,3 +722,5 @@ bool wasJavaSelectedInSameProcess()
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/fwkbase.hxx b/jvmfwk/source/fwkbase.hxx
index 27a0cb6941ec..0a15f7628e8e 100644
--- a/jvmfwk/source/fwkbase.hxx
+++ b/jvmfwk/source/fwkbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,3 +157,5 @@ bool wasJavaSelectedInSameProcess();
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index a2c56310b550..3b73534e129e 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,9 +58,12 @@
#include "framework.hxx"
#include "fwkutil.hxx"
-using namespace rtl;
using namespace osl;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
+
namespace jfw
{
@@ -270,10 +274,12 @@ rtl::OUString findPlugin(
{
rtl::OUString url;
#ifdef UNX
-#ifdef MACOSX
- rtl::OUString path = rtl::OUString::createFromAscii("DYLD_LIBRARY_PATH");
+#if defined(MACOSX)
+ rtl::OUString path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DYLD_LIBRARY_PATH"));
+#elif defined(AIX)
+ rtl::OUString path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LIBPATH"));
#else
- rtl::OUString path = rtl::OUString::createFromAscii("LD_LIBRARY_PATH");
+ rtl::OUString path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LD_LIBRARY_PATH"));
#endif
rtl::OUString env_path;
oslProcessError err = osl_getEnvironment(path.pData, &env_path.pData);
@@ -352,3 +358,5 @@ jfw::FileStatus checkFileURL(const rtl::OUString & sURL)
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx
index 6098f9d6b58e..9e241cf92efe 100644
--- a/jvmfwk/source/fwkutil.hxx
+++ b/jvmfwk/source/fwkutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,15 +69,11 @@ struct Bootstrap :
struct FwkMutex: public ::rtl::Static<osl::Mutex, FwkMutex> {};
-//osl::Mutex * getFwkMutex();
-
rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);
rtl::OUString getPlatform();
-//const rtl::Bootstrap& getBootstrap();
-
rtl::OUString getDirFromFile(const rtl::OUString& usFilePath);
@@ -120,7 +117,7 @@ enum FileStatus
one of the values of FileStatus.
@exception
- Errors occured during determining if the file exists
+ Errors occurred during determining if the file exists
*/
FileStatus checkFileURL(const rtl::OUString & path);
@@ -136,3 +133,5 @@ rtl::OUString buildClassPathFromDirectory(const rtl::OUString & relPath);
rtl::OUString retrieveClassPath( ::rtl::OUString const & macro );
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx
index a5170e4b0e40..e121712d8672 100644
--- a/jvmfwk/source/libxmlutil.cxx
+++ b/jvmfwk/source/libxmlutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -182,3 +183,5 @@ CXmlCharPtr::operator ::rtl::OString()
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/source/libxmlutil.hxx
index 8abd7b82ef8d..b8c4a6e2f388 100644
--- a/jvmfwk/source/libxmlutil.hxx
+++ b/jvmfwk/source/libxmlutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include "libxml/parser.h"
#include "libxml/xpath.h"
-//#include "libxml/xpathinternals.h"
#include "rtl/ustring.hxx"
namespace jfw
{
@@ -88,24 +88,6 @@ public:
};
//===========================================================
-// class CXmlNsPtr
-// {
-// xmlNs* _object;
-
-// CXmlNsPtr(const CXmlNsPtr&);
-// CXmlNsPtr & operator = (const CXmlNsPtr&);
-// public:
-// CXmlNsPtr();
-// CXmlNsPtr(xmlNs* aDoc);
-// /** Takes ownership of xmlDoc
-// */
-// CXmlNsPtr & operator = (xmlNs* pObj);
-// ~CXmlNsPtr();
-// xmlNs* operator -> ();
-// operator xmlNs* ();
-// };
-
-//===========================================================
class CXmlCharPtr
{
xmlChar* _object;
@@ -127,3 +109,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/source/makefile.mk b/jvmfwk/source/makefile.mk
index 22056983dd1d..d43a31bc642d 100644
--- a/jvmfwk/source/makefile.mk
+++ b/jvmfwk/source/makefile.mk
@@ -51,15 +51,12 @@ SLOFILES = \
$(SLO)$/fwkbase.obj
-#LIB1TARGET=$(SLB)$/$(FRAMEWORKLIB).lib
-
.IF "$(UNIXVERSIONNAMES)" == ""
SHL1TARGET = $(FRAMEWORKLIB)$(UDK_MAJOR)
.ELSE # UNIXVERSIONNAMES
SHL1TARGET = $(FRAMEWORKLIB)
.ENDIF # UNIXVERSIONNAMES
-#SHL1TARGET=$(FRAMEWORKLIB)
SHL1DEPN=
SHL1IMPLIB = i$(FRAMEWORKLIB)
SHL1LIBS = $(SLB)$/$(TARGET).lib