summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/rtfexport.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-06-21 09:54:14 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-06-21 12:41:52 +0200
commit11d19a5e35891409da7b9c65c56f26f7d5ae5ad0 (patch)
treea90896040d0947605bdc52032ada2efa55200249 /sw/source/filter/ww8/rtfexport.cxx
parentd2cefbe7effbee079c05a5a8234305650618fdc1 (diff)
Handle special case outside of for loop
Change-Id: I40abac65c4d015157bf0fbc58e78fd16a4adc764
Diffstat (limited to 'sw/source/filter/ww8/rtfexport.cxx')
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx19
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);