Hi All,

This is the first of multiple patches to address fdo#40656 (moving measurements to the LibreOffice General tab). In this patch:

1. Changed "Java" to "Advanced"
2. Shrunk Java stuff to about half of tab
3. Moved experimental options to Advanced tab below Java section

I didn't do any renaming (not sure what if anything needs renamed), just did a move and verified that the options work.

Please send me any comments about needed fixes, this is my most "advanced" change to date so I can be relatively sure it needs things changed. Thanks in advance everyone.

Best Regards,
Joel
>From d801a8fb3ed92db50073138b5f6a19c354113946 Mon Sep 17 00:00:00 2001
From: Joel Madero <jmadero....@gmail.com>
Date: Tue, 4 Sep 2012 07:03:03 -0700
Subject: [PATCH] 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
---
 cui/source/options/optgdlg.cxx |   29 ++++-------------------------
 cui/source/options/optgdlg.hrc |    3 ---
 cui/source/options/optgdlg.hxx |    4 ----
 cui/source/options/optgdlg.src |   18 ------------------
 cui/source/options/optjava.cxx |   33 ++++++++++++++++++++++++++++++++-
 cui/source/options/optjava.hrc |   10 ++++++++++
 cui/source/options/optjava.hxx |    4 ++++
 cui/source/options/optjava.src |   22 ++++++++++++++++++++--
 cui/source/options/treeopt.src |    2 +-
 9 files changed, 71 insertions(+), 54 deletions(-)

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5f7015b..3ff3b3c 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -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();
diff --git a/cui/source/options/optgdlg.hrc b/cui/source/options/optgdlg.hrc
index 5929380..f966338 100644
--- a/cui/source/options/optgdlg.hrc
+++ b/cui/source/options/optgdlg.hrc
@@ -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
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 0f1f659..a607212 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -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 *);
diff --git a/cui/source/options/optgdlg.src b/cui/source/options/optgdlg.src
index 4d0267d..61ea3ab 100644
--- a/cui/source/options/optgdlg.src
+++ b/cui/source/options/optgdlg.src
@@ -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";
-    };
 };
 
  //****************************************************************************
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index f1238d8..65bde82 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -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: */
+
+
diff --git a/cui/source/options/optjava.hrc b/cui/source/options/optjava.hrc
index 5945c6b..ca1ced8 100644
--- a/cui/source/options/optjava.hrc
+++ b/cui/source/options/optjava.hrc
@@ -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
 
diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx
index 714b472..2d0839c 100644
--- a/cui/source/options/optjava.hxx
+++ b/cui/source/options/optjava.hxx
@@ -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;
 
diff --git a/cui/source/options/optjava.src b/cui/source/options/optjava.src
index d8c17d4..baa449be 100644
--- a/cui/source/options/optjava.src
+++ b/cui/source/options/optjava.src
@@ -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: " ;
diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src
index 6a1644c..ad6273d 100644
--- a/cui/source/options/treeopt.src
+++ b/cui/source/options/treeopt.src
@@ -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 ; > ;
         };
     };
-- 
1.7.9.5

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to