summaryrefslogtreecommitdiff
path: root/sw/source/core/fields
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-25 11:20:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-25 14:59:42 +0100
commit6976600c66e7671ab42188effc18e9988468e9cf (patch)
treebb3d6341ded09be84c48f9de0edb8442f5df9a9f /sw/source/core/fields
parent1c1c50e12cc33df7c158badfc6b08c2ef9bb38a5 (diff)
Don't preset SwAuthorityField::m_SortKeyArr with three empty elements
This appears to be a mistake introduced with 0be2a98cc04ee26f605a6f6e7efbdee325560a91 "Convert V_DECL_PTRARR_DEL(SortKeyArr) to boost::ptr_vector", where the original svl/svarray.hxx-based SortKeyArr ctor had a parameter specifying the initial capacity. But the mistake was apparently harmless as uses of SwAuthorityField appear to always fill m_SortKeyArr via SwAuthorityFieldType::PutValue or SwAuthorityFieldType::SetSortKeys (which both first clear m_SortKeyArr) before accessing m_SortKeyArr otherwise (as observed when playing around with Writer "Insert - Table of Contents and Index - Table of Contents, Index or Bibliography...", and in the "Table of Contents, Index or Bibliography" dialog doing "Type - Type and Title - Type: Bibliography", "Entries - Sort by - Content", "Entries - Sort Keys - 1: Address", etc.). Change-Id: I0901b3b790f8390e743d5802116f13e7261e83eb Reviewed-on: https://gerrit.libreoffice.org/48563 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/core/fields')
-rw-r--r--sw/source/core/fields/authfld.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 9c3e9e0f0f72..907668df8532 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -66,7 +66,6 @@ bool SwAuthEntry::operator==(const SwAuthEntry& rComp)
SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
: SwFieldType( SwFieldIds::TableOfAuthorities ),
m_pDoc(pDoc),
- m_SortKeyArr(3),
m_cPrefix('['),
m_cSuffix(']'),
m_bIsSequence(false),