vcl/source/control/tabctrl.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d7f00522a2dd84b05371920ebbcf6f81323a666f
Author:     NickWingate <nick.wing...@collabora.com>
AuthorDate: Fri Aug 12 09:51:34 2022 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Sun Nov 20 10:42:51 2022 +0100

    Fix sending empty tab pages to online
    
    Previously this assumed page ids were sequential
    if a page is removed then its id returns an empty
    page. Fetching window child also worked based on
    iterations and not comparing actual ids so another
    possibility for empty pages.
    
    Signed-off-by: NickWingate <nick.wing...@collabora.com>
    Change-Id: I908f58665a9429ca4b66f346108030926a599d7d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138181
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142976
    Tested-by: Jenkins

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index b5d4d4cde0e2..b2f86b3cd9a5 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2228,9 +2228,9 @@ void TabControl::DumpAsPropertyTree(tools::JsonWriter& 
rJsonWriter)
 
     {
         auto childrenNode = rJsonWriter.startArray("children");
-        for (int i = 0; i < GetChildCount(); i++)
+        for (auto id : GetPageIDs())
         {
-            vcl::Window* pChild = GetChild(i);
+            TabPage* pChild = GetTabPage(id);
 
             if (pChild)
             {

Reply via email to