sw/source/ui/dialog/wordcountdialog.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit cdea41e35a6b7aabfe5dca9ab76b567af2a1df24
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Jul 30 00:43:14 2020 +0300
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Mar 22 11:42:37 2021 +0100

    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.kagan...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112829
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/ui/dialog/wordcountdialog.cxx 
b/sw/source/ui/dialog/wordcountdialog.cxx
index 3dd7149b558e..6683215d5f86 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -20,6 +20,7 @@
 #include <officecfg/Office/Writer.hxx>
 #include <swtypes.hxx>
 #include <wordcountdialog.hxx>
+#include <docsh.hxx>
 #include <docstat.hxx>
 #include <cmdid.h>
 #include <swmodule.hxx>
@@ -135,7 +136,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();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to