drawinglayer/source/geometry/viewinformation2d.cxx            |   21 
 drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx  |    3 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx    |   14 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx       |   11 
 include/drawinglayer/geometry/viewinformation2d.hxx           |    3 
 include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx |   23 
 svx/source/sdr/contact/objectcontactofpageview.cxx            |    2 
 svx/source/sdr/primitive2d/sdrattributecreator.cxx            |   53 
 sw/uiconfig/swriter/ui/fldvarpage.ui                          |  647 ++++------
 9 files changed, 362 insertions(+), 415 deletions(-)

New commits:
commit f9aa7d95ac68c39166342aff91a5777a565f2c1d
Author:     Oliver Specht <oliver.spe...@cib.de>
AuthorDate: Wed Apr 10 17:11:10 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Tue Apr 16 22:17:15 2024 +0200

    tdf#160621 Redesign name and value fields in variabe fields dialog page
    
    The space available in the bottom of the dialog page
    is now used to make the input fields longer
    
    Change-Id: If936decbcc44ff356095fc291ff8306084c248ef

diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui 
b/sw/uiconfig/swriter/ui/fldvarpage.ui
index 4c6be9736980..9fd8c8f8a306 100644
--- a/sw/uiconfig/swriter/ui/fldvarpage.ui
+++ b/sw/uiconfig/swriter/ui/fldvarpage.ui
@@ -55,162 +55,273 @@
     <property name="column-spacing">12</property>
     <property name="column-homogeneous">True</property>
     <child>
-      <object class="GtkBox" id="box3">
+      <!-- n-columns=4 n-rows=2 -->
+      <object class="GtkGrid" id="gdNameValue">
         <property name="visible">True</property>
         <property name="can-focus">False</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
+        <property name="row-spacing">6</property>
+        <property name="column-spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="nameft">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="halign">start</property>
+            <property name="label" translatable="yes" 
context="fldvarpage|nameft">Na_me:</property>
+            <property name="use-underline">True</property>
+            <property name="mnemonic-widget">name</property>
+            <property name="xalign">0</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="name">
+            <property name="visible">True</property>
+            <property name="can-focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="truncate-multiline">True</property>
+            <child internal-child="accessible">
+              <object class="AtkObject" id="name-atkobject">
+                <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|name">Type the name of the 
user-defined field  to create.</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">0</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
         <child>
-          <object class="GtkFrame" id="typeframe">
+          <object class="GtkLabel" id="valueft">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
+            <property name="halign">start</property>
+            <property name="valign">start</property>
+            <property name="label" translatable="yes" 
context="fldvarpage|valueft">_Value:</property>
+            <property name="use-underline">True</property>
+            <property name="mnemonic-widget">value</property>
+            <property name="xalign">0</property>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can-focus">True</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
-            <property name="label-xalign">0</property>
-            <property name="shadow-type">none</property>
+            <property name="shadow-type">in</property>
             <child>
-              <object class="GtkScrolledWindow">
+              <object class="GtkTextView" id="value">
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
-                <property name="margin-top">6</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="shadow-type">in</property>
-                <child>
-                  <object class="GtkTreeView" id="type">
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="hexpand">True</property>
-                    <property name="vexpand">True</property>
-                    <property name="model">liststore1</property>
-                    <property name="headers-visible">False</property>
-                    <property name="headers-clickable">False</property>
-                    <property name="search-column">0</property>
-                    <property name="show-expanders">False</property>
-                    <child internal-child="selection">
-                      <object class="GtkTreeSelection" 
id="treeview-selection1"/>
-                    </child>
-                    <child>
-                      <object class="GtkTreeViewColumn" id="treeviewcolumn1">
-                        <child>
-                          <object class="GtkCellRendererText" 
id="cellrenderertext1"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                    </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="type-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|type">Lists the available 
field types. To add a field to your document, click a field type, click a field 
in the Select list, and then click Insert.</property>
-                      </object>
-                    </child>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="value-atkobject">
+                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|value">Enter the contents 
to add to a user-defined field.</property>
                   </object>
                 </child>
               </object>
             </child>
