summaryrefslogtreecommitdiff
path: root/desktop/source/deployment
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-06-03 09:21:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-06-03 14:40:46 +0200
commitd3799f92438f3022ef101b4a04d4cd609ad93f73 (patch)
treed0ca602ae5f9d6e607fdec3b03ca0a044e3a32d3 /desktop/source/deployment
parent756c027198adc5212d46d72e0628c90698652af5 (diff)
Upcoming loplugin:elidestringvar: desktop
Change-Id: I46295b47daaa590b053433e0232e85e9c7b1f3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95397 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx15
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx3
2 files changed, 6 insertions, 12 deletions
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 0caa69534820..549528aae042 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -576,10 +576,9 @@ std::pair< OUString, OUString > DescriptionInfoset::getLocalizedPublisherNameAnd
OUString sURL;
if (node.is())
{
- const OUString exp1("text()");
css::uno::Reference< css::xml::dom::XNode > xPathName;
try {
- xPathName = m_xpath->selectSingleNode(node, exp1);
+ xPathName = m_xpath->selectSingleNode(node, "text()");
} catch (const css::xml::xpath::XPathException &) {
// ignore
}
@@ -587,10 +586,9 @@ std::pair< OUString, OUString > DescriptionInfoset::getLocalizedPublisherNameAnd
if (xPathName.is())
sPublisherName = xPathName->getNodeValue();
- const OUString exp2("@xlink:href");
css::uno::Reference< css::xml::dom::XNode > xURL;
try {
- xURL = m_xpath->selectSingleNode(node, exp2);
+ xURL = m_xpath->selectSingleNode(node, "@xlink:href");
} catch (const css::xml::xpath::XPathException &) {
// ignore
}
@@ -612,10 +610,9 @@ OUString DescriptionInfoset::getLocalizedDisplayName() const
getLocalizedChild("desc:display-name");
if (node.is())
{
- const OUString exp("text()");
css::uno::Reference< css::xml::dom::XNode > xtext;
try {
- xtext = m_xpath->selectSingleNode(node, exp);
+ xtext = m_xpath->selectSingleNode(node, "text()");
} catch (const css::xml::xpath::XPathException &) {
// ignore
}
@@ -764,9 +761,8 @@ DescriptionInfoset::getChildWithDefaultLocale(css::uno::Reference< css::xml::dom
}
}
- const OUString exp2("*[1]");
try {
- return m_xpath->selectSingleNode(xParent, exp2);
+ return m_xpath->selectSingleNode(xParent, "*[1]");
} catch (const css::xml::xpath::XPathException &) {
// ignore
return nullptr;
@@ -785,10 +781,9 @@ OUString DescriptionInfoset::getLocalizedHREFAttrFromChild(
{
if (out_bParentExists)
*out_bParentExists = true;
- const OUString exp("@xlink:href");
css::uno::Reference< css::xml::dom::XNode > xURL;
try {
- xURL = m_xpath->selectSingleNode(node, exp);
+ xURL = m_xpath->selectSingleNode(node, "@xlink:href");
} catch (const css::xml::xpath::XPathException &) {
// ignore
}
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index eddb42b28a40..aca144b2bf9c 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -400,10 +400,9 @@ void BackendImpl::implProcessHelp(
langFolderDest, xCmdEnv);
const OUString aHelpStr("help");
- const OUString aSlash("/");
OUString aJarFile(
- makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr + ".jar"));
+ makeURL(sHelpFolder, langFolderURLSegment + "/" + aHelpStr + ".jar"));
aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
OUString aEncodedJarFilePath = rtl::Uri::encode(