external/libxslt/UnpackedTarball_libxslt.mk                       |    1 
 external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 |  120 ++++
 jvmfwk/inc/fwkbase.hxx                                            |   11 
 jvmfwk/inc/libxmlutil.hxx                                         |    4 
 jvmfwk/inc/vendorplugin.hxx                                       |   94 ---
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx               |  109 +--
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx                        |    7 
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx                  |   17 
 jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx                  |    5 
 jvmfwk/source/elements.cxx                                        |    4 
 jvmfwk/source/framework.cxx                                       |  275 
+++-------
 jvmfwk/source/fwkbase.cxx                                         |   18 
 jvmfwk/source/libxmlutil.cxx                                      |    2 
 solenv/clang-format/blacklist                                     |    4 
 svx/source/svdraw/svdundo.cxx                                     |    8 
 15 files changed, 317 insertions(+), 362 deletions(-)

New commits:
commit a8a394bf9fe86c288f6c3d5ef521e5663ce0b6aa
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Apr 17 14:50:10 2019 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Thu Apr 18 15:39:24 2019 +0200

    libxslt: add patch for CVE-2019-11068
    
    Change-Id: I3fe30de8140dce3d81cdfae7d41e0bd465b1d5f4
    Reviewed-on: https://gerrit.libreoffice.org/70879
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 2d85b75b1220484aebd6e583d6d7aee71280e38e)

diff --git a/external/libxslt/UnpackedTarball_libxslt.mk 
b/external/libxslt/UnpackedTarball_libxslt.mk
index eae318ef74b9..beb591b8b2a8 100644
--- a/external/libxslt/UnpackedTarball_libxslt.mk
+++ b/external/libxslt/UnpackedTarball_libxslt.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxslt,\
        external/libxslt/libxslt-msvc.patch.2 \
        external/libxslt/libxslt-1.1.26-memdump.patch \
        external/libxslt/rpath.patch.0 \
+       external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 
b/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1
new file mode 100644
index 000000000000..260f35d1a35e
--- /dev/null
+++ b/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1
@@ -0,0 +1,120 @@
+From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnho...@aevum.de>
+Date: Sun, 24 Mar 2019 09:51:39 +0100
+Subject: [PATCH] Fix security framework bypass
+
+xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
+don't check for this condition and allow access. With a specially
+crafted URL, xsltCheckRead could be tricked into returning an error
+because of a supposedly invalid URL that would still be loaded
+succesfully later on.
+
+Fixes #12.
+
+Thanks to Felix Wilhelm for the report.
+---
+ libxslt/documents.c | 18 ++++++++++--------
+ libxslt/imports.c   |  9 +++++----
+ libxslt/transform.c |  9 +++++----
+ libxslt/xslt.c      |  9 +++++----
+ 4 files changed, 25 insertions(+), 20 deletions(-)
+
+diff --git a/libxslt/documents.c b/libxslt/documents.c
+index 3f3a7312..4aad11bb 100644
+--- a/libxslt/documents.c
++++ b/libxslt/documents.c
+@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const 
xmlChar *URI) {
+       int res;
+ 
+       res = xsltCheckRead(ctxt->sec, ctxt, URI);
+-      if (res == 0) {
+-          xsltTransformError(ctxt, NULL, NULL,
+-               "xsltLoadDocument: read rights for %s denied\n",
+-                           URI);
++      if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(ctxt, NULL, NULL,
++                     "xsltLoadDocument: read rights for %s denied\n",
++                                 URI);
+           return(NULL);
+       }
+     }
+@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const 
xmlChar *URI) {
+       int res;
+ 
+       res = xsltCheckRead(sec, NULL, URI);
+-      if (res == 0) {
+-          xsltTransformError(NULL, NULL, NULL,
+-               "xsltLoadStyleDocument: read rights for %s denied\n",
+-                           URI);
++      if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsltLoadStyleDocument: read rights for %s denied\n",
++                                 URI);
+           return(NULL);
+       }
+     }
+diff --git a/libxslt/imports.c b/libxslt/imports.c
+index 874870cc..3783b247 100644
+--- a/libxslt/imports.c
++++ b/libxslt/imports.c
+@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, 
xmlNodePtr cur) {
+       int secres;
+ 
+       secres = xsltCheckRead(sec, NULL, URI);
+-      if (secres == 0) {
+-          xsltTransformError(NULL, NULL, NULL,
+-               "xsl:import: read rights for %s denied\n",
+-                           URI);
++      if (secres <= 0) {
++            if (secres == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsl:import: read rights for %s denied\n",
++                                 URI);
+           goto error;
+       }
+     }
+diff --git a/libxslt/transform.c b/libxslt/transform.c
+index 13793914..0636dbd0 100644
+--- a/libxslt/transform.c
++++ b/libxslt/transform.c
+@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
+      */
+     if (ctxt->sec != NULL) {
+       ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
+-      if (ret == 0) {
+-          xsltTransformError(ctxt, NULL, inst,
+-               "xsltDocumentElem: write rights for %s denied\n",
+-                           filename);
++      if (ret <= 0) {
++            if (ret == 0)
++                xsltTransformError(ctxt, NULL, inst,
++                     "xsltDocumentElem: write rights for %s denied\n",
++                                 filename);
+           xmlFree(URL);
+           xmlFree(filename);
+           return;
+diff --git a/libxslt/xslt.c b/libxslt/xslt.c
+index 780a5ad7..a234eb79 100644
+--- a/libxslt/xslt.c
++++ b/libxslt/xslt.c
+@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
+       int res;
+ 
+       res = xsltCheckRead(sec, NULL, filename);
+-      if (res == 0) {
+-          xsltTransformError(NULL, NULL, NULL,
+-               "xsltParseStylesheetFile: read rights for %s denied\n",
+-                           filename);
++      if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsltParseStylesheetFile: read rights for %s denied\n",
++                                 filename);
+           return(NULL);
+       }
+     }
+-- 
+2.18.1
+
commit 90aa1f6e8070cadb26132e7187b47241004f26f8
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Apr 9 14:51:54 2019 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Thu Apr 18 15:39:24 2019 +0200

    tdf#124503: Support JRE installations with unknown java.vendor property
    
    After recent additions of 61c4f96d6ae6a80370774e53287edb27cbce8067 "Support
    AdoptOpenJDK" and 41507db590b24e1b9b45d95cad55c71ba2e4091d "Support Amazon
    Corretto" to our hard-coded list, there is now reports that at least Debian 
and
    Ubuntu tried to distribute versions of OpenJDK with the java.vendor propety 
set
    to string like "Debian" or "Ubuntu".  Instead of trying to catch up with an
    ever-growing hard-coded list, it is probably better to stop relying 
exclusively
    on such a hard-coded list, and for unknown vendor values, try out whether 
the
    SunInfo backend (which supports the "generic" OpenJDK) would be able to 
handle
    the given JRE.  (For simplicity, assume that any versions of such JREs are
    supported.  Our baseline is Java 6, and there are unlikely any older 
versions of
    JREs from unknown vendors out there.  If this turns out to be problematic, 
we
    could include information about problematic vendors after all, or add a 
general
    check that JREs from unknown vendors are at least Java 6.)
    
    Many functions in jvmfwk/inc/vendorplugin.hxx that used to take a set of
    sVendor/sMinVersion/sMaxVerison/arExcludeList paramters had to be revised to
    take a vendorSettings parameter instead, and
    VendorSettings::getVersionInformation has been changed to return a
    boost::optional, so that unknown vendors can be handled gracefully.
    
    Reviewed-on: https://gerrit.libreoffice.org/70460
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit 3d27b2fa9c5a03f78e5145377402f8a88e3da1be)
    Conflicts:
            jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
            jvmfwk/source/framework.cxx
    
    Change-Id: Ibf915f2ddd59e09b77e2c03be688cac0547b9ac9
    Reviewed-on: https://gerrit.libreoffice.org/70587
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/jvmfwk/source/fwkbase.hxx b/jvmfwk/inc/fwkbase.hxx
similarity index 93%
rename from jvmfwk/source/fwkbase.hxx
rename to jvmfwk/inc/fwkbase.hxx
index b3779cda96b6..8fe077b79a28 100644
--- a/jvmfwk/source/fwkbase.hxx
+++ b/jvmfwk/inc/fwkbase.hxx
@@ -16,10 +16,15 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_JVMFWK_SOURCE_FWKBASE_HXX
-#define INCLUDED_JVMFWK_SOURCE_FWKBASE_HXX
+#ifndef INCLUDED_JVMFWK_INC_FWKBASE_HXX
+#define INCLUDED_JVMFWK_INC_FWKBASE_HXX
+
+#include <sal/config.h>
+
+#include <boost/optional.hpp>
 
 #include <rtl/ustring.hxx>
+#include "elements.hxx"
 #include "libxmlutil.hxx"
 
 namespace jfw
@@ -34,7 +39,7 @@ class VendorSettings
 public:
     VendorSettings();
 
-    VersionInfo getVersionInformation(const OUString & sVendor) const;
+    boost::optional<VersionInfo> getVersionInformation(const OUString & 
sVendor) const;
 
     ::std::vector< OUString> getSupportedVendors() const;
 };
diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/inc/libxmlutil.hxx
similarity index 96%
rename from jvmfwk/source/libxmlutil.hxx
rename to jvmfwk/inc/libxmlutil.hxx
index 8a58280b406d..078d285ac78f 100644
--- a/jvmfwk/source/libxmlutil.hxx
+++ b/jvmfwk/inc/libxmlutil.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_JVMFWK_SOURCE_LIBXMLUTIL_HXX
-#define INCLUDED_JVMFWK_SOURCE_LIBXMLUTIL_HXX
+#ifndef INCLUDED_JVMFWK_INC_LIBXMLUTIL_HXX
+#define INCLUDED_JVMFWK_INC_LIBXMLUTIL_HXX
 
 #include <libxml/parser.h>
 #include <libxml/xpath.h>
diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx
index f370f1123375..0aa6d84276e3 100644
--- a/jvmfwk/inc/vendorplugin.hxx
+++ b/jvmfwk/inc/vendorplugin.hxx
@@ -28,10 +28,10 @@
 
 #include <memory>
 #include <vector>
-#include <utility>
-#include "elements.hxx"
 #include "vendorbase.hxx"
 
+namespace jfw { class VendorSettings; }
+
 /**
    @file
    <p>
@@ -56,7 +56,6 @@ enum class javaPluginError
     WrongVersionFormat,
     FailedVersion,
     NoJre,
-    WrongVendor,
     WrongArch,
     VmCreationFailed
 };
@@ -64,26 +63,14 @@ enum class javaPluginError
 
 /** obtains information about installations of Java Runtime Environments 
(JREs).
 
-    <p>The function gathers information about available JREs which have the 
same
-    vendor as determined by the <code>sVendor</code> parameter. Only 
information
+    <p>The function gathers information about available JREs. Only information
     about those JREs which match the version requirements are returned. These
-    requirements are specified by the parameters <code>sMinVersion</code>,
-    <code>sMaxVersion</code> and <code>arExcludeList</code>.
+    requirements are specified by the parameter <code>vendorSettings</code>.
     </p>
     <p>
     The JavaInfo structures returned in <code>parJavaInfo</code> should be 
ordered
     according to their version. The one, representing a JRE with the highest
     version should be the first in the array. </p>
-    @param sVendor
-        [in] only JREs from this vendor are examined. This parameter always 
contains
-        a vendor string. That is, the string it is not empty.
-    @param sMinVersion
-        [in] represents the minimum version of a JRE. The string can be empty.
-    @param sMaxVersion
-        [in] represents the maximum version of a JRE. The string can be empty.
-    @param arExcludeList
-        [in] contains a list of &quot;bad&quot; versions. JREs which have one 
of these
-        versions must not be returned by this function.
     @param parJavaInfo
         [out] if the function runs successfully then <code>parJavaInfo</code> 
contains
         on return a vector of pointers to <code>JavaInfo</code> objects.
@@ -91,40 +78,25 @@ enum class javaPluginError
     @return
     javaPluginError::NONE the function ran successfully.</br>
     javaPluginError::Error an error occurred during execution.</br>
-    javaPluginError::InvalidArg an argument was not valid.</br>
     javaPluginError::WrongVersionFormat the version strings in
-    <code>sMinVersion,sMaxVersion,arExcludeList</code> are not recognized as 
valid
+    <code>vendorSettings</code> are not recognized as valid
     version strings.
  */
 javaPluginError jfw_plugin_getAllJavaInfos(
     bool checkJavaHomeAndPath,
-    OUString const& sVendor,
-    OUString const& sMinVersion,
-    OUString const& sMaxVersion,
-    std::vector<OUString> const & arExcludeList,
+    jfw::VendorSettings const & vendorSettings,
     std::vector<std::unique_ptr<JavaInfo>> * parJavaInfo,
     std::vector<rtl::Reference<jfw_plugin::VendorBase>> & infos);
 
 /** obtains information for a JRE at a given location.
 
-   <p>If the given location belongs to a JRE whoose vendor matches the
-   sVendor argument and the JRE has a version which meets the requirements as
-   specified by <code>sMinVersion, sMaxVersion, arExcludeList</code> then
-   this function shall return a JavaInfo object for this JRE if this 
implementation
-   supports this vendor.</p>
+   <p>If the given location belongs to a JRE
+   and the JRE has a version which meets the requirements as
+   specified by <code>vendorSettings</code> then
+   this function shall return a JavaInfo object for this JRE.</p>
 
    @param sLocation
        [in] a file URL to the directory of the JRE.
-   @param sVendor
-      [in] a name of a vendor. This parameter always contains
-        a vendor string. That is, the string it is not empty.
-   @param sMinVersion
-       [in] represents the minimum version of a JRE.
-   @param sMaxVersion
-       [in] represents the maximum version of a JRE.
-   @param arExcludeList
-       [in] contains a list of &quot;bad&quot; versions. JREs which have one 
of these
-        versions must not be returned by this function.
    @param ppInfo
        [out] if the function runs successfully then <code>ppInfo</code> 
contains
         on return a pointer to a <code>JavaInfo</code> object.
@@ -134,37 +106,23 @@ javaPluginError jfw_plugin_getAllJavaInfos(
    javaPluginError::Error an error occurred during execution.</br>
    javaPluginError::InvalidArg an argument was not valid. For example, 
sLocation
     is an empty string.</br>
-   javaPluginError::WrongVersionFormat the version strings in
-    <code>sMinVersion,sMaxVersion,arExcludeList</code> are not recognized as 
valid
-    version strings.
    javaPluginError::FailedVersion there is a JRE at the given location but it 
does not
    meet the version requirements.
-   javaPluginError::NoJre no JRE could be detected at the given location. 
However, that
-   does not mean necessarily that there is no JRE. There could be a JRE but it 
has
-   a vendor which is not supported by this API implementation.
+   javaPluginError::NoJre no JRE could be detected at the given location.
  */
 javaPluginError jfw_plugin_getJavaInfoByPath(
     OUString const& sLocation,
-    OUString const& sVendor,
-    OUString const& sMinVersion,
-    OUString const& sMaxVersion,
-    std::vector<OUString> const &arExcludeList,
+    jfw::VendorSettings const & vendorSettings,
     std::unique_ptr<JavaInfo> * ppInfo);
 
 
 /** obtains information for a JRE referenced by the JAVA_HOME environment 
variable.
 
-   <p>If the JAVA_HOME environment variable is set and points to a JRE whoose 
vendor
-   matches the requirements given by vecVendorInfos (i.e. it has a vendor that 
is
-   given in vecVendorInfos and the version requirements for the vendor are 
met),
+   <p>If the JAVA_HOME environment variable is set and points to a JRE that
+   matches the requirements given by vendorSettings (i.e.
+   the version requirements, if any, for the vendor are met),
    then this function shall return a JavaInfo object for this JRE.</p>
 
-   @param vecVendorInfos
-       [in] vector specifying the vendor and version requirements that the JRE 
must fulfill.
-       The vector contains pairs of vendors and the respective version 
requirements
-       for those vendors. The JRE must support the requirements of one given 
pair in the
-       vector (i.e. it must be of one of the vendors and meet the version 
requirements
-       - minVersion, maxVersion, excludeVersions - for that specific vendor).
    @param ppInfo
        [out] if the JAVA_HOME environment variable is set and points to a 
suitable
        JRE, then <code>ppInfo</code> contains
@@ -173,12 +131,12 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
    @return
    javaPluginError::NONE the function ran successfully.</br>
    javaPluginError::NoJre no suitable JRE could be detected at the given 
location. However, that
-   does not mean necessarily that there is no JRE. There could be a JRE but it 
has
-   a vendor which is not supported by this API implementation or it does not
+   does not mean necessarily that there is no JRE. There could be a JRE but
+   it does not
    meet the version requirements.
  */
 javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
