From 2457f8f5b88028d0248943e2f80fce55913312f1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 21 Apr 2012 14:54:15 +0100 Subject: clarify DelNumRule comment --- sw/source/filter/ww8/ww8par3.cxx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index f909f77875b9..357119b76a1b 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1411,9 +1411,8 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) WW8ListManager::~WW8ListManager() { /* - named lists remain in doc!!! - unnamed lists are deleted when unused - pLFOInfos are in any case destructed + named lists remain in document + unused automatic lists are removed from document (DelNumRule) */ for(std::vector::iterator aIter = maLSTInfos.begin(); aIter != maLSTInfos.end(); ++aIter) @@ -1426,18 +1425,18 @@ WW8ListManager::~WW8ListManager() delete *aIter; } boost::ptr_vector::reverse_iterator aIter; - for (aIter = pLFOInfos.rbegin() ; - aIter < pLFOInfos.rend(); - ++aIter ) + for (aIter = pLFOInfos.rbegin() ; + aIter < pLFOInfos.rend(); + ++aIter ) + { + if (aIter->bOverride + && aIter->pNumRule + && !aIter->bUsedInDoc + && aIter->pNumRule->IsAutoRule()) { - if (aIter->bOverride - && aIter->pNumRule - && !aIter->bUsedInDoc - && aIter->pNumRule->IsAutoRule()) - { - rDoc.DelNumRule( aIter->pNumRule->GetName() ); - } + rDoc.DelNumRule( aIter->pNumRule->GetName() ); } + } } bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo) -- cgit v1.2.3