[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2022-02-21 Thread Stephan Bergmann (via logerrit)
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   16 +---
 jvmfwk/source/framework.cxx |8 ++--
 jvmfwk/source/fwkbase.cxx   |3 +++
 3 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 5e8f64e50f97d39e83a3358697be14db03566878
Author: Stephan Bergmann 
AuthorDate: Mon Feb 21 11:55:21 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 21 15:37:27 2022 +0100

Avoid unnecessary empty -Djava.class.path=

Change-Id: Idcfe7321077b60381c0273910b1faeb444ef1fd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130242
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 29de226211f1..e55b914edf13 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -712,17 +712,22 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 // all versions below 1.5.1
 options.emplace_back("abort", reinterpret_cast(abort_handler));
 bool hasStackSize = false;
+#ifdef UNX
+// Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
+// in the class path in order to have applet support:
+OString sAddPath = getPluginJarPath(pInfo->sVendor, 
pInfo->sLocation,pInfo->sVersion);
+#endif
 for (int i = 0; i < cOptions; i++)
 {
 OString opt(arOptions[i].optionString);
 #ifdef UNX
-// Until java 1.5 we need to put a plugin.jar or javaplugin.jar 
(<1.4.2)
-// in the class path in order to have applet support:
 if (opt.startsWith("-Djava.class.path="))
 {
-OString sAddPath = getPluginJarPath(pInfo->sVendor, 
pInfo->sLocation,pInfo->sVersion);
 if (!sAddPath.isEmpty())
+{
 opt += OStringChar(SAL_PATHSEPARATOR) + sAddPath;
+sAddPath.clear();
+}
 }
 #endif
 if (opt == "-Xint") {
@@ -767,6 +772,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
 }
 #endif
 }
+#ifdef UNX
+if (!sAddPath.isEmpty()) {
+options.emplace_back("-Djava.class.path=" + sAddPath, nullptr);
+}
+#endif
 
 std::unique_ptr sarOptions(new 
JavaVMOption[options.size()]);
 for (std::vector::size_type i = 0; i != options.size(); ++i) {
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 4163eea57b7c..8aa85082b838 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -195,8 +195,12 @@ javaFrameworkError jfw_startVM(
 //In direct mode the options are specified by bootstrap 
variables
 //of the form UNO_JAVA_JFW_PARAMETER_1 .. 
UNO_JAVA_JFW_PARAMETER_n
 vmParams = jfw::BootParams::getVMParameters();
-sUserClassPath =
-"-Djava.class.path=" + jfw::BootParams::getClasspath();
+auto const cp = jfw::BootParams::getClasspath();
+if (!cp.isEmpty())
+{
+sUserClassPath =
+"-Djava.class.path=" + cp;
+}
 }
 else
 OSL_ASSERT(false);
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 0af34a443f3c..bb5df10a9c4d 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -470,6 +470,9 @@ OString makeClassPathOption(std::u16string_view 
sUserClassPath)
 }
 
 sPaths = OUStringToOString(sBufCP.makeStringAndClear(), PathEncoding());
+if (sPaths.isEmpty()) {
+return "";
+}
 
 OString sOptionClassPath = "-Djava.class.path=" + sPaths;
 return sOptionClassPath;


[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2020-04-07 Thread Noel Grandin (via logerrit)
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |   60 ++---
 jvmfwk/source/fwkbase.cxx  |   34 
 2 files changed, 47 insertions(+), 47 deletions(-)

New commits:
commit 21eb6c98bcfb1d453f8eb9f73bd87f6dd87aa882
Author: Noel Grandin 
AuthorDate: Tue Apr 7 14:16:40 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 7 15:12:35 2020 +0200

loplugin:flatten in jvmfwk

Change-Id: Ic58bc539ad6b4e1ef1d8049ec97547d1420be8a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91817
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index ff540cc52325..db855d9ce4f4 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1049,44 +1049,44 @@ void addJavaInfosFromPath(
 #if !defined JVM_ONE_PATH_CHECK
 // Get Java from PATH environment variable
 char *szPath= getenv("PATH");
-if(szPath)
+if(!szPath)
+return;
+
+OUString usAllPath(szPath, strlen(szPath), osl_getThreadTextEncoding());
+sal_Int32 nIndex = 0;
+do
 {
-OUString usAllPath(szPath, strlen(szPath), 
osl_getThreadTextEncoding());
-sal_Int32 nIndex = 0;
-do
+OUString usToken = usAllPath.getToken( 0, SAL_PATHSEPARATOR, nIndex );
+OUString usTokenUrl;
+if(File::getFileURLFromSystemPath(usToken, usTokenUrl) == File::E_None)
 {
-OUString usToken = usAllPath.getToken( 0, SAL_PATHSEPARATOR, 
nIndex );
-OUString usTokenUrl;
-if(File::getFileURLFromSystemPath(usToken, usTokenUrl) == 
File::E_None)
+if(!usTokenUrl.isEmpty())
 {
-if(!usTokenUrl.isEmpty())
+OUString usBin;
+if(usTokenUrl == ".")
 {
-OUString usBin;
-if(usTokenUrl == ".")
-{
-OUString usWorkDirUrl;
-if(osl_Process_E_None == 
osl_getProcessWorkingDir(&usWorkDirUrl.pData))
-usBin= usWorkDirUrl;
-}
-else if(usTokenUrl == "..")
-{
-OUString usWorkDir;
-if(osl_Process_E_None == 
osl_getProcessWorkingDir(&usWorkDir.pData))
-usBin= getDirFromFile(usWorkDir);
-}
-else
-{
-usBin = usTokenUrl;
-}
-if(!usBin.isEmpty())
-{
-addJREInfoFromBinPath(usBin, allInfos, addedInfos);
-}
+OUString usWorkDirUrl;
+if(osl_Process_E_None == 
osl_getProcessWorkingDir(&usWorkDirUrl.pData))
+usBin= usWorkDirUrl;
+}
+else if(usTokenUrl == "..")
+{
+OUString usWorkDir;
+if(osl_Process_E_None == 
osl_getProcessWorkingDir(&usWorkDir.pData))
+usBin= getDirFromFile(usWorkDir);
+}
+else
+{
+usBin = usTokenUrl;
+}
+if(!usBin.isEmpty())
+{
+addJREInfoFromBinPath(usBin, allInfos, addedInfos);
 }
 }
 }
-while ( nIndex >= 0 );
 }
+while ( nIndex >= 0 );
 #endif
 }
 
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 332d84ebb07b..7f3cd0a132ae 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -94,23 +94,23 @@ VendorSettings::VendorSettings()
 SAL_WARN( "jfw", sMsg );
 throw FrameworkException(JFW_E_CONFIGURATION, sMsg);
 }
-if (!sSettingsPath.isEmpty())
-{
-m_xmlDocVendorSettings = xmlParseFile(sSettingsPath.getStr());
-if (m_xmlDocVendorSettings == nullptr)
-throw FrameworkException(
-JFW_E_ERROR,
-OStringLiteral("[Java framework] Error while parsing file: ")
-+ sSettingsPath + ".");
-
-m_xmlPathContextVendorSettings = 
xmlXPathNewContext(m_xmlDocVendorSettings);
-int res = xmlXPathRegisterNs(
-m_xmlPathContextVendorSettings, reinterpret_cast("jf"),
-reinterpret_cast(NS_JAVA_FRAMEWORK));
-if (res == -1)
-throw FrameworkException(JFW_E_ERROR,
-"[Java framework] Error in constructor 
VendorSettings::VendorSettings() (fwkbase.cxx)");
-}
+if (sSettingsPath.isEmpty())
+return;
+
+m_xmlDocVendorSettings = xmlParseFile(sSettingsPath.getStr());
+if (m_xmlDocVendorSettings == nullptr)
+throw FrameworkException(
+JFW_E_ERROR,
+   

[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2019-12-14 Thread Stephan Bergmann (via logerrit)
 jvmfwk/plugins/sunmajor/pluginlib/sunjavapluginrc |2 --
 jvmfwk/source/jvmfwk3rc   |4 
 jvmfwk/source/readme.txt  |4 
 3 files changed, 10 deletions(-)

New commits:
commit 6f5dcd30d4035652d4ee3cf9708f481cd2f53977
Author: Stephan Bergmann 
AuthorDate: Sat Dec 14 09:16:40 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Dec 14 10:53:50 2019 +0100

Remove unused jvmfwk *rc files

...and accompanying readme.txt.  In the past, they got copied to "solver" 
and
were used during the build.  bf0e30f9cdee963d3cf889305c85b53c21b8c974 
"jvmfwk:
remove Package_*solver" stopped copying them.

From jvmfwk3rc, the UNO_JAVA_JFW_ENV_JREHOME/CLASSPATH=true settings are 
found
in OfficeConnection::setUp (unotest/source/cpp/officeconnection.cxx) and
org.openoffice.test.OfficeConnection.setup
(unotest/source/java/org/openoffice/test/OfficeConnection.java), used during
tests.  Setting UNO_JAVA_JFW_VENDOR_SETTINGS appears to not be necessary 
there
(presumably because those UNO_JAVA_JFW_ENV_* settings override its use 
anyway?).

The JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 in sunjavapluginrc had been 
added
as the fix for  "java
framework: registration of Java components may fail", most of the relevant
commit messages mention "#i40879# in build environment the JRE is not 
tested for
accessibility, because of potential X server problems".  There appears to 
be no
replacement that still sets it in post "solver" times, presumably because 
that
hack is just no longer relevant.

Change-Id: I3028b2f69c00eed3c5d2103345773b8daac409a0
Reviewed-on: https://gerrit.libreoffice.org/85136
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavapluginrc 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavapluginrc
deleted file mode 100644
index 0f2fb31eef90..
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavapluginrc
+++ /dev/null
@@ -1,2 +0,0 @@
-[Bootstrap]
-JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1
\ No newline at end of file
diff --git a/jvmfwk/source/jvmfwk3rc b/jvmfwk/source/jvmfwk3rc
deleted file mode 100644
index 048b16e7ab3b..
--- a/jvmfwk/source/jvmfwk3rc
+++ /dev/null
@@ -1,4 +0,0 @@
-[Bootstrap]
-UNO_JAVA_JFW_ENV_JREHOME=true
-UNO_JAVA_JFW_ENV_CLASSPATH=true
-UNO_JAVA_JFW_VENDOR_SETTINGS=javavendors.xml
\ No newline at end of file
diff --git a/jvmfwk/source/readme.txt b/jvmfwk/source/readme.txt
deleted file mode 100644
index b39576a7e863..
--- a/jvmfwk/source/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The file jvfwk3rc is intended for providing bootstrap parameter for the java 
-framework within the build environment. It is not part of a product. Tools 
-which are started in the environment, such as regcomp.exe and uno.exe, use
-this rc file when Java is needed. 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2018-02-01 Thread Mike Kaganski
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx |6 --
 jvmfwk/source/fwkutil.cxx  |6 --
 2 files changed, 12 deletions(-)

New commits:
commit 94a5665ef3c0fa594048dd425772c4be29d9d7da
Author: Mike Kaganski 
Date:   Wed Jan 31 16:16:37 2018 +0300

jvmfwk: MSVC: pragma warning: make more specific, remove obsolete

Change-Id: Ibb69ba9c994e44c162318e40c4469c311309f326
Reviewed-on: https://gerrit.libreoffice.org/48996
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index fd6680ae07e1..fb6ec2ba6eb4 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -39,16 +39,10 @@
 #include 
 
 #if defined(_WIN32)
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
 #if !defined WIN32_LEAN_AND_MEAN
 # define WIN32_LEAN_AND_MEAN
 #endif
 #include 
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
 #endif
 #include 
 
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index 3d0a2ac22804..e8c13021ce48 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -19,16 +19,10 @@
 
 
 #if defined(_WIN32)
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
 #if !defined WIN32_LEAN_AND_MEAN
 # define WIN32_LEAN_AND_MEAN
 #endif
 #include 
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
 #endif
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2017-10-12 Thread Julien Nabet
 jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx|   50 +---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   40 ++--
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx  |   33 +
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx|   37 ++
 jvmfwk/source/elements.cxx  |   15 ++
 jvmfwk/source/framework.cxx |   26 +++---
 6 files changed, 84 insertions(+), 117 deletions(-)

New commits:
commit 2ea531c0578bb7f0a34ec7de0aaea595e0387928
Author: Julien Nabet 
Date:   Thu Oct 12 20:32:17 2017 +0200

Use loop ranges in jvmfwk

to simplify and avoid all the typedefs

Change-Id: Ia14337dd71b55fc24f162b5436af76aeeb8d2575
Reviewed-on: https://gerrit.libreoffice.org/43346
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 4485828a8926..22285bb0c18c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -97,7 +97,6 @@ bool GnuInfo::initialize(vector > 
props)
 //javax.accessibility.assistive_technologies from system properties
 
 OUString sJavaLibraryPath;
-typedef vector >::const_iterator it_prop;
 OUString const sVendorProperty("java.vendor");
 OUString const sVersionProperty("java.version");
 OUString const sJavaHomeProperty("java.home");
@@ -112,28 +111,27 @@ bool GnuInfo::initialize(vector 
> props)
 bool bJavaLibraryPath = false;
 bool bAccess = false;
 
-typedef vector >::const_iterator it_prop;
-for (it_prop i = props.begin(); i != props.end(); ++i)
+for (auto const& prop : props)
 {
-if(! bVendor && sVendorProperty == i->first)
+if(! bVendor && sVendorProperty == prop.first)
 {
-m_sVendor = i->second;
+m_sVendor = prop.second;
 bVendor = true;
 }
-else if (!bVersion && sVersionProperty == i->first)
+else if (!bVersion && sVersionProperty == prop.first)
 {
-m_sVersion = i->second;
+m_sVersion = prop.second;
 bVersion = true;
 }
-else if (!bHome && sGNUHomeProperty == i->first)
+else if (!bHome && sGNUHomeProperty == prop.first)
 {
-m_sHome = i->second;
+m_sHome = prop.second;
 bHome = true;
 }
-else if (!bJavaHome && sJavaHomeProperty == i->first)
+else if (!bJavaHome && sJavaHomeProperty == prop.first)
 {
OUString fileURL;
-   if (osl_getFileURLFromSystemPath(i->second.pData,& fileURL.pData) ==
+   if (osl_getFileURLFromSystemPath(prop.second.pData,& fileURL.pData) 
==
osl_File_E_None)
{
//make sure that the drive letter have all the same case
@@ -146,15 +144,15 @@ bool GnuInfo::initialize(vector 
> props)
}
}
 }
-else if (!bJavaLibraryPath && sJavaLibraryPathProperty == i->first)
+else if (!bJavaLibraryPath && sJavaLibraryPathProperty == prop.first)
 {
 sal_Int32 nIndex = 0;
-osl_getFileURLFromSystemPath(i->second.getToken(0, ':', 
nIndex).pData, &sJavaLibraryPath.pData);
+osl_getFileURLFromSystemPath(prop.second.getToken(0, ':', 
nIndex).pData, &sJavaLibraryPath.pData);
 bJavaLibraryPath = true;
 }
-else if (!bAccess && sAccessProperty == i->first)
+else if (!bAccess && sAccessProperty == prop.first)
 {
-if (!i->second.isEmpty())
+if (!prop.second.isEmpty())
 {
 m_bAccessibility = true;
 bAccess = true;
@@ -179,11 +177,10 @@ bool GnuInfo::initialize(vector 
> props)
 vector libpaths = getVectorFromCharArray(arRtPaths, size);
 
 bool bRt = false;
-typedef vector::const_iterator i_path;
-for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
+for (auto const& libpath : libpaths)
 {
 //Construct an absolute path to the possible runtime
-OUString usRt= m_sHome + *ip;
+OUString usRt= m_sHome + libpath;
 DirectoryItem item;
 if(DirectoryItem::get(usRt, item) == File::E_None)
 {
@@ -197,10 +194,10 @@ bool GnuInfo::initialize(vector 
> props)
 if (!bRt)
 {
 m_sHome = m_sJavaHome;
-for(i_path ip = libpaths.begin(); ip != libpaths.end(); ++ip)
+for (auto const& libpath : libpaths)
 {
 //Construct an absolute path to the possible runtime
-OUString usRt= m_sHome + *ip;
+OUString usRt= m_sHome + libpath;
 DirectoryItem item;
 if(DirectoryItem::get(usRt, item) == File::E_None)
 {
@@ -216,10 +213,10 @@ bool GnuInfo::initialize(vector 
> props)
 

[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2015-05-27 Thread Stephan Bergmann
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |3 
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx|7 --
 jvmfwk/source/fwkbase.cxx   |   61 
 jvmfwk/source/fwkutil.hxx   |9 --
 4 files changed, 29 insertions(+), 51 deletions(-)

New commits:
commit f9d2bfec02042c5391cb838786577ad32365a56b
Author: Stephan Bergmann 
Date:   Wed May 27 17:24:02 2015 +0200

fprintf -> SAL_INFO

Change-Id: I4808e89cf5b90c99df3d4c4474c578a8c8f611a6

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 18c7280..4094600 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -28,9 +28,6 @@
 # include 
 #endif
 
-#if OSL_DEBUG_LEVEL > 0
-#include 
-#endif
 #include 
 
 #include "boost/scoped_array.hpp"
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
index ee4d6d0..ef81466 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
@@ -61,11 +61,8 @@ bool isVendorSupported(const OUString& sVendor)
 if (sVendor.equalsAscii(gVendorMap[pos].sVendorName))
 return true;
 }
-#if OSL_DEBUG_LEVEL >= 2
-OString sVendorName = OUStringToOString(sVendor, 
osl_getThreadTextEncoding());
-fprintf(stderr, "[Java frameworksunjavaplugin.so]sunjavaplugin does not 
support vendor: %s.\n",
-sVendorName.getStr());
-#endif
+SAL_INFO(
+"jfw.level2", "sunjavaplugin does not support vendor: " << sVendor);
 return false;
 }
 
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 9c79344..0a7e414 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -239,11 +239,9 @@ std::vector VendorSettings::getSupportedVendors()
 OString sParam =
 OUStringToOString(sValue, osl_getThreadTextEncoding());
 vecParams.push_back(sParam);
-#if OSL_DEBUG_LEVEL >=2
-OString sParamName = OUStringToOString(sName, 
osl_getThreadTextEncoding());
-fprintf(stderr,"[Java framework] Using bootstrap parameter %s"
-" = %s.\n", sParamName.getStr(), sParam.getStr());
-#endif
+SAL_INFO(
+"jfw.level2",
+"Using bootstrap parameter " << sName << " = " << sParam);
 }
 else
 break;
@@ -270,10 +268,10 @@ OString BootParams::getClasspath()
 sCP))
 {
 sClassPath = OUStringToOString(sCP, osl_getThreadTextEncoding());
-#if OSL_DEBUG_LEVEL >=2
-fprintf(stderr,"[Java framework] Using bootstrap parameter "
-UNO_JAVA_JFW_CLASSPATH " = %s.\n", sClassPath.getStr());
-#endif
+SAL_INFO(
+"jfw.level2",
+"Using bootstrap parameter " UNO_JAVA_JFW_CLASSPATH " = "
+<< sClassPath);
 }
 
 OUString sEnvCP;
@@ -287,10 +285,10 @@ OString BootParams::getClasspath()
 char szSep[] = {SAL_PATHSEPARATOR,0};
 sClassPath += OString(szSep) + OString(pCp);
 }
-#if OSL_DEBUG_LEVEL >=2
-fprintf(stderr,"[Java framework] Using bootstrap parameter "
-UNO_JAVA_JFW_ENV_CLASSPATH " and class path is:\n %s.\n", pCp ? 
pCp : "");
-#endif
+SAL_INFO(
+"jfw.level2",
+"Using bootstrap parameter " UNO_JAVA_JFW_ENV_CLASSPATH
+" and class path is: " << (pCp ? pCp : ""));
 }
 
 return sClassPath;
@@ -326,11 +324,10 @@ OUString BootParams::getVendorSettings()
  UNO_JAVA_JFW_VENDOR_SETTINGS));
 }
 }
-#if OSL_DEBUG_LEVEL >=2
-OString sValue = OUStringToOString(sVendor, osl_getThreadTextEncoding());
-fprintf(stderr,"[Java framework] Using bootstrap parameter "
-UNO_JAVA_JFW_VENDOR_SETTINGS" = %s.\n", sValue.getStr());
-#endif
+SAL_INFO(
+"jfw.level2",
+"Using bootstrap parameter " UNO_JAVA_JFW_VENDOR_SETTINGS " = "
+<< sVendor);
 }
 return sVendor;
 }
