From 3c904d64f4e160d2feade4b05c5115d2db8f37f6 Mon Sep 17 00:00:00 2001 From: Cor Nouws Date: Sun, 10 Jun 2012 23:00:36 +0200 Subject: Give Macro recorder separate option, apart from Experimental features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9dbf5d510ebaff8448a152d75a006a183303bd81 (cherry picked from commit 5ae11320a26a6356dfadeb812e0d6baf5bdc951c) Signed-off-by: Caolán McNamara --- cui/source/options/optgdlg.cxx | 18 ++++++++++++++---- cui/source/options/optgdlg.hrc | 3 +++ cui/source/options/optgdlg.hxx | 1 + cui/source/options/optgdlg.src | 6 ++++++ 4 files changed, 24 insertions(+), 4 deletions(-) (limited to 'cui') diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 762ec3d78d83..b8cc40f41dd1 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -215,7 +215,8 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : aInterpretFT ( this, CUI_RES( FT_INTERPRET ) ), aYearValueField ( this, CUI_RES( NF_YEARVALUE ) ), aToYearFT ( this, CUI_RES( FT_TOYEAR ) ), - aExperimentalCB ( this, CUI_RES( CB_EXPERIMENTAL ) ) + aExperimentalCB ( this, CUI_RES( CB_EXPERIMENTAL ) ), + aMacroRecorderCB ( this, CUI_RES( CB_MACRORECORDER ) ) { FreeResource(); @@ -250,7 +251,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : Window* pWins[] = { &aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, - &aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB + &aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB, &aMacroRecorderCB }; Window** pCurrent = pWins; const sal_Int32 nCount = SAL_N_ELEMENTS( pWins ); @@ -271,7 +272,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : Window* pWins[] = { &aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, - &aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB + &aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB, &aMacroRecorderCB }; Window** pCurrent = pWins; const sal_Int32 nCount = SAL_N_ELEMENTS( pWins ); @@ -297,7 +298,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : Window* pWins[] = { &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, &aTwoFigureFL, - &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB + &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB, &aMacroRecorderCB }; Window** pCurrent = pWins; const sal_Int32 nCount = SAL_N_ELEMENTS( pWins ); @@ -441,6 +442,13 @@ sal_Bool OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) bModified = sal_True; } + if ( aMacroRecorderCB.IsChecked() != aMacroRecorderCB.GetSavedValue() ) + { + SvtMiscOptions aMiscOpt; + aMiscOpt.SetMacroRecorderMode( aMacroRecorderCB.IsChecked() ); + bModified = sal_True; + } + const SfxUInt16Item* pUInt16Item = PTR_CAST( SfxUInt16Item, GetOldItem( rSet, SID_ATTR_YEAR2000 ) ); sal_uInt16 nNum = (sal_uInt16)aYearValueField.GetText().ToInt32(); @@ -486,6 +494,8 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet ) aSaveAlwaysCB.SaveValue(); aExperimentalCB.Check( aMiscOpt.IsExperimentalMode() ); aExperimentalCB.SaveValue(); + aMacroRecorderCB.Check( aMiscOpt.IsMacroRecorderMode() ); + aMacroRecorderCB.SaveValue(); aODMADlgCB.Check( aMiscOpt.TryODMADialog() ); aODMADlgCB.SaveValue(); diff --git a/cui/source/options/optgdlg.hrc b/cui/source/options/optgdlg.hrc index d870e29f8774..2ccc5037045f 100644 --- a/cui/source/options/optgdlg.hrc +++ b/cui/source/options/optgdlg.hrc @@ -65,6 +65,7 @@ #define ROW12 (ROW11+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) #define ROW13 (ROW12+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) #define ROW14 (ROW13+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE+6) +#define ROW15 (ROW14+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) #define DIFF(v1,v2) (v2-v1) #define OFFS_TEXTBOX_FIXEDTEXT(base) (base+(RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2) @@ -112,6 +113,8 @@ #define LB_HELPFORMAT 16 #define FT_EXPERIMENTAL 17 #define CB_EXPERIMENTAL 18 +#define FT_MACRORECORDER 19 +#define CB_MACRORECORDER 20 //#define FL_FILEDLG 20 //#define CB_FILEDLG 21 diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index e4c6672789d6..4b7f571d503f 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -73,6 +73,7 @@ private: String aStrDateInfo; CheckBox aExperimentalCB; + CheckBox aMacroRecorderCB; DECL_LINK( TwoFigureHdl, NumericField* ); DECL_LINK( TwoFigureConfigHdl, NumericField* ); diff --git a/cui/source/options/optgdlg.src b/cui/source/options/optgdlg.src index 4319a95212af..75af383c6b77 100644 --- a/cui/source/options/optgdlg.src +++ b/cui/source/options/optgdlg.src @@ -192,6 +192,12 @@ TabPage OFA_TP_MISC Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "Enable experimental (unstable) features"; }; + CheckBox CB_MACRORECORDER + { + Pos = MAP_APPFONT( COL1, ROW15 ); + Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT ); + Text [ en-US ] = "Enable macro recording (limited)"; + }; }; //**************************************************************************** -- cgit v1.2.3