chart2/uiconfig/ui/insertaxisdlg.ui |  117 +++++++++++++++++-------------------
 vcl/qt5/QtBuilder.cxx               |    6 +
 2 files changed, 63 insertions(+), 60 deletions(-)

New commits:
commit 9dd1c9f9df5b0a60ee9fbe8d7db79561ac3eca0c
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Oct 2 17:10:22 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Oct 2 22:11:10 2024 +0200

    tdf#130857 qt weld: Add new layout to parent layout
    
    Similar to the way it's already done for widgets
    a few lines above, also add a newly created layout
    to the parent layout (if the parent is a layout).
    
    This makes the case where a QLayout is inside a
    QLayout (e.g. a "GtkBox" inside a "GtkBox" in the
    .ui file) work, where previously, the inner layout
    wouldn't be added to the hierarchy, and thus
    not be displayed in the dialog.
    
    Quoting from the QLayout::addItem doc [1]:
    
    > This function is not usually called in application code. To add a widget
    > to a layout, use the addWidget() function; to add a child layout, use
    > the addLayout() function provided by the relevant QLayout subclass.
    
    Therefore, cast to QBoxLayout, the only QLayout
    type used so far and call QBoxLayout::addLayout
    to add the child layout.
    (This might have to be extended when using e.g.
    QGridLayout in the future as well.)
    
    This will e.g. be needed for the "Tools" -> "Word count"
    dialog in Writer or the "Insert" -> "Axes..." dialog
    seen in Calc when a chart is selected -- once further
    remaining aspects needed to be able to support those
    have been implemented and they'll be enabled
    in QtInstanceBuilder::IsUIFileSupported.
    
    Change-Id: I518b9a33be1db419737a80aee44d93b2a7be1094
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174397
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
index 4845d70209bf..6fde9cb7575e 100644
--- a/vcl/qt5/QtBuilder.cxx
+++ b/vcl/qt5/QtBuilder.cxx
@@ -160,6 +160,12 @@ QObject* QtBuilder::makeObject(QObject* pParent, 
std::u16string_view sName, cons
         pWidget->setAccessibleIdentifier(toQString(sID));
 #endif
     }
+    else if (QLayout* pLayout = qobject_cast<QLayout*>(pObject))
+    {
+        // add layout to parent layout
+        if (QBoxLayout* pParentBoxLayout = 
qobject_cast<QBoxLayout*>(pParentLayout))
+            pParentBoxLayout->addLayout(pLayout);
+    }
 
     m_aChildren.emplace_back(sID, pObject);
 
commit 938b9988626a1a9ed233b1a1a118c7af48d56942
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Oct 2 16:29:14 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Oct 2 22:11:01 2024 +0200

    chart2: Resave insertaxisdlg.ui with glade 3.40
    
    This dialog can be seen by inserting a chart using
    "Insert" -> "Chart" in Calc, then double-clicking on
    the newly inserted chart, then opening the dialog
    using "Insert" -> "Axes...".
    
    Change-Id: Ie726805f7ec1e4ec81e74e90da7a3e7851cb4f90
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174396
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/chart2/uiconfig/ui/insertaxisdlg.ui 
b/chart2/uiconfig/ui/insertaxisdlg.ui
index 2853bc594ed4..5c714e56efd7 100644
--- a/chart2/uiconfig/ui/insertaxisdlg.ui
+++ b/chart2/uiconfig/ui/insertaxisdlg.ui
@@ -1,32 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.40.0 -->
 <interface domain="chart">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkDialog" id="InsertAxisDialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
+    <property name="can-focus">False</property>
+    <property name="border-width">6</property>
     <property name="title" translatable="yes" 
context="insertaxisdlg|InsertAxisDialog">Axes</property>
     <property name="modal">True</property>
-    <property name="default_width">0</property>
-    <property name="default_height">0</property>
-    <property name="type_hint">dialog</property>
+    <property name="default-width">0</property>
+    <property name="default-height">0</property>
+    <property name="type-hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox3">
-        <property name="can_focus">False</property>
+        <property name="can-focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area3">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
+            <property name="can-focus">False</property>
+            <property name="layout-style">end</property>
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label" translatable="yes" 
context="stock">_OK</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
+                <property name="can-focus">True</property>
+                <property name="can-default">True</property>
+                <property name="has-default">True</property>
+                <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
               <packing>
