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 /framework/source/uielement | |
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 'framework/source/uielement')
-rw-r--r-- | framework/source/uielement/toolbarsmenucontroller.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index c5f554488800..11870476e294 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -20,6 +20,7 @@ #include <uielement/toolbarsmenucontroller.hxx> #include <algorithm> +#include <string_view> #include <services.h> #include <strings.hrc> @@ -394,7 +395,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co sal_Int32 n = aSortedTbs[i].aCommand.lastIndexOf( '/' ); if (( n > 0 ) && (( n+1 ) < aSortedTbs[i].aCommand.getLength() )) - aStrBuf.appendCopy( aSortedTbs[i].aCommand, n+1 ); + aStrBuf.append( std::u16string_view(aSortedTbs[i].aCommand).substr(n+1) ); OUString aCmd( aStrBuf.makeStringAndClear() ); @@ -666,7 +667,7 @@ void SAL_CALL ToolbarsMenuController::itemSelected( const css::awt::MenuEvent& r if (( nIndex > 0 ) && (( nIndex+1 ) < aCmd.getLength() )) { OUStringBuffer aBuf( "private:resource/toolbar/" ); - aBuf.appendCopy( aCmd, nIndex+1 ); + aBuf.append( std::u16string_view(aCmd).substr(nIndex+1) ); bool bShow( !pVCLPopupMenu->IsItemChecked( rEvent.MenuId )); OUString aToolBarResName( aBuf.makeStringAndClear() ); |