diff options
Diffstat (limited to 'sdext')
-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; |