[Libreoffice-commits] .: Branch 'feature/cmclayout' - vcl/qa vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Mar 27 06:32:31 PDT 2012


 vcl/qa/cppunit/builder/demo.ui |   29 +++++++++++++++++++++++++++++
 vcl/source/window/builder.cxx  |   11 +++++++++++
 2 files changed, 40 insertions(+)

New commits:
commit f9cff8a149bada7f0a92f717991a573313e89699
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 27 14:32:24 2012 +0100

    checkboxes, edit controls

diff --git a/vcl/qa/cppunit/builder/demo.ui b/vcl/qa/cppunit/builder/demo.ui
index 92904e7..e77dde1 100644
--- a/vcl/qa/cppunit/builder/demo.ui
+++ b/vcl/qa/cppunit/builder/demo.ui
@@ -45,6 +45,22 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkCheckButton" id="checkbutton1">
+                <property name="label" translatable="yes">checkbutton</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -135,6 +151,19 @@
                 <property name="position">2</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkEntry" id="entry1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">●</property>
+                <property name="text" translatable="yes">an edit control</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 5bb7b28..882ac2f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -29,6 +29,7 @@
 #include <vcl/builder.hxx>
 #include <vcl/button.hxx>
 #include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/layout.hxx>
 
@@ -88,10 +89,18 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, bool b
     {
         pWindow = new RadioButton(pParent, WB_CENTER|WB_VCENTER);
     }
+    else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkCheckButton")))
+    {
+        pWindow = new CheckBox(pParent, WB_CENTER|WB_VCENTER);
+    }
     else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkLabel")))
     {
         pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER);
     }
+    else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkEntry")))
+    {
+        pWindow = new Edit(pParent, WB_CENTER|WB_VCENTER);
+    }
     else
     {
         fprintf(stderr, "TO-DO, implement %s\n", name.getStr());
@@ -153,6 +162,8 @@ Window *VclBuilder::insertObject(Window *pParent, const rtl::OString &rClass, st
 
                 pCurrentChild->SetStyle(nBits);
             }
+            else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("text")))
+                pCurrentChild->SetText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
             else if
                 (
                     rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("expand")) ||


More information about the Libreoffice-commits mailing list