-            <child type="label">
-              <object class="GtkLabel" id="label1">
+          </object>
+          <packing>
+            <property name="left-attach">1</property>
+            <property name="top-attach">1</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
+        <child>
+          <!-- n-columns=2 n-rows=1 -->
+          <object class="GtkGrid" id="toolbar">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="valign">end</property>
+            <property name="column-spacing">6</property>
+            <child>
+              <object class="GtkButton" id="apply">
                 <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="label" translatable="yes" 
context="fldvarpage|label1">_Type</property>
-                <property name="use-underline">True</property>
-                <property name="xalign">0</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
+                <property name="tooltip-text" translatable="yes" 
context="fldvarpage|apply|tooltip_text">Apply</property>
+                <property name="valign">center</property>
+                <property name="image">image2</property>
+                <property name="always-show-image">True</property>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="apply-atkobject">
+                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|apply">Adds the 
user-defined field to the Select list.</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="delete">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
+                <property name="tooltip-text" translatable="yes" 
context="fldvarpage|delete|tooltip_text">Delete</property>
+                <property name="valign">center</property>
+                <property name="image">image1</property>
+                <property name="always-show-image">True</property>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="delete-atkobject">
+                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|delete">Removes the 
user-defined field from the select list. You can only remove fields that are 
not used in the current document.</property>
+                  </object>
+                </child>
               </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">0</property>
+              </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
+            <property name="left-attach">3</property>
+            <property name="top-attach">1</property>
           </packing>
         </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
-        <property name="left-attach">0</property>
-        <property name="top-attach">0</property>
+        <property name="left-attach">1</property>
+        <property name="top-attach">1</property>
+        <property name="width">2</property>
       </packing>
     </child>
     <child>
-      <object class="GtkBox" id="box4">
+      <object class="GtkFrame" id="typeframe">
         <property name="visible">True</property>
         <property name="can-focus">False</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
+        <property name="label-xalign">0</property>
+        <property name="shadow-type">none</property>
         <child>
-          <object class="GtkFrame" id="selectframe">
+          <object class="GtkScrolledWindow">
             <property name="visible">True</property>
-            <property name="can-focus">False</property>
+            <property name="can-focus">True</property>
+            <property name="margin-top">6</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
-            <property name="label-xalign">0</property>
-            <property name="shadow-type">none</property>
+            <property name="shadow-type">in</property>
             <child>
-              <object class="GtkScrolledWindow">
+              <object class="GtkTreeView" id="type">
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
-                <property name="margin-top">6</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="shadow-type">in</property>
+                <property name="model">liststore1</property>
+                <property name="headers-visible">False</property>
+                <property name="headers-clickable">False</property>
+                <property name="search-column">0</property>
+                <property name="show-expanders">False</property>
                 <child>
-                  <object class="GtkTreeView" id="select">
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="hexpand">True</property>
-                    <property name="vexpand">True</property>
-                    <property name="model">liststore2</property>
-                    <property name="headers-visible">False</property>
-                    <property name="headers-clickable">False</property>
-                    <property name="search-column">0</property>
-                    <property name="show-expanders">False</property>
-                    <child internal-child="selection">
-                      <object class="GtkTreeSelection" 
id="treeview-selection2"/>
-                    </child>
+                  <object class="GtkTreeViewColumn" id="treeviewcolumn1">
                     <child>
-                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
-                        <child>
-                          <object class="GtkCellRendererText" 
id="cellrenderertext2"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
-                      </object>
-                    </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="select-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|select">Lists the available 
fields for the field type selected in the Type list. To insert a field, click 
the field, and then click Insert.</property>
-                      </object>
+                      <object class="GtkCellRendererText" 
id="cellrenderertext1"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
                     </child>
                   </object>
                 </child>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="type-atkobject">
+                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|type">Lists the available 
field types. To add a field to your document, click a field type, click a field 
in the Select list, and then click Insert.</property>
+                  </object>
+                </child>
               </object>
             </child>
