Moving experimental section to java, changing section name

First of a few patches to move measurements to the general section in the
LibreOffice main tree. This patch moves experimental section to "Java"
and then changes the name "Java" to "Advanced". The space which was cleared
by moving experimental section will be used for measurements in the future.

	modified:   cui/source/options/optgdlg.cxx
	modified:   cui/source/options/optgdlg.hrc
	modified:   cui/source/options/optgdlg.hxx
	modified:   cui/source/options/optgdlg.src
	modified:   cui/source/options/optjava.cxx
	modified:   cui/source/options/optjava.hrc
	modified:   cui/source/options/optjava.hxx
	modified:   cui/source/options/optjava.src
	modified:   cui/source/options/treeopt.src

Change-Id: I20073296ce81aace4b041ef5cb27e4313637a58d
This commit is contained in:
Joel Madero 2012-09-04 07:03:03 -07:00 committed by Caolán McNamara
parent 063966ee0e
commit 818d269971
9 changed files with 71 additions and 54 deletions

View file

@ -212,10 +212,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
aTwoFigureFL ( this, CUI_RES( FL_TWOFIGURE ) ),
aInterpretFT ( this, CUI_RES( FT_INTERPRET ) ),
aYearValueField ( this, CUI_RES( NF_YEARVALUE ) ),
aToYearFT ( this, CUI_RES( FT_TOYEAR ) ),
aExperimentalFL ( this, CUI_RES( FL_EXPERIMENTAL ) ),
aExperimentalCB ( this, CUI_RES( CB_EXPERIMENTAL ) ),
aMacroRecorderCB ( this, CUI_RES( CB_MACRORECORDER ) )
aToYearFT ( this, CUI_RES( FT_TOYEAR ) )
{
FreeResource();
@ -245,7 +242,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
Window* pWins[] =
{
&aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB,
&aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalFL, &aExperimentalCB, &aMacroRecorderCB
&aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT
};
Window** pCurrent = pWins;
const sal_Int32 nCount = SAL_N_ELEMENTS( pWins );
@ -266,7 +263,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
Window* pWins[] =
{
&aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB,
&aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalFL, &aExperimentalCB, &aMacroRecorderCB
&aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT
};
Window** pCurrent = pWins;
const sal_Int32 nCount = SAL_N_ELEMENTS( pWins );
@ -292,7 +289,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
Window* pWins[] =
{
&aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, &aTwoFigureFL,
&aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalFL, &aExperimentalCB, &aMacroRecorderCB
&aInterpretFT, &aYearValueField, &aToYearFT
};
Window** pCurrent = pWins;
const sal_Int32 nCount = SAL_N_ELEMENTS( pWins );
@ -403,20 +400,6 @@ sal_Bool OfaMiscTabPage::FillItemSet( SfxItemSet& rSet )
bModified = sal_True;
}
if ( aExperimentalCB.IsChecked() != aExperimentalCB.GetSavedValue() )
{
SvtMiscOptions aMiscOpt;
aMiscOpt.SetExperimentalMode( aExperimentalCB.IsChecked() );
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();
@ -450,10 +433,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet )
aPrintDlgCB.SaveValue();
aSaveAlwaysCB.Check( aMiscOpt.IsSaveAlwaysAllowed() );
aSaveAlwaysCB.SaveValue();
aExperimentalCB.Check( aMiscOpt.IsExperimentalMode() );
aExperimentalCB.SaveValue();
aMacroRecorderCB.Check( aMiscOpt.IsMacroRecorderMode() );
aMacroRecorderCB.SaveValue();
aODMADlgCB.Check( aMiscOpt.TryODMADialog() );
aODMADlgCB.SaveValue();

View file

@ -94,9 +94,6 @@
#define CB_EXTHELP 12
#define CB_HELPAGENT 13
#define PB_HELPAGENT_RESET 14
#define FL_EXPERIMENTAL 15
#define CB_EXPERIMENTAL 16
#define CB_MACRORECORDER 17
#define FL_TWOFIGURE 40
#define FT_INTERPRET 41

View file

@ -70,10 +70,6 @@ private:
String aStrDateInfo;
FixedLine aExperimentalFL;
CheckBox aExperimentalCB;
CheckBox aMacroRecorderCB;
DECL_LINK( TwoFigureHdl, NumericField* );
DECL_LINK( TwoFigureConfigHdl, NumericField* );
DECL_LINK(HelpCheckHdl_Impl, void *);

View file

@ -160,24 +160,6 @@ TabPage OFA_TP_MISC
Size = MAP_APPFONT( WHOLE_WIDTH - COL6, RSC_CD_FIXEDTEXT_HEIGHT );
Text [ en-US ] = "and " ;
};
FixedLine FL_EXPERIMENTAL
{
Pos = MAP_APPFONT( COL0, ROW14 );
Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "Optional (unstable) features" ;
};
CheckBox CB_EXPERIMENTAL
{
Pos = MAP_APPFONT( COL1, ROW15 );
Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT );
Text [ en-US ] = "Enable experimental features";
};
CheckBox CB_MACRORECORDER
{
Pos = MAP_APPFONT( COL1, ROW16 );
Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT );
Text [ en-US ] = "Enable macro recording";
};
};
//****************************************************************************

View file