-    std::vector<std::pair<OUString, jfw::VersionInfo>> const& vecVendorInfos,
+    jfw::VendorSettings const & vendorSettings,
     std::unique_ptr<JavaInfo> * ppInfo,
     std::vector<rtl::Reference<jfw_plugin::VendorBase>> & infos);
 
@@ -187,20 +145,14 @@ javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
     whose executable is in the PATH.
 
     <p>The function gathers information about available JREs which are on the 
PATH
-    (PATH environment variable) and meet the vendor and version requirements 
given by
-    <code>vecVendorInfos</code> (i.e. they have a vendor that is given in
-    <code>vecVendorInfos</code> and the version requirements for the vendor 
are met).
+    (PATH environment variable) and meet the version requirements given by
+    <code>vendorSettings</code> (i.e.
+    the version requirements, if any, for the vendor are met).
     </p>
     <p>
     The JavaInfo structures returned in <code>vecJavaInfosFromPath</code> 
should be ordered
     according to their occurrence in the PATH. The one that is the first one 
on the PATH
     is also the first element in the vector.</p>
-    @param vecVendorInfos
-       [in] vector specifying the vendor and version requirements that the JRE 
must fulfill.
-       The vector contains pairs of vendors and the respective version 
requirements
-       for those vendors. The JRE must support the requirements of one given 
pair in the
-       vector (i.e. it must be of one of the vendors and meet the version 
requirements
-       - minVersion, maxVersion, excludeVersions - for that specific vendor).
     @param vecJavaInfosFromPath
         [out] if the function runs successfully then 
<code>vecJavaInfosFromPath</code>
         contains on return a vector of pointers to <code>JavaInfo</code> 
