diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-01-11 11:21:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-01-11 13:55:14 +0100 |
commit | 70519a43e0d89a6b5d89859a6851f8c757c6b0c7 (patch) | |
tree | bc1f4a6b6510e3bff75e9dc54eb71e2fa6cfc3c8 /sdext/source | |
parent | a0210c5c5e8fd47b55567a8b18788d57d2b7decb (diff) |
Replace OUStringBuffer::appendCopy with append(std::u16string_view)
...which is more general
Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7
Reviewed-on: https://gerrit.libreoffice.org/66155
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sdext/source')
-rw-r--r-- | sdext/source/pdfimport/tree/style.cxx | 3 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterController.cxx | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index 87d0479a564a..b00920a62f93 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -25,6 +25,7 @@ #include <rtl/ustrbuf.hxx> #include <algorithm> +#include <string_view> using namespace pdfi; @@ -167,7 +168,7 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const else aStyleName = OStringToOUString( rStyle.Name, RTL_TEXTENCODING_ASCII_US ); sal_Int32 nIndex = aStyleName.lastIndexOf( ':' ); - aRet.appendCopy( aStyleName, nIndex+1 ); + aRet.append( std::u16string_view(aStyleName).substr(nIndex+1) ); aRet.append( nStyle ); } } diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 1a1c6bbc9b08..313a34cef216 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <string_view> + #include "PresenterController.hxx" #include "PresenterAccessibility.hxx" @@ -381,13 +385,13 @@ void PresenterController::UpdatePaneTitles() if (nStartIndex < 0) { // Add the remaining part of the string. - sResult.appendCopy(sTemplate, nIndex); + sResult.append(std::u16string_view(sTemplate).substr(nIndex)); break; } else { // Add the part preceding the next %. - sResult.appendCopy(sTemplate, nIndex, nStartIndex-nIndex); + sResult.append(std::u16string_view(sTemplate).substr(nIndex, nStartIndex-nIndex)); // Get the placeholder ++nStartIndex; |