summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-09 12:12:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-10 08:27:04 +0100
commitdac7be50cff94e0c34cdca5ac7e35c19685c40c1 (patch)
tree98c8936c41a03e6e5b15233b0ba04123272232c4 /configmgr
parentb8f497a06d585dbae3adadb4d177fe84fdb1b5fa (diff)
o3tl::string_view -> std::string_view (in configmgr)
Change-Id: I64131f59ce859a252baa9c84291d262bcb04fffd Reviewed-on: https://gerrit.libreoffice.org/66012 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/writemodfile.cxx20
-rw-r--r--configmgr/source/writemodfile.hxx9
2 files changed, 15 insertions, 14 deletions
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index b3592bb1a8af..2122c3fdf947 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -22,13 +22,13 @@
#include <cassert>
#include <cstddef>
#include <limits>
+#include <string_view>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/XInterface.hpp>
-#include <o3tl/string_view.hxx>
#include <osl/file.h>
#include <osl/file.hxx>
#include <rtl/string.h>
@@ -60,7 +60,7 @@ class Components;
namespace {
-OString convertToUtf8(o3tl::u16string_view text) {
+OString convertToUtf8(std::u16string_view text) {
OString s;
assert(text.size() <= sal_uInt32(std::numeric_limits<sal_Int32>::max()));
if (!rtl_convertUStringToString(
@@ -140,7 +140,7 @@ oslFileError TempFile::flush() {
return e;
}
-void TempFile::writeString(o3tl::string_view text) {
+void TempFile::writeString(std::string_view text) {
buffer.append(text.data(), text.size());
if (buffer.getLength() > 0x10000)
flush();
@@ -186,8 +186,8 @@ void writeValueContent_(
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C',
'D', 'E', 'F' };
handle.writeString(
- o3tl::string_view(hexDigit + ((value[i] >> 4) & 0xF), 1));
- handle.writeString(o3tl::string_view(hexDigit + (value[i] & 0xF), 1));
+ std::string_view(hexDigit + ((value[i] >> 4) & 0xF), 1));
+ handle.writeString(std::string_view(hexDigit + (value[i] & 0xF), 1));
}
}
@@ -281,7 +281,7 @@ void writeValue(TempFile &handle, Type type, css::uno::Any const & value) {
void writeNode(
Components & components, TempFile &handle,
- rtl::Reference< Node > const & parent, o3tl::u16string_view name,
+ rtl::Reference< Node > const & parent, std::u16string_view name,
rtl::Reference< Node > const & node)
{
static xmlreader::Span const typeNames[] = {
@@ -316,7 +316,7 @@ void writeNode(
if (type != TYPE_NIL) {
handle.writeString(" oor:type=\"");
handle.writeString(
- o3tl::string_view(
+ std::string_view(
typeNames[type].begin, typeNames[type].length));
handle.writeString("\"");
}
@@ -359,7 +359,7 @@ void writeNode(
if (type != TYPE_NIL) {
handle.writeString(" oor:type=\"");
handle.writeString(
- o3tl::string_view(
+ std::string_view(
typeNames[type].begin, typeNames[type].length));
handle.writeString("\"");
}
@@ -479,7 +479,7 @@ void writeModifications(
}
-void writeAttributeValue(TempFile &handle, o3tl::u16string_view value) {
+void writeAttributeValue(TempFile &handle, std::u16string_view value) {
std::size_t i = 0;
std::size_t j = i;
for (; j != value.size(); ++j) {
@@ -524,7 +524,7 @@ void writeAttributeValue(TempFile &handle, o3tl::u16string_view value) {
handle.writeString(convertToUtf8(value.substr(i, j - i)));
}
-void writeValueContent(TempFile &handle, o3tl::u16string_view value) {
+void writeValueContent(TempFile &handle, std::u16string_view value) {
std::size_t i = 0;
std::size_t j = i;
for (; j != value.size(); ++j) {
diff --git a/configmgr/source/writemodfile.hxx b/configmgr/source/writemodfile.hxx
index a8925ab8e758..435a24caf63f 100644
--- a/configmgr/source/writemodfile.hxx
+++ b/configmgr/source/writemodfile.hxx
@@ -22,7 +22,8 @@
#include <sal/config.h>
-#include <o3tl/string_view.hxx>
+#include <string_view>
+
#include <rtl/strbuf.hxx>
namespace configmgr {
@@ -43,15 +44,15 @@ struct TempFile {
#ifdef _WIN32
oslFileError closeWithoutUnlink();
#endif
- void writeString(o3tl::string_view text);
+ void writeString(std::string_view text);
private:
TempFile(const TempFile&) = delete;
TempFile& operator=(const TempFile&) = delete;
};
-void writeAttributeValue(TempFile &handle, o3tl::u16string_view value);
-void writeValueContent(TempFile &handle, o3tl::u16string_view value);
+void writeAttributeValue(TempFile &handle, std::u16string_view value);
+void writeValueContent(TempFile &handle, std::u16string_view value);
void writeModFile(
Components & components, OUString const & url, Data const & data);