summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-26 11:50:22 +0000
committerMichael Stahl <mstahl@redhat.com>2018-03-02 14:31:21 +0100
commit731aa4b4b93bea443c2a44a37fa6289aeb84a873 (patch)
tree00d7e77c258767eb59453051b650ab9771437301
parent265b67c1737d25ebaf302fb59c1dfe59dfb4f449 (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.cxx3
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;