diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-06 16:04:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-06 16:09:39 +0000 |
commit | 0183d4cf7e3311625d3544395229b5ccd0f7bc4d (patch) | |
tree | 153f572c49ef7acdedc0f90b10736225f57696dc /sc | |
parent | 11cde981f5f9f4d037f0f0f73a14e928eab23075 (diff) |
convert col or row dialog to .ui
Change-Id: I47b0b0abd3cbb992b93cd1db10558fed579e4f1c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/UIConfig_scalc.mk | 1 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/crdlg.hxx | 25 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/crdlg.cxx | 56 | ||||
-rw-r--r-- | sc/source/ui/src/miscdlgs.src | 60 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/colorrowdialog.ui | 152 |
6 files changed, 176 insertions, 119 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 82996021e755..b0308befdbbe 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 bfd9668c41b7..6b8cc619a0e6 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 fd2eabaf6191..5e7f00fbb5df 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 7a41edb0ab35..c009bd4752c2 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 e0344cf37f24..be20fb5de069 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 000000000000..41a407859b2b --- /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> |