[Libreoffice-commits] .: Branch 'feature/cmclayout' - 7 commits - boost/boost_1_44_0-gcc4.7.patch boost/makefile.mk cui/source sw/Package_uiconfig.mk sw/uiconfig vcl/inc vcl/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jun 1 05:54:45 PDT 2012


 boost/boost_1_44_0-gcc4.7.patch |   49 +++++++
 boost/makefile.mk               |    3 
 cui/source/tabpages/chardlg.cxx |   10 -
 sw/Package_uiconfig.mk          |    1 
 sw/uiconfig/swriter/ui/20705.ui |  253 ++++++++++++++++++++++++++++++++++++++++
 vcl/inc/vcl/button.hxx          |    4 
 vcl/inc/vcl/fixed.hxx           |    2 
 vcl/inc/vcl/lstbox.hxx          |    1 
 vcl/inc/vcl/window.hxx          |   20 +++
 vcl/inc/window.h                |    2 
 vcl/source/control/button.cxx   |   96 +++++++++++----
 vcl/source/control/ctrl.cxx     |   25 ++-
 vcl/source/control/edit.cxx     |   45 ++++---
 vcl/source/control/field.cxx    |   32 ++---
 vcl/source/control/fixed.cxx    |   16 ++
 vcl/source/control/lstbox.cxx   |   20 +++
 vcl/source/control/spinfld.cxx  |   40 +++---
 vcl/source/window/builder.cxx   |    4 
 vcl/source/window/dialog.cxx    |   73 ++++++++---
 vcl/source/window/layout.cxx    |   15 --
 vcl/source/window/window.cxx    |   39 +++++-
 vcl/unx/gtk/window/gtkframe.cxx |   16 --
 22 files changed, 626 insertions(+), 140 deletions(-)

New commits:
commit dfeea79320467aec8e007635f3e5ee75abf31c90
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 1 13:43:01 2012 +0100

    add zero-code change demo insert break dialog
    
    ToDo:
    a) connect up GtkComboBox model, ListStore etc to fill in the currently missing
    default entries.
    b) implement pack at start for button boxes

diff --git a/sw/Package_uiconfig.mk b/sw/Package_uiconfig.mk
index c4cf186..926f2cd 100644
--- a/sw/Package_uiconfig.mk
+++ b/sw/Package_uiconfig.mk
@@ -29,6 +29,7 @@
 $(eval $(call gb_Package_Package,sw_uiconfig,$(SRCDIR)/sw/uiconfig))
 
 $(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/ui/titlepage.ui,swriter/ui/titlepage.ui))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/ui/20705.ui,swriter/ui/20705.ui))
 
 $(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/menubar/menubar.xml,sglobal/menubar/menubar.xml))
 $(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/statusbar/statusbar.xml,sglobal/statusbar/statusbar.xml))
diff --git a/sw/uiconfig/swriter/ui/20705.ui b/sw/uiconfig/swriter/ui/20705.ui
new file mode 100644
index 0000000..a5b2e2e
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/20705.ui
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="20705">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Insert Break</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="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="100">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="101">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="102">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">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>
+            <property name="fill">True</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="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="left_padding">12</property>
+                <child>
+                  <object class="GtkBox" id="box1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkRadioButton" id="2">
+                        <property name="label" translatable="yes">Line break</property>
+                        <property name="use_action_appearance">False</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="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="3">
+                        <property name="label" translatable="yes">Column break</property>
+                        <property name="use_action_appearance">False</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="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">2</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="1">
+                        <property name="label" translatable="yes">Page break</property>
+                        <property name="use_action_appearance">False</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="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">2</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Style</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">liststore1</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="7">
+                        <property name="label" translatable="yes">Change page number</property>
+                        <property name="use_action_appearance">False</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">5</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="box2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkSpinButton" id="8">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="invisible_char_set">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">6</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="6">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Type</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">100</action-widget>
+      <action-widget response="0">101</action-widget>
+      <action-widget response="0">102</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name gchararray1 -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">[None]</col>
+      </row>
+    </data>
+  </object>
+</interface>
commit 005bc6d2f188fad493bd15dab991b099cb9cca5a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 1 13:40:01 2012 +0100

    extend property snaffling to listboxes etc.

diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 5522b29..017f1b2 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -199,6 +199,7 @@ public:
 
     void            SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
     const Link&     GetToggleHdl() const { return maToggleHdl; }
+    virtual void take_properties(Window &rOther);
 };
 
 inline void PushButton::Check( sal_Bool bCheck )
@@ -231,6 +232,7 @@ public:
                     OKButton( Window* pParent, const ResId& rResId );
 
     virtual void    Click();
+    virtual void take_properties(Window &rOther);
 };
 
 // ----------------
@@ -253,6 +255,7 @@ public:
                     CancelButton( Window* pParent, const ResId& rResId );
 
     virtual void    Click();
+    virtual void take_properties(Window &rOther);
 };
 
 // --------------
@@ -275,6 +278,7 @@ public:
                     HelpButton( Window* pParent, const ResId& rResId );
 
     virtual void    Click();
