[Libreoffice-commits] core.git: sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk

Caolán McNamara caolanm at redhat.com
Mon Jan 6 08:10:04 PST 2014


 sc/UIConfig_scalc.mk                   |    1 
 sc/inc/sc.hrc                          |    1 
 sc/source/ui/inc/crdlg.hxx             |   25 +----
 sc/source/ui/miscdlgs/crdlg.cxx        |   56 +++---------
 sc/source/ui/src/miscdlgs.src          |   60 -------------
 sc/uiconfig/scalc/ui/colorrowdialog.ui |  152 +++++++++++++++++++++++++++++++++
 6 files changed, 176 insertions(+), 119 deletions(-)

New commits:
commit 0183d4cf7e3311625d3544395229b5ccd0f7bc4d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 6 16:04:55 2014 +0000

    convert col or row dialog to .ui
    
    Change-Id: I47b0b0abd3cbb992b93cd1db10558fed579e4f1c

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 8299602..b0308be 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/analysisofvariancedialog \
 	sc/uiconfig/scalc/ui/cellprotectionpage \
 	sc/uiconfig/scalc/ui/chardialog \
+	sc/uiconfig/scalc/ui/colorrowdialog \
 	sc/uiconfig/scalc/ui/colwidthdialog \
 	sc/uiconfig/scalc/ui/consolidatedialog \
 	sc/uiconfig/scalc/ui/correlationdialog \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index bfd9668..6b8cc619 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1045,7 +1045,6 @@
 #define RID_SCDLG_HFEDIT_HEADER         (SC_DIALOGS_START + 68)
 #define RID_SCDLG_HFEDIT_FOOTER         (SC_DIALOGS_START + 69)
 #define RID_SCPAGE_PRINT                (SC_DIALOGS_START + 70)
-#define RID_SCDLG_COLORROW              (SC_DIALOGS_START + 71)
 
 #define RID_SCDLG_CONTACTS              (SC_DIALOGS_START + 78)
 
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
index fd2eaba..5e7f00f 100644
--- a/sc/source/ui/inc/crdlg.hxx
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -23,34 +23,23 @@
 
 #include <vcl/dialog.hxx>
 #include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
 #include "scui_def.hxx"
 
-//------------------------------------------------------------------------
-
 class ScColOrRowDlg : public ModalDialog
 {
 public:
-            ScColOrRowDlg( Window*          pParent,
-                           const OUString&    rStrTitle,
-                           const OUString&    rStrLabel,
-                           sal_Bool             bColDefault = sal_True );
-            ~ScColOrRowDlg();
-
+    ScColOrRowDlg(Window* pParent, const OUString& rStrTitle,
+        const OUString& rStrLabel, bool bColDefault = true);
 private:
-    FixedLine       aFlFrame;
-    RadioButton     aBtnRows;
-    RadioButton     aBtnCols;
-    OKButton        aBtnOk;
-    CancelButton    aBtnCancel;
-    HelpButton      aBtnHelp;
+    VclFrame*       m_pFrame;
+    RadioButton*    m_pBtnRows;
+    RadioButton*    m_pBtnCols;
+    OKButton*       m_pBtnOk;
 
     DECL_LINK(OkHdl, void *);
 };
 
-
 #endif
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx
index 7a41edb..c009bd4 100644
--- a/sc/source/ui/miscdlgs/crdlg.cxx
+++ b/sc/source/ui/miscdlgs/crdlg.cxx
@@ -17,62 +17,38 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #undef SC_DLLIMPLEMENTATION
 
-
-
-//------------------------------------------------------------------
-
 #include "crdlg.hxx"
 #include "scresid.hxx"
 #include "miscdlgs.hrc"
 
