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:
parent
43812baa4c
commit
23f268d077
1 changed files with 2 additions and 0 deletions
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue