[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 2 commits - include/tools sc/uiconfig tools/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 23 06:41:06 UTC 2021


 include/tools/color.hxx                      |   21 +
 sc/uiconfig/scalc/ui/standardfilterdialog.ui |  477 ++++++++++++++++-----------
 tools/source/generic/color.cxx               |   39 ++
 3 files changed, 344 insertions(+), 193 deletions(-)

New commits:
commit f3a14171997ce33ba5f872799ec188b402a5b36f
Author:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Mon Sep 20 10:40:45 2021 +0200
Commit:     Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Thu Sep 23 08:40:45 2021 +0200

    Save with glade 3.38.2
    
    Change-Id: Ie9f8b54d64b66f51d145a697af78882cc769ac8c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122346
    Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>

diff --git a/sc/uiconfig/scalc/ui/standardfilterdialog.ui b/sc/uiconfig/scalc/ui/standardfilterdialog.ui
index a71da96fbb22..d47f384d471d 100644
--- a/sc/uiconfig/scalc/ui/standardfilterdialog.ui
+++ b/sc/uiconfig/scalc/ui/standardfilterdialog.ui
@@ -1,38 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
 <interface domain="sc">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkDialog" id="StandardFilterDialog">
-    <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="standardfilterdialog|StandardFilterDialog">Standard Filter</property>
     <property name="resizable">False</property>
-    <property name="default_width">0</property>
-    <property name="default_height">0</property>
-    <property name="type_hint">dialog</property>
-    <child>
-      <placeholder/>
-    </child>
+    <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-vbox1">
-        <property name="can_focus">False</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>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
-            <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">gtk-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="use_stock">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-stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -44,10 +41,10 @@
               <object class="GtkButton" id="cancel">
                 <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="can-focus">True</property>
+                <property name="can-default">True</property>
+                <property name="receives-default">True</property>
+                <property name="use-stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -59,10 +56,10 @@
               <object class="GtkButton" id="help">
                 <property name="label">gtk-help</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="can-focus">True</property>
+                <property name="can-default">True</property>
+                <property name="receives-default">True</property>
+                <property name="use-stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -75,58 +72,60 @@
           <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="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="vexpand">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="GtkAlignment" id="alignment1">
                 <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="top_padding">6</property>
-                <property name="left_padding">12</property>
+                <property name="top-padding">6</property>
+                <property name="left-padding">12</property>
                 <child>
                   <object class="GtkScrolledWindow" id="scrollbar">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
+                    <property name="can-focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
-                    <property name="hscrollbar_policy">never</property>
-                    <property name="vscrollbar_policy">always</property>
-                    <property name="shadow_type">in</property>
+                    <property name="hscrollbar-policy">never</property>
+                    <property name="vscrollbar-policy">always</property>
+                    <property name="shadow-type">in</property>
                     <child>
                       <object class="GtkViewport">
                         <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>
                         <child>
+                          <!-- n-columns=3 n-rows=3 -->
                           <object class="GtkGrid" id="grid">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can-focus">False</property>
                             <child>
+                              <!-- n-columns=4 n-rows=5 -->
                               <object class="GtkGrid" id="grid1">
                                 <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="border_width">3</property>
-                                <property name="row_spacing">6</property>
-                                <property name="column_spacing">12</property>
+                                <property name="border-width">3</property>
+                                <property name="row-spacing">6</property>
+                                <property name="column-spacing">12</property>
                                 <child>
                                   <object class="GtkComboBoxText" id="connect1">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item translatable="yes" context="standardfilterdialog|connect1">AND</item>
                                       <item translatable="yes" context="standardfilterdialog|connect1">OR</item>
@@ -141,14 +140,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">1</property>
+                                    <property name="left-attach">0</property>
+                                    <property name="top-attach">1</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="connect2">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item translatable="yes" context="standardfilterdialog|connect2">AND</item>
                                       <item translatable="yes" context="standardfilterdialog|connect2">OR</item>
@@ -163,14 +162,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">2</property>
+                                    <property name="left-attach">0</property>
+                                    <property name="top-attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="connect3">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item translatable="yes" context="standardfilterdialog|connect3">AND</item>
                                       <item translatable="yes" context="standardfilterdialog|connect3">OR</item>
@@ -182,14 +181,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">3</property>
+                                    <property name="left-attach">0</property>
+                                    <property name="top-attach">3</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="connect4">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item translatable="yes" context="standardfilterdialog|connect4">AND</item>
                                       <item translatable="yes" context="standardfilterdialog|connect4">OR</item>
@@ -201,58 +200,58 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">4</property>
+                                    <property name="left-attach">0</property>
+                                    <property name="top-attach">4</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label2">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="label" translatable="yes" context="standardfilterdialog|label2">Operator</property>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">0</property>
+                                    <property name="left-attach">0</property>
+                                    <property name="top-attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label3">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="label" translatable="yes" context="standardfilterdialog|label3">Field name</property>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">0</property>
+                                    <property name="left-attach">1</property>
+                                    <property name="top-attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label4">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="label" translatable="yes" context="standardfilterdialog|label4">Condition</property>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">0</property>
+                                    <property name="left-attach">2</property>
+                                    <property name="top-attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label5">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="label" translatable="yes" context="standardfilterdialog|label5">Value</property>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">3</property>
-                                    <property name="top_attach">0</property>
+                                    <property name="left-attach">3</property>
+                                    <property name="top-attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="field1">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <accessibility>
                                       <relation type="labelled-by" target="label3"/>
                                     </accessibility>
@@ -263,14 +262,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">1</property>
+                                    <property name="left-attach">1</property>
+                                    <property name="top-attach">1</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="field2">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <accessibility>
                                       <relation type="labelled-by" target="label3"/>
                                     </accessibility>
@@ -281,14 +280,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">2</property>
+                                    <property name="left-attach">1</property>
+                                    <property name="top-attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="field3">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <accessibility>
                                       <relation type="labelled-by" target="label3"/>
                                     </accessibility>
@@ -299,14 +298,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">3</property>
+                                    <property name="left-attach">1</property>
+                                    <property name="top-attach">3</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="field4">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <child internal-child="accessible">
                                       <object class="AtkObject" id="field4-atkobject">
                                         <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|field4-atkobject">Field Name 4</property>
@@ -314,14 +313,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">4</property>
+                                    <property name="left-attach">1</property>
+                                    <property name="top-attach">4</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="cond1">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item>=</item>
                                       <item><</item>
@@ -350,14 +349,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">1</property>
+                                    <property name="left-attach">2</property>
+                                    <property name="top-attach">1</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="cond2">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item>=</item>
                                       <item><</item>
@@ -386,14 +385,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">2</property>
+                                    <property name="left-attach">2</property>
+                                    <property name="top-attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="cond3">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item>=</item>
                                       <item><</item>
@@ -422,14 +421,14 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">3</property>
+                                    <property name="left-attach">2</property>
+                                    <property name="top-attach">3</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="cond4">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <items>
                                       <item>=</item>
                                       <item><</item>
@@ -455,20 +454,20 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="top_attach">4</property>
+                                    <property name="left-attach">2</property>
+                                    <property name="top-attach">4</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="val1">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="hexpand">True</property>
-                                    <property name="has_entry">True</property>
+                                    <property name="has-entry">True</property>
                                     <child internal-child="entry">
                                       <object class="GtkEntry" id="comboboxtext-entry2">
-                                        <property name="can_focus">True</property>
-                                        <property name="activates_default">True</property>
+                                        <property name="can-focus">True</property>
+                                        <property name="activates-default">True</property>
                                       </object>
                                     </child>
                                     <accessibility>
@@ -481,20 +480,20 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">3</property>
-                                    <property name="top_attach">1</property>
+                                    <property name="left-attach">3</property>
+                                    <property name="top-attach">1</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="val2">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="hexpand">True</property>
-                                    <property name="has_entry">True</property>
+                                    <property name="has-entry">True</property>
                                     <child internal-child="entry">
                                       <object class="GtkEntry" id="comboboxtext-entry4">
-                                        <property name="can_focus">True</property>
-                                        <property name="activates_default">True</property>
+                                        <property name="can-focus">True</property>
+                                        <property name="activates-default">True</property>
                                       </object>
                                     </child>
                                     <accessibility>
@@ -507,20 +506,20 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">3</property>
-                                    <property name="top_attach">2</property>
+                                    <property name="left-attach">3</property>
+                                    <property name="top-attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="val3">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="hexpand">True</property>
-                                    <property name="has_entry">True</property>
+                                    <property name="has-entry">True</property>
                                     <child internal-child="entry">
                                       <object class="GtkEntry" id="comboboxtext-entry6">
-                                        <property name="can_focus">True</property>
-                                        <property name="activates_default">True</property>
+                                        <property name="can-focus">True</property>
+                                        <property name="activates-default">True</property>
                                       </object>
                                     </child>
                                     <accessibility>
@@ -533,20 +532,20 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">3</property>
-                                    <property name="top_attach">3</property>
+                                    <property name="left-attach">3</property>
+                                    <property name="top-attach">3</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkComboBoxText" id="val4">
                                     <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
+                                    <property name="can-focus">False</property>
                                     <property name="hexpand">True</property>
-                                    <property name="has_entry">True</property>
+                                    <property name="has-entry">True</property>
                                     <child internal-child="entry">
                                       <object class="GtkEntry" id="comboboxtext-entry8">
-                                        <property name="can_focus">True</property>
-                                        <property name="activates_default">True</property>
+                                        <property name="can-focus">True</property>
+                                        <property name="activates-default">True</property>
                                       </object>
                                     </child>
                                     <child internal-child="accessible">
@@ -556,16 +555,40 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">3</property>
-                                    <property name="top_attach">4</property>
+                                    <property name="left-attach">3</property>
+                                    <property name="top-attach">4</property>
                                   </packing>
                                 </child>
                               </object>
                               <packing>
-                                <property name="left_attach">0</property>
-                                <property name="top_attach">0</property>
+                                <property name="left-attach">0</property>
+                                <property name="top-attach">0</property>
                               </packing>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </object>
                         </child>
                       </object>
@@ -577,7 +600,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="label" translatable="yes" context="standardfilterdialog|label1">Filter Criteria</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -594,143 +617,155 @@
         <child>
           <object class="GtkExpander" id="more">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
+            <property name="can-focus">True</property>
             <property name="hexpand">True</property>
             <property name="spacing">6</property>
-            <property name="resize_toplevel">True</property>
+            <property name="resize-toplevel">True</property>
             <child>
+              <!-- n-columns=3 n-rows=3 -->
               <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="margin_top">6</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="row_spacing">6</property>
+                <property name="row-spacing">6</property>
                 <child>
+                  <!-- n-columns=3 n-rows=3 -->
                   <object class="GtkGrid" id="grid3">
                     <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="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
+                    <property name="row-spacing">6</property>
+                    <property name="column-spacing">12</property>
                     <child>
                       <object class="GtkCheckButton" id="case">
                         <property name="label" translatable="yes" context="standardfilterdialog|case">_Case sensitive</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="hexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkCheckButton" id="header">
                         <property name="label" translatable="yes" context="standardfilterdialog|header">Range c_ontains column labels</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="hexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkCheckButton" id="regexp">
                         <property name="label" translatable="yes" context="standardfilterdialog|regexp">Regular _expressions</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="hexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkCheckButton" id="unique">
                         <property name="label" translatable="yes" context="standardfilterdialog|unique">_No duplications</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="hexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkCheckButton" id="copyresult">
                         <property name="label" translatable="yes" context="standardfilterdialog|copyresult">Co_py results to:</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="hexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                         <accessibility>
                           <relation type="label-for" target="lbcopyarea"/>
                           <relation type="label-for" target="edcopyarea"/>
                         </accessibility>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">2</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkCheckButton" id="destpers">
                         <property name="label" translatable="yes" context="standardfilterdialog|destpers">_Keep filter criteria</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="hexpand">True</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">2</property>
                       </packing>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">0</property>
                   </packing>
                 </child>
                 <child>
+                  <!-- n-columns=3 n-rows=3 -->
                   <object class="GtkGrid" id="grid4">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="margin_left">12</property>
+                    <property name="can-focus">False</property>
+                    <property name="margin-left">12</property>
                     <property name="hexpand">True</property>
-                    <property name="column_spacing">12</property>
+                    <property name="column-spacing">12</property>
                     <child>
                       <object class="GtkComboBoxText" id="lbcopyarea">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <accessibility>
                           <relation type="labelled-by" target="copyresult"/>
                         </accessibility>
@@ -741,17 +776,17 @@
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkEntry" id="edcopyarea">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="margin_bottom">1</property>
+                        <property name="can-focus">True</property>
+                        <property name="margin-bottom">1</property>
                         <property name="hexpand">True</property>
-                        <property name="width_chars">30</property>
+                        <property name="width-chars">30</property>
                         <accessibility>
                           <relation type="labelled-by" target="copyresult"/>
                         </accessibility>
@@ -762,74 +797,132 @@
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkButton" id="rbcopyarea">
                         <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>
                         <child>
                           <placeholder/>
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">2</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">1</property>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">1</property>
                   </packing>
                 </child>
                 <child>
+                  <!-- n-columns=3 n-rows=3 -->
                   <object class="GtkGrid" id="grid5">
                     <property name="sensitive">False</property>
-                    <property name="can_focus">False</property>
-                    <property name="column_spacing">12</property>
+                    <property name="can-focus">False</property>
+                    <property name="column-spacing">12</property>
                     <child>
                       <object class="GtkLabel" id="dbarealabel">
                         <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <property name="label" translatable="yes" context="standardfilterdialog|dbarealabel">Data range:</property>
                         <property name="xalign">0</property>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkLabel" id="dbarea">
                         <property name="sensitive">False</property>
-                        <property name="can_focus">False</property>
+                        <property name="can-focus">False</property>
                         <property name="hexpand">True</property>
                         <property name="label" translatable="yes" context="standardfilterdialog|dbarea">dummy</property>
                         <property name="xalign">0</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">0</property>
                       </packing>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">2</property>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">2</property>
                   </packing>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
             </child>
             <child type="label">
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can-focus">False</property>
                 <property name="label" translatable="yes" context="standardfilterdialog|label6">Op_tions</property>
-                <property name="use_underline">True</property>
+                <property name="use-underline">True</property>
               </object>
             </child>
           </object>
commit 2a533afc5e68130b67b890380b345fae307ba542
Author:     dante <dante19031999 at gmail.com>
AuthorDate: Fri Nov 20 12:33:57 2020 +0100
Commit:     Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Thu Sep 23 08:40:32 2021 +0200

    Changes to the color class
    
    Before colors could be only converted to string rrggbb. Now also supports RRGGBB. It can also be converted back into a color.
    
    Change-Id: Ifb89d554b434c243c4f0956ee680ec23de823339
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106224
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit fcc9128aabb56d521e71e3e537d895e640c86004)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122345
    Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>

diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index fa62f28f362b..10dd3d3aea6e 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -162,6 +162,19 @@ public:
     static Color HSBtoRGB(sal_uInt16 nHue, sal_uInt16 nSaturation, sal_uInt16 nBrightness);
     void RGBtoHSB(sal_uInt16& nHue, sal_uInt16& nSaturation, sal_uInt16& nBrightness) const;
 
+    /** Converts a string into a color. Supports:
+      * #RRGGBB
+      * #rrggbb
+      * #RGB
+      * #rgb
+      * RRGGBB
+      * rrggbb
+      * RGB
+      * rgb
+      * If fails returns Color().
+      */
+    static Color STRtoRGB(const OUString& colorname);
+
     bool operator==(const Color& rColor) const
     {
         return mValue == rColor.mValue;
@@ -171,10 +184,16 @@ public:
         return !(Color::operator==(rColor));
     }
 
-    // Return color as RGB hex string
+    // Return color as RGB hex string: rrggbb
     // for example "00ff00" for green color
     OUString AsRGBHexString() const;
 
+    /* Return color as RGB hex string: RRGGBB
+     * for example "00FF00" for green color
+     * @return hex string
+     */
+    OUString AsRGBHEXString() const;
+
     // get ::basegfx::BColor from this color
     basegfx::BColor getBColor() const
     {
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 061435ed61c9..9511e16865e8 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -167,6 +167,38 @@ Color Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
     return Color( cR, cG, cB );
 }
 
