sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |    8 ++++++--
 vcl/jsdialog/enabled.cxx                          |    4 ++--
 vcl/jsdialog/jsdialogbuilder.cxx                  |   13 ++++++++-----
 3 files changed, 16 insertions(+), 9 deletions(-)

New commits:
commit 0ebfe72f27af2a699520ec63402bc71210def43a
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Apr 28 11:31:55 2025 +0000
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue May 20 18:24:27 2025 +0200

    lok: setup accessibility sidebar panel root
    
    - we need to point correct node to generate good JSON
      (Deck has dump method)
    - in case of a11y panel entries we are deeper in the structure
    - we need to assign correct LOKWindowId to the sidebar fragments
      to put widgets into correct basket
    
    Change-Id: I72a09acdbfae6c2688ee04b5593a457a7c518911
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184716
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185562
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index eb9a50aa322b..62d8f19252c9 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -37,7 +37,9 @@ namespace sw::sidebar
 {
 AccessibilityCheckEntry::AccessibilityCheckEntry(
     weld::Container* pParent, std::shared_ptr<sfx::AccessibilityIssue> const& 
rAccessibilityIssue)
-    : m_xBuilder(Application::CreateBuilder(pParent, 
u"svx/ui/accessibilitycheckentry.ui"_ustr))
+    : m_xBuilder(Application::CreateBuilder(pParent, 
u"svx/ui/accessibilitycheckentry.ui"_ustr,
+                                            false,
+                                            
reinterpret_cast<sal_uInt64>(SfxViewShell::Current())))
     , 
m_xContainer(m_xBuilder->weld_container(u"accessibilityCheckEntryBox"_ustr))
     , m_xLabel(m_xBuilder->weld_label(u"accessibilityCheckEntryLabel"_ustr))
     , 
m_xGotoButton(m_xBuilder->weld_link_button(u"accessibilityCheckEntryLinkButton"_ustr))
@@ -98,7 +100,9 @@ IMPL_LINK_NOARG(AccessibilityCheckEntry, FixButtonClicked, 
weld::Button&, void)
 }
 
 AccessibilityCheckLevel::AccessibilityCheckLevel(weld::Box* pParent)
-    : m_xBuilder(Application::CreateBuilder(pParent, 
u"svx/ui/accessibilitychecklevel.ui"_ustr))
+    : m_xBuilder(Application::CreateBuilder(pParent, 
u"svx/ui/accessibilitychecklevel.ui"_ustr,
+                                            false,
+                                            
reinterpret_cast<sal_uInt64>(SfxViewShell::Current())))
     , m_xContainer(m_xBuilder->weld_box(u"accessibilityCheckLevelBox"_ustr))
 {
     m_xExpanders[0] = m_xBuilder->weld_expander(u"expand_document"_ustr);
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index d890c45cced2..b7ca603dd6e8 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -312,8 +312,6 @@ constexpr auto OtherDialogList
         { u"formula/ui/structpage.ui" },
         // svx
         { u"svx/ui/acceptrejectchangesdialog.ui" },
-        { u"svx/ui/accessibilitycheckdialog.ui" },
-        { u"svx/ui/accessibilitycheckentry.ui" },
         { u"svx/ui/compressgraphicdialog.ui" },
         { u"svx/ui/findreplacedialog.ui" },
         { u"svx/ui/fontworkgallerydialog.ui" },
@@ -430,6 +428,7 @@ constexpr auto SidebarList
         { u"sfx/ui/panel.ui" },
         { u"sfx/ui/templatepanel.ui" },
         // svx
+        { u"svx/ui/accessibilitycheckentry.ui" },
         { u"svx/ui/accessibilitychecklevel.ui" },
         { u"svx/ui/defaultshapespanel.ui" },
         { u"svx/ui/inspectortextpanel.ui" },
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index d2a6dfb0cd8a..cf74c50a8e62 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -189,18 +189,16 @@ void 
JSInstanceBuilder::initializeSidebarSender(sal_uInt64 nLOKWindowId,
 
     m_aParentDialog = pRoot->GetParentWithLOKNotifier();
 
-    bool bIsSidebarPanel = (rUIFile == u"sfx/ui/panel.ui");
     bool bIsNavigatorPanel = jsdialog::isBuilderEnabledForNavigator(rUIFile);
 
     // builder for Panel, PanelLayout, and DockingWindow
     // get SidebarDockingWindow, or SwNavigatorWin as m_aContentWindow
+    //    A11YCheckLevel : 12 levels up from pRoot
     //      PanelLayout  : 9 levels up from pRoot
     //      Panel        : 7 levels up from pRoot
     //      DockingWindow: 3 levels up from pRoot
-    unsigned nLevelsUp = 9;
-    if (bIsSidebarPanel)
-        nLevelsUp = 7;
-    else if (bIsNavigatorPanel)
+    unsigned nLevelsUp = 100; // limit
+    if (bIsNavigatorPanel)
         nLevelsUp = 3;
 
     if (nLevelsUp > 0)
@@ -212,6 +210,11 @@ void JSInstanceBuilder::initializeSidebarSender(sal_uInt64 
nLOKWindowId,
         m_aContentWindow = pRoot;
         for (unsigned i = 0; i < nLevelsUp && m_aContentWindow; i++)
         {
+            if (!bIsNavigatorPanel && m_aContentWindow->get_id() == "Deck")
+                nLevelsUp = i + 3;
+
+            // Useful to check if any panel doesn't appear
+            // SAL _ DEBUG ("SIDEBAR CONTENT LOOK UP FROM: " << 
m_aContentWindow->get_id());
             m_aContentWindow = m_aContentWindow->GetParent();
         }
     }
commit 415fdfe1ccd73dcb92571254e35c6526a71bd1cb
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Fri Apr 4 11:39:18 2025 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue May 20 18:24:21 2025 +0200

    jsdialog: enable svx/ui/accessibilitychecklevel.ui
    
    Change-Id: I1387bac5412842f24f3c79674fa1a960ae8bb54d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183702
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185561
    Tested-by: Jenkins

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index f3ee41f98a68..d890c45cced2 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -430,6 +430,7 @@ constexpr auto SidebarList
         { u"sfx/ui/panel.ui" },
         { u"sfx/ui/templatepanel.ui" },
         // svx
+        { u"svx/ui/accessibilitychecklevel.ui" },
         { u"svx/ui/defaultshapespanel.ui" },
         { u"svx/ui/inspectortextpanel.ui" },
         { u"svx/ui/mediaplayback.ui" },

Reply via email to