diff options
author | Manal Alhassoun <malhassoun@kacst.edu.sa> | 2013-05-27 11:58:45 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-27 13:15:32 +0000 |
commit | bfc0609a4c5c73533b31f2581963160abe57df5e (patch) | |
tree | 9ebfdae32737324b30278d6ad16e19fa26ed8cfb /sc/source/ui/miscdlgs/inscldlg.cxx | |
parent | 7d01bed2e663e19b2387d5427036afea0ff4fa4f (diff) |
inscldlg.ui widget
Change-Id: Ia931e330303e9f5baf7ae92a8d69bc460327425d
Reviewed-on: https://gerrit.libreoffice.org/4049
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/miscdlgs/inscldlg.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/inscldlg.cxx | 46 |
1 files changed, 20 insertions, 26 deletions
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; |