[Libreoffice-commits] core.git: sw/source

Bjoern Michaelsen (via logerrit) logerrit at kemper.freedesktop.org
Sun Mar 15 01:22:16 UTC 2020


 sw/source/core/doc/doc.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit cdb2f2830abb2ded4d2f5073a864def375bad348
Author:     Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sun Mar 15 00:06:38 2020 +0100
Commit:     Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Sun Mar 15 02:21:23 2020 +0100

    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 at libreoffice.org>

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


More information about the Libreoffice-commits mailing list