[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Tue Feb 27 09:50:09 UTC 2018
sw/source/uibase/fldui/fldmgr.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f3a4129ed5946e2b8661dc8df23e00c4b6c6ecc8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Feb 26 11:50:22 2018 +0000
Resolves: tdf#115951 wrong entry selected for numbering pos
Change-Id: I4e317abb3cfceee2de4826f967a27d14fb3878ef
Reviewed-on: https://gerrit.libreoffice.org/50354
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list