From bfc0609a4c5c73533b31f2581963160abe57df5e Mon Sep 17 00:00:00 2001 From: Manal Alhassoun Date: Mon, 27 May 2013 11:58:45 +0300 Subject: inscldlg.ui widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia931e330303e9f5baf7ae92a8d69bc460327425d Reviewed-on: https://gerrit.libreoffice.org/4049 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/UIConfig_scalc.mk | 1 + sc/source/ui/inc/inscldlg.hxx | 12 +-- sc/source/ui/inc/miscdlgs.hrc | 5 - sc/source/ui/miscdlgs/inscldlg.cxx | 46 ++++----- sc/source/ui/src/miscdlgs.src | 68 ------------- sc/uiconfig/scalc/ui/insertcells.ui | 194 ++++++++++++++++++++++++++++++++++++ 6 files changed, 219 insertions(+), 107 deletions(-) create mode 100644 sc/uiconfig/scalc/ui/insertcells.ui diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 1f77cdd0e521..cf715ff59c2e 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -73,6 +73,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/headerdialog \ sc/uiconfig/scalc/ui/headerfootercontent \ sc/uiconfig/scalc/ui/headerfooterdialog \ + sc/uiconfig/scalc/ui/insertcells \ sc/uiconfig/scalc/ui/insertname \ sc/uiconfig/scalc/ui/insertsheet \ sc/uiconfig/scalc/ui/leftfooterdialog \ diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx index f6a5ed9b2436..008206df3f15 100644 --- a/sc/source/ui/inc/inscldlg.hxx +++ b/sc/source/ui/inc/inscldlg.hxx @@ -32,14 +32,10 @@ class ScInsertCellDlg : public ModalDialog { private: - FixedLine aFlFrame; - RadioButton aBtnCellsDown; - RadioButton aBtnCellsRight; - RadioButton aBtnInsRows; - RadioButton aBtnInsCols; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + RadioButton* m_pBtnCellsDown; + RadioButton* m_pBtnCellsRight; + RadioButton* m_pBtnInsRow; + RadioButton* m_pBtnInsCol; public: ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = false ); diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc index 9efabdc4568b..c65428ab4170 100644 --- a/sc/source/ui/inc/miscdlgs.hrc +++ b/sc/source/ui/inc/miscdlgs.hrc @@ -37,11 +37,6 @@ #define FL_FRAME 112 #define STR_BTN_CLOSE 200 -// Insert Cell Dialog -#define BTN_CELLSDOWN 11 -#define BTN_CELLSRIGHT 12 -#define BTN_INSROWS 16 -#define BTN_INSCOLS 17 // Insert Contents Dialog #define BTN_INSALL 20 diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index 56e72e710041..0d522c80224f 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -34,42 +34,36 @@ static sal_uInt8 nInsItemChecked=0; //================================================================== ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) : - ModalDialog ( pParent, ScResId( RID_SCDLG_INSCELL ) ), - // - aFlFrame ( this, ScResId( FL_FRAME ) ), - aBtnCellsDown ( this, ScResId( BTN_CELLSDOWN ) ), - aBtnCellsRight ( this, ScResId( BTN_CELLSRIGHT ) ), - aBtnInsRows ( this, ScResId( BTN_INSROWS ) ), - aBtnInsCols ( this, ScResId( BTN_INSCOLS ) ), - aBtnOk ( this, ScResId( BTN_OK ) ), - aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ) + ModalDialog ( pParent, "InsertCellsDialog", "modules/scalc/ui/insertcells.ui") { + get(m_pBtnCellsDown, "down"); + get(m_pBtnCellsRight, "right"); + get(m_pBtnInsRow, "rows"); + get(m_pBtnInsCol, "cols"); + if (bDisallowCellMove) { - aBtnCellsDown.Disable(); - aBtnCellsRight.Disable(); - aBtnInsRows.Check(); + m_pBtnCellsDown->Disable(); + m_pBtnCellsRight->Disable(); + m_pBtnInsRow->Check(); switch(nInsItemChecked) { - case 2: aBtnInsRows .Check();break; - case 3: aBtnInsCols .Check();break; - default:aBtnInsRows .Check();break; + case 2: m_pBtnInsRow->Check();break; + case 3: m_pBtnInsCol->Check();break; + default:m_pBtnInsRow->Check();break; } } else { switch(nInsItemChecked) { - case 0: aBtnCellsDown .Check();break; - case 1: aBtnCellsRight.Check();break; - case 2: aBtnInsRows .Check();break; - case 3: aBtnInsCols .Check();break; + case 0: m_pBtnCellsDown->Check();break; + case 1: m_pBtnCellsRight->Check();break; + case 2: m_pBtnInsRow->Check();break; + case 3: m_pBtnInsCol->Check();break; } } - //------------- - FreeResource(); } //------------------------------------------------------------------------ @@ -78,22 +72,22 @@ InsCellCmd ScInsertCellDlg::GetInsCellCmd() const { InsCellCmd nReturn = INS_NONE; - if ( aBtnCellsDown.IsChecked() ) + if ( m_pBtnCellsDown->IsChecked() ) { nInsItemChecked=0; nReturn = INS_CELLSDOWN; } - else if ( aBtnCellsRight.IsChecked()) + else if ( m_pBtnCellsRight->IsChecked()) { nInsItemChecked=1; nReturn = INS_CELLSRIGHT; } - else if ( aBtnInsRows.IsChecked() ) + else if ( m_pBtnInsRow->IsChecked() ) { nInsItemChecked=2; nReturn = INS_INSROWS; } - else if ( aBtnInsCols.IsChecked() ) + else if ( m_pBtnInsCol->IsChecked() ) { nInsItemChecked=3; nReturn = INS_INSCOLS; diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src index 798a375821cd..74f7ea19814a 100644 --- a/sc/source/ui/src/miscdlgs.src +++ b/sc/source/ui/src/miscdlgs.src @@ -19,74 +19,6 @@ #include "miscdlgs.hrc" -ModalDialog RID_SCDLG_INSCELL -{ - OutputSize = TRUE ; - HelpId = CMD_FID_INS_CELL ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 191 , 70 ) ; - Text [ en-US ] = "Insert Cells" ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 135 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 135 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 135 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - RadioButton BTN_INSCOLS - { - HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSCOLS"; - Pos = MAP_APPFONT ( 12 , 56 ) ; - Size = MAP_APPFONT ( 114 , 10 ) ; - Text [ en-US ] = "Entire ~column" ; - TabStop = TRUE ; - }; - RadioButton BTN_INSROWS - { - HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSROWS"; - Pos = MAP_APPFONT ( 12 , 42 ) ; - Size = MAP_APPFONT ( 114 , 10 ) ; - Text [ en-US ] = "Entire ro~w" ; - TabStop = TRUE ; - }; - RadioButton BTN_CELLSRIGHT - { - HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSRIGHT"; - Pos = MAP_APPFONT ( 12 , 28 ) ; - Size = MAP_APPFONT ( 114 , 10 ) ; - Text [ en-US ] = "Shift cells ~right" ; - TabStop = TRUE ; - }; - RadioButton BTN_CELLSDOWN - { - HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSDOWN"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 114 , 10 ) ; - Text [ en-US ] = "Shift cells ~down" ; - TabStop = TRUE ; - }; - FixedLine FL_FRAME - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 123 , 8 ) ; - Text [ en-US ] = "Selection" ; - }; -}; - ModalDialog RID_SCDLG_INSCONT { OutputSize = TRUE ; diff --git a/sc/uiconfig/scalc/ui/insertcells.ui b/sc/uiconfig/scalc/ui/insertcells.ui new file mode 100644 index 000000000000..92c47955d9b3 --- /dev/null +++ b/sc/uiconfig/scalc/ui/insertcells.ui @@ -0,0 +1,194 @@ + + + + + False + 6 + Insert Cells + dialog + + + False + 12 + + + False + vertical + start + + + gtk-ok + True + True + True + True + True + False + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + False + True + + + False + True + 1 + + + + + gtk-help + True + True + True + False + True + top + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + vertical + 6 + + + Shift cells _down + True + True + False + False + True + 0 + True + True + right + + + False + True + 1 + + + + + Shift cells _right + True + True + False + False + True + 0 + True + rows + + + False + True + 2 + + + + + Entire ro_w + True + True + False + False + True + 0 + True + cols + + + False + True + 3 + + + + + Entire _column + True + True + False + False + True + 0 + True + down + + + False + True + 4 + + + + + + + + + True + False + Selection + + + + + + + + False + True + 1 + + + + + + ok + cancel + help + + + -- cgit