Related: tdf#131581 inhibit updates during other for_each variants

Change-Id: I74789006815b0ae04cfe5084d60d639241062896
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102383
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index a580ff2..16436ad 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4575,6 +4575,8 @@ public:

    virtual void selected_foreach(const std::function<bool(weld::TreeIter&)>& func) override
    {
        UpdateGuard aGuard(*m_xTreeView);

        SalInstanceTreeIter aVclIter(m_xTreeView->FirstSelected());
        while (aVclIter.iter)
        {
@@ -4586,6 +4588,8 @@ public:

    virtual void visible_foreach(const std::function<bool(weld::TreeIter&)>& func) override
    {
        UpdateGuard aGuard(*m_xTreeView);

        SalInstanceTreeIter aVclIter(m_xTreeView->GetFirstEntryInView());
        while (aVclIter.iter)
        {