diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-09-27 19:18:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-09-27 23:41:23 +0200 |
commit | 9c9b1e95ae4c407cf0f462c4e1a64fcc303399d6 (patch) | |
tree | 35865297b3d6b241fdd09e7ec4612af43511dc33 /configmgr | |
parent | 94e22f5a2fcc9f193ce0370805156ad5320d4141 (diff) |
Add conversion from rtl::OStringNumber to std::string_view
...and revert the relevant part of 2f5f45921b05904a4be1ff633be09c62cb44ff08
"support O(U)String::number() for fast string concatenation", as discussed in
the comments of that Gerrit change, now that
89bb0b0dcd8dc4656d0047cd10702d1c471c0fa1 "Deduplicate O(U)StringNumber
definitions; add toAsciiUpperCase" paved the way.
For consistency, also add conversion from rtl::OUStringNumber to
std::u16string_view, even if that remains unused as of now.
Change-Id: Ieb64bff0b59c22f3dec05c99fca5676b27a46e9a
Reviewed-on: https://gerrit.libreoffice.org/79750
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/writemodfile.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx index d7fba8264b80..017e925dee48 100644 --- a/configmgr/source/writemodfile.cxx +++ b/configmgr/source/writemodfile.cxx @@ -155,19 +155,19 @@ void writeValueContent_(TempFile &handle, sal_Bool value) { } void writeValueContent_(TempFile &handle, sal_Int16 value) { - handle.writeString(OString(OString::number(value))); + handle.writeString(OString::number(value)); } void writeValueContent_(TempFile &handle, sal_Int32 value) { - handle.writeString(OString(OString::number(value))); + handle.writeString(OString::number(value)); } void writeValueContent_(TempFile &handle, sal_Int64 value) { - handle.writeString(OString(OString::number(value))); + handle.writeString(OString::number(value)); } void writeValueContent_(TempFile &handle, double value) { - handle.writeString(OString(OString::number(value))); + handle.writeString(OString::number(value)); } void writeValueContent_(TempFile &handle, const OUString& value) { @@ -530,7 +530,7 @@ void writeValueContent(TempFile &handle, std::u16string_view value) { { handle.writeString(convertToUtf8(value.substr(i, j - i))); handle.writeString("<unicode oor:scalar=\""); - handle.writeString(OString(OString::number(c))); + handle.writeString(OString::number(c)); handle.writeString("\"/>"); i = j + 1; } else if (c == '\x0D') { |