[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 2 13:31:46 UTC 2018
sw/source/uibase/fldui/fldmgr.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 731aa4b4b93bea443c2a44a37fa6289aeb84a873
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/50356
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
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;
More information about the Libreoffice-commits
mailing list