summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-10-17 20:33:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-23 08:55:00 +0200
commitc68be56c295c8dda3043c80d4641575ec2799e55 (patch)
tree40fc9a82e021498f7cebe76e59bec5bb85d6385c /editeng
parentMake comparison operator member functions const (diff)
downloadcore-c68be56c295c8dda3043c80d4641575ec2799e55.tar.gz
core-c68be56c295c8dda3043c80d4641575ec2799e55.zip
size some stringbuffer to prevent re-alloc
Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 45c2cb163e06..ad71436ab89f 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1629,7 +1629,7 @@ OUString ContentNode::GetExpandedText(sal_Int32 nStartPos, sal_Int32 nEndPos) co
DBG_ASSERT( nStartPos <= nEndPos, "Start and End reversed?" );
sal_Int32 nIndex = nStartPos;
- OUStringBuffer aStr;
+ OUStringBuffer aStr(256);
const EditCharAttrib* pNextFeature = GetCharAttribs().FindFeature( nIndex );
while ( nIndex < nEndPos )
{
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 5be0d3113ce5..c65dc164ea4a 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -287,7 +287,7 @@ OUString ImpEditEngine::GetSelected( const EditSelection& rSel ) const
OSL_ENSURE( nStartNode <= nEndNode, "Selection not sorted ?" );
- OUStringBuffer aText;
+ OUStringBuffer aText(256);
const OUString aSep = EditDoc::GetSepStr( LINEEND_LF );
// iterate over the paragraphs ...