+    virtual void take_properties(Window &rOther);
 };
 
 // ---------------
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index a894905..44a9753 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -74,6 +74,7 @@ public:
     static Size     CalcMinimumTextSize( Control const* pControl, long nMaxWidth = 0 );
     Size            CalcMinimumSize( long nMaxWidth = 0 ) const;
     virtual Size    GetOptimalSize(WindowSizeType eType) const;
+    virtual void take_properties(Window &rOther);
 };
 
 // -------------
@@ -108,6 +109,7 @@ public:
     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
 
     virtual Size    GetOptimalSize(WindowSizeType eType) const;
+    virtual void take_properties(Window &rOther);
 };
 
 // ---------------
diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx
index 526cbf4..ba5ef31 100644
--- a/vcl/inc/vcl/lstbox.hxx
+++ b/vcl/inc/vcl/lstbox.hxx
@@ -227,6 +227,7 @@ public:
      */
     using Control::GetIndexForPoint;
     long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+    virtual void take_properties(Window &rOther);
 };
 
 // ----------------
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 97a9da6..4e81d71 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1220,6 +1220,17 @@ PushButton::PushButton( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void PushButton::take_properties(Window &rOther)
+{
+    if (!GetParent())
+    {
+        ImplInitPushButtonData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    }
+
+    Button::take_properties(rOther);
+}
+
 // -----------------------------------------------------------------------
 
 PushButton::~PushButton()
@@ -1763,6 +1774,13 @@ OKButton::OKButton( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void OKButton::take_properties(Window &rOther)
+{
+    if (!GetParent())
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    PushButton::take_properties(rOther);
+}
+
 // -----------------------------------------------------------------------
 
 void OKButton::Click()
@@ -1833,6 +1851,13 @@ CancelButton::CancelButton( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void CancelButton::take_properties(Window &rOther)
+{
+    if (!GetParent())
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    PushButton::take_properties(rOther);
+}
+
 // -----------------------------------------------------------------------
 
 void CancelButton::Click()
@@ -1903,6 +1928,13 @@ HelpButton::HelpButton( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void HelpButton::take_properties(Window &rOther)
+{
+    if (!GetParent())
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    PushButton::take_properties(rOther);
+}
+
 // -----------------------------------------------------------------------
 
 void HelpButton::Click()
@@ -2456,6 +2488,29 @@ RadioButton::RadioButton( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void RadioButton::take_properties(Window &rOther)
+{
+    if (!GetParent())
+    {
+        ImplInitRadioButtonData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    }
+
+    Button::take_properties(rOther);
+
+    RadioButton &rOtherRadio = static_cast<RadioButton&>(rOther);
+    if (rOtherRadio.m_xGroup.get())
+    {
+        rOtherRadio.m_xGroup->erase(&rOtherRadio);
+        rOtherRadio.m_xGroup->insert(this);
+    }
+    std::swap(m_xGroup, rOtherRadio.m_xGroup);
+    mbChecked = rOtherRadio.mbChecked;
+    mbSaveValue = rOtherRadio.mbSaveValue;
+    mbRadioCheck = rOtherRadio.mbRadioCheck;
+    mbStateChanged = rOtherRadio.mbStateChanged;
+}
+
 // -----------------------------------------------------------------------
 
 void RadioButton::ImplLoadRes( const ResId& rResId )
@@ -2831,22 +2886,6 @@ void RadioButton::SetState( sal_Bool bCheck )
     }
 }
 
-void RadioButton::take_properties(Window &rOther)
-{
-    RadioButton &rOtherRadio = static_cast<RadioButton&>(rOther);
-    if (rOtherRadio.m_xGroup.get())
-    {
-        rOtherRadio.m_xGroup->erase(&rOtherRadio);
-        rOtherRadio.m_xGroup->insert(this);
-    }
-    std::swap(m_xGroup, rOtherRadio.m_xGroup);
-    mbChecked = rOtherRadio.mbChecked;
-    mbSaveValue = rOtherRadio.mbSaveValue;
-    mbRadioCheck = rOtherRadio.mbRadioCheck;
-    mbStateChanged = rOtherRadio.mbStateChanged;
-    Button::take_properties(rOther);
-}
-
 bool RadioButton::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
 {
     if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("active")))
@@ -3419,6 +3458,22 @@ CheckBox::CheckBox( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void CheckBox::take_properties(Window &rOther)
+{
+    if (!GetParent())
+    {
+        ImplInitCheckBoxData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    }
+
+    Button::take_properties(rOther);
+
+    CheckBox &rOtherCheck = static_cast<CheckBox&>(rOther);
+    meState = rOtherCheck.meState;
+    meSaveValue = rOtherCheck.meSaveValue;
+    mbTriState = rOtherCheck.mbTriState;
+}
+
 // -----------------------------------------------------------------------
 
 void CheckBox::MouseButtonDown( const MouseEvent& rMEvt )
@@ -3803,15 +3858,6 @@ void CheckBox::SetState( TriState eState )
     }
 }
 
-void CheckBox::take_properties(Window &rOther)
-{
-    CheckBox &rOtherCheck = static_cast<CheckBox&>(rOther);
-    meState = rOtherCheck.meState;
-    meSaveValue = rOtherCheck.meSaveValue;
-    mbTriState = rOtherCheck.mbTriState;
-    Button::take_properties(rOther);
-}
-
 bool CheckBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
 {
     if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("active")))
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 29438ee..f731648 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -65,15 +65,7 @@ Control::Control( Window* pParent, WinBits nStyle ) :
     Window( WINDOW_CONTROL )
 {
     ImplInitControlData();
-    Window::ImplInit( pParent, nStyle, NULL );
-}
-
-void Control::take_properties(Window &rOther)
-{
-    Control &rOtherControl = static_cast<Control&>(rOther);
-    std::swap(mpControlData, rOtherControl.mpControlData);
-    mbHasFocus = rOtherControl.mbHasFocus;
-    Window::take_properties(rOther);
+    ImplInit( pParent, nStyle, NULL );
 }
 
 Control::Control( Window* pParent, const ResId& rResId ) :
