tdf#135244: don't jump when updating counts

Change-Id: Id1693e420a51a913fa78da7b7f46e076876ffe68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99756
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index ba159d4..e7b739a 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -19,6 +19,7 @@

#include <officecfg/Office/Writer.hxx>
#include <wordcountdialog.hxx>
#include <docsh.hxx>
#include <docstat.hxx>
#include <swmodule.hxx>
#include <view.hxx>
@@ -133,7 +134,9 @@ void SwWordCountFloatDlg::UpdateCounts()
    SwDocStat aCurrCnt;
    SwDocStat aDocStat;
    {
        SwWait aWait( *::GetActiveView()->GetDocShell(), true );
        auto& rDocShell(*GetActiveView()->GetDocShell());
        SwWait aWait(rDocShell, true);
        auto aLock = rDocShell.LockAllViews();
        rSh.StartAction();
        rSh.CountWords( aCurrCnt );
        aDocStat = rSh.GetUpdatedDocStat();