diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-11 17:44:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-11 21:25:10 +0100 |
commit | 35e471bb4d1388cf5afcdcee214cf5111edf44e3 (patch) | |
tree | bb78f4f13f131f0cb206a9707cc3cfc495a3876a /xmlsecurity/inc | |
parent | 0c06e77c122f10a1842bc908bd6e25b1110ddbd2 (diff) |
Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY. These had been missed by
1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).
This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).
The improvement to loplugin:stringadd became necessary to fix
> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
> File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.
Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmlsecurity/inc')
-rw-r--r-- | xmlsecurity/inc/biginteger.hxx | 5 | ||||
-rw-r--r-- | xmlsecurity/inc/xmlsec/saxhelper.hxx | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx index f0d1055ed176..ac411c2e53b7 100644 --- a/xmlsecurity/inc/biginteger.hxx +++ b/xmlsecurity/inc/biginteger.hxx @@ -20,6 +20,9 @@ #pragma once #include <sal/config.h> + +#include <string_view> + #include <rtl/ustring.hxx> #include <com/sun/star/uno/Sequence.h> @@ -30,7 +33,7 @@ namespace xmlsecurity { XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString(const css::uno::Sequence<sal_Int8>& serial); XSECXMLSEC_DLLPUBLIC css::uno::Sequence<sal_Int8> -numericStringToBigInteger(const OUString& serialNumber); +numericStringToBigInteger(std::u16string_view serialNumber); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx index e1eed377d6fa..af3d4ca259d1 100644 --- a/xmlsecurity/inc/xmlsec/saxhelper.hxx +++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_XMLSECURITY_INC_XMLSEC_SAXHELPER_HXX #define INCLUDED_XMLSECURITY_INC_XMLSEC_SAXHELPER_HXX +#include <sal/config.h> + +#include <string_view> + #include <libxml/tree.h> #include <rtl/ustring.hxx> @@ -55,27 +59,27 @@ class SAXHelper final /// @throws css::xml::sax::SAXException /// @throws css::uno::RuntimeException void startElement( - const OUString& aName , + std::u16string_view aName , const css::uno::Sequence< css::xml::csax::XMLAttribute >& aAttributes ) ; /// @throws css::xml::sax::SAXException /// @throws css::uno::RuntimeException - void endElement( const OUString& aName ) ; + void endElement( std::u16string_view aName ) ; /// @throws css::xml::sax::SAXException /// @throws css::uno::RuntimeException - void characters( const OUString& aChars ) ; + void characters( std::u16string_view aChars ) ; /// @throws css::xml::sax::SAXException /// @throws css::uno::RuntimeException - void ignorableWhitespace( const OUString& aWhitespaces ) ; + void ignorableWhitespace( std::u16string_view aWhitespaces ) ; /// @throws css::xml::sax::SAXException /// @throws css::uno::RuntimeException void processingInstruction( - const OUString& aTarget , - const OUString& aData ) ; + std::u16string_view aTarget , + std::u16string_view aData ) ; } ; |