-            <child type="label">
-              <object class="GtkLabel" id="label2">
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="label" translatable="yes" 
context="fldvarpage|label1">_Type</property>
+            <property name="use-underline">True</property>
+            <property name="xalign">0</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
+        <property name="height">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="selectframe">
+        <property name="visible">True</property>
+        <property name="can-focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="label-xalign">0</property>
+        <property name="shadow-type">none</property>
+        <child>
+          <object class="GtkScrolledWindow">
+            <property name="visible">True</property>
+            <property name="can-focus">True</property>
+            <property name="margin-top">6</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="shadow-type">in</property>
+            <child>
+              <object class="GtkTreeView" id="select">
                 <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="label" translatable="yes" 
context="fldvarpage|label2">_Select</property>
-                <property name="use-underline">True</property>
-                <property name="xalign">0</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
+                <property name="can-focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="model">liststore2</property>
+                <property name="headers-visible">False</property>
+                <property name="headers-clickable">False</property>
+                <property name="search-column">0</property>
+                <property name="show-expanders">False</property>
+                <child>
+                  <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                    <child>
+                      <object class="GtkCellRendererText" 
id="cellrenderertext2"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="select-atkobject">
+                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|select">Lists the available 
fields for the field type selected in the Type list. To insert a field, click 
the field, and then click Insert.</property>
+                  </object>
+                </child>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="label" translatable="yes" 
context="fldvarpage|label2">_Select</property>
+            <property name="use-underline">True</property>
+            <property name="xalign">0</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
         </child>
       </object>
       <packing>
@@ -219,146 +330,104 @@
       </packing>
     </child>
     <child>
-      <object class="GtkBox" id="box1">
+      <object class="GtkFrame" id="formatframe">
         <property name="visible">True</property>
         <property name="can-focus">False</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
+        <property name="label-xalign">0</property>
+        <property name="shadow-type">none</property>
         <child>
-          <object class="GtkBox" id="box2">
+          <object class="GtkBox" id="box5">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
+            <property name="margin-top">6</property>
+            <property name="hexpand">True</property>
             <property name="vexpand">True</property>
             <property name="orientation">vertical</property>
-            <property name="spacing">12</property>
+            <property name="spacing">6</property>
             <child>
-              <object class="GtkFrame" id="formatframe">
+              <object class="GtkScrolledWindow">
                 <property name="visible">True</property>
-                <property name="can-focus">False</property>
+                <property name="can-focus">True</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="label-xalign">0</property>
-                <property name="shadow-type">none</property>
+                <property name="shadow-type">in</property>
                 <child>
-                  <object class="GtkBox" id="box5">
+                  <object class="GtkTreeView" id="numformat">
                     <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="margin-top">6</property>
+                    <property name="can-focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
+                    <property name="model">liststore3</property>
+                    <property name="headers-visible">False</property>
+                    <property name="headers-clickable">False</property>
+                    <property name="search-column">0</property>
+                    <property name="show-expanders">False</property>
                     <child>
-                      <object class="GtkScrolledWindow">
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
-                        <property name="shadow-type">in</property>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn3">
                         <child>