@@ -89,6 +81,21 @@ Control::Control( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void Control::take_properties(Window &rOther)
+{
+    if (!GetParent())
+    {
+        ImplInitControlData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle(), NULL);
+    }
+
+    Window::take_properties(rOther);
+
+    Control &rOtherControl = static_cast<Control&>(rOther);
+    std::swap(mpControlData, rOtherControl.mpControlData);
+    mbHasFocus = rOtherControl.mbHasFocus;
+}
+
 // -----------------------------------------------------------------------
 
 Control::~Control()
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index cc648ae..5eda75f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -202,8 +202,34 @@ Edit::Edit( Window* pParent, WinBits nStyle ) :
     ImplInit( pParent, nStyle );
 }
 
+Edit::Edit( Window* pParent, const ResId& rResId ) :
+    Control( WINDOW_EDIT )
+{
+    if (Dialog::replace_buildable(pParent, rResId.GetId(), *this))
+        return;
+
+    ImplInitEditData();
+    rResId.SetRT( RSC_EDIT );
+    WinBits nStyle = ImplInitRes( rResId );
+    ImplInit( pParent, nStyle );
+    ImplLoadRes( rResId );
+
+    // Derived MultiLineEdit takes care to call Show only after MultiLineEdit
+    // ctor has already started:
+    if ( !(nStyle & WB_HIDE) && rResId.GetRT() != RSC_MULTILINEEDIT )
+        Show();
+}
+
 void Edit::take_properties(Window &rOther)
 {
+    if (!GetParent())
+    {
+        ImplInitEditData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    }
+
+    Control::take_properties(rOther);
+
     Edit &rOtherEdit = static_cast<Edit&>(rOther);
     maText = rOtherEdit.maText;
     maSaveValue = rOtherEdit.maSaveValue;
@@ -223,25 +249,6 @@ void Edit::take_properties(Window &rOther)
     mbIsSubEdit = rOtherEdit.mbIsSubEdit;
     mbInMBDown = rOtherEdit.mbInMBDown;
     mbActivePopup = rOtherEdit.mbActivePopup;
-    Control::take_properties(rOther);
-}
-
-Edit::Edit( Window* pParent, const ResId& rResId ) :
-    Control( WINDOW_EDIT )
-{
-    if (Dialog::replace_buildable(pParent, rResId.GetId(), *this))
-        return;
-
-    ImplInitEditData();
-    rResId.SetRT( RSC_EDIT );
-    WinBits nStyle = ImplInitRes( rResId );
-    ImplInit( pParent, nStyle );
-    ImplLoadRes( rResId );
-
-    // Derived MultiLineEdit takes care to call Show only after MultiLineEdit
-    // ctor has already started:
-    if ( !(nStyle & WB_HIDE) && rResId.GetRT() != RSC_MULTILINEEDIT )
-        Show();
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 3110a96..c908b7b 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1663,10 +1663,7 @@ MetricField::MetricField( Window* pParent, const ResId& rResId ) :
     SpinField( WINDOW_METRICFIELD )
 {
     if (Dialog::replace_buildable(pParent, rResId.GetId(), *this))
-    {
-        SetField( this );
         return;
-    }
 
     rResId.SetRT( RSC_METRICFIELD );
     WinBits nStyle = ImplInitRes( rResId ) ;
@@ -1678,28 +1675,33 @@ MetricField::MetricField( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
-bool MetricField::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+void MetricField::take_properties(Window &rOther)
 {
-    if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("format")))
+    if (!GetParent())
     {
-        maCustomUnitText = rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8);
-        meUnit = FUNIT_CUSTOM;
+        SpinField::ImplInit(rOther.GetParent(), rOther.GetStyle());
+        SetField( this );
     }
-    else
-        return SpinField::set_property(rKey, rValue);
-    return true;
-}
 
