From cd66852f6dd08631a25d15a1527a647e69ab8ce3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Aug 2018 10:34:54 +0200 Subject: create appendCopy method in OUStringBuffer so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/source/awt/animatedimagespeer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolkit/source') diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 58e9f6c09a1a..a0fa5cc71567 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -117,9 +117,9 @@ namespace toolkit ENSURE_OR_RETURN( separatorPos != -1, "lcl_getHighContrastURL: unsupported URL scheme - cannot automatically determine HC version!", i_imageURL ); OUStringBuffer composer; - composer.append( i_imageURL.copy( 0, separatorPos ) ); + composer.appendCopy( i_imageURL, 0, separatorPos ); composer.append( "/sifr" ); - composer.append( i_imageURL.copy( separatorPos ) ); + composer.appendCopy( i_imageURL, separatorPos ); return composer.makeStringAndClear(); } -- cgit