diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 11:50:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-27 10:49:46 +0100 |
commit | f3a4129ed5946e2b8661dc8df23e00c4b6c6ecc8 (patch) | |
tree | 6a2a8095cc39bcaab65257105e90ab20bf7c067a | |
parent | b7e08c594066e626a92a460931d93b7f64c16df6 (diff) |
Resolves: tdf#115951 wrong entry selected for numbering pos
Change-Id: I4e317abb3cfceee2de4826f967a27d14fb3878ef
Reviewed-on: https://gerrit.libreoffice.org/50354
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@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 1ae000cfabc8..bd1926b80788 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 == static_cast<sal_Int32>(nFormatId)) + if (nValidEntry == static_cast<sal_Int32>(nFormatId) - nOffset) { nId = pTypes[nType]; break; |