From e276c812648bf511d6c4813d6fd82a00391cfdac Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 17 Oct 2019 20:33:50 +0200 Subject: size some stringbuffer to prevent re-alloc I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512 (e.g. in emfio/). Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f Reviewed-on: https://gerrit.libreoffice.org/81540 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/source/uiconfiguration/CommandImageResolver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework/source') diff --git a/framework/source/uiconfiguration/CommandImageResolver.cxx b/framework/source/uiconfiguration/CommandImageResolver.cxx index c95ddeb56e76..3822f7eb2fa3 100644 --- a/framework/source/uiconfiguration/CommandImageResolver.cxx +++ b/framework/source/uiconfiguration/CommandImageResolver.cxx @@ -34,7 +34,7 @@ OUString lclConvertToCanonicalName(const OUString& rFileName) sal_Int32 nLength = rFileName.getLength(); const sal_Unicode* pString = rFileName.getStr(); - OUStringBuffer aBuffer(nLength); + OUStringBuffer aBuffer(nLength*2); for (sal_Int32 i = 0; i < nLength; i++) { -- cgit