summaryrefslogtreecommitdiff
path: root/jvmfwk/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-27 21:08:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-28 16:51:51 +0200
commitff41cf1b8dbeb36b8824257acb5c5ba272415108 (patch)
treef10fd5ac3dac8b21ab0540a2fc66ee3ebaf16a7e /jvmfwk/source
parent9c9e5b5ee7f1144c20624ac9471354a218638175 (diff)
loplugin:oncevar
Change-Id: I3c014f53607a849c743a2fd1aa47d03d5af978fb Reviewed-on: https://gerrit.libreoffice.org/76495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'jvmfwk/source')
-rw-r--r--jvmfwk/source/elements.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 27de3532d70c..bc4a4b7554b7 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -407,8 +407,7 @@ void NodeJava::write() const
//The element must exist
if (m_enabled)
{
- OString sExpression("/jf:java/jf:enabled");
- pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
+ pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>("/jf:java/jf:enabled"),
contextUser);
if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
throw FrameworkException(JFW_E_ERROR, sExcMsg);
@@ -429,8 +428,7 @@ void NodeJava::write() const
//The element must exist
if (m_userClassPath)
{
- OString sExpression("/jf:java/jf:userClassPath");
- pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
+ pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>("/jf:java/jf:userClassPath"),
contextUser);
if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
throw FrameworkException(JFW_E_ERROR, sExcMsg);
@@ -443,8 +441,7 @@ void NodeJava::write() const
//set <javaInfo> element
if (m_javaInfo)
{
- OString sExpression("/jf:java/jf:javaInfo");
- pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
+ pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>("/jf:java/jf:javaInfo"),
contextUser);
if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
throw FrameworkException(JFW_E_ERROR, sExcMsg);
@@ -455,8 +452,7 @@ void NodeJava::write() const
//set <vmParameters> element
if (m_vmParameters)
{
- OString sExpression("/jf:java/jf:vmParameters");
- pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
+ pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>("/jf:java/jf:vmParameters"),
contextUser);
if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
throw FrameworkException(JFW_E_ERROR, sExcMsg);
@@ -494,8 +490,7 @@ void NodeJava::write() const
//set <jreLocations> element
if (m_JRELocations)
{
- OString sExpression("/jf:java/jf:jreLocations");
- pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
+ pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>("/jf:java/jf:jreLocations"),
contextUser);
if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
throw FrameworkException(JFW_E_ERROR, sExcMsg);