summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-03-07 16:23:28 +0100
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2020-03-10 22:00:45 +0100
commit76b4a00226cfd26c0d13d6d33c1c08c955a0818a (patch)
tree7fff9edf9686d2eb228904c6695a73007bd26a53 /sw
parent8305d28f8dbdc9f891df38da290627b5e7dc651a (diff)
SwTOXBaseSection::UpdateAuthorities(): SwIerator no more ...
Change-Id: I51d7bbe527a722ddd8a603afe15e75ad4b8c737a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90167 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/doctxm.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index a5427d028a5b..2a6f805f79a4 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1362,20 +1362,17 @@ void SwTOXBaseSection::UpdateAuthorities(const SwTOXInternational& rIntl,
if(!pAuthField)
return;
- SwIterator<SwFormatField,SwFieldType> aIter( *pAuthField );
- for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
+ std::vector<SwFormatField*> vFields;
+ pAuthField->GatherFields(vFields);
+ for(auto pFormatField: vFields)
{
- const SwTextField* pTextField = pFormatField->GetTextField();
- // undo
- if(!pTextField)
- continue;
- const SwTextNode& rTextNode = pTextField->GetTextNode();
+ const auto pTextField = pFormatField->GetTextField();
+ const SwTextNode& rTextNode = pFormatField->GetTextField()->GetTextNode();
::SetProgressState( 0, pDoc->GetDocShell() );
if (rTextNode.GetText().getLength() &&
rTextNode.getLayoutFrame(pLayout) &&
- rTextNode.GetNodes().IsDocNodes()
- && (!pLayout || !pLayout->IsHideRedlines()
+ (!pLayout || !pLayout->IsHideRedlines()
|| !sw::IsFieldDeletedInModel(pDoc->getIDocumentRedlineAccess(), *pTextField)))
{
//#106485# the body node has to be used!