-
-//==================================================================
-
-ScColOrRowDlg::ScColOrRowDlg( Window*       pParent,
-                              const OUString& rStrTitle,
-                              const OUString& rStrLabel,
-                              sal_Bool          bColDefault )
-
-    :   ModalDialog     ( pParent, ScResId( RID_SCDLG_COLORROW ) ),
-        //
-        aFlFrame        ( this, ScResId( FL_FRAME ) ),
-        aBtnRows        ( this, ScResId( BTN_GROUP_ROWS ) ),
-        aBtnCols        ( this, ScResId( BTN_GROUP_COLS ) ),
-        aBtnOk          ( this, ScResId( BTN_OK ) ),
-        aBtnCancel      ( this, ScResId( BTN_CANCEL ) ),
-        aBtnHelp        ( this, ScResId( BTN_HELP ) )
+ScColOrRowDlg::ScColOrRowDlg(Window* pParent, const OUString& rStrTitle,
+    const OUString& rStrLabel, bool bColDefault)
+    : ModalDialog(pParent, "ColOrRowDialog",
+        "modules/scalc/ui/colorrowdialog.ui")
 {
-    SetText( rStrTitle );
-    aFlFrame.SetText( rStrLabel );
-
-    if ( bColDefault )
-        aBtnCols.Check();
-    else
-        aBtnRows.Check();
-
-    aBtnOk.SetClickHdl( LINK( this, ScColOrRowDlg, OkHdl ) );
+    get(m_pBtnOk, "ok");
+    get(m_pBtnCols, "columns");
+    get(m_pBtnRows, "rows");
+    get(m_pFrame, "frame");
 
-    FreeResource();
-}
+    SetText(rStrTitle);
+    m_pFrame->set_label(rStrLabel);
 
-//------------------------------------------------------------------------
+    if (bColDefault)
+        m_pBtnCols->Check();
+    else
+        m_pBtnRows->Check();
 
-ScColOrRowDlg::~ScColOrRowDlg()
-{
+    m_pBtnOk->SetClickHdl( LINK( this, ScColOrRowDlg, OkHdl ) );
 }
 
-//------------------------------------------------------------------------
-
 IMPL_LINK_NOARG_INLINE_START(ScColOrRowDlg, OkHdl)
 {
-    EndDialog( aBtnCols.IsChecked() ? SCRET_COLS : SCRET_ROWS );
+    EndDialog( m_pBtnCols->IsChecked() ? SCRET_COLS : SCRET_ROWS );
     return 0;
 }
 IMPL_LINK_NOARG_INLINE_END(ScColOrRowDlg, OkHdl)
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index e0344cf..be20fb5 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -224,66 +224,6 @@ ModalDialog RID_SCDLG_INSCONT
     };
 };
 
-#define TXT_COLS \
-    Text [ en-US ] = "~Columns" ; \
-
-
-#define TXT_ROWS \
-    Text [ en-US ] = "~Rows" ;  \
-
-
- // RID_SCDLG_COLORROW wird nur in der Optionen-Sortierlisten-Seite benutzt
-
-ModalDialog RID_SCDLG_COLORROW
-{
-    HelpID = "sc:ModalDialog:RID_SCDLG_COLORROW";
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 148 , 63 ) ;
-    Moveable = TRUE ;
-    Closeable = FALSE ;
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 92 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 92 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    HelpButton BTN_HELP
-    {
-        Pos = MAP_APPFONT ( 92 , 43 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    RadioButton BTN_GROUP_ROWS
-    {
-        HelpID = "sc:RadioButton:RID_SCDLG_COLORROW:BTN_GROUP_ROWS";
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 71 , 10 ) ;
-        TXT_ROWS
-        TabStop = TRUE ;
-    };
-    RadioButton BTN_GROUP_COLS
-    {
-        HelpID = "sc:RadioButton:RID_SCDLG_COLORROW:BTN_GROUP_COLS";
-        Pos = MAP_APPFONT ( 12 , 28 ) ;
-        Size = MAP_APPFONT ( 71 , 10 ) ;
-        TXT_COLS
-        TabStop = TRUE ;
-    };
-    FixedLine FL_FRAME
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 80 , 8 ) ;
-    };
-};
-
 ModalDialog RID_SCDLG_CHARTCOLROW
 {
     HelpID = "sc:ModalDialog:RID_SCDLG_CHARTCOLROW";
diff --git a/sc/uiconfig/scalc/ui/colorrowdialog.ui b/sc/uiconfig/scalc/ui/colorrowdialog.ui
new file mode 100644
index 0000000..41a4078
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/colorrowdialog.ui
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Mon Jan  6 16:03:58 2014 -->
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="ColOrRowDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Copy List</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="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>
+            <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="has_default">True</property>
+                <property name="receives_default">True</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="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</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="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</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="frame">
+            <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="top_padding">6</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkBox" id="box2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkRadioButton" id="columns">
+                        <property name="label" translatable="yes">_Columns</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="xalign">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">rows</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="rows">
+                        <property name="label" translatable="yes">_Rows</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">columns</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">List from</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </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">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list