-void MetricField::take_properties(Window &rOther)
-{
-    MetricField &rOtherField = static_cast<MetricField&>(rOther);
+    SpinField::take_properties(rOther);
 
+    MetricField &rOtherField = static_cast<MetricField&>(rOther);
     maCustomUnitText = rOtherField.maCustomUnitText;
     maCurUnitText = rOtherField.maCurUnitText;
     mnBaseValue = rOtherField.mnBaseValue;
     meUnit = rOtherField.meUnit;
+}
 
-    SpinField::take_properties(rOther);
+bool MetricField::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+    if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("format")))
+    {
+        maCustomUnitText = rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8);
+        meUnit = FUNIT_CUSTOM;
+    }
+    else
+        return SpinField::set_property(rKey, rValue);
+    return true;
 }
 
 void MetricField::ImplLoadRes( const ResId& rResId )
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 03ee12e..474ee71 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -177,6 +177,14 @@ FixedText::FixedText( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void FixedText::take_properties(Window &rOther)
+{
+    if (!GetParent())
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+
+    Control::take_properties(rOther);
+}
+
 // -----------------------------------------------------------------------
 
 FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessibleLabelForRelation ) :
@@ -596,6 +604,14 @@ FixedLine::FixedLine( Window* pParent, const ResId& rResId ) :
         Show();
 }
 
+void FixedLine::take_properties(Window &rOther)
+{
+    if (!GetParent())
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+
+    Control::take_properties(rOther);
+}
+
 // -----------------------------------------------------------------------
 
 void  FixedLine::FillLayoutData() const
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 2adf61c..edaac63 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -75,12 +75,32 @@ ListBox::ListBox( Window* pParent, const ResId& rResId ) :
     rResId.SetRT( RSC_LISTBOX );
     WinBits nStyle = ImplInitRes( rResId );
     ImplInit( pParent, nStyle );
+
     ImplLoadRes( rResId );
 
     if ( !(nStyle & WB_HIDE ) )
         Show();
 }
 
+void ListBox::take_properties(Window &rOther)
+{
+    if (!GetParent())
+    {
+        ImplInitListBoxData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    }
+
+    Control::take_properties(rOther);
+
+    fprintf(stderr, "ListBox::take_properties\n");
+    ListBox &rOtherListBox = static_cast<ListBox&>(rOther);
+    mnDDHeight = rOtherListBox.mnDDHeight;
+    mnSaveValue = rOtherListBox.mnSaveValue;
+    mbDDAutoSize = rOtherListBox.mbDDAutoSize;
+    mnLineCount = rOtherListBox.mnLineCount;
+    fprintf(stderr, "ListBox::take_properties %p %d\n", this, IsVisible());
+}
+
 // -----------------------------------------------------------------------
 
 ListBox::~ListBox()
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 4ec6cb9..364cb4d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -361,14 +361,34 @@ SpinField::SpinField( Window* pParent, WinBits nWinStyle ) :
     ImplInit( pParent, nWinStyle );
 }
 
+SpinField::SpinField( Window* pParent, const ResId& rResId ) :
+    Edit( WINDOW_SPINFIELD )
+{
+    ImplInitSpinFieldData();
+    rResId.SetRT( RSC_SPINFIELD );
+    WinBits nStyle = ImplInitRes( rResId );
+    ImplInit( pParent, nStyle );
+    ImplLoadRes( rResId );
+
+    if ( !(nStyle & WB_HIDE) )
+        Show();
+}
+
 void SpinField::take_properties(Window &rOther)
 {
     fprintf(stderr, "SpinField::take_properties\n");
+    if (!GetParent())
+    {
+        ImplInitSpinFieldData();
+        ImplInit(rOther.GetParent(), rOther.GetStyle());
+    }
+
+    Edit::take_properties(rOther);
+
     SpinField &rOtherField = static_cast<SpinField&>(rOther);
-    assert(!mpEdit && rOther.mpEdit);
-    mpEdit = new Edit(this, WB_NOBORDER);
-    SetSubEdit(mpEdit);
+    assert(mpEdit && rOther.mpEdit);
     mpEdit->take_properties(*rOtherField.mpEdit);
+
     maUpperRect = rOtherField.maUpperRect;
     maLowerRect = rOtherField.maLowerRect;
     maDropDownRect = rOtherField.maDropDownRect;
@@ -380,24 +400,10 @@ void SpinField::take_properties(Window &rOther)
     mbUpperIn = rOtherField.mbUpperIn;
     mbLowerIn = rOtherField.mbLowerIn;
     mbInDropDown = rOtherField.mbInDropDown;
-
-    Edit::take_properties(rOther);
-
     fprintf(stderr, "SpinField::take_properties %p %d\n", this, IsVisible());
 }
 
-SpinField::SpinField( Window* pParent, const ResId& rResId ) :
-    Edit( WINDOW_SPINFIELD )
-{
-    ImplInitSpinFieldData();
-    rResId.SetRT( RSC_SPINFIELD );
-    WinBits nStyle = ImplInitRes( rResId );
-    ImplInit( pParent, nStyle );
-    ImplLoadRes( rResId );
 
-    if ( !(nStyle & WB_HIDE) )
-        Show();
-}
 
 // --------------------------------------------------------------------
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 98e0087..66e1829 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -182,7 +182,7 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
     else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkSpinButton")))
         pWindow = new MetricField(pParent, WB_RIGHT|WB_SPIN|WB_BORDER|WB_3DLOOK);
     else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkComboBox")))