-                          <object class="GtkTreeView" id="numformat">
-                            <property name="visible">True</property>
-                            <property name="can-focus">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                            <property name="model">liststore3</property>
-                            <property name="headers-visible">False</property>
-                            <property name="headers-clickable">False</property>
-                            <property name="search-column">0</property>
-                            <property name="show-expanders">False</property>
-                            <child internal-child="selection">
-                              <object class="GtkTreeSelection" 
id="treeview-selection3"/>
-                            </child>
-                            <child>
-                              <object class="GtkTreeViewColumn" 
id="treeviewcolumn3">
-                                <child>
-                                  <object class="GtkCellRendererText" 
id="cellrenderertext3"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                            </child>
-                            <child internal-child="accessible">
-                              <object class="AtkObject" 
id="numformat-atkobject">
-                                <property 
name="AtkObject::accessible-description" translatable="yes" 
context="fldvarpage|extended_tip|numformat">Click the format to apply to the 
selected field, or click "Additional formats" to define a custom 
format.</property>
-                              </object>
-                            </child>
-                          </object>
+                          <object class="GtkCellRendererText" 
id="cellrenderertext3"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
                         </child>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkScrolledWindow">
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
-                        <property name="shadow-type">in</property>
-                        <child>
-                          <object class="GtkTreeView" id="format">
-                            <property name="visible">True</property>
-                            <property name="can-focus">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                            <property name="model">liststore4</property>
-                            <property name="headers-visible">False</property>
-                            <property name="headers-clickable">False</property>
-                            <property name="search-column">0</property>
-                            <property name="show-expanders">False</property>
-                            <child internal-child="selection">
-                              <object class="GtkTreeSelection" 
id="treeview-selection4"/>
-                            </child>
-                            <child>
-                              <object class="GtkTreeViewColumn" 
id="treeviewcolumn4">
-                                <child>
-                                  <object class="GtkCellRendererText" 
id="cellrenderertext4"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                            </child>
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="format-atkobject">
-                                <property 
name="AtkObject::accessible-description" translatable="yes" 
context="fldvarpage|extended_tip|format">In the Format list, define if the 
value is inserted as text or as number.</property>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="numformat-atkobject">
+                        <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|numformat">Click the format 
to apply to the selected field, or click "Additional formats" to define a 
custom format.</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label3">
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="shadow-type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="format">
                     <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="label" translatable="yes" 
context="fldvarpage|label3">_Format</property>
-                    <property name="use-underline">True</property>
-                    <property name="xalign">0</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
+                    <property name="can-focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="model">liststore4</property>
+                    <property name="headers-visible">False</property>
+                    <property name="headers-clickable">False</property>
+                    <property name="search-column">0</property>
+                    <property name="show-expanders">False</property>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn4">
+                        <child>
+                          <object class="GtkCellRendererText" 
id="cellrenderertext4"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="format-atkobject">
+                        <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|format">In the Format list, 
define if the value is inserted as text or as number.</property>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">0</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
@@ -378,7 +447,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -448,11 +517,11 @@
                       <object class="GtkEntry" id="separator">
                         <property name="visible">True</property>
                         <property name="can-focus">True</property>
+                        <property name="tooltip-text" translatable="yes" 
context="fldvarpage|separator|tooltip_text">Enter the character to use as a 
separator between the heading number and the field number.</property>
                         <property name="max-length">1</property>
                         <property name="width-chars">2</property>
                         <property name="text" translatable="yes" 
context="fldvarpage|separator">.</property>
                         <property name="truncate-multiline">True</property>
-                        <property name="tooltip_text" translatable="yes" 
context="fldvarpage|separator|tooltip_text">Enter the character to use as a 
separator between the heading number and the field number.</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="separator-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|separator">Enter the 
character to use as a separator between the heading number and the field 
number.</property>
@@ -482,159 +551,27 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">2</property>
+                <property name="position">3</property>
               </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-      <packing>
-        <property name="left-attach">2</property>
-        <property name="top-attach">0</property>
-      </packing>
-    </child>
-    <child>
-      <!-- n-columns=3 n-rows=2 -->
-      <object class="GtkGrid">
-        <property name="visible">True</property>
-        <property name="can-focus">False</property>
-        <property name="row-spacing">6</property>
-        <property name="column-spacing">12</property>
-        <property name="column-homogeneous">True</property>
-        <child>
-          <object class="GtkLabel" id="nameft">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="label" translatable="yes" 
context="fldvarpage|nameft">Na_me</property>
-            <property name="use-underline">True</property>
-            <property name="mnemonic-widget">name</property>
-            <property name="xalign">0</property>
-          </object>
-          <packing>
-            <property name="left-attach">0</property>
-            <property name="top-attach">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkEntry" id="name">
-            <property name="visible">True</property>
-            <property name="can-focus">True</property>
-            <property name="hexpand">True</property>
-            <property name="truncate-multiline">True</property>
-            <child internal-child="accessible">
-              <object class="AtkObject" id="name-atkobject">
-                <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|name">Type the name of the 
user-defined field  to create.</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="left-attach">1</property>
-            <property name="top-attach">0</property>
-          </packing>
         </child>
