diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-28 17:56:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 16:42:33 +0100 |
commit | 042033f1e6da22616cb76c8d950c20c9efecbad5 (patch) | |
tree | 26b3f1f42d067506f44550b410f3fb9640616a5b /extensions/source/update/feed | |
parent | ccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff) |
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions/source/update/feed')
-rw-r--r-- | extensions/source/update/feed/updatefeed.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 0e00bcd18848..153233bbb67c 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <string_view> + #include <config_folders.h> #include <cppuhelper/exc_hlp.hxx> @@ -120,7 +124,7 @@ class UpdateInformationProvider : bool isUserAgentExtended() const; public: uno::Reference< xml::dom::XElement > getDocumentRoot(const uno::Reference< xml::dom::XNode >& rxNode); - uno::Reference< xml::dom::XNode > getChildNode(const uno::Reference< xml::dom::XNode >& rxNode, const OUString& rName); + uno::Reference< xml::dom::XNode > getChildNode(const uno::Reference< xml::dom::XNode >& rxNode, std::u16string_view rName); // XUpdateInformationService @@ -220,14 +224,14 @@ public: uno::Reference< xml::dom::XNode > xAtomEntryNode( m_xNodeList->item(m_nCount++) ); uno::Reference< xml::dom::XNode > xSummaryNode( - m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, "summary/text()" ) + m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, u"summary/text()" ) ); if( xSummaryNode.is() ) aEntry.Description = xSummaryNode->getNodeValue(); uno::Reference< xml::dom::XNode > xContentNode( - m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, "content" ) ); + m_xUpdateInformationProvider->getChildNode( xAtomEntryNode, u"content" ) ); if( xContentNode.is() ) aEntry.UpdateDocument = m_xUpdateInformationProvider->getDocumentRoot(xContentNode); @@ -532,11 +536,11 @@ UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode uno::Reference< xml::dom::XNode > UpdateInformationProvider::getChildNode(const uno::Reference< xml::dom::XNode >& rxNode, - const OUString& rName) + std::u16string_view rName) { OSL_ASSERT(m_xXPathAPI.is()); try { - return m_xXPathAPI->selectSingleNode(rxNode, "./atom:" + rName); + return m_xXPathAPI->selectSingleNode(rxNode, OUString::Concat("./atom:") + rName); } catch (const xml::xpath::XPathException &) { // ignore return nullptr; |