diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-03-15 00:36:51 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-03-15 02:22:25 +0100 |
commit | f1e5f9040234575a023c023b2b4654e4fbcd6389 (patch) | |
tree | a0077b6163cabeb84caef5d5e7240c399b179578 | |
parent | b324e250eba39292ded7709517e0db2d5b99f3b8 (diff) |
DocumentFieldManager::UpdateTableFields(): SwIterator no more ...
Change-Id: Ic2d4fa7fe191f60837feab578e3573e21dab3d7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90504
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index f68fdf02e27b..9b06c4d1998c 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -710,15 +710,14 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) if( pFieldType ) { - SwIterator<SwFormatField,SwFieldType> aIter( *pFieldType ); - for( SwFormatField* pFormatField = aIter.Last(); pFormatField; pFormatField = aIter.Previous() ) + std::vector<SwFormatField*> vFields; + pFieldType->GatherFields(vFields); + for(SwFormatField* pFormatField: vFields) { // start calculation at the end // new fields are inserted at the beginning of the modify chain // that gives faster calculation on import // mba: do we really need this "optimization"? Is it still valid? - if (!pFormatField->GetTextField()) - continue; SwTableField *const pField(static_cast<SwTableField*>(pFormatField->GetField())); if (nsSwExtendedSubType::SUB_CMD & pField->GetSubType()) continue; @@ -728,8 +727,6 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) { // table where this field is located const SwTextNode& rTextNd = pFormatField->GetTextField()->GetTextNode(); - if( !rTextNd.GetNodes().IsDocNodes() ) - continue; const SwTableNode* pTableNd = rTextNd.FindTableNode(); if( !pTableNd ) continue; |