@@ -372,10 +369,10 @@ OUString BootParams::getJREHome()
 JFW_E_ERROR,
 OString("[Java framework] Error in function 
BootParams::getJREHome() "
  "(fwkbase.cxx)."));
-#if OSL_DEBUG_LEVEL >=2
-fprintf(stderr,"[Java framework] Using bootstrap parameter "
-UNO_JAVA_JFW_ENV_JREHOME" with JAVA_HOME = %s.\n", pJRE);
-#endif
+SAL_INFO(
+"jfw.level2",
+"Using bootstrap parameter " UNO_JAVA_JFW_ENV_JREHOME
+" with JAVA_HOME = " << pJRE);
 }
 else if (getMode() == JFW_MODE_DIRECT
 && !bEnvJRE
@@ -388,14 +385,9 @@ OUString BootParams::getJREHome()
  " must be set in direct mode."));
 }
 
-#if OSL_DEBUG_LEVEL >=2
-if (bJRE == 

[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2014-02-26 Thread Alexander Wilms
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx |4 ++--
 jvmfwk/source/elements.cxx   |8 
 jvmfwk/source/libxmlutil.cxx |6 +++---
 jvmfwk/source/libxmlutil.hxx |6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 132d7941e01a6b385f17ebd768341debd49f8847
Author: Alexander Wilms 
Date:   Tue Feb 25 19:15:10 2014 +0100

Remove visual noise from jvmfwk

Change-Id: Ie9ad9478532b395bd6a2bddd54bbe0d10b1b5eb2
Reviewed-on: https://gerrit.libreoffice.org/8277
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index 6fa931d..9fc8e83 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -39,7 +39,7 @@ rtl::Reference createInstance(createInstance_func 
pFunc,
 
 
 
-//##
+
 
 MalformedVersionException::MalformedVersionException()
 {}
@@ -54,7 +54,7 @@ MalformedVersionException::operator =(
 {
 return *this;
 }
-//##
+
 
 
 VendorBase::VendorBase(): m_bAccessibility(false)
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index ec30fc2..6b6ec8b 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -168,7 +168,7 @@ void createSettingsStructure(xmlDoc * document, bool * 
bNeedsSave)
 }
 
 
-//
+
 VersionInfo::VersionInfo(): arVersions(NULL)
 {
 }
@@ -204,7 +204,7 @@ sal_Int32 VersionInfo::getExcludeVersionSize()
 {
 return vecExcludeVersions.size();
 }
-//==
+
 
 NodeJava::NodeJava(Layer layer):
 m_layer(layer)
@@ -797,7 +797,7 @@ bool NodeJava::createSettingsDocument() const
 return true;
 }
 
-//=
+
 CNodeJavaInfo::CNodeJavaInfo() :
 m_bEmptyNode(false), bNil(true), bAutoSelect(true),
 nFeatures(0), nRequirements(0)
@@ -1048,7 +1048,7 @@ JavaInfo * CNodeJavaInfo::makeJavaInfo() const
 return pInfo;
 }
 
-//
+
 MergedSettings::MergedSettings():
 m_bEnabled(false),
 m_sClassPath(),
diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx
index 30b1d07..bb2640e 100644
--- a/jvmfwk/source/libxmlutil.cxx
+++ b/jvmfwk/source/libxmlutil.cxx
@@ -53,7 +53,7 @@ CXPathObjectPtr::operator xmlXPathObject*() const
 {
 return _object;
 }
-//===
+
 CXPathContextPtr::CXPathContextPtr(xmlXPathContextPtr aContext)
 : _object(aContext)
 {
@@ -85,7 +85,7 @@ CXPathContextPtr::operator xmlXPathContext*() const
 {
 return _object;
 }
-//===
+
 CXmlDocPtr::CXmlDocPtr(xmlDoc* aDoc)
 : _object(aDoc)
 {
@@ -118,7 +118,7 @@ CXmlDocPtr::operator xmlDoc*() const
 return _object;
 }
 
-//===
+
 CXmlCharPtr::CXmlCharPtr(xmlChar * aChar)
 : _object(aChar)
 {
diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/source/libxmlutil.hxx
index 4ee92d1..b99c04f 100644
--- a/jvmfwk/source/libxmlutil.hxx
+++ b/jvmfwk/source/libxmlutil.hxx
@@ -43,7 +43,7 @@ public:
 operator xmlXPathObject* () const;
 };
 
-//===
+
 class CXPathContextPtr
 {
 xmlXPathContext* _object;
@@ -59,7 +59,7 @@ public:
 operator xmlXPathContext* () const;
 };
 
-//===
+
 class CXmlDocPtr
 {
 xmlDoc* _object;
@@ -78,7 +78,7 @@ public:
 operator xmlDoc* () const;
 };
 
-//===
+
 class CXmlCharPtr
 {
 xmlChar* _object;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jvmfwk/plugins jvmfwk/source

2014-02-18 Thread Stephan Bergmann
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |8 
 jvmfwk/source/elements.cxx   |2 +-
 jvmfwk/source/elements.hxx   |2 +-
 jvmfwk/source/framework.cxx  |2 +-
 jvmfwk/source/fwkbase.cxx|   12 ++--
 5 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit f2529fc7441ced32daef09c0ca767080998d1792
Author: Stephan Bergmann 
Date:   Tue Feb 18 12:01:43 2014 +0100

jvmfwk: sal_Bool -> bool

Change-Id: I35f302006cb9ef6e98a041dea811818b98c0e876

diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx 
b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index fb99974..09e0435 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -29,7 +29,7 @@
 #include "jvmfwk/framework.h"
 
 
-static sal_Bool hasOption(char const * szOption, int argc, char** argv);
+static bool hasOption(char const * szOption, int argc, char** argv);
 static OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData);
 static bool findAndSelect(JavaInfo**);
 
@@ -132,14 +132,14 @@ OString getLD_LIBRARY_PATH(const rtl::ByteSequence & 
vendorData)
 return paths;
 }
 
-static sal_Bool hasOption(char const * szOption, int argc, char** argv)
+static bool hasOption(char const * szOption, int argc, char** argv)
 {
-sal_Bool retVal= sal_False;
+bool retVal= false;
 for(sal_Int16 i= 1; i < argc; i++)
 {
 if( ! strcmp(argv[i], szOption))
 {
-retVal= sal_True;
+retVal= true;
 break;
 }
 }
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 9fdab7a..ec30fc2 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -586,7 +586,7 @@ void NodeJava::write() const
 throw FrameworkException(JFW_E_ERROR, sExcMsg);
 }
 
-void NodeJava::setEnabled(sal_Bool bEnabled)
+void NodeJava::setEnabled(bool bEnabled)
 {
 m_enabled =  boost::optional(bEnabled);
 }
diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx
index 36fbd3e..f716fe4 100644
--- a/jvmfwk/source/elements.hxx
+++ b/jvmfwk/source/elements.hxx
@@ -186,7 +186,7 @@ public:
 /** sets m_enabled.
 /java/enabled@xsi:nil will be set to false when write is called.
  */
-void setEnabled(sal_Bool bEnabled);
+void setEnabled(bool bEnabled);
 
 /** sets m_sUserClassPath. See setEnabled.
  */
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index f0b9d69..dcaac1b 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -40,7 +40,7 @@ static bool g_bEnabledSwitchedOn = false;
 
 static JavaVM * g_pJavaVM = NULL;
 
-sal_Bool areEqualJavaInfo(
+bool areEqualJavaInfo(
 JavaInfo const * pInfoA,JavaInfo const * pInfoB)
 {
 return jfw_areEqualJavaInfo(pInfoA, pInfoB);
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 29949c6..3b4fba3 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -424,12 +424,12 @@ OUString BootParams::getJREHome()
 {
 OUString sJRE;
 OUString sEnvJRE;
-sal_Bool bJRE = Bootstrap::get()->getFrom(
+bool bJRE = Bootstrap::get()->getFrom(
 OUString(UNO_JAVA_JFW_JREHOME) ,sJRE);
-sal_Bool bEnvJRE = Bootstrap::get()->getFrom(
+bool bEnvJRE = Bootstrap::get()->getFrom(
 OUString(UNO_JAVA_JFW_ENV_JREHOME) ,sEnvJRE);
 
-if (bJRE == sal_True && bEnvJRE == sal_True)
+if (bJRE && bEnvJRE)
 {
 throw FrameworkException(
 JFW_E_CONFIGURATION,
@@ -439,7 +439,7 @@ OUString BootParams::getJREHome()
  "Check bootstrap parameters: environment 
variables, command line "
  "arguments, rc/ini files for executable and java 
framework library."));
 }
-else if (bEnvJRE == sal_True)
+else if (bEnvJRE)
 {
 const char * pJRE = getenv("JAVA_HOME");
 if (pJRE == NULL)
@@ -463,8 +463,8 @@ OUString BootParams::getJREHome()
 #endif
 }
 else if (getMode() == JFW_MODE_DIRECT
-&& bEnvJRE == sal_False
-&& bJRE == sal_False)
+&& !bEnvJRE
+&& !bJRE)
 {
 throw FrameworkException(
 JFW_E_CONFIGURATION,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits