diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-20 09:50:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-20 10:18:34 +0000 |
commit | cffabc3d8e73ce957cfc1b8015398564aba6e63f (patch) | |
tree | 2c51cd7ae9adf856919d0d50db3d42331061063d /sc/source | |
parent | 842cb0da2ec72bafbd16fd50e5d780285227e452 (diff) |
convert row/col height/width dialogs to .ui
Change-Id: Ie97b9fcdd5fb93d195ea1beb536d5a0ac7bf7cc4
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 23 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/miscdlgs.hrc | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/mtrindlg.hxx | 30 | ||||
-rw-r--r-- | sc/source/ui/inc/solveroptions.hrc | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/mtrindlg.cxx | 118 | ||||
-rw-r--r-- | sc/source/ui/src/miscdlgs.src | 226 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 59 |
8 files changed, 71 insertions, 397 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 8df625b8be46..003d96babbfb 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -849,10 +849,9 @@ AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(Wi } AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( Window* pParent, - sal_uInt16 nResId, // Ableitung fuer jeden Dialog! + OString sDialogName, long nCurrent, long nDefault, - int nId , FieldUnit eFUnit, sal_uInt16 nDecimals, long nMaximum , @@ -860,23 +859,9 @@ AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg long nFirst, long nLast ) { - ScMetricInputDlg * pDlg=NULL; - switch ( nId ) - { - case RID_SCDLG_ROW_MAN : - case RID_SCDLG_ROW_OPT : - case RID_SCDLG_COL_MAN : - case RID_SCDLG_COL_OPT : - pDlg = new ScMetricInputDlg( pParent , nResId,nCurrent ,nDefault, eFUnit, - nDecimals, nMaximum , nMinimum , nFirst, nLast); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractScMetricInputDlg_Impl( pDlg ); - return 0; + ScMetricInputDlg * pDlg = new ScMetricInputDlg(pParent, sDialogName, nCurrent ,nDefault, eFUnit, + nDecimals, nMaximum , nMinimum , nFirst, nLast); + return new AbstractScMetricInputDlg_Impl( pDlg ); } AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(Window* pParent, diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 682911464506..e00a5bbb1af6 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -470,16 +470,15 @@ public: virtual AbstractScLinkedAreaDlg * CreateScLinkedAreaDlg(Window* pParent); virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent, - sal_uInt16 nResId, // Ableitung fuer jeden Dialog! + OString sDialogName, long nCurrent, long nDefault, - int nId , FieldUnit eFUnit = FUNIT_MM, sal_uInt16 nDecimals = 2, long nMaximum = 1000, long nMinimum = 0, long nFirst = 1, - long nLast = 100 ); + long nLast = 100 ); virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(Window * pParent, const OUString& rDefault); diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc index 70766c4eab3d..fc5d694db75b 100644 --- a/sc/source/ui/inc/miscdlgs.hrc +++ b/sc/source/ui/inc/miscdlgs.hrc @@ -20,7 +20,6 @@ #include "sc.hrc" // -> RID_SCDLG_INSCONT // -> RID_SCDLG_MOVETAB - // -> RID_SCDLG_MTRINPUT // -> RID_SCDLG_SELENTRY // -> RID_SCDLG_FILLSERIES // -> RID_SCDLG_AUTOFORMAT @@ -66,10 +65,6 @@ // String input #define ED_INPUT 10 -// Metrics input -#define ED_VALUE 1 -#define BTN_DEFVAL 1 - // Selection from a (String-)ListBox #define FL_ENTRYLIST 10 #define LB_ENTRYLIST 11 diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx index bea11af46d31..d49780e74155 100644 --- a/sc/source/ui/inc/mtrindlg.hxx +++ b/sc/source/ui/inc/mtrindlg.hxx @@ -31,31 +31,25 @@ class ScMetricInputDlg : public ModalDialog { public: - ScMetricInputDlg( Window* pParent, - sal_uInt16 nResId, // Ableitung fuer jeden Dialog! - long nCurrent, - long nDefault, - FieldUnit eFUnit = FUNIT_MM, - sal_uInt16 nDecimals = 2, - long nMaximum = 1000, - long nMinimum = 0, - long nFirst = 1, - long nLast = 100 ); - ~ScMetricInputDlg(); + ScMetricInputDlg( Window* pParent, + OString sDialogName, + long nCurrent, + long nDefault, + FieldUnit eFUnit = FUNIT_MM, + sal_uInt16 nDecimals = 2, + long nMaximum = 1000, + long nMinimum = 0, + long nFirst = 1, + long nLast = 100 ); long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const; private: - FixedText aFtEditTitle; - MetricField aEdValue; - CheckBox aBtnDefVal; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + MetricField* m_pEdValue; + CheckBox* m_pBtnDefVal; long nDefaultValue; long nCurrentValue; - void CalcPositions(); DECL_LINK(SetDefValHdl, void *); DECL_LINK(ModifyHdl, void *); }; diff --git a/sc/source/ui/inc/solveroptions.hrc b/sc/source/ui/inc/solveroptions.hrc index f311bbe49818..121beaf46975 100644 --- a/sc/source/ui/inc/solveroptions.hrc +++ b/sc/source/ui/inc/solveroptions.hrc @@ -35,6 +35,4 @@ #define NF_VALUE 1 -#define ED_VALUE 1 - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx index 0829670029b6..0dcf2b283767 100644 --- a/sc/source/ui/miscdlgs/mtrindlg.cxx +++ b/sc/source/ui/miscdlgs/mtrindlg.cxx @@ -32,52 +32,38 @@ //================================================================== ScMetricInputDlg::ScMetricInputDlg( Window* pParent, - sal_uInt16 nResId, + OString sDialogName, long nCurrent, long nDefault, FieldUnit eFUnit, - sal_uInt16 nDecimals, + sal_uInt16 nDecimals, long nMaximum, long nMinimum, long nFirst, long nLast ) - : ModalDialog ( pParent, ScResId( nResId ) ), - // - aFtEditTitle ( this, ScResId( FT_LABEL ) ), - aEdValue ( this, ScResId( ED_VALUE ) ), - aBtnDefVal ( this, ScResId( BTN_DEFVAL ) ), - aBtnOk ( this, ScResId( BTN_OK ) ), - aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ) -{ - //SetText( rTitle ); - // - //aFtEditTitle.SetText( rEditTitle ); - CalcPositions(); - aBtnDefVal.SetClickHdl ( LINK( this, ScMetricInputDlg, SetDefValHdl ) ); - aEdValue. SetModifyHdl( LINK( this, ScMetricInputDlg, ModifyHdl ) ); - - aEdValue.SetUnit ( eFUnit ); - aEdValue.SetDecimalDigits ( nDecimals ); - aEdValue.SetMax ( aEdValue.Normalize( nMaximum ), FUNIT_TWIP ); - aEdValue.SetMin ( aEdValue.Normalize( nMinimum ), FUNIT_TWIP ); - aEdValue.SetLast ( aEdValue.Normalize( nLast ), FUNIT_TWIP ); - aEdValue.SetFirst ( aEdValue.Normalize( nFirst ), FUNIT_TWIP ); - aEdValue.SetSpinSize ( aEdValue.Normalize( 1 ) / 10 ); - aEdValue.SetValue ( aEdValue.Normalize( nDefault ), FUNIT_TWIP ); - nDefaultValue = sal::static_int_cast<long>( aEdValue.GetValue() ); - aEdValue.SetValue ( aEdValue.Normalize( nCurrent ), FUNIT_TWIP ); - nCurrentValue = sal::static_int_cast<long>( aEdValue.GetValue() ); - aBtnDefVal.Check( nCurrentValue == nDefaultValue ); - - FreeResource(); -} - -//------------------------------------------------------------------------ - -ScMetricInputDlg::~ScMetricInputDlg() + : ModalDialog(pParent, sDialogName, + OStringToOUString("modules/scalc/ui/" + + sDialogName.toAsciiLowerCase() + ".ui", RTL_TEXTENCODING_UTF8)) { + get(m_pEdValue, "value"); + get(m_pBtnDefVal, "default"); + + m_pBtnDefVal->SetClickHdl ( LINK( this, ScMetricInputDlg, SetDefValHdl ) ); + m_pEdValue->SetModifyHdl( LINK( this, ScMetricInputDlg, ModifyHdl ) ); + + m_pEdValue->SetUnit ( eFUnit ); + m_pEdValue->SetDecimalDigits ( nDecimals ); + m_pEdValue->SetMax ( m_pEdValue->Normalize( nMaximum ), FUNIT_TWIP ); + m_pEdValue->SetMin ( m_pEdValue->Normalize( nMinimum ), FUNIT_TWIP ); + m_pEdValue->SetLast ( m_pEdValue->Normalize( nLast ), FUNIT_TWIP ); + m_pEdValue->SetFirst ( m_pEdValue->Normalize( nFirst ), FUNIT_TWIP ); + m_pEdValue->SetSpinSize ( m_pEdValue->Normalize( 1 ) / 10 ); + m_pEdValue->SetValue ( m_pEdValue->Normalize( nDefault ), FUNIT_TWIP ); + nDefaultValue = sal::static_int_cast<long>( m_pEdValue->GetValue() ); + m_pEdValue->SetValue ( m_pEdValue->Normalize( nCurrent ), FUNIT_TWIP ); + nCurrentValue = sal::static_int_cast<long>( m_pEdValue->GetValue() ); + m_pBtnDefVal->Check( nCurrentValue == nDefaultValue ); } //------------------------------------------------------------------------ @@ -87,8 +73,8 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const /* mit Nachkommastellen: - double nVal = aEdValue.GetValue( eUnit ); - sal_uInt16 nDecs = aEdValue.GetDecimalDigits(); + double nVal = m_pEdValue->GetValue( eUnit ); + sal_uInt16 nDecs = m_pEdValue->GetDecimalDigits(); double nFactor = 0.0; // static long ImpPower10( sal_uInt16 nDecs ) @@ -103,49 +89,7 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const */ // erstmal Nachkommastellen abschneiden - nich so doll... - return sal::static_int_cast<long>( aEdValue.Denormalize( aEdValue.GetValue( eUnit ) ) ); -} - -//------------------------------------------------------------------------ - -void ScMetricInputDlg::CalcPositions() -{ - MapMode oldMode = GetMapMode(); - SetMapMode( MAP_APPFONT ); - - Size aDlgSize = GetOutputSizePixel(); - Size aFtSize = aFtEditTitle.GetSizePixel(); - Point aNewPos; - - aFtSize.Width() = aFtEditTitle.GetTextWidth(aFtEditTitle.GetText()); - // add mnemonic char width to fixed text width - aFtSize.Width() += aFtEditTitle.GetTextWidth(OUString("(W)")); - aFtEditTitle.SetSizePixel( aFtSize ); - - aNewPos.Y() = aEdValue.GetPosPixel().Y(); - aNewPos.X() = aFtEditTitle.GetPosPixel().X(); - aNewPos.X() += aFtEditTitle.GetSizePixel().Width(); - aNewPos.X() += LogicToPixel( Point(3,0) ).X(); - aEdValue.SetPosPixel( aNewPos ); - - aNewPos.Y() = aBtnDefVal.GetPosPixel().Y(); - aBtnDefVal.SetPosPixel( aNewPos ); - - aNewPos.Y() = aBtnOk.GetPosPixel().Y(); - aNewPos.X() += aEdValue.GetSizePixel().Width(); - aNewPos.X() += LogicToPixel( Point(6,0) ).X(); - aBtnOk.SetPosPixel( aNewPos ); - aNewPos.Y() = aBtnCancel.GetPosPixel().Y(); - aBtnCancel.SetPosPixel( aNewPos ); - aNewPos.Y() = aBtnHelp.GetPosPixel().Y(); - aBtnHelp.SetPosPixel( aNewPos ); - - aNewPos.X() += aBtnOk.GetSizePixel().Width(); - aNewPos.X() += LogicToPixel( Point(6,0) ).X(); - aDlgSize.Width() = aNewPos.X(); - SetOutputSizePixel( aDlgSize ); - - SetMapMode( oldMode ); + return sal::static_int_cast<long>( m_pEdValue->Denormalize( m_pEdValue->GetValue( eUnit ) ) ); } //------------------------------------------------------------------------ @@ -153,13 +97,13 @@ void ScMetricInputDlg::CalcPositions() IMPL_LINK_NOARG(ScMetricInputDlg, SetDefValHdl) { - if ( aBtnDefVal.IsChecked() ) + if ( m_pBtnDefVal->IsChecked() ) { - nCurrentValue = sal::static_int_cast<long>( aEdValue.GetValue() ); - aEdValue.SetValue( nDefaultValue ); + nCurrentValue = sal::static_int_cast<long>( m_pEdValue->GetValue() ); + m_pEdValue->SetValue( nDefaultValue ); } else - aEdValue.SetValue( nCurrentValue ); + m_pEdValue->SetValue( nCurrentValue ); return 0; } @@ -167,7 +111,7 @@ IMPL_LINK_NOARG(ScMetricInputDlg, SetDefValHdl) IMPL_LINK_NOARG_INLINE_START(ScMetricInputDlg, ModifyHdl) { - aBtnDefVal.Check( nDefaultValue == aEdValue.GetValue() ); + m_pBtnDefVal->Check( nDefaultValue == m_pEdValue->GetValue() ); return 0; } IMPL_LINK_NOARG_INLINE_END(ScMetricInputDlg, ModifyHdl) diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src index 479984ae93c1..b22e9df0a8e9 100644 --- a/sc/source/ui/src/miscdlgs.src +++ b/sc/source/ui/src/miscdlgs.src @@ -270,232 +270,6 @@ ModalDialog RID_SCDLG_TAB_BG_COLOR }; }; -ModalDialog RID_SCDLG_COL_MAN -{ - Text [ en-US ] = "Column Width" ; - - HelpId = CMD_FID_COL_WIDTH ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 190 , 63 ) ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 136 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 136 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 136 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedText FT_LABEL - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Width" ; - }; - MetricField ED_VALUE - { - HelpID = "sc:MetricField:RID_SCDLG_COL_MAN:ED_VALUE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 70 , 6 ) ; - Size = MAP_APPFONT ( 70 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - }; - CheckBox BTN_DEFVAL - { - HelpID = "sc:CheckBox:RID_SCDLG_COL_MAN:BTN_DEFVAL"; - // HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen - TabStop = TRUE ; - Pos = MAP_APPFONT ( 70 , 24 ) ; - Size = MAP_APPFONT ( 70 , 10 ) ; - Text [ en-US ] = "~Default value" ; - }; -}; - -ModalDialog RID_SCDLG_COL_OPT -{ - Text [ en-US ] = "Optimal Column Width" ; - - HelpId = CMD_FID_COL_OPT_WIDTH ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 190 , 63 ) ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 136 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 136 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 136 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedText FT_LABEL - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Add" ; - }; - MetricField ED_VALUE - { - HelpID = "sc:MetricField:RID_SCDLG_COL_OPT:ED_VALUE"; - // HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen - Border = TRUE ; - Pos = MAP_APPFONT ( 70 , 6 ) ; - Size = MAP_APPFONT ( 70 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - }; - CheckBox BTN_DEFVAL - { - HelpID = "sc:CheckBox:RID_SCDLG_COL_OPT:BTN_DEFVAL"; - // HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen - TabStop = TRUE ; - Pos = MAP_APPFONT ( 70 , 24 ) ; - Size = MAP_APPFONT ( 70 , 10 ) ; - Text [ en-US ] = "~Default value" ; - }; -}; - -ModalDialog RID_SCDLG_ROW_MAN -{ - Text [ en-US ] = "Row Height" ; - - HelpId = CMD_FID_ROW_HEIGHT ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 190 , 63 ) ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 136 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 136 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 136 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedText FT_LABEL - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Height" ; - }; - MetricField ED_VALUE - { - HelpID = "sc:MetricField:RID_SCDLG_ROW_MAN:ED_VALUE"; - // HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen - Border = TRUE ; - Pos = MAP_APPFONT ( 70 , 6 ) ; - Size = MAP_APPFONT ( 70 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - }; - CheckBox BTN_DEFVAL - { - HelpID = "sc:CheckBox:RID_SCDLG_ROW_MAN:BTN_DEFVAL"; - // HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen - TabStop = TRUE ; - Pos = MAP_APPFONT ( 70 , 24 ) ; - Size = MAP_APPFONT ( 70 , 10 ) ; - Text [ en-US ] = "~Default value" ; - }; -}; - -ModalDialog RID_SCDLG_ROW_OPT -{ - Text [ en-US ] = "Optimal Row Height" ; - - HelpId = CMD_FID_ROW_OPT_HEIGHT ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 190 , 63 ) ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 136 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 136 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 136 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedText FT_LABEL - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Add" ; - }; - MetricField ED_VALUE - { - HelpID = "sc:MetricField:RID_SCDLG_ROW_OPT:ED_VALUE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 70 , 6 ) ; - Size = MAP_APPFONT ( 70 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - }; - CheckBox BTN_DEFVAL - { - HelpID = "sc:CheckBox:RID_SCDLG_ROW_OPT:BTN_DEFVAL"; - // HelpID, weil die generierten aus den Ableitungen nicht in die hid.lst kommen - TabStop = TRUE ; - Pos = MAP_APPFONT ( 70 , 24 ) ; - Size = MAP_APPFONT ( 70 , 10 ) ; - Text [ en-US ] = "~Default value" ; - }; -}; - #define TXT_COLS \ Text [ en-US ] = "~Columns" ; \ diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 3720e003810b..0387e727b902 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -545,16 +545,13 @@ void ScCellShell::Execute( SfxRequest& rReq ) GetRowHeight( pData->GetCurY(), pData->GetTabNo() ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); + assert(pFact); //ScAbstractFactory create fail! - AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_ROW_MAN, - nCurHeight, - ScGlobal::nStdRowHeight, - RID_SCDLG_ROW_MAN, - eMetric, - 2, - MAX_ROW_HEIGHT); - OSL_ENSURE(pDlg, "Dialog create fail!"); + AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( + pTabViewShell->GetDialogParent(), "RowHeightDialog", + nCurHeight, ScGlobal::nStdRowHeight, + eMetric, 2, MAX_ROW_HEIGHT); + assert(pDlg); //Dialog create fail if ( pDlg->Execute() == RET_OK ) { @@ -590,16 +587,12 @@ void ScCellShell::Execute( SfxRequest& rReq ) FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); + assert(pFact); //ScAbstractFactory create fail! - AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_ROW_OPT, - ScGlobal::nLastRowHeightExtra, - 0, - RID_SCDLG_ROW_OPT, - eMetric, - 1, - MAX_EXTRA_HEIGHT); - OSL_ENSURE(pDlg, "Dialog create fail!"); + AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( + pTabViewShell->GetDialogParent(), "OptimalRowHeightDialog", + ScGlobal::nLastRowHeightExtra, 0, eMetric, 1, MAX_EXTRA_HEIGHT); + assert(pDlg); //Dialog create fail! if ( pDlg->Execute() == RET_OK ) { @@ -637,16 +630,12 @@ void ScCellShell::Execute( SfxRequest& rReq ) GetColWidth( pData->GetCurX(), pData->GetTabNo() ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); + assert(pFact); //ScAbstractFactory create fail! - AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_COL_MAN, - nCurHeight, - STD_COL_WIDTH, - RID_SCDLG_COL_MAN, - eMetric, - 2, - MAX_COL_WIDTH); - OSL_ENSURE(pDlg, "Dialog create fail!"); + AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( + pTabViewShell->GetDialogParent(), "ColWidthDialog", nCurHeight, + STD_COL_WIDTH, eMetric, 2, MAX_COL_WIDTH); + assert(pDlg); //Dialog create fail! if ( pDlg->Execute() == RET_OK ) { @@ -682,16 +671,12 @@ void ScCellShell::Execute( SfxRequest& rReq ) FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - - AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_COL_OPT, - ScGlobal::nLastColWidthExtra, - STD_EXTRA_WIDTH, - RID_SCDLG_COL_OPT, - eMetric, - 1, - MAX_EXTRA_WIDTH); - OSL_ENSURE(pDlg, "Dialog create fail!"); + assert(pFact); //ScAbstractFactory create fail! + + AbstractScMetricInputDlg* pDlg = pFact->CreateScMetricInputDlg( + pTabViewShell->GetDialogParent(), "OptimalColWidthDialog", + ScGlobal::nLastColWidthExtra, STD_EXTRA_WIDTH, eMetric, 1, MAX_EXTRA_WIDTH); + assert(pDlg); //Dialog create fail! if ( pDlg->Execute() == RET_OK ) { long nVal = pDlg->GetInputValue(); |