diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-06-21 09:54:14 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-06-21 12:41:52 +0200 |
commit | 11d19a5e35891409da7b9c65c56f26f7d5ae5ad0 (patch) | |
tree | a90896040d0947605bdc52032ada2efa55200249 /sw | |
parent | d2cefbe7effbee079c05a5a8234305650618fdc1 (diff) |
Handle special case outside of for loop
Change-Id: I40abac65c4d015157bf0fbc58e78fd16a4adc764
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 45dc232d6722..7a2849d1dc7c 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -204,18 +204,15 @@ void RtfExport::BuildNumbering() { const SwNumRuleTable& rListTable = m_pDoc->GetNumRuleTable(); - for (sal_uInt16 n = rListTable.size()+1; n;) + SwNumRule* pOutlineRule = m_pDoc->GetOutlineNumRule(); + if (IsExportNumRule(*pOutlineRule)) + GetId(*pOutlineRule); + + for (auto n = rListTable.size(); n;) { - SwNumRule* pRule; - --n; - if (n == rListTable.size()) - pRule = m_pDoc->GetOutlineNumRule(); - else - { - pRule = rListTable[ n ]; - if (!SwDoc::IsUsed(*pRule)) - continue; - } + SwNumRule* pRule = rListTable[ --n ]; + if (!SwDoc::IsUsed(*pRule)) + continue; if (IsExportNumRule(*pRule)) GetId(*pRule); |