summaryrefslogtreecommitdiff
path: root/sw/source/ui/dialog
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-07-30 00:43:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-07-30 08:34:16 +0200
commitd6ce2c0500ab026ba131782365a41da93794196f (patch)
treee44a94224edb3b4fc30d17e2585e3e37ba151676 /sw/source/ui/dialog
parent5f646281f777019a4e91c467f1d6f8a7f2083ffd (diff)
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>
Diffstat (limited to 'sw/source/ui/dialog')
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index ba159d4e6aa6..e7b739ac9a2a 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();