diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-12-20 13:28:53 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-12-21 15:30:40 +0100 |
commit | ed29dc6b3b4d7baa1a85621cceb940707454d87d (patch) | |
tree | ab7e0adf38a96c62d96f2e585348c5ebde6aec97 /sw/source/core/docnode/ndsect.cxx | |
parent | 3c96ded851bc6887693e4ecbc1f5961dc430613c (diff) |
Make SwSection::GetSectionName() return a reference to the name
Has a small but measureable impact on the time it takes to load a
specific pathological (huge) customer document. The load time drops
from 1min 46s to 1min 38s on my machine.
Reviewed-on: https://gerrit.libreoffice.org/46847
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 9675f307fbd7961b3d00f810dad3eacc9920e07d)
Change-Id: I93b603f369528187980d644a5364fa9bcf2f4615
Reviewed-on: https://gerrit.libreoffice.org/46904
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sw/source/core/docnode/ndsect.cxx')
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index c8a1d4ccbbce..e5d2d017c799 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -1371,7 +1371,7 @@ OUString SwDoc::GetUniqueSectionName( const OUString* pChkStr ) const const SwSectionNode *const pSectNd = pFormat->GetSectionNode(); if( pSectNd != nullptr ) { - const OUString rNm = pSectNd->GetSection().GetSectionName(); + const OUString& rNm = pSectNd->GetSection().GetSectionName(); if (rNm.startsWith( aName )) { // Calculate the Number and reset the Flag |