[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 23 13:32:31 UTC 2017
sw/source/uibase/fldui/fldmgr.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit ec451bcb2831439faac9fdfb2dc981b0fa0a2961
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 23 12:49:54 2017 +0100
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 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 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)
More information about the Libreoffice-commits
mailing list