From c68be56c295c8dda3043c80d4641575ec2799e55 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 Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/core/nmspmap.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmloff') diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 44e619c0f348..7aa50542b5e8 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -235,9 +235,9 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, NameSpaceMap::const_iterator aIter = aNameMap.find ( nKey ); if ( aIter != aNameMap.end() ) { - OUStringBuffer sQName; // ...if it's in our map, make the prefix const OUString & prefix( (*aIter).second->sPrefix ); + OUStringBuffer sQName(prefix.getLength() + 1 + rLocalName.getLength()); if (!prefix.isEmpty()) // not default namespace { sQName.append( prefix ); -- cgit