summaryrefslogtreecommitdiff
path: root/jvmfwk/source
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/source')
-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
11 files changed, 68 insertions, 65 deletions
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