-        pWindow = new ListBox(pParent, WB_DROPDOWN|WB_CENTER|WB_VCENTER|WB_3DLOOK);
+        pWindow = new ListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
     else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkLabel")))
         pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
     else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkEntry")))
@@ -548,8 +548,6 @@ void VclBuilder::swapGuts(Window &rOrig, Window &rReplacement)
 
     sal_uInt16 nPosition = getPositionWithinParent(rOrig);
 
-    rReplacement.ImplInit(rOrig.mpWindowImpl->mpRealParent, rOrig.GetStyle(), NULL);
-
     if (rReplacement.mpWindowImpl->mpBorderWindow)
         fprintf(stderr, "problem two\n");
 
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 9275edc..4c5c015 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1204,6 +1204,8 @@ bool Dialog::replace_buildable(Window *pParent, sal_Int32 nID, Window &rReplacem
         rReplacement.ImplInit(pActionArea, 0, NULL);
         rReplacement.Hide();
     }
+    else
+        fprintf(stderr, "%d found\n", nID);
     assert(rReplacement.mpWindowImpl);
     return true;
 }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 5f0d4a0..622fcac 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -9702,6 +9702,8 @@ Size Window::get_preferred_size() const
 void Window::take_properties(Window &rOther)
 {
     WindowImpl *pWindowImpl = rOther.mpWindowImpl;
+    if (!mpWindowImpl->mpRealParent)
+        ImplInit(pWindowImpl->mpRealParent, rOther.GetStyle(), NULL);
     std::swap(mpWindowImpl->mpUserData, pWindowImpl->mpUserData);
     std::swap(mpWindowImpl->mpExtImpl, pWindowImpl->mpExtImpl);
     std::swap(mpWindowImpl->mpCursor, pWindowImpl->mpCursor);
commit e7eebc1f91df78d2288789d574681284ecb38e22
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 1 10:26:18 2012 +0100

    drop extra padding

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index a482770..98ed195 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -251,20 +251,15 @@ Size VclButtonBox::calculateRequisition() const
     if (!nVisibleChildren)
         return Size();
 
-    rtl::OString sChildInternalPadX(RTL_CONSTASCII_STRINGPARAM("child-internal-pad-x"));
-    sal_Int32 nChildInternalPadX = getWidgetStyleProperty<sal_Int32>(sChildInternalPadX, DEFAULT_CHILD_INTERNAL_PAD_X);
-    rtl::OString sChildInternalPadY(RTL_CONSTASCII_STRINGPARAM("child-internal-pad-y"));
-    sal_Int32 nChildInternalPadY = getWidgetStyleProperty<sal_Int32>(sChildInternalPadY, DEFAULT_CHILD_INTERNAL_PAD_Y);
-    Size aChildPad(nChildInternalPadX, nChildInternalPadY);
-
     long nPrimaryDimension =
         (getPrimaryDimension(aSize) * nVisibleChildren) +
-        (m_nSpacing * (nVisibleChildren-1)) +
-        ((getPrimaryDimension(aChildPad)*2) * nVisibleChildren);
+        (m_nSpacing * (nVisibleChildren-1));
     setPrimaryDimension(aSize, nPrimaryDimension + m_nSpacing);
 
     long nSecondaryDimension = getSecondaryDimension(aSize);
-    setSecondaryDimension(aSize, nSecondaryDimension + getSecondaryDimension(aChildPad)*2);
+    setSecondaryDimension(aSize, nSecondaryDimension);
+
+    fprintf(stderr, "button box asked for %ld %ld\n", aSize.Width(), aSize.Height());
 
     return aSize;
 }
@@ -272,6 +267,8 @@ Size VclButtonBox::calculateRequisition() const
 
 void VclButtonBox::setAllocation(const Size &rAllocation)
 {
+    fprintf(stderr, "button box got %ld %ld\n", rAllocation.Width(), rAllocation.Height());
+
     sal_uInt16 nVisibleChildren = 0;
     for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT))
     {
commit a49be49dc99c1059d3633a99a49e0e0c299ccc95
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 1 10:21:38 2012 +0100

    move setting dialog properties on box child to initial show

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 79cb5df..9275edc 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -584,10 +584,24 @@ void Dialog::StateChanged( StateChangedType nType )
             maLayoutTimer.Stop();
 
             //resize dialog to fit requisition on initial show
-            const Window *pContainer = GetWindow(WINDOW_FIRSTCHILD);
-            Size aSize = pContainer->get_preferred_size();
-            aSize.Height() += 2*m_nBorderWidth;
-            aSize.Width() += 2*m_nBorderWidth;
+            VclBox *pBox = dynamic_cast<VclBox*>(GetWindow(WINDOW_FIRSTCHILD));
+
+            const DialogStyle& rDialogStyle =
+                GetSettings().GetStyleSettings().GetDialogStyle();
+            pBox->set_border_width(rDialogStyle.content_area_border);
+            pBox->set_spacing(rDialogStyle.content_area_spacing);
+
+            VclButtonBox *pActionArea = getActionArea(this);
+            if (pActionArea)
+            {
+                pActionArea->set_border_width(rDialogStyle.action_area_border);
+                pActionArea->set_spacing(rDialogStyle.button_spacing);
+            }
+
+            Size aSize = get_preferred_size();
+
+            fprintf(stderr, "100 dialog sized to %d %d\n", aSize.Width(),
+                aSize.Height());
 
             Size aMax = GetOptimalSize(WINDOWSIZE_MAXIMUM);
             aSize.Width() = std::min(aMax.Width(), aSize.Width());
@@ -595,6 +609,12 @@ void Dialog::StateChanged( StateChangedType nType )
 
             SetMinOutputSizePixel(aSize);
             SetSizePixel(aSize);
+
+            aSize = GetSizePixel();
+
+            fprintf(stderr, "101 dialog sized to %d %d\n", aSize.Width(),
+                aSize.Height());
+
         }
 
         if ( GetSettings().GetStyleSettings().GetAutoMnemonic() )
