avoid OUString construction in lcl_GetDelimitedString

for the common case of having no paragraphs

Change-Id: I56ad9b5069021690954730188e406c133894dbee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170889
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin 2024-07-23 11:05:59 +02:00
parent 43812baa4c
commit 23f268d077

View file

@ -93,6 +93,8 @@ static OUString lcl_GetDelimitedString( const EditEngine& rEngine, const char c
static OUString lcl_GetDelimitedString( const EditTextObject& rEdit, const char c )
{
sal_Int32 nParCount = rEdit.GetParagraphCount();
if (nParCount == 0)
return u""_ustr;
OUStringBuffer aRet( nParCount * 80 );
for (sal_Int32 nPar=0; nPar<nParCount; nPar++)
{