@@ -39,8 +39,8 @@
               <object class="GtkButton" id="cancel">
                 <property name="label" translatable="yes" 
context="stock">_Cancel</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
               <packing>
@@ -53,8 +53,8 @@
               <object class="GtkButton" id="help">
                 <property name="label" translatable="yes" 
context="stock">_Help</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
                 <property name="margin-end">6</property>
                 <property name="use-underline">True</property>
               </object>
@@ -69,14 +69,14 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="pack_type">end</property>
+            <property name="pack-type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
           <object class="GtkBox" id="box1">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can-focus">False</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
             <property name="spacing">12</property>
@@ -84,27 +84,27 @@
             <child>
               <object class="GtkFrame" id="frame1">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can-focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkBox" id="box2">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
+                    <property name="margin-start">12</property>
+                    <property name="margin-top">6</property>
                     <property name="vexpand">True</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
-                    <property name="margin-start">12</property>
-                    <property name="margin-top">6</property>
                     <child>
                       <object class="GtkCheckButton" id="primaryX">
                         <property name="label" translatable="yes" 
context="insertaxisdlg|primaryX">_X axis</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="primaryX-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="insertaxisdlg|extended_tip|primaryX">Displays the X 
axis as a line with subdivisions.</property>
@@ -121,10 +121,10 @@
                       <object class="GtkCheckButton" id="primaryY">
                         <property name="label" translatable="yes" 
context="insertaxisdlg|primaryY">_Y axis</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="primaryY-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="insertaxisdlg|extended_tip|primaryY">Displays the Y 
axis as a line with subdivisions.</property>
@@ -141,10 +141,10 @@
                       <object class="GtkCheckButton" id="primaryZ">
                         <property name="label" translatable="yes" 
context="insertaxisdlg|primaryZ">_Z axis</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="primaryZ-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="insertaxisdlg|extended_tip|primaryZ">Displays the Z 
axis as a line with subdivisions.</property>
@@ -162,7 +162,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="hexpand">True</property>
                     <property name="label" translatable="yes" 
context="insertaxisdlg|label1">Axes</property>
                     <attributes>
@@ -180,27 +180,27 @@
             <child>
               <object class="GtkFrame" id="frame2">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can-focus">False</property>
                 <property name="hexpand">True</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkBox" id="box3">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
+                    <property name="margin-start">12</property>
+                    <property name="margin-top">6</property>
                     <property name="vexpand">True</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
-                    <property name="margin-start">12</property>
-                    <property name="margin-top">6</property>
                     <child>
                       <object class="GtkCheckButton" id="secondaryX">
                         <property name="label" translatable="yes" 
context="insertaxisdlg|secondaryX">X _axis</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="secondaryX-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="insertaxisdlg|extended_tip|secondaryX">Displays a 
secondary X axis in the chart.</property>
@@ -217,10 +217,10 @@
                       <object class="GtkCheckButton" id="secondaryY">
                         <property name="label" translatable="yes" 
context="insertaxisdlg|secondaryY">Y ax_is</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="secondaryY-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="insertaxisdlg|extended_tip|secondaryY">The major 
axis and the secondary axis can have different scaling. For example, you can 
scale one axis to 2 in. and the other to 1.5 in. </property>
@@ -237,10 +237,10 @@
                       <object class="GtkCheckButton" id="secondaryZ">
                         <property name="label" translatable="yes" 
context="insertaxisdlg|secondaryZ">Z axi_s</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -253,7 +253,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="hexpand">True</property>
                     <property name="label" translatable="yes" 
context="insertaxisdlg|label2">Secondary Axes</property>
                     <attributes>
@@ -282,9 +282,6 @@
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
     </action-widgets>
-    <child type="titlebar">
-      <placeholder/>
-    </child>
     <child internal-child="accessible">
       <object class="AtkObject" id="InsertAxisDialog-atkobject">
         <property name="AtkObject::accessible-description" translatable="yes" 
context="insertaxisdlg|extended_tip|InsertAxisDialog">Specifies the axes to be 
displayed in the chart.</property>

Reply via email to