@@ -1094,9 +1114,24 @@ Size Dialog::GetOptimalSize(WindowSizeType eType) const
         return SystemWindow::GetOptimalSize(eType);
 
     Size aSize = GetWindow(WINDOW_FIRSTCHILD)->GetOptimalSize(eType);
-    aSize.Height() += 2*m_nBorderWidth;
-    aSize.Width() += 2*m_nBorderWidth;
-    return Window::CalcWindowSize(aSize);
+
+    fprintf(stderr, "dialog contents wanted to be %d %d\n", aSize.Width(),
+        aSize.Height());
+
+    aSize.Height() += mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder
+        + 2*m_nBorderWidth;
+    aSize.Width() += mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder
+        + 2*m_nBorderWidth;
+
+    fprintf(stderr, "stage 2 dialog wanted to be %d %d\n", aSize.Width(),
+        aSize.Height());
+
+    aSize = Window::CalcWindowSize(aSize);
+
+    fprintf(stderr, "stage 3 dialog wanted to be %d %d\n", aSize.Width(),
+        aSize.Height());
+
+    return aSize;
 }
 
 IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG )
@@ -1108,24 +1143,22 @@ IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG )
         return 0;
     }
     Size aSize = GetSizePixel();
+
+    fprintf(stderr, "stage 4 dialog claimed to be %d %d\n", aSize.Width(),
+        aSize.Height());
+
     aSize.Width() -= mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder
         + 2 * m_nBorderWidth;
     aSize.Height() -= mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder
         + 2 * m_nBorderWidth;
-    Point aPos(mpWindowImpl->mnLeftBorder + m_nBorderWidth,
-        mpWindowImpl->mnTopBorder + m_nBorderWidth);
 
-    const DialogStyle& rDialogStyle =
-        GetSettings().GetStyleSettings().GetDialogStyle();
-    pBox->set_border_width(rDialogStyle.content_area_border);
-    pBox->set_spacing(rDialogStyle.content_area_spacing);
+    fprintf(stderr, "stage 5 space for contents ends up as %d %d\n", aSize.Width(),
+        aSize.Height());
+    fprintf(stderr, "dialog got given %d %d\n", aSize.Width(),
+        aSize.Height());
 
-    VclButtonBox *pActionArea = getActionArea(this);
-    if (pActionArea)
-    {
-        pActionArea->set_border_width(rDialogStyle.action_area_border);
-        pActionArea->set_spacing(rDialogStyle.button_spacing);
-    }
+    Point aPos(mpWindowImpl->mnLeftBorder + m_nBorderWidth,
+        mpWindowImpl->mnTopBorder + m_nBorderWidth);
 
     pBox->SetPosSizePixel(aPos, aSize);
     return 0;
commit 5c1e86c57ef76ccd2128d29bc477d84e2dd96d3a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 1 10:20:15 2012 +0100

    move height/width request into WindowImpl

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 55fd630..7671cff 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -350,13 +350,9 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet )
         //10 lines
         sal_Int32 nHeight = m_pWestFontSizeLB->CalcWindowSizePixel(10);
 
