summaryrefslogtreecommitdiff
path: root/sw/source/uibase/fldui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-23 12:49:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-23 15:32:10 +0200
commitec451bcb2831439faac9fdfb2dc981b0fa0a2961 (patch)
treeed910cfdda8438c706bcfa2374c6acad329de955 /sw/source/uibase/fldui
parente07606fdd000fa7ee197a7596e673d392591b1e7 (diff)
Resolves: tdf#113356 Missing numbering formats in writer field ui list
Change-Id: If1ba30783473b82f08fef3754fcdcf3b4e2951b4 Reviewed-on: https://gerrit.libreoffice.org/43717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/fldui')
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index d04aa3c1c03b..05b88f03f980 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -737,12 +737,13 @@ OUString SwFieldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uInt32 nFormatId) cons
return SwResId(pStart[nFormatId]);
OUString aRet;
- if (strcmp(*pStart, FMT_NUM_ARY[0]))
+ if (*pStart == FMT_NUM_ARY[0])
{
if (xNumberingInfo.is())
{
Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes();
const sal_Int16* pTypes = aTypes.getConstArray();
+ sal_Int32 nOffset = aSwFields[nPos].nFormatLength;
sal_uInt32 nValidEntry = 0;
for (sal_Int32 nType = 0; nType < aTypes.getLength(); nType++)
{
@@ -750,7 +751,7 @@ OUString SwFieldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uInt32 nFormatId) cons
if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N &&
(nCurrent != (NumberingType::BITMAP | LINK_TOKEN)))
{
- if (nValidEntry == nFormatId)
+ if (nValidEntry == nFormatId - nOffset)
{
sal_uInt32 n = SvxNumberingTypeTable::FindIndex(pTypes[nType]);
if (n != RESARRAY_INDEX_NOTFOUND)