From 4c957e514cb591fb876a6dc46d404aeea7d8fb9a Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Wed, 18 Mar 2026 16:22:58 +0100 Subject: [PATCH] tdf#171046: fix update of document statistics Document statistics should be considered as initialized only if the call to IncrementalDocStatCalculate() came to an end. Change-Id: I3d83e99fb8b1cfa6c63ca0ee120275fe80c00e47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202041 Reviewed-by: Oliver Specht Tested-by: Jenkins --- sw/source/core/doc/DocumentStatisticsManager.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx index d99ea52bcf6c..07ce961292e1 100644 --- a/sw/source/core/doc/DocumentStatisticsManager.cxx +++ b/sw/source/core/doc/DocumentStatisticsManager.cxx @@ -103,7 +103,6 @@ void DocumentStatisticsManager::UpdateDocStat( bool bCompleteAsync, bool bFields // returns true while there is more to do bool DocumentStatisticsManager::IncrementalDocStatCalculate(tools::Long nChars, bool bFields) { - mbInitialized = true; mpDocStat->Reset(); mpDocStat->nPara = 0; // default is 1! @@ -196,7 +195,7 @@ bool DocumentStatisticsManager::IncrementalDocStatCalculate(tools::Long nChars, SwFieldType *pType = m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::DocStat); pType->UpdateFields(); } - + mbInitialized = nChars > 0; return nChars < 0; }