static/CustomTarget_emscripten_fs_image.mk |    1 +
 sw/UIConfig_swriter.mk                     |    1 +
 sw/inc/strings.hrc                         |    1 +
 sw/source/uibase/uiview/view2.cxx          |    9 +++++++--
 sw/uiconfig/swriter/ui/numberinput.ui      |    5 ++---
 5 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit f8bed5288656575e6f23923bfbd648bfd00c39a6
Author:     Jim Raykowski <[email protected]>
AuthorDate: Mon Oct 31 14:18:52 2022 -0800
Commit:     Jim Raykowski <[email protected]>
CommitDate: Tue Nov 1 06:13:01 2022 +0100

    tdf#142446 follow up: Fix missing ui file crash and a11y ui errors
    
    I somehow missed adding the locally changed .mk files to commit
    5f72a041c0160e4067ca931a9cec711b84b558f4. This patch also fixes gla11y
    reported a11y errors in the UI file and adds a help message to the
    dialog.
    
    Change-Id: Ib095b59f12571d53888916b26914fa99dd82979a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142087
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>

diff --git a/static/CustomTarget_emscripten_fs_image.mk 
b/static/CustomTarget_emscripten_fs_image.mk
index dfa088885bcd..61f718a85ae5 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -680,6 +680,7 @@ gb_emscripten_fs_image_files += \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/notebookbar_single.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/notebookbar.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/numberingnamedialog.ui
 \
+    
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/numberinput.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/numparapage.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/objectdialog.ui
 \
     
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swriter/ui/optcaptionpage.ui
 \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 185adbbc247a..d6e935e65c5b 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -208,6 +208,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
        sw/uiconfig/swriter/ui/newuserindexdialog \
        sw/uiconfig/swriter/ui/numparapage \
        sw/uiconfig/swriter/ui/numberingnamedialog \
+       sw/uiconfig/swriter/ui/numberinput \
        sw/uiconfig/swriter/ui/objectdialog \
        sw/uiconfig/swriter/ui/optcomparison \
        sw/uiconfig/swriter/ui/optcompatpage \
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 94b06835ecf3..2bf82cbc482f 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -680,6 +680,7 @@
 #define STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL 
NC_("STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL", "Fold All")
 #define STR_OUTLINE_LEVELS_SHOWN_TITLE          
NC_("STR_OUTLINE_LEVELS_SHOWN_TITLE", "Show Outline Content to Level")
 #define STR_OUTLINE_LEVELS_SHOWN_SPIN_LABEL     
NC_("STR_OUTLINE_LEVELS_SHOWN_SPIN_LABEL", "Level (1 - 10)")
+#define STR_OUTLINE_LEVELS_SHOWN_HELP_LABEL     
NC_("STR_OUTLINE_LEVELS_SHOWN_HELP_LABEL", "Enter the maximum outline level to 
show content for.")
 
 #define STR_EXPANDALL                           NC_("STR_EXPANDALL", "Expand 
All")
 #define STR_COLLAPSEALL                         NC_("STR_COLLAPSEALL", 
"Collapse All")
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 6e2db153bf9a..a3d7ce3d3665 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -198,7 +198,11 @@ public:
         m_xSpinButton->set_position(-1);
         m_xSpinButton->select_region(0, -1);
         m_xSpinButton->connect_changed(LINK(this, SwNumberInputDlg, 
InputModifiedHdl));
-        rLabel2.isEmpty() ? m_xLabel2->hide() : m_xLabel2->set_label(rLabel2);
+        if (!rLabel2.isEmpty())
+        {
+            m_xLabel2->set_label(rLabel2);
+            m_xLabel2->show();
+        }
     }
 
     auto GetNumber()
@@ -1338,7 +1342,8 @@ void SwView::Execute(SfxRequest &rReq)
             SwNumberInputDlg aDlg(GetViewFrame()->GetFrameWeld(),
                                   SwResId(STR_OUTLINE_LEVELS_SHOWN_TITLE),
                                   SwResId(STR_OUTLINE_LEVELS_SHOWN_SPIN_LABEL),
-                                  nOutlineLevel + 1, 1, 10);
+                                  nOutlineLevel + 1, 1, 10,
+                                  
SwResId(STR_OUTLINE_LEVELS_SHOWN_HELP_LABEL));
             if (aDlg.run() == RET_OK)
                 rSh.MakeOutlineLevelsVisible(aDlg.GetNumber());
         }
diff --git a/sw/uiconfig/swriter/ui/numberinput.ui 
b/sw/uiconfig/swriter/ui/numberinput.ui
index 1fdab56c7270..b61ccce592fe 100644
--- a/sw/uiconfig/swriter/ui/numberinput.ui
+++ b/sw/uiconfig/swriter/ui/numberinput.ui
@@ -76,8 +76,8 @@
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
-                <property name="label" translatable="yes" 
context="stringinput|name">label1</property>
                 <property name="use-underline">True</property>
+                <property name="mnemonic_widget">spinbutton</property>
                 <property name="xalign">0</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -112,9 +112,8 @@
         </child>
         <child>
           <object class="GtkLabel" id="label2">
-            <property name="visible">True</property>
+            <property name="visible">False</property>
             <property name="can-focus">False</property>
-            <property name="label" translatable="yes" 
context="stringinput|name">label2</property>
           </object>
           <packing>
             <property name="expand">False</property>

Reply via email to