[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 14 17:44:13 UTC 2020
sw/source/core/fields/dbfld.cxx | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
New commits:
commit a970d3e50fa39c89961d99aa4b858f3b71d921b2
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sat Mar 14 15:26:58 2020 +0100
Commit: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Sat Mar 14 18:43:39 2020 +0100
SwDBFieldType::PutValue(): SwIterator no more ...
Change-Id: I4507ee036611f52a7685077cc880163cd7b83881
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90492
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index b7bf466a12e1..fbc13f796109 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -136,19 +136,13 @@ void SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
if( sTmp != m_sColumn )
{
m_sColumn = sTmp;
- SwIterator<SwFormatField,SwFieldType> aIter( *this );
- SwFormatField* pFormatField = aIter.First();
- while(pFormatField)
+ std::vector<SwFormatField*> vFields;
+ GatherFields(vFields);
+ for(auto pFormatField: vFields)
{
- // field in Undo?
- SwTextField *pTextField = pFormatField->GetTextField();
- if(pTextField && pTextField->GetTextNode().GetNodes().IsDocNodes() )
- {
- SwDBField* pDBField = static_cast<SwDBField*>(pFormatField->GetField());
- pDBField->ClearInitialized();
- pDBField->InitContent();
- }
- pFormatField = aIter.Next();
+ SwDBField* pDBField = static_cast<SwDBField*>(pFormatField->GetField());
+ pDBField->ClearInitialized();
+ pDBField->InitContent();
}
}
}
More information about the Libreoffice-commits
mailing list