diff options
author | Philipp Kaluza <floss@ghostroute.eu> | 2012-10-21 00:05:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-02 15:46:53 +0000 |
commit | fb3a7529bc77211d795936a960211f147f658d8f (patch) | |
tree | 4498bfbefd4db0fa93ca56b043ab32e604991efd /cui | |
parent | Fix incorrect shifting of cell notes upon cell insertion / deletion. (diff) | |
download | core-fb3a7529bc77211d795936a960211f147f658d8f.tar.gz core-fb3a7529bc77211d795936a960211f147f658d8f.zip |
WIP: first stab at converting the insert-row dialog
to UI format
Conflicts:
cui/UI_cui.mk
Change-Id: I1b1888f667b31b6ca22d1eca57aeb9da7ce45b71
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UI_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/insrc.cxx | 19 | ||||
-rw-r--r-- | cui/source/inc/insrc.hxx | 13 | ||||
-rw-r--r-- | cui/uiconfig/ui/insrc.ui | 242 |
4 files changed, 252 insertions, 23 deletions
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 6f316fa57f0b..9e4f844701e9 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/insertfloatingframe \ cui/uiconfig/ui/insertoleobject \ cui/uiconfig/ui/insertplugin \ + cui/uiconfig/ui/insrc \ cui/uiconfig/ui/macroselectordialog \ cui/uiconfig/ui/positionpage \ cui/uiconfig/ui/specialcharacters \ diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx index 81b8c0c6019c..e48a8eb0967a 100644 --- a/cui/source/dialogs/insrc.cxx +++ b/cui/source/dialogs/insrc.cxx @@ -25,30 +25,23 @@ bool SvxInsRowColDlg::isInsertBefore() const { - return !aAfterBtn.IsChecked(); + return !m_pAfterBtn->IsChecked(); } sal_uInt16 SvxInsRowColDlg::getInsertCount() const { - return static_cast< sal_uInt16 >( aCountEdit.GetValue() ); + return static_cast< sal_uInt16 >( m_pCountEdit->GetValue() ); } SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString& sHelpId ) - : ModalDialog( pParent, CUI_RES(DLG_INS_ROW_COL) ), - aCount( this, CUI_RES( FT_COUNT ) ), - aCountEdit( this, CUI_RES( ED_COUNT ) ), - aInsFL( this, CUI_RES( FL_INS ) ), - aBeforeBtn( this, CUI_RES( CB_POS_BEFORE ) ), - aAfterBtn( this, CUI_RES( CB_POS_AFTER ) ), - aPosFL( this, CUI_RES( FL_POS ) ), + : ModalDialog( pParent, "insert_row_dialog", "cui/ui/insrc.ui" ), aRow(CUI_RESSTR(STR_ROW)), aCol(CUI_RESSTR(STR_COL)), - aOKBtn( this, CUI_RES( BT_OK ) ), - aCancelBtn( this, CUI_RES( BT_CANCEL ) ), - aHelpBtn( this, CUI_RES( BT_HELP ) ), bColumn( bCol ) { - FreeResource(); + get(m_pCountEdit, "insert_number"); + get(m_pBeforeBtn, "insert_before"); + get(m_pAfterBtn, "insert_after"); SetText( bColumn ? aCol : aRow ); SetHelpId( sHelpId ); } diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx index 4e472d43691b..98f393f082fa 100644 --- a/cui/source/inc/insrc.hxx +++ b/cui/source/inc/insrc.hxx @@ -31,21 +31,14 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog { - FixedText aCount; - NumericField aCountEdit; - FixedLine aInsFL; + NumericField* m_pCountEdit; - RadioButton aBeforeBtn; - RadioButton aAfterBtn; - FixedLine aPosFL; + RadioButton* m_pBeforeBtn; + RadioButton* m_pAfterBtn; rtl::OUString aRow; rtl::OUString aCol; - OKButton aOKBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; - bool bColumn; public: diff --git a/cui/uiconfig/ui/insrc.ui b/cui/uiconfig/ui/insrc.ui new file mode 100644 index 000000000000..102d12ee922c --- /dev/null +++ b/cui/uiconfig/ui/insrc.ui @@ -0,0 +1,242 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="insert_row_dialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Insert Row</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="ok"> + <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="button2"> + <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="button1"> + <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="margin_top">6</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="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Insert</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSeparator" id="separator1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Number</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">insert_number</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="insert_number"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="is_focus">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">True</property> + <property name="numeric">True</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Position</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSeparator" id="separator2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">2</property> + <property name="width">3</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="insert_before"> + <property name="label" translatable="yes">_Before</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="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="insert_after"> + <property name="label" translatable="yes">A_fter</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="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">insert_before</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">4</property> + <property name="width">2</property> + <property name="height">1</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> + <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">button2</action-widget> + <action-widget response="0">button1</action-widget> + </action-widgets> + </object> +</interface> |