-        rtl::OString sHeightRequest(RTL_CONSTASCII_STRINGPARAM("height-request"));
-        m_pWestFontNameLB->setChildProperty<sal_Int32>(sHeightRequest,
-            nHeight);
-        m_pWestFontStyleLB->setChildProperty<sal_Int32>(sHeightRequest,
-            nHeight);
-        m_pWestFontSizeLB->setChildProperty<sal_Int32>(sHeightRequest,
-            nHeight);
+        m_pWestFontNameLB->set_height_request(nHeight);
+        m_pWestFontStyleLB->set_height_request(nHeight);
+        m_pWestFontSizeLB->set_height_request(nHeight);
     }
 
     m_pEastLine = new FixedLine(&m_aGrid, CUI_RES( FL_EAST ) );
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 1b07f66..e3fa0dc 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -1083,6 +1083,26 @@ public:
     virtual Size GetOptimalSize(WindowSizeType eType) const;
 
     /*
+     * Sets the "width-request" property
+     *
+     * Override for width request of the widget, or -1 if natural request
+     * should be used.
+     *
+     * @see get_preferred_size, set_width_request
+     */
+    void set_height_request(sal_Int32 nHeightRequest);
+
+    /*
+     * Sets the "height-request" property
+     *
+     * Override for height request of the widget, or -1 if natural request
+     * should be used.
+     *
+     * @see get_preferred_size, set_height_request
+     */
+    void set_width_request(sal_Int32 nWidthRequest);
+
+    /*
      * Retrieves the preferred size of a widget taking
      * into account the "width-request" and "height-request" properties.
      *
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 106fe96..040c19a 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -281,6 +281,8 @@ public:
     sal_Int32           mnTopBorder;
     sal_Int32           mnRightBorder;
     sal_Int32           mnBottomBorder;
+    sal_Int32           mnWidthRequest;
+    sal_Int32           mnHeightRequest;
     long                mnX;
     long                mnY;
     long                mnAbsScreenX;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 0bcdd31..5f0d4a0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -629,6 +629,8 @@ void Window::ImplInitWindowData( WindowType nType )
     mpWindowImpl->mnTopBorder         = 0;            // top border
     mpWindowImpl->mnRightBorder       = 0;            // right border
     mpWindowImpl->mnBottomBorder      = 0;            // bottom border
+    mpWindowImpl->mnWidthRequest      = -1;           // width request
+    mpWindowImpl->mnHeightRequest     = -1;           // height request
     mpWindowImpl->mnX                 = 0;            // X-Position to Parent
     mpWindowImpl->mnY                 = 0;            // Y-Position to Parent
     mpWindowImpl->mnAbsScreenX        = 0;            // absolute X-position on screen, used for RTL window positioning
@@ -5398,6 +5400,28 @@ void Window::SetStyle( WinBits nStyle )
     }
 }
 
+void Window::set_height_request(sal_Int32 nHeightRequest)
+{
+    DBG_CHKTHIS( Window, ImplDbgCheckWindow );
+
+    if ( mpWindowImpl->mnHeightRequest != nHeightRequest )
+    {
+        mpWindowImpl->mnHeightRequest = nHeightRequest;
+        queue_resize();
+    }
+}
+
+void Window::set_width_request(sal_Int32 nWidthRequest)
+{
+    DBG_CHKTHIS( Window, ImplDbgCheckWindow );
+
+    if ( mpWindowImpl->mnWidthRequest != nWidthRequest )
+    {
+        mpWindowImpl->mnWidthRequest = nWidthRequest;
+        queue_resize();
+    }
+}
+
 // -----------------------------------------------------------------------
 
 void Window::SetExtendedStyle( WinBits nExtendedStyle )
@@ -9662,11 +9686,8 @@ uno::Any Window::getWidgetAnyProperty(const rtl::OString &rString) const
 
 Size Window::get_preferred_size() const
 {
-    rtl::OString sWidthRequest(RTL_CONSTASCII_STRINGPARAM("width-request"));
-    rtl::OString sHeightRequest(RTL_CONSTASCII_STRINGPARAM("height-request"));
-    sal_Int32 nWidth = getWidgetProperty<sal_Int32>(sWidthRequest, -1);
-    sal_Int32 nHeight = getWidgetProperty<sal_Int32>(sHeightRequest, -1);
-    Size aRet(nWidth, nHeight);
+    Size aRet(mpWindowImpl->mnWidthRequest, mpWindowImpl->mnHeightRequest);
+    fprintf(stderr, "numbers are %d %d\n", aRet.Width(), aRet.Height());
     if (aRet.Width() == -1 || aRet.Height() == -1)
     {
         Size aOptimal = GetOptimalSize(WINDOWSIZE_PREFERRED);
@@ -9694,6 +9715,8 @@ void Window::take_properties(Window &rOther)
     mpWindowImpl->mnTopBorder = pWindowImpl->mnTopBorder;
     mpWindowImpl->mnRightBorder = pWindowImpl->mnRightBorder;
     mpWindowImpl->mnBottomBorder = pWindowImpl->mnBottomBorder;
+    mpWindowImpl->mnWidthRequest = pWindowImpl->mnWidthRequest;
+    mpWindowImpl->mnHeightRequest = pWindowImpl->mnHeightRequest;
     mpWindowImpl->mnX = pWindowImpl->mnX;
     mpWindowImpl->mnY = pWindowImpl->mnY;
     mpWindowImpl->mnAbsScreenX = pWindowImpl->mnAbsScreenX;
@@ -9852,6 +9875,10 @@ bool Window::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
     }
     else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("text")))
         SetText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+    else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("height-request")))
+        set_height_request(rValue.toInt32());
+    else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("width-request")))
+        set_width_request(rValue.toInt32());
     else
     {
         fprintf(stderr, "unhandled property %s\n", rKey.getStr());
commit 3b950dcf9478cd126c6441be0cf1ed116044c0b7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 1 10:10:36 2012 +0100

    This random +6 makes my windows too large
    
    The comment doesn't describe the circumstances that required this
    in the first place

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 4137a8d..8eafe45 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1493,14 +1493,6 @@ void GtkSalFrame::Enable( sal_Bool /*bEnable*/ )
 
 void GtkSalFrame::setMinMaxSize()
 {
-/*  FIXME: for yet unknown reasons the reported size is a little smaller
- *  than the max size hint; one would guess that this was due to the border
- *  sizes of the widgets involved (GtkWindow and GtkFixed), but setting the
- *  their border to 0 (which is the default anyway) does not change the
- *  behaviour. Until the reason is known we'll add some pixels here.
- */
-#define CONTAINER_ADJUSTMENT 6
-
     /*  #i34504# metacity (and possibly others) do not treat
      *  _NET_WM_STATE_FULLSCREEN and max_width/heigth independently;
      *  whether they should is undefined. So don't set the max size hint
@@ -1514,14 +1506,14 @@ void GtkSalFrame::setMinMaxSize()
         {
             if( m_aMinSize.Width() && m_aMinSize.Height() && ! m_bFullscreen )
             {
-                aGeo.min_width  = m_aMinSize.Width()+CONTAINER_ADJUSTMENT;
-                aGeo.min_height = m_aMinSize.Height()+CONTAINER_ADJUSTMENT;
+                aGeo.min_width  = m_aMinSize.Width();
+                aGeo.min_height = m_aMinSize.Height();
                 aHints |= GDK_HINT_MIN_SIZE;
             }
             if( m_aMaxSize.Width() && m_aMaxSize.Height() && ! m_bFullscreen )
             {
-                aGeo.max_width  = m_aMaxSize.Width()+CONTAINER_ADJUSTMENT;
-                aGeo.max_height = m_aMaxSize.Height()+CONTAINER_ADJUSTMENT;
+                aGeo.max_width  = m_aMaxSize.Width();
+                aGeo.max_height = m_aMaxSize.Height();
                 aHints |= GDK_HINT_MAX_SIZE;
             }
         }
commit 72db021fa2348dacbebd088887f76fd4adbb8ece
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 29 13:57:35 2012 +0200

    Backport some Boost 1.48.0 changes to keep GCC 4.7 -std=c++11 happy

diff --git a/boost/boost_1_44_0-gcc4.7.patch b/boost/boost_1_44_0-gcc4.7.patch
new file mode 100644
index 0000000..842a92a
--- /dev/null
+++ b/boost/boost_1_44_0-gcc4.7.patch
@@ -0,0 +1,49 @@
+--- misc/boost_1_44_0/boost/smart_ptr/shared_ptr.hpp	2009-12-14 18:44:19.000000000 +0100
++++ misc/build/boost_1_44_0/boost/smart_ptr/shared_ptr.hpp	2012-03-28 08:32:46.772493003 +0200
+@@ -207,7 +207,17 @@
+         boost::detail::sp_enable_shared_from_this( this, p, p );
+     }
+ 
+-//  generated copy constructor, destructor are fine
++//  generated copy constructor, destructor are fine...
++
++#if defined( BOOST_HAS_RVALUE_REFS )
++
++// ... except in C++0x, move disables the implicit copy
++
++    shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
++    {
++    }
++
++#endif
+ 
+     template<class Y>
+     explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
+--- misc/boost_1_44_0/boost/smart_ptr/weak_ptr.hpp	2009-12-14 18:44:19.000000000 +0100
++++ misc/build/boost_1_44_0/boost/smart_ptr/weak_ptr.hpp	2012-03-28 10:31:57.607462325 +0200
+@@ -40,8 +40,24 @@
+     {
+     }
+ 
+-//  generated copy constructor, assignment, destructor are fine
++//  generated copy constructor, assignment, destructor are fine...
+ 
++#if defined( BOOST_HAS_RVALUE_REFS )
++
++// ... except in C++0x, move disables the implicit copy
++
++    weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
++    {
++    }
++
++    weak_ptr & operator=( weak_ptr const & r ) // never throws
++    {
++        px = r.px;
++        pn = r.pn;
++        return *this;
++    }
++
++#endif
+ 
+ //
+ //  The "obvious" converting constructor implementation:
diff --git a/boost/makefile.mk b/boost/makefile.mk
index 093566b..cab945f 100644
--- a/boost/makefile.mk
+++ b/boost/makefile.mk
@@ -71,6 +71,9 @@ PATCH_FILES+=boost.windows.patch
 PATCH_FILES += boost_1_44_0-unused-parameters.patch
 .END
 
+# Backporting fixes for the GCC 4.7 -std=c++11 mode from Boost 1.48.0:
+PATCH_FILES += boost_1_44_0-gcc4.7.patch
+
 ADDITIONAL_FILES= \
     libs/thread/src/win32/makefile.mk \
 	libs/date_time/src/gregorian/makefile.mk


More information about the Libreoffice-commits mailing list