editeng/source/editeng/impedit4.cxx | 1 + 1 file changed, 1 insertion(+)
New commits: commit 451efe2d7df16e61221fce4eafdba1fc7feaf60e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri May 13 12:11:00 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat May 14 14:43:28 2022 +0200 reserve space in vector in ImpEditEngine::CreateTextObject Change-Id: I4fd49ab81808b3912445b4037a50a5cd85c74144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 6520b0034727..9b1ec896612a 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1043,6 +1043,7 @@ std::unique_ptr<EditTextObject> ImpEditEngine::CreateTextObject( EditSelection a // and the Attribute... std::size_t nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); + rCAttriblist.reserve(rCAttriblist.size() + pNode->GetCharAttribs().GetAttribs().size()); while ( pAttr ) { // In a blank paragraph keep the attributes!