diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-03 09:21:10 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-03 14:40:46 +0200 |
commit | d3799f92438f3022ef101b4a04d4cd609ad93f73 (patch) | |
tree | d0ca602ae5f9d6e607fdec3b03ca0a044e3a32d3 /desktop/source/deployment/misc/dp_descriptioninfoset.cxx | |
parent | 756c027198adc5212d46d72e0628c90698652af5 (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/misc/dp_descriptioninfoset.cxx')
-rw-r--r-- | desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 15 |
1 files changed, 5 insertions, 10 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 } |