diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 5 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 2 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.hxx | 3 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 6 |
4 files changed, 9 insertions, 7 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 05288a4ef5f3..f0fe5aea2f67 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -41,6 +41,7 @@ #include <queue> #include <memory> #include <stack> +#include <string_view> #include <unordered_map> #include <vector> #include <cassert> @@ -228,7 +229,7 @@ public: void registerNamespace( const OUString& NamespaceURL, sal_Int32 NamespaceToken ); /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - OUString const & getNamespaceURL( const OUString& rPrefix ); + OUString const & getNamespaceURL( std::u16string_view rPrefix ); /// @throws css::uno::RuntimeException void setErrorHandler( const css::uno::Reference< css::xml::sax::XErrorHandler >& Handler ); /// @throws css::uno::RuntimeException @@ -911,7 +912,7 @@ void FastSaxParserImpl::registerNamespace( const OUString& NamespaceURL, sal_Int throw IllegalArgumentException("namespace URL is already registered: " + NamespaceURL, css::uno::Reference<css::uno::XInterface >(), 0); } -OUString const & FastSaxParserImpl::getNamespaceURL( const OUString& rPrefix ) +OUString const & FastSaxParserImpl::getNamespaceURL( std::u16string_view rPrefix ) { try { diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index 792784eb2a9c..e6538424891c 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -91,7 +91,7 @@ namespace sax_fastparser { mnDoubleStrCapacity = RTL_STR_MAX_VALUEOFDOUBLE; } - void FastSaxSerializer::write( const OUString& sOutput, bool bEscape ) + void FastSaxSerializer::write( std::u16string_view sOutput, bool bEscape ) { write( OUStringToOString(sOutput, RTL_TEXTENCODING_UTF8), bEscape ); diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index 0b7ad72d8c0c..109ada3c726f 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -28,6 +28,7 @@ #include "CachedOutputStream.hxx" #include <stack> +#include <string_view> #include <map> #include <memory> @@ -111,7 +112,7 @@ public: OString getId( ::sal_Int32 Element ); void write( double value ); - void write( const OUString& s, bool bEscape = false ); + void write( std::u16string_view s, bool bEscape = false ); void write( const OString& s, bool bEscape = false ); void write( const char* pStr, sal_Int32 nLen, bool bEscape = false ); diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 39b01f175176..b285ba9f3219 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -86,7 +86,7 @@ FastSerializerHelper* FastSerializerHelper::write(const OString& value) return this; } -FastSerializerHelper* FastSerializerHelper::write(const OUString& value) +FastSerializerHelper* FastSerializerHelper::write(std::u16string_view value) { mpSerializer->write(value); return this; @@ -116,9 +116,9 @@ FastSerializerHelper* FastSerializerHelper::writeEscaped(const char* value) return this; } -FastSerializerHelper* FastSerializerHelper::writeEscaped(const OUString& value) +FastSerializerHelper* FastSerializerHelper::writeEscaped(std::u16string_view value) { - if (!value.isEmpty()) + if (!value.empty()) mpSerializer->write(value, true); return this; } |