@ -29,6 +29,8 @@
#include "optjava.hxx"
#include <dialmgr.hxx>
#include <svtools/miscopt.hxx>
#include "optjava.hrc"
#include <cuires.hrc>
#include "helpid.hrc"
@ -115,7 +117,11 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet
m_sAccessibilityText( CUI_RES( STR_ACCESSIBILITY ) ),
m_sAddDialogText ( CUI_RES( STR_ADDDLGTEXT ) ),
xDialogListener ( new ::svt::DialogClosedListener() )
xDialogListener ( new ::svt::DialogClosedListener() ),
m_aExperimental ( this, CUI_RES( FL_EXPERIMENTAL ) ),
m_aExperimentalCB ( this, CUI_RES( CB_EXPERIMENTAL ) ),
m_aMacroCB ( this, CUI_RES( CB_MACRO ) )
{
m_aJavaEnableCB.SetClickHdl( LINK( this, SvxJavaOptionsPage, EnableHdl_Impl ) );
@ -614,6 +620,22 @@ sal_Bool SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ )
bModified = sal_True;
}
if ( m_aExperimentalCB.IsChecked() != m_aExperimentalCB.GetSavedValue() )
{
SvtMiscOptions aMiscOpt;
aMiscOpt.SetExperimentalMode( m_aExperimentalCB.IsChecked() );
bModified = sal_True;
}
if ( m_aMacroCB.IsChecked() != m_aMacroCB.GetSavedValue() )
{
SvtMiscOptions aMiscOpt;
aMiscOpt.SetMacroRecorderMode( m_aMacroCB.IsChecked() );
bModified = sal_True;
}
if ( m_pPathDlg )
{
::rtl::OUString sPath( m_pPathDlg->GetClassPath() );
@ -687,6 +709,8 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet& /*rSet*/ )
ClearJavaInfo();
ClearJavaList();
SvtMiscOptions aMiscOpt;
sal_Bool bEnabled = sal_False;
javaFrameworkError eErr = jfw_getEnabled( &bEnabled );
if ( eErr != JFW_E_NONE )
@ -694,6 +718,11 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet& /*rSet*/ )
m_aJavaEnableCB.Check( bEnabled );
EnableHdl_Impl( &m_aJavaEnableCB );
m_aExperimentalCB.Check( aMiscOpt.IsExperimentalMode() );
m_aExperimentalCB.SaveValue();
m_aMacroCB.Check( aMiscOpt.IsMacroRecorderMode() );
m_aMacroCB.SaveValue();
m_aResetTimer.Start();
}
@ -1071,3 +1100,5 @@ void SvxJavaClassPathDlg::SetClassPath( const String& _rPath )
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -28,6 +28,10 @@
#define LB_JAVA 13
#define FT_JAVA_PATH 14
#define FL_EXPERIMENTAL 15
#define CB_EXPERIMENTAL 16
#define CB_MACRO 17
#define PB_ADD 20
#define PB_PARAMETER 21
#define PB_CLASSPATH 22
@ -70,5 +74,11 @@
#define PB_PATH_ESC 32
#define PB_PATH_HLP 33
#endif // #ifndef _SVX_OPTJAVA_HRC

View file

@ -74,6 +74,10 @@ private:
String m_sAddDialogText;
Timer m_aResetTimer;
FixedLine m_aExperimental;
CheckBox m_aExperimentalCB;
CheckBox m_aMacroCB;
::std::vector< JavaInfo* >
m_aAddedInfos;

View file

@ -62,13 +62,13 @@ TabPage RID_SVXPAGE_OPTIONS_JAVA
Control LB_JAVA
{
Pos = MAP_APPFONT ( 21 , 38 ) ;
Size = MAP_APPFONT ( 177 , 130 ) ;
Size = MAP_APPFONT ( 177 , 60 ) ;
Border = TRUE ;
TabStop = TRUE ;
};
FixedText FT_JAVA_PATH
{
Pos = MAP_APPFONT ( 21 , 171 ) ;
Pos = MAP_APPFONT ( 21 , 100 ) ;
Size = MAP_APPFONT ( 233 , 8 ) ;
NoLabel = TRUE ;
};
@ -93,6 +93,24 @@ TabPage RID_SVXPAGE_OPTIONS_JAVA
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Class Path..." ;
};
FixedLine FL_EXPERIMENTAL
{
Pos = MAP_APPFONT ( 6 , 120 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Optional (unstable) options" ;
};
CheckBox CB_EXPERIMENTAL
{
Pos = MAP_APPFONT( 12, 130 );
Size = MAP_APPFONT ( 242 , 10 );
Text [ en-US ] = "Enable experimental features";
};
CheckBox CB_MACRO
{
Pos = MAP_APPFONT( 12, 140 );
Size = MAP_APPFONT ( 242 , 10 );
Text [ en-US ] = "Enable macro recording";
};
String STR_INSTALLED_IN
{
Text [ en-US ] = "Location: " ;

View file

@ -106,7 +106,7 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
< "Security" ; RID_SVXPAGE_INET_SECURITY ; > ;
< "Appearance" ; RID_SVXPAGE_COLORCONFIG ; > ;
< "Accessibility" ; RID_SVXPAGE_ACCESSIBILITYCONFIG ; > ;
< "Java" ; RID_SVXPAGE_OPTIONS_JAVA ; > ;
< "Advanced" ; RID_SVXPAGE_OPTIONS_JAVA ; > ;
< "Online Update" ; RID_SVXPAGE_ONLINEUPDATE ; > ;
};
};