objects.
@@ -216,7 +168,7 @@ javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
  */
 
 javaPluginError jfw_plugin_getJavaInfosFromPath(
-    std::vector<std::pair<OUString, jfw::VersionInfo>> const& vecVendorInfos,
+    jfw::VendorSettings const & vendorSettings,
     std::vector<std::unique_ptr<JavaInfo>> & vecJavaInfosFromPath,
     std::vector<rtl::Reference<jfw_plugin::VendorBase>> & infos);
 
@@ -256,8 +208,6 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
     @return
     javaPluginError::NONE the function ran successfully.</br>
     javaPluginError::Error an error occurred during execution.</br>
-    javaPluginError::WrongVendor the <code>JavaInfo</code> object was not 
created
-    in by this library and the VM cannot be started.</br>
     JFW_PLUGIN_E_VM_CREATION_FAILED a VM could not be created. The error was 
caused
     by the JRE.
  */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index b55fc1d7065a..9ab07c57e46c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -56,6 +56,7 @@
 
 #include <jni.h>
 #include <rtl/byteseq.hxx>
+#include <fwkbase.hxx>
 #include <vendorplugin.hxx>
 #include "util.hxx"
 #include "sunversion.hxx"
@@ -295,19 +296,12 @@ javaPluginError checkJavaVersionRequirements(
 
 javaPluginError jfw_plugin_getAllJavaInfos(
     bool checkJavaHomeAndPath,
-    OUString const& sVendor,
-    OUString const& sMinVersion,
-    OUString const& sMaxVersion,
-    std::vector<OUString> const &arExcludeList,
+    jfw::VendorSettings const & vendorSettings,
     std::vector<std::unique_ptr<JavaInfo>>* parJavaInfo,
     std::vector<rtl::Reference<jfw_plugin::VendorBase>> & infos)
 {
     assert(parJavaInfo);
 
-    OSL_ASSERT(!sVendor.isEmpty());
-    if (sVendor.isEmpty())
-        return javaPluginError::InvalidArg;
-
     //Find all JREs
     vector<rtl::Reference<VendorBase> > vecInfos =
         addAllJREInfos(checkJavaHomeAndPath, infos);
@@ -315,17 +309,16 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 
     for (auto const& vecInfo : vecInfos)
     {
+        if (auto const versionInfo = 
vendorSettings.getVersionInformation(vecInfo->getVendor()))
+        {
+            javaPluginError err = checkJavaVersionRequirements(
+                vecInfo, versionInfo->sMinVersion, versionInfo->sMaxVersion, 
versionInfo->vecExcludeVersions);
 
-        if (sVendor != vecInfo->getVendor())
-            continue;
-
-        javaPluginError err = checkJavaVersionRequirements(
-            vecInfo, sMinVersion, sMaxVersion, arExcludeList);
-
-        if (err == javaPluginError::FailedVersion || err == 
javaPluginError::WrongArch)
-            continue;
-        else if (err == javaPluginError::WrongVersionFormat)
-            return err;
+            if (err == javaPluginError::FailedVersion || err == 
javaPluginError::WrongArch)
+                continue;
+            else if (err == javaPluginError::WrongVersionFormat)
+                return err;
+        }
 
         vecVerifiedInfos.push_back(vecInfo);
     }
@@ -342,10 +335,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 
 javaPluginError jfw_plugin_getJavaInfoByPath(
     OUString const& sPath,
-    OUString const& sVendor,
-    OUString const& sMinVersion,
-    OUString const& sMaxVersion,
-    std::vector<OUString> const &arExcludeList,
+    jfw::VendorSettings const & vendorSettings,
     std::unique_ptr<JavaInfo> * ppInfo)
 {
     assert(ppInfo != nullptr);
@@ -353,19 +343,17 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
     if (sPath.isEmpty())
         return javaPluginError::InvalidArg;
 
-    OSL_ASSERT(!sVendor.isEmpty());
-    if (sVendor.isEmpty())
-        return javaPluginError::InvalidArg;
-
     rtl::Reference<VendorBase> aVendorInfo = getJREInfoByPath(sPath);
     if (!aVendorInfo.is())
         return javaPluginError::NoJre;
 
     //Check if the detected JRE matches the version requirements
-    if (sVendor != aVendorInfo->getVendor())
-        return javaPluginError::NoJre;
-    javaPluginError errorcode = checkJavaVersionRequirements(
-            aVendorInfo, sMinVersion, sMaxVersion, arExcludeList);
+    javaPluginError errorcode = javaPluginError::NONE;
+    if (auto const versionInfo = 
vendorSettings.getVersionInformation(aVendorInfo->getVendor()))
+    {
+        errorcode = checkJavaVersionRequirements(
+            aVendorInfo, versionInfo->sMinVersion, versionInfo->sMaxVersion, 
versionInfo->vecExcludeVersions);
+    }
 
     if (errorcode == javaPluginError::NONE)
         *ppInfo = createJavaInfo(aVendorInfo);
@@ -374,7 +362,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
 }
 
 javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
-    std::vector<pair<OUString, jfw::VersionInfo>> const& vecVendorInfos,
+    jfw::VendorSettings const & vendorSettings,
     std::unique_ptr<JavaInfo> * ppInfo,
     std::vector<rtl::Reference<VendorBase>> & infos)
 {
@@ -388,32 +376,24 @@ javaPluginError jfw_plugin_getJavaInfoFromJavaHome(
     assert(infoJavaHome.size() == 1);
 
     //Check if the detected JRE matches the version requirements
-    for (auto const& vendorInfo : vecVendorInfos)
-    {
-        const OUString& vendor = vendorInfo.first;
-        jfw::VersionInfo versionInfo = vendorInfo.second;
-
-        if (vendor == infoJavaHome[0]->getVendor())
-        {
-            javaPluginError errorcode = checkJavaVersionRequirements(
+    auto const versionInfo = 
vendorSettings.getVersionInformation(infoJavaHome[0]->getVendor());
+    if (!versionInfo
+        || (checkJavaVersionRequirements(
                 infoJavaHome[0],
-                versionInfo.sMinVersion,
-                versionInfo.sMaxVersion,
-                versionInfo.vecExcludeVersions);
-
-            if (errorcode == javaPluginError::NONE)
-            {
-                *ppInfo = createJavaInfo(infoJavaHome[0]);
-                return javaPluginError::NONE;
-            }
-        }
+                versionInfo->sMinVersion,
+                versionInfo->sMaxVersion,
+                versionInfo->vecExcludeVersions)
+            == javaPluginError::NONE))
+    {
+        *ppInfo = createJavaInfo(infoJavaHome[0]);
+        return javaPluginError::NONE;
     }
 
     return javaPluginError::NoJre;
 }
 
 javaPluginError jfw_plugin_getJavaInfosFromPath(
-    std::vector<std::pair<OUString, jfw::VersionInfo>> const& vecVendorInfos,
+    jfw::VendorSettings const & vendorSettings,
     std::vector<std::unique_ptr<JavaInfo>> & javaInfosFromPath,
     std::vector<rtl::Reference<jfw_plugin::VendorBase>> & infos)
 {
@@ -426,24 +406,16 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
     // copy infos of JREs that meet version requirements to vecVerifiedInfos
     for (auto const& infosFromPath : vecInfosFromPath)
     {
-        for (auto const& vendorInfo : vecVendorInfos)
-        {
-            const OUString& vendor = vendorInfo.first;
-            jfw::VersionInfo const & versionInfo = vendorInfo.second;
-
-            if (vendor == infosFromPath->getVendor())
-            {
-                javaPluginError errorcode = checkJavaVersionRequirements(
+        auto const versionInfo = 
vendorSettings.getVersionInformation(infosFromPath->getVendor());
+        if (!versionInfo
+            || (checkJavaVersionRequirements(
                     infosFromPath,
-                    versionInfo.sMinVersion,
-                    versionInfo.sMaxVersion,
-                    versionInfo.vecExcludeVersions);
-
-                if (errorcode == javaPluginError::NONE)
-                {
-                    vecVerifiedInfos.push_back(createJavaInfo(infosFromPath));
-                }
-            }
+                    versionInfo->sMinVersion,
+                    versionInfo->sMaxVersion,
+                    versionInfo->vecExcludeVersions)
+                == javaPluginError::NONE))
+        {
+            vecVerifiedInfos.push_back(createJavaInfo(infosFromPath));
         }
     }
 
@@ -620,9 +592,6 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
     // unless errorcode is volatile the following warning occurs on gcc:
     // warning: variable 'errorcode' might be clobbered by `longjmp' or `vfork'
     volatile javaPluginError errorcode = javaPluginError::NONE;
-    //Check if the Vendor (pInfo->sVendor) is supported by this plugin
-    if ( ! isVendorSupported(pInfo->sVendor))
-        return javaPluginError::WrongVendor;
 #ifdef MACOSX
     rtl::Reference<VendorBase> aVendorInfo = getJREInfoByPath( 
pInfo->sLocation );
     if ( !aVendorInfo.is() || aVendorInfo->compareVersions( pInfo->sVersion ) 
< 0 )
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 9808c8707e96..3b08aa4cffb2 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1045,6 +1045,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
         }
     }
 
+    auto knownVendor = false;
     if (!sVendorName.isEmpty())
     {
         //find the creator func for the respective vendor name
@@ -1056,10 +1057,16 @@ rtl::Reference<VendorBase> getJREInfoByPath(
             if (sNameMap == sVendorName)
             {
                 ret = createInstance(gVendorMap[c].createFunc, props);
+                knownVendor = true;
                 break;
             }
         }
     }
+    // For unknown vendors, try SunInfo as fallback:
+    if (!knownVendor)
+    {
+        ret = createInstance(SunInfo::createInstance, props);
+    }
     if (!ret.is())
     {
         vecBadPaths.push_back(sFilePath);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
index 2960d118cf38..9cdeb5c89c26 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
@@ -22,9 +22,6 @@
 #include "gnujre.hxx"
 #include "sunjre.hxx"
 #include "otherjre.hxx"
-#include <osl/thread.h>
-#include <stdio.h>
-
 
 namespace jfw_plugin
 {
@@ -51,20 +48,6 @@ BEGIN_VENDOR_MAP()
     VENDOR_MAP_ENTRY("Azul Systems, Inc.", OtherInfo)
 END_VENDOR_MAP()
 
-
-bool isVendorSupported(const OUString& sVendor)
-{
-    const size_t count = SAL_N_ELEMENTS(gVendorMap) - 1;
-    for ( size_t pos = 0; pos < count; ++pos )
-    {
-        if (sVendor.equalsAscii(gVendorMap[pos].sVendorName))
-            return true;
-    }
-    SAL_INFO(
-        "jfw.level2", "sunjavaplugin does not support vendor: " << sVendor);
-    return false;
-}
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx 
b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx
index b7a12685d9c4..3e022c3b49b9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.hxx
@@ -46,11 +46,6 @@ VendorSupportMapEntry gVendorMap[] ={
 #define END_VENDOR_MAP() \
     {nullptr, nullptr, nullptr} };
 
-/* Examines if the vendor supplied in parameter sVendor is part of the
-   list of supported vendors. That is the arry of VendorSupportMapEntry
-   is search for an respective entry.
-*/
-bool isVendorSupported(const OUString & sVendor);
 }
 
 #endif
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index ff083373f553..c15ee6757bb6 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -26,9 +26,9 @@
 #include <osl/mutex.hxx>
 #include <osl/file.hxx>
 #include <fwkutil.hxx>
-#include "fwkbase.hxx"
+#include <fwkbase.hxx>
 #include "framework.hxx"
-#include "libxmlutil.hxx"
+#include <libxmlutil.hxx>
 #include <osl/thread.hxx>
 #include <algorithm>
 #include <libxml/parser.h>
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 777133212082..efe26050f56f 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -34,7 +34,7 @@
 #include "framework.hxx"
 #include <fwkutil.hxx>
 #include <elements.hxx>
-#include "fwkbase.hxx"
+#include <fwkbase.hxx>
 
 namespace {
 
@@ -58,8 +58,6 @@ javaFrameworkError 
jfw_findAllJREs(std::vector<std::unique_ptr<JavaInfo>> *pparI
         osl::MutexGuard guard(jfw::FwkMutex::get());
 
         jfw::VendorSettings aVendorSettings;
-        std::vector<OUString> vecVendors =
-            aVendorSettings.getSupportedVendors();
         //Add the JavaInfos found by jfw_plugin_getAllJavaInfos to the vector
         std::vector<std::unique_ptr<JavaInfo>> vecInfo;
         //get the list of paths to jre locations which have been
@@ -67,70 +65,48 @@ javaFrameworkError 
jfw_findAllJREs(std::vector<std::unique_ptr<JavaInfo>> *pparI
         const jfw::MergedSettings settings;
         const std::vector<OUString>& vecJRELocations =
             settings.getJRELocations();
-        //Use every plug-in library to get Java installations.
-        for (auto const & vendor: vecVendors)
-        {
-            jfw::VersionInfo versionInfo =
-                aVendorSettings.getVersionInformation(vendor);
+        //Use all plug-in libraries to get Java installations.
+        std::vector<std::unique_ptr<JavaInfo>> arInfos;
+        std::vector<rtl::Reference<jfw_plugin::VendorBase>> infos;
+        javaPluginError plerr = jfw_plugin_getAllJavaInfos(
+            true,
+            aVendorSettings,
+            & arInfos,
+            infos);
 
-            //get all installations of one vendor according to minVersion,
-            //maxVersion and excludeVersions
-            std::vector<std::unique_ptr<JavaInfo>> arInfos;
-            std::vector<rtl::Reference<jfw_plugin::VendorBase>> infos;
-            javaPluginError plerr = jfw_plugin_getAllJavaInfos(
-                true,
-                vendor,
-                versionInfo.sMinVersion,
-                versionInfo.sMaxVersion,
-                versionInfo.vecExcludeVersions,
-                & arInfos,
-                infos);
+        if (plerr != javaPluginError::NONE)
+            return JFW_E_ERROR;
 
-            if (plerr != javaPluginError::NONE)
-                return JFW_E_ERROR;
+        for (auto & j: arInfos)
+            vecInfo.push_back(std::move(j));
 
-            for (auto & j: arInfos)
-                vecInfo.push_back(std::move(j));
+        //Check if any plugin can detect JREs at the location
+        // of the paths added by jfw_addJRELocation
+        //Check every manually added location
+        for (auto const & ii: vecJRELocations)
+        {
+            std::unique_ptr<JavaInfo> aInfo;
+            plerr = jfw_plugin_getJavaInfoByPath(
+                ii,
+                aVendorSettings,
+                &aInfo);
+            if (plerr == javaPluginError::NoJre)
+                continue;
+            if (plerr == javaPluginError::FailedVersion)
+                continue;
+            else if (plerr != javaPluginError::NONE)
+                return JFW_E_ERROR;
 
-            //Check if the current plugin can detect JREs at the location
-            // of the paths added by jfw_addJRELocation
-            //Check every manually added location
-            for (auto const & ii: vecJRELocations)
+            // Was this JRE already added?
+            if (std::find_if(
+                    vecInfo.begin(), vecInfo.end(),
+                    [&aInfo](std::unique_ptr<JavaInfo> const & info) {
+                        return areEqualJavaInfo(
+                            info.get(), aInfo.get());
+                    })
+                == vecInfo.end())
             {
-                std::unique_ptr<JavaInfo> aInfo;
-                plerr = jfw_plugin_getJavaInfoByPath(
-                    ii,
-                    vendor,
-                    versionInfo.sMinVersion,
-                    versionInfo.sMaxVersion,
-                    versionInfo.vecExcludeVersions,
-                    &aInfo);
-                if (plerr == javaPluginError::NoJre)
-                    continue;
-                if (plerr == javaPluginError::FailedVersion)
-                    continue;
-                else if (plerr != javaPluginError::NONE)
-                    return JFW_E_ERROR;
-
-                // Was this JRE already added?  Different plugins could detect
-                // the same JRE.  Also make sure vecInfo contains only 
JavaInfos
-                // for the vendors for which there is a javaSelection/plugins/
-                // library entry in the javavendors.xml; jfw_getJavaInfoByPath
-                // can return a JavaInfo of any vendor:
-                if ((std::find_if(
-                         vecInfo.begin(), vecInfo.end(),
-                         [&aInfo](std::unique_ptr<JavaInfo> const & info) {
-                             return areEqualJavaInfo(
-                                 info.get(), aInfo.get());
-                         })
-                     == vecInfo.end())
-                    && (std::find(
-                            vecVendors.begin(), vecVendors.end(),
-                            aInfo->sVendor)
-                        != vecVendors.end()))
-                {
-                    vecInfo.push_back(std::move(aInfo));
-                }
+                vecInfo.push_back(std::move(aInfo));
             }
         }
 
@@ -302,7 +278,6 @@ javaFrameworkError jfw_startVM(
             g_pJavaVM = pVm;
             *ppVM = pVm;
         }
-        OSL_ASSERT(plerr != javaPluginError::WrongVendor);
     }
     catch (const jfw::FrameworkException& e)
     {
@@ -341,25 +316,13 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr<JavaInfo> *pInfo)
 
         // get list of vendors for Java installations
         jfw::VendorSettings aVendorSettings;
-        std::vector<OUString> vecVendors =
-            aVendorSettings.getSupportedVendors();
-
-        // save vendors and respective version requirements pair-wise in a 
vector
-        std::vector<std::pair<OUString, jfw::VersionInfo>> versionInfos;
-        for (auto const & vendor : vecVendors)
-        {
-            jfw::VersionInfo versionInfo =
-                aVendorSettings.getVersionInformation(vendor);
-
-            versionInfos.emplace_back(vendor, versionInfo);
-        }
 
         std::vector<rtl::Reference<jfw_plugin::VendorBase>> infos;
 
         // first inspect Java installation that the JAVA_HOME
         // environment variable points to (if it is set)
         if (jfw_plugin_getJavaInfoFromJavaHome(
-                versionInfos, &aCurrentInfo, infos)
+                aVendorSettings, &aCurrentInfo, infos)
             == javaPluginError::NONE)
         {
             // compare features
@@ -377,7 +340,7 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr<JavaInfo> *pInfo)
         {
             std::vector<std::unique_ptr<JavaInfo>> vecJavaInfosFromPath;
             if (jfw_plugin_getJavaInfosFromPath(
-                    versionInfos, vecJavaInfosFromPath, infos)
+                    aVendorSettings, vecJavaInfosFromPath, infos)
                 == javaPluginError::NONE)
             {
                 for (auto & pJInfo: vecJavaInfosFromPath)
@@ -403,31 +366,20 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr<JavaInfo> *pInfo)
 
 
         // if no suitable Java installation has been found yet:
-        // first iterate over all vendors to find a suitable Java installation,
+        // first use jfw_plugin_getAllJavaInfos to find a suitable Java 
installation,
         // then try paths that have been added manually
         if (!bInfoFound)
         {
-            //Use every vendor to get Java installations. At the first usable
-            //Java the loop will break
-            for (auto const & vendor : vecVendors)
+            //get all installations
+            std::vector<std::unique_ptr<JavaInfo>> arInfos;
+            javaPluginError plerr = jfw_plugin_getAllJavaInfos(
+                false,
+                aVendorSettings,
+                & arInfos,
+                infos);
+
+            if (plerr == javaPluginError::NONE)
             {
-                jfw::VersionInfo versionInfo =
-                    aVendorSettings.getVersionInformation(vendor);
-
-                //get all installations of one vendor according to minVersion,
-                //maxVersion and excludeVersions
-                std::vector<std::unique_ptr<JavaInfo>> arInfos;
-                javaPluginError plerr = jfw_plugin_getAllJavaInfos(
-                    false,
-                    vendor,
-                    versionInfo.sMinVersion,
-                    versionInfo.sMaxVersion,
-                    versionInfo.vecExcludeVersions,
-                    & arInfos,
-                    infos);
-
-                if (plerr != javaPluginError::NONE)
-                    continue;
                 //iterate over all installations to find the best which has
                 //all features
                 for (auto & pJInfo: arInfos)
@@ -440,7 +392,6 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr<JavaInfo> *pInfo)
                         //the just found Java implements all required features
                         //currently there is only accessibility!!!
                         aCurrentInfo = std::move(pJInfo);
-                        bInfoFound = true;
                         break;
                     }
                     else if (!aCurrentInfo)
@@ -450,12 +401,8 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr<JavaInfo> *pInfo)
                         aCurrentInfo = std::move(pJInfo);
                     }
                 }
-
-                if (bInfoFound)
-                    break;
-                //All Java installations found by the current plug-in lib
-                //do not provide the required features. Try the next plug-in
             }
+
             if (!aCurrentInfo)
             {//The plug-ins did not find a suitable Java. Now try the paths 
which have been
             //added manually.
@@ -464,53 +411,41 @@ javaFrameworkError 
jfw_findAndSelectJRE(std::unique_ptr<JavaInfo> *pInfo)
                 //node.loadFromSettings();
                 const std::vector<OUString> & vecJRELocations =
                     settings.getJRELocations();
-                //use every plug-in to determine the JavaInfo objects
-                for (auto const & vendor : vecVendors)
+                //use all plug-ins to determine the JavaInfo objects
+                for (auto const & JRELocation : vecJRELocations)
                 {
-                    jfw::VersionInfo versionInfo =
-                        aVendorSettings.getVersionInformation(vendor);
-
-                    for (auto const & JRELocation : vecJRELocations)
+                    std::unique_ptr<JavaInfo> aInfo;
+                    javaPluginError err = jfw_plugin_getJavaInfoByPath(
+                        JRELocation,
+                        aVendorSettings,
+                        &aInfo);
+                    if (err == javaPluginError::NoJre)
+                        continue;
+                    if (err == javaPluginError::FailedVersion)
+                        continue;
+                    else if (err !=javaPluginError::NONE)
+                        return JFW_E_ERROR;
+
+                    if (aInfo)
                     {
-                        std::unique_ptr<JavaInfo> aInfo;
-                        javaPluginError err = jfw_plugin_getJavaInfoByPath(
-                            JRELocation,
-                            vendor,
-                            versionInfo.sMinVersion,
-                            versionInfo.sMaxVersion,
-                            versionInfo.vecExcludeVersions,
-                            &aInfo);
-                        if (err == javaPluginError::NoJre)
-                            continue;
-                        if (err == javaPluginError::FailedVersion)
-                            continue;
-                        else if (err !=javaPluginError::NONE)
-                            return JFW_E_ERROR;
-
-                        if (aInfo)
+                        // compare features
+                        // If the user does not require any features 
(nFeatureFlags = 0)
+                        // then the first installation is used
+                        if ((aInfo->nFeatures & nFeatureFlags) == 
nFeatureFlags)
                         {
-                            // compare features
-                            // If the user does not require any features 
(nFeatureFlags = 0)
-                            // then the first installation is used
-                            if ((aInfo->nFeatures & nFeatureFlags) == 
nFeatureFlags)
-                            {
-                                //the just found Java implements all required 
features
-                                //currently there is only accessibility!!!
-                                aCurrentInfo = std::move(aInfo);
-                                bInfoFound = true;
-                                break;
-                            }
-                            else if (!aCurrentInfo)
-                            {
-                                // We remember the very first installation in
-                                // aCurrentInfo:
-                                aCurrentInfo = std::move(aInfo);
-                            }
+                            //the just found Java implements all required 
features
+                            //currently there is only accessibility!!!
+                            aCurrentInfo = std::move(aInfo);
+                            break;
                         }
-                    }//end iterate over paths
-                    if (bInfoFound)
-                        break;
-                }// end iterate plug-ins
+                        else if (!aCurrentInfo)
+                        {
+                            // We remember the very first installation in
+                            // aCurrentInfo:
+                            aCurrentInfo = std::move(aInfo);
+                        }
+                    }
+                }//end iterate over paths
             }
         }
         if (aCurrentInfo)