-        <child>
-          <object class="GtkLabel" id="valueft">
+        <child type="label">
+          <object class="GtkLabel" id="label3">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
-            <property name="label" translatable="yes" 
context="fldvarpage|valueft">_Value</property>
+            <property name="label" translatable="yes" 
context="fldvarpage|label3">_Format</property>
             <property name="use-underline">True</property>
-            <property name="mnemonic-widget">value</property>
             <property name="xalign">0</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
           </object>
-          <packing>
-            <property name="left-attach">0</property>
-            <property name="top-attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="visible">True</property>
-            <property name="can-focus">True</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="shadow-type">in</property>
-            <child>
-              <object class="GtkTextView" id="value">
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="comments-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|value">Enter the contents 
to add to a user-defined field.</property>
-                  </object>
-                </child>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="left-attach">1</property>
-            <property name="top-attach">1</property>
-          </packing>
-        </child>
-        <child>
-          <!-- n-columns=2 n-rows=1 -->
-          <object class="GtkGrid" id="toolbar">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="valign">end</property>
-            <property name="column-spacing">6</property>
-            <child>
-              <object class="GtkButton" id="apply">
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="tooltip-text" translatable="yes" 
context="fldvarpage|apply|tooltip_text">Apply</property>
-                <property name="valign">center</property>
-                <property name="image">image2</property>
-                <property name="always-show-image">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="apply-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|apply">Adds the 
user-defined field to the Select list.</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="delete">
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="tooltip-text" translatable="yes" 
context="fldvarpage|delete|tooltip_text">Delete</property>
-                <property name="valign">center</property>
-                <property name="image">image1</property>
-                <property name="always-show-image">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="delete-atkobject">
-                    <property name="AtkObject::accessible-description" 
translatable="yes" context="fldvarpage|extended_tip|delete">Removes the 
user-defined field from the select list. You can only remove fields that are 
not used in the current document.</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">1</property>
-                <property name="top-attach">0</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="left-attach">2</property>
-            <property name="top-attach">1</property>
-          </packing>
         </child>
       </object>
       <packing>
-        <property name="left-attach">0</property>
-        <property name="top-attach">1</property>
-        <property name="width">3</property>
+        <property name="left-attach">2</property>
+        <property name="top-attach">0</property>
       </packing>
     </child>
   </object>
commit 6efe52138732b7054f879b3e118d5bef5b6add36
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Apr 7 20:04:57 2024 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Tue Apr 16 22:17:02 2024 +0200

    Failed to set property GtkEntry.valign to top: Could not parse enum: 'top'
    
    Change-Id: I2d73204bda451bb87b64652b4dd934fc16e3b65d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165875
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui 
b/sw/uiconfig/swriter/ui/fldvarpage.ui
index 7925bdbaaad0..4c6be9736980 100644
--- a/sw/uiconfig/swriter/ui/fldvarpage.ui
+++ b/sw/uiconfig/swriter/ui/fldvarpage.ui
@@ -524,7 +524,6 @@
           <object class="GtkEntry" id="name">
             <property name="visible">True</property>
             <property name="can-focus">True</property>
-            <property name="valign">top</property>
             <property name="hexpand">True</property>
             <property name="truncate-multiline">True</property>
             <child internal-child="accessible">
@@ -550,7 +549,6 @@
           <packing>
             <property name="left-attach">0</property>
             <property name="top-attach">1</property>
-            <property name="width">1</property>
           </packing>
         </child>
         <child>
