From fb3a7529bc77211d795936a960211f147f658d8f Mon Sep 17 00:00:00 2001 From: Philipp Kaluza Date: Sun, 21 Oct 2012 00:05:02 +0000 Subject: WIP: first stab at converting the insert-row dialog to UI format Conflicts: cui/UI_cui.mk Change-Id: I1b1888f667b31b6ca22d1eca57aeb9da7ce45b71 --- cui/UI_cui.mk | 1 + cui/source/dialogs/insrc.cxx | 19 ++-- cui/source/inc/insrc.hxx | 13 +-- cui/uiconfig/ui/insrc.ui | 242 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 252 insertions(+), 23 deletions(-) create mode 100644 cui/uiconfig/ui/insrc.ui (limited to 'cui') 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 @@ + + + + + False + 5 + Insert Row + dialog + + + False + 2 + + + False + vertical + start + + + gtk-ok + False + True + True + True + False + True + + + False + True + 0 + + + + + gtk-cancel + False + True + True + True + False + True + + + False + True + 1 + + + + + gtk-help + False + True + True + True + 6 + False + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + 6 + 6 + + + True + False + Insert + + + 0 + 0 + 2 + 1 + + + + + True + False + + + 2 + 0 + 3 + 1 + + + + + True + False + _Number + True + insert_number + + + 1 + 1 + 2 + 1 + + + + + True + True + True + True + + True + True + + + 3 + 1 + 1 + 1 + + + + + True + False + Position + + + 0 + 2 + 2 + 1 + + + + + True + False + + + 2 + 2 + 3 + 1 + + + + + _Before + False + True + True + False + False + True + 0 + True + + + 1 + 3 + 2 + 1 + + + + + A_fter + False + True + True + False + False + True + 0 + True + True + insert_before + + + 1 + 4 + 2 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + True + 1 + + + + + + ok + button2 + button1 + + + -- cgit