@@ -621,43 +556,21 @@ javaFrameworkError jfw_getJavaInfoByPath(OUString const & 
pPath, std::unique_ptr
         osl::MutexGuard guard(jfw::FwkMutex::get());
 
         jfw::VendorSettings aVendorSettings;
-        std::vector<OUString> vecVendors =
-            aVendorSettings.getSupportedVendors();
 
-        //Use every plug-in library to determine if the path represents a
-        //JRE. If a plugin recognized it then the loop will break
-        for (auto const & vendor : vecVendors)
-        {
-            jfw::VersionInfo versionInfo =
-                aVendorSettings.getVersionInformation(vendor);
-
-            //ask the plugin if this is a JRE.
-            //If so check if it meets the version requirements.
-            //Only if it does return a JavaInfo
-            javaPluginError plerr = jfw_plugin_getJavaInfoByPath(
-                pPath,
-                vendor,
-                versionInfo.sMinVersion,
-                versionInfo.sMaxVersion,
-                versionInfo.vecExcludeVersions,
-                ppInfo);
+        //ask all plugins if this is a JRE.
+        //If so check if it meets the version requirements.
+        //Only if it does return a JavaInfo
+        javaPluginError plerr = jfw_plugin_getJavaInfoByPath(
+            pPath,
+            aVendorSettings,
+            ppInfo);
 
-            if (plerr == javaPluginError::NONE)
-            {
-                break;
-            }
-            else if(plerr == javaPluginError::FailedVersion)
-            {//found JRE but it has the wrong version
-                ppInfo->reset();
-                errcode = JFW_E_FAILED_VERSION;
-                break;
-            }
-            else if (plerr == javaPluginError::NoJre)
-            {// plugin does not recognize this path as belonging to JRE
-                continue;
-            }
-            OSL_ASSERT(false);
+        if(plerr == javaPluginError::FailedVersion)
+        {//found JRE but it has the wrong version
+            ppInfo->reset();
+            errcode = JFW_E_FAILED_VERSION;
         }
+        OSL_ASSERT(plerr == javaPluginError::NONE || plerr == 
javaPluginError::NoJre);
         if (!*ppInfo && errcode != JFW_E_FAILED_VERSION)
             errcode = JFW_E_NOT_RECOGNIZED;
     }
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index b7044217edc1..05b2a0f5a0ca 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -28,7 +28,7 @@
 #include "framework.hxx"
 #include <fwkutil.hxx>
 #include <elements.hxx>
-#include "fwkbase.hxx"
+#include <fwkbase.hxx>
 
 using namespace osl;
 
@@ -116,11 +116,23 @@ VendorSettings::VendorSettings():
     }
 }
 
-VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor) 
const
+boost::optional<VersionInfo> VendorSettings::getVersionInformation(const 
OUString & sVendor) const
 {
     OSL_ASSERT(!sVendor.isEmpty());
-    VersionInfo aVersionInfo;
     OString osVendor = OUStringToOString(sVendor, RTL_TEXTENCODING_UTF8);
+    CXPathObjectPtr pathObject;
+    pathObject = xmlXPathEvalExpression(
+        reinterpret_cast<xmlChar const *>(
+            OString(
+                "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"" + 
osVendor
+                + "\"]/jf:minVersion").getStr()),
+        m_xmlPathContextVendorSettings);
+    if (xmlXPathNodeSetIsEmpty(pathObject->nodesetval))
+    {
+        return {};
+    }
+
+    VersionInfo aVersionInfo;
     //Get minVersion
     OString sExpression = OString(
         "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") +
diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx
index d2fe64e391a5..5f1ec5784eb5 100644
--- a/jvmfwk/source/libxmlutil.cxx
+++ b/jvmfwk/source/libxmlutil.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "libxmlutil.hxx"
+#include <libxmlutil.hxx>
 
 namespace jfw
 {
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 6f8857e5591e..d7d60551c62a 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -8312,7 +8312,9 @@ jvmaccess/workbench/exceptiontest1.cxx
 jvmaccess/workbench/exceptiontest2.cxx
 jvmaccess/workbench/javainfo/javainfotest.cxx
 jvmfwk/inc/elements.hxx
+jvmfwk/inc/fwkbase.hxx
 jvmfwk/inc/fwkutil.hxx
+jvmfwk/inc/libxmlutil.hxx
 jvmfwk/inc/vendorbase.hxx
 jvmfwk/inc/vendorplugin.hxx
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -8336,10 +8338,8 @@ jvmfwk/source/elements.cxx
 jvmfwk/source/framework.cxx
 jvmfwk/source/framework.hxx
 jvmfwk/source/fwkbase.cxx
-jvmfwk/source/fwkbase.hxx
 jvmfwk/source/fwkutil.cxx
 jvmfwk/source/libxmlutil.cxx
-jvmfwk/source/libxmlutil.hxx
 l10ntools/inc/cfglex.hxx
 l10ntools/inc/cfgmerge.hxx
 l10ntools/inc/common.hxx
commit d9f518f7db16c33097366054e8d6b66c139b2ece
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Apr 4 12:22:06 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Thu Apr 18 15:39:24 2019 +0200

    Resolves: tdf#120754 on undoing an obj insert use its current ordinal
    
    there may have been changes not caught by undo to the object's
    ordinal, so on use of RemoveObject (or ReplaceObject) call GetOrdNum
    on the object to get its current position within its parent.
    
    We can keep nOrdNum for the desired dest position within the parent
    for InsertObject
    
    Change-Id: I3bdabf387dd630fc1fadaaa1f3d8c05e93865e4f
    Reviewed-on: https://gerrit.libreoffice.org/70409
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    Tested-by: Jenkins

diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index ba26e624d777..0b1d6cee6005 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -736,7 +736,7 @@ void SdrUndoRemoveObj::Redo()
     {
         ImplUnmarkObject( pObj );
         E3DModifySceneSnapRectUpdater aUpdater(pObj);
-        pObjList->RemoveObject(nOrdNum);
+        pObjList->RemoveObject(pObj->GetOrdNum());
     }
 
     // Trigger PageChangeCall
@@ -758,7 +758,7 @@ void SdrUndoInsertObj::Undo()
     {
         ImplUnmarkObject( pObj );
 
-        SdrObject* pChkObj= pObjList->RemoveObject(nOrdNum);
+        SdrObject* pChkObj= pObjList->RemoveObject(pObj->GetOrdNum());
         DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj");
     }
 }
@@ -913,7 +913,7 @@ void SdrUndoReplaceObj::Undo()
         SetNewOwner(true);
 
         ImplUnmarkObject( pNewObj );
-        pObjList->ReplaceObject(pObj,nOrdNum);
+        pObjList->ReplaceObject(pObj,pNewObj->GetOrdNum());
     }
     else
     {
@@ -931,7 +931,7 @@ void SdrUndoReplaceObj::Redo()
         SetNewOwner(false);
 
         ImplUnmarkObject( pObj );
-        pObjList->ReplaceObject(pNewObj,nOrdNum);
+        pObjList->ReplaceObject(pNewObj,pObj->GetOrdNum());
 
     }
     else
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to