diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 11:50:22 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-03-02 14:31:21 +0100 |
commit | 731aa4b4b93bea443c2a44a37fa6289aeb84a873 (patch) | |
tree | 00d7e77c258767eb59453051b650ab9771437301 | |
parent | 265b67c1737d25ebaf302fb59c1dfe59dfb4f449 (diff) |
Resolves: tdf#115951 wrong entry selected for numbering pos
Change-Id: I4e317abb3cfceee2de4826f967a27d14fb3878ef
Reviewed-on: https://gerrit.libreoffice.org/50356
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/uibase/fldui/fldmgr.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index e74c9ec12efc..687e4d84cd25 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -832,13 +832,14 @@ sal_uInt16 SwFieldMgr::GetFormatId(sal_uInt16 nTypeId, sal_uInt32 nFormatId) con { Sequence<sal_Int16> aTypes = m_xNumberingInfo->getSupportedNumberingTypes(); const sal_Int16* pTypes = aTypes.getConstArray(); + sal_Int32 nOffset = aSwFields[nPos].nFormatLength; sal_Int32 nValidEntry = 0; for (sal_Int32 nType = 0; nType < aTypes.getLength(); nType++) { sal_Int16 nCurrent = pTypes[nType]; if (nCurrent > NumberingType::CHARS_LOWER_LETTER_N) { - if (nValidEntry == ((sal_Int32)nFormatId)) + if (nValidEntry == static_cast<sal_Int32>(nFormatId) - nOffset) { nId = pTypes[nType]; break; |