summaryrefslogtreecommitdiffstats
path: root/jvmfwk/source/fwkbase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/source/fwkbase.cxx')
-rw-r--r--jvmfwk/source/fwkbase.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index db91bdeb38f4..73d7925f8707 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -29,7 +29,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=\"") +