[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 10 21:01:24 UTC 2020
sw/source/core/doc/doctxm.cxx | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 76b4a00226cfd26c0d13d6d33c1c08c955a0818a
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sat Mar 7 16:23:28 2020 +0100
Commit: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Tue Mar 10 22:00:45 2020 +0100
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 at libreoffice.org>
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!
More information about the Libreoffice-commits
mailing list