diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-03-15 00:06:38 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-03-15 02:21:23 +0100 |
commit | cdb2f2830abb2ded4d2f5073a864def375bad348 (patch) | |
tree | 15dd1ee07288d5e603a30cbf5d3a89d4e172f49f /sw | |
parent | f15a0d82b9be81fa9c7cb5327558ee639d4cbad6 (diff) |
SwDoc::ConvertFieldsToText(): SwIterator no more ...
Change-Id: I68ef8fa411c6da21e99b0e5435481a03e0d32db7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90501
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a928eb8b65c2..2a8511a676b0 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1597,12 +1597,9 @@ bool SwDoc::ConvertFieldsToText(SwRootFrame const& rLayout) if ( SwFieldIds::Postit == pCurType->Which() ) continue; - SwIterator<SwFormatField,SwFieldType> aIter( *pCurType ); - std::vector<const SwFormatField*> aFieldFormats; - for( SwFormatField* pCurFieldFormat = aIter.First(); pCurFieldFormat; pCurFieldFormat = aIter.Next() ) - aFieldFormats.push_back(pCurFieldFormat); - - for(const auto& rpFieldFormat : aFieldFormats) + std::vector<SwFormatField*> vFieldFormats; + pCurType->GatherFields(vFieldFormats, false); + for(const auto& rpFieldFormat : vFieldFormats) { const SwTextField *pTextField = rpFieldFormat->GetTextField(); // skip fields that are currently not in the document |