+Color Color::STRtoRGB(const OUString& colorname)
+{
+    Color col;
+    if(colorname.isEmpty()) return col;
+
+    switch(colorname.getLength()){
+        case 7:
+            col.mValue = colorname.copy(1,6).toUInt32(16);
+            break;
+        case 6:
+            col.mValue = colorname.toUInt32(16);
+            break;
+        case 4:
+        {
+            sal_Unicode data[6] = { colorname[1], colorname[1], colorname[2],
+                                     colorname[2], colorname[3], colorname[3] };
+            col.mValue = OUString(data,6).toUInt32(16);
+            break;
+        }
+        case 3:
+        {
+            sal_Unicode data[6] = { colorname[0], colorname[0], colorname[1],
+                                     colorname[1], colorname[2], colorname[2] };
+            col.mValue = OUString(data,6).toUInt32(16);
+            break;
+        }
+        default:
+            break;
+    }
+    return col;
+}
+
 OUString Color::AsRGBHexString() const
 {
     std::stringstream ss;
@@ -174,6 +206,13 @@ OUString Color::AsRGBHexString() const
     return OUString::createFromAscii(ss.str().c_str());
 }
 
+OUString Color::AsRGBHEXString() const
+{
+    std::stringstream ss;
+    ss << std::hex << std::uppercase << std::setfill ('0') << std::setw(6) << sal_uInt32(GetRGBColor());
+    return OUString::createFromAscii(ss.str().c_str());
+}
+
 void Color::ApplyTintOrShade(sal_Int16 n100thPercent)
 {
     if (n100thPercent == 0)


More information about the Libreoffice-commits mailing list