commit 08a2eb2bc9c44afc5c435fd8a54f7c50c8a14109
Author:     Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de>
AuthorDate: Thu Feb 22 15:13:33 2024 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Tue Apr 16 22:06:27 2024 +0200

    IASS: Re-define Text suppression for TextEdit
    
    The current version suppressed text for Objects
    in edit mode for the paint in the view since that
    text is painted/visualized by the EditEngine/Overlay
    while it is being edited, so that would be displayed
    twice - and in different states.
    That is correct, but e.g. also suppressed display
    for e.g. an opened second Window for the Document or
    in a running SlideShow.
    The mechanism uses embedding the Text in case it gets
    edited to a simple Primitive that then can be
    suppressed by the view rendering it. It decomposed
    to empty, thus to visualize it a renderer had to
    actively identify and process it.
    I now turnedd this around - it is a normal
    GroupPrimitive2D and decomposes to the text content,
    so will be visualized by all renderers that do not
    actively suppress it. To actively suppress it I added
    a get/setTextEditActive marker to ViewInformation2D
    that will be used by the ObjectContactOfPageView
    to signal exactly that and to suppress in the pixel
    based VCLRenderer in that case.
    This is important e.g. for 2nd view window, but also
    for PDF export with active TextEdit (yes, happens)
    and SlideShow.
    There was also support missing for an up-to-now
    empty/new object (no text yet) so that text from the
    active TextEdit was not provided, corrected that.
    
    Change-Id: I0d8befdb023028d78ce341091331e9a83a0173bd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163773
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>

diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx 
b/drawinglayer/source/geometry/viewinformation2d.cxx
index 03089e41e36f..367491488863 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -87,6 +87,12 @@ protected:
     // the point in time
     double mfViewTime;
 
+    // a hint that the View that is being painted has an active TextEdit. This
+    // is important for handling of TextHierarchyEditPrimitive2D to suppress
+    // the text for objects in TextEdit - the text is visualized by the
+    // active EditEngine/Outliner overlay, so it would be double visualized
+    bool mbTextEditActive;
+
     // allow to reduce DisplayQuality (e.g. sw 3d fallback renderer for 
interactions)
     bool mbReducedDisplayQuality : 1;
 
@@ -106,6 +112,7 @@ public:
         , maDiscreteViewport()
         , mxVisualizedPage()
         , mfViewTime(0.0)
+        , mbTextEditActive(false)
         , mbReducedDisplayQuality(false)
         , mbUseAntiAliasing(ViewInformation2D::getGlobalAntiAliasing())
         , mbPixelSnapHairline(mbUseAntiAliasing && bForwardPixelSnapHairline)
@@ -190,6 +197,9 @@ public:
         mxVisualizedPage = rNew;
     }
 
+    bool getTextEditActive() const { return mbTextEditActive; }
+    void setTextEditActive(bool bNew) { mbTextEditActive = bNew; }
+
     bool getReducedDisplayQuality() const { return mbReducedDisplayQuality; }
     void setReducedDisplayQuality(bool bNew) { mbReducedDisplayQuality = bNew; 
}
 
@@ -206,6 +216,7 @@ public:
                 && maViewport == rCandidate.maViewport
                 && mxVisualizedPage == rCandidate.mxVisualizedPage
                 && mfViewTime == rCandidate.mfViewTime
+                && mbTextEditActive == rCandidate.mbTextEditActive
                 && mbReducedDisplayQuality == 
rCandidate.mbReducedDisplayQuality
                 && mbUseAntiAliasing == rCandidate.mbUseAntiAliasing
                 && mbPixelSnapHairline == rCandidate.mbPixelSnapHairline);
@@ -342,6 +353,16 @@ void ViewInformation2D::setUseAntiAliasing(bool bNew)
         mpViewInformation2D->setUseAntiAliasing(bNew);
 }
 
+bool ViewInformation2D::getTextEditActive() const
+{
+    return mpViewInformation2D->getTextEditActive();
+}
+
+void ViewInformation2D::setTextEditActive(bool bNew)
+{
+    mpViewInformation2D->setTextEditActive(bNew);
+}
+
 bool ViewInformation2D::getPixelSnapHairline() const
 {
     return mpViewInformation2D->getPixelSnapHairline();
diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx 
b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
index 93cb4e455d76..172e8c758797 100644
--- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
@@ -137,8 +137,7 @@ namespace drawinglayer::primitive2d
 
 
         
TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(Primitive2DContainer&&
 aContent)
-        :   BasePrimitive2D()
-        ,   maContent(std::move(aContent))
+        :   GroupPrimitive2D(std::move(aContent))
         {
         }
 
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index f2aea4cd7eae..be1c7e0e21bc 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -889,20 +889,6 @@ void VclMetafileProcessor2D::processBasePrimitive2D(const 
primitive2d::BasePrimi
                 static_cast<const 
primitive2d::StructureTagPrimitive2D&>(rCandidate));
             break;
         }
-        case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D:
-        {
-            // This primitive is created if a text edit is active and contains 
it's
-            // current content, not from model data itself.
-            // Pixel renderers need to suppress that content, it gets 
displayed by the active
-            // TextEdit in the EditView. Suppression is done by decomposing to 
nothing.
-            // MetaFile renderers have to show it, so that the edited text is 
part of the
-            // MetaFile, e.g. needed for presentation previews and exports.
-            // So take action here and process it's content:
-            // Note: Former error was #i97628#
-            process(static_cast<const 
primitive2d::TextHierarchyEditPrimitive2D&>(rCandidate)
-                        .getContent());
-            break;
-        }
         case PRIMITIVE2D_ID_EPSPRIMITIVE2D:
         {
             RenderEpsPrimitive2D(static_cast<const 
primitive2d::EpsPrimitive2D&>(rCandidate));
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index e71cda4a0bb6..028e06cd39a2 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -335,6 +335,17 @@ void VclPixelProcessor2D::processBasePrimitive2D(const 
primitive2d::BasePrimitiv
             processInvertPrimitive2D(rCandidate);
             break;
         }
+        case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D:
+        {
+            // check if TextEdit is active
+            if (getViewInformation2D().getTextEditActive())
+                // suppress text display
+                break;
+
+            // visualize text
+            process(rCandidate);
+            break;
+        }
         case PRIMITIVE2D_ID_EPSPRIMITIVE2D:
         {
             RenderEpsPrimitive2D(static_cast<const 
primitive2d::EpsPrimitive2D&>(rCandidate));
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx 
b/include/drawinglayer/geometry/viewinformation2d.hxx
index 8f1bd634fd58..04ad7612085f 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -159,6 +159,9 @@ public:
     bool getPixelSnapHairline() const;
     void setPixelSnapHairline(bool bNew);
 
+    bool getTextEditActive() const;
+    void setTextEditActive(bool bNew);
+
     static void setGlobalAntiAliasing(bool bAntiAliasing, bool bTemporary);
     static bool getGlobalAntiAliasing();
     static void forwardPixelSnapHairline(bool bPixelSnapHairline);
diff --git a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx 
b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
index da388d935eac..dee28235f3b6 100644
--- a/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
@@ -159,28 +159,19 @@ namespace drawinglayer::primitive2d
             separate from other text data since some renderers need to suppress
             this output due to painting the edited text in e.g. an
             OutlinerEditView in the active text edit control.
-            Deriving now from BasePrimitive2D to turn around functionality:
-            This will decompose to nothing -> suppress. In renderers that need 
to
-            visualize it (only VclMetafileProcessor2D for now), it needs
-            to be detected and used (see there).
-            Doing it this way around since we will potentially have many
-            pixel renderers and only one MetafileProcessor, so it will
-            be one action less to support (and to potentially forget about )
-            in these implementations.
+            It is derived from GroupPrimitive2D so decomposes to the contained
+            Text, thus it will get displayed everywhere except a renderer
+            checks for this Primitive and suppresses it actively. Remember that
+            this is also important e.g. for PDF export - if the object is in
+            edit mode, we need to include the most current text from 
EditEngine/
+            Outliner to that export
          */
-        class DRAWINGLAYER_DLLPUBLIC TextHierarchyEditPrimitive2D final : 
public BasePrimitive2D
+        class DRAWINGLAYER_DLLPUBLIC TextHierarchyEditPrimitive2D final : 
public GroupPrimitive2D
         {
-        private:
-            /// the content
-            Primitive2DContainer                             maContent;
-
         public:
             /// constructor
             explicit TextHierarchyEditPrimitive2D(Primitive2DContainer&& 
aContent);
 
-            /// data read access
-            const Primitive2DContainer& getContent() const { return maContent; 
}
-
             /// provide unique ID
             virtual sal_uInt32 getPrimitive2DID() const override;
         };
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 84df5650207e..e6ad25dab657 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -216,6 +216,8 @@ namespace sdr::contact
             aNewViewInformation2D.setViewport(aViewRange);
             
aNewViewInformation2D.setVisualizedPage(GetXDrawPageForSdrPage(GetSdrPage()));
             aNewViewInformation2D.setViewTime(fCurrentTime);
+            if 
(static_cast<SdrPaintView&>(mrPageWindow.GetPageView().GetView()).IsTextEdit())
+                aNewViewInformation2D.setTextEditActive(true);
             updateViewInformation2D(aNewViewInformation2D);
 
             drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence;
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx 
b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 2b9f9b767763..9c154599531f 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -530,40 +530,39 @@ namespace drawinglayer::primitive2d
             // Save chaining attributes
             bool bChainable = rTextObj.IsChainable();
 
+            // get OutlinerParaObject
+            std::optional<OutlinerParaObject> aOutlinerParaObject;
 
+            // 1st try to get from rText
             if(rText.GetOutlinerParaObject())
             {
-                // added TextEdit text suppression
-                bool bInEditMode(false);
+                aOutlinerParaObject.emplace(*rText.GetOutlinerParaObject());
+            }
 
-                if(rText.GetObject().getTextCount() > 1)
-                {
-                    bInEditMode = rTextObj.IsInEditMode() && 
rText.GetObject().getActiveText() == &rText;
-                }
-                else
-                {
-                    bInEditMode = rTextObj.IsInEditMode();
-                }
+            // added TextEdit text suppression - check if rText is in EditMode
+            bool bInEditMode(false);
 
-                OutlinerParaObject 
aOutlinerParaObject(*rText.GetOutlinerParaObject());
+            if(rText.GetObject().getTextCount() > 1)
+            {
+                bInEditMode = rTextObj.IsInEditMode() && 
rText.GetObject().getActiveText() == &rText;
+            }
+            else
+            {
+                bInEditMode = rTextObj.IsInEditMode();
+            }
 
-                if(bInEditMode)
-                {
-                    std::optional<OutlinerParaObject> pTempObj = 
rTextObj.CreateEditOutlinerParaObject();
+            if(bInEditMode)
+            {
+                // if yes, try to get OutlinerParaObject from active TextEdit
+                std::optional<OutlinerParaObject> 
aTextEditOutlinerParaObject(rTextObj.CreateEditOutlinerParaObject());
 
-                    if(pTempObj)
-                    {
-                        aOutlinerParaObject = *pTempObj;
-                    }
-                    else
-                    {
-                        // #i100537#
-                        // CreateEditOutlinerParaObject() returning no object 
does not mean that
-                        // text edit mode is not active. Do not reset the flag 
here
-                        // bInEditMode = false;
-                    }
-                }
+                if (aTextEditOutlinerParaObject)
+                    // if we got one, prefer text from active TextEdit
+                    aOutlinerParaObject = aTextEditOutlinerParaObject;
+            }
 
+            if(aOutlinerParaObject)
+            {
                 const SdrTextAniKind eAniKind(rTextObj.GetTextAniKind());
 
                 // #i107346#
@@ -572,7 +571,7 @@ namespace drawinglayer::primitive2d
 
                 return attribute::SdrTextAttribute(
                     rText,
-                    aOutlinerParaObject,
+                    *aOutlinerParaObject,
                     rSet.Get(XATTR_FORMTXTSTYLE).GetValue(),
                     pLeft ? *pLeft : rTextObj.GetTextLeftDistance(),
                     pUpper ? *pUpper : rTextObj.GetTextUpperDistance(),

Reply via email to