[Libreoffice-commits] .: 3 commits - cui/source officecfg/registry sc/source sfx2/source svtools/inc svtools/source

Fridrich Strba fridrich at kemper.freedesktop.org
Fri Jun 15 06:13:37 PDT 2012


 cui/source/options/optgdlg.cxx                             |   18 +++++-
 cui/source/options/optgdlg.hrc                             |    3 +
 cui/source/options/optgdlg.hxx                             |    1 
 cui/source/options/optgdlg.src                             |    6 ++
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 +++
 sc/source/ui/src/scstring.src                              |    4 -
 sc/source/ui/view/gridwin.cxx                              |    2 
 sfx2/source/view/viewfrm.cxx                               |    4 -
 svtools/inc/svtools/miscopt.hxx                            |    3 +
 svtools/source/config/miscopt.cxx                          |   34 ++++++++++++-
 10 files changed, 75 insertions(+), 10 deletions(-)

New commits:
commit 6799962a4be3e704c82869b4c7415adebcad6a02
Author: Cor Nouws <oolst at nouenoff.nl>
Date:   Sun Jun 10 22:01:29 2012 +0200

    Remove unused argument
    
    Change-Id: Id646516a71800fbc0fe82595b51f4468f12954d3

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 40e8f38..12168f8 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1228,7 +1228,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
         long nMaxText = 0;
 
         //  default entries
-        static const sal_uInt16 nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_FILTER_EMPTY, SCSTR_FILTER_NOTEMPTY };
+        static const sal_uInt16 nDefIDs[] = { SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_FILTER_EMPTY, SCSTR_FILTER_NOTEMPTY };
         const size_t nDefCount = SAL_N_ELEMENTS(nDefIDs);
         for (i=0; i<nDefCount; i++)
         {
commit 16e2c3b9075e050e80d2c628b34a0245e970bfeb
Author: Cor Nouws <oolst at nouenoff.nl>
Date:   Sun Jun 10 22:07:41 2012 +0200

    Adding an accelerator in Calc autofilter
    
    Change-Id: If9a4afb5ec18768f469267372d08328e80abddf9

diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index 84b20eb..50335dc 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -178,7 +178,7 @@ String SCSTR_ALL
 
 String SCSTR_STDFILTER
 {
-    Text [ en-US ] = "Standard Filter..." ;
+    Text [ en-US ] = "~Standard Filter..." ;
 };
 
 String SCSTR_TOP10FILTER
@@ -588,7 +588,7 @@ String STR_REPLCELLSWARN
 
 String SCSTR_ALLFILTER
 {
-    Text [ en-US ] = "All";
+    Text [ en-US ] = "~All";
 };
 
 String STR_ACC_CSVRULER_NAME
commit 5ae11320a26a6356dfadeb812e0d6baf5bdc951c
Author: Cor Nouws <oolst at nouenoff.nl>
Date:   Sun Jun 10 23:00:36 2012 +0200

    Give Macro recorder separate option, apart from Experimental features
    
    Change-Id: I9dbf5d510ebaff8448a152d75a006a183303bd81

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 40fd21e..99e49f6 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 d870e29..2ccc503 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 e4c6672..4b7f571 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 4319a95..75af383 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)";
+    };
 };
 
  //****************************************************************************
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 00036cd..a0d672b 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -6647,6 +6647,16 @@
         </info>
         <value>false</value>
       </prop>
+      <prop
+          oor:name="MacroRecorderMode" oor:type="xs:boolean"
+          oor:nillable="false">
+        <info>
+          <author>cornouws</author>
+          <desc>Determins if the limited, and awkward code producing
+          macro recorder should be enabled in the user interface.</desc>
+        </info>
+        <value>false</value>
+      </prop>
       <prop oor:name="SymbolSet" oor:type="xs:short" oor:nillable="false">
         <!-- UIHints: Tools  Options General View -->
         <info>
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1f920bc..7602254 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3003,7 +3003,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
                 {
                     SvtMiscOptions aMiscOptions;
                     const char* pName = GetObjectShell()->GetFactory().GetShortName();
-                    if ( !aMiscOptions.IsExperimentalMode() ||
+                    if ( !aMiscOptions.IsMacroRecorderMode() ||
                          ( strcmp(pName,"swriter") && strcmp(pName,"scalc") ) )
                     {
                         rSet.DisableItem( nWhich );
@@ -3029,7 +3029,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
                 {
                     SvtMiscOptions aMiscOptions;
                     const char* pName = GetObjectShell()->GetFactory().GetShortName();
-                    if ( !aMiscOptions.IsExperimentalMode() ||
+                    if ( !aMiscOptions.IsMacroRecorderMode() ||
                          ( strcmp(pName,"swriter") && strcmp(pName,"scalc") ) )
                     {
                         rSet.DisableItem( nWhich );
diff --git a/svtools/inc/svtools/miscopt.hxx b/svtools/inc/svtools/miscopt.hxx
index 66eb0c1..2f89993 100644
--- a/svtools/inc/svtools/miscopt.hxx
+++ b/svtools/inc/svtools/miscopt.hxx
@@ -121,6 +121,9 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options
         void        SetExperimentalMode( sal_Bool bSet );
         sal_Bool    IsExperimentalMode() const;
 
+        void        SetMacroRecorderMode( sal_Bool bSet );
+        sal_Bool    IsMacroRecorderMode() const;
+
     private:
 
         /*-****************************************************************************************************//**
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 51d2ee7..74b9b61 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -74,6 +74,8 @@ using namespace ::com::sun::star;
 #define PROPERTYHANDLE_ALWAYSALLOWSAVE      9
 #define PROPERTYNAME_EXPERIMENTALMODE       ASCII_STR("ExperimentalMode")
 #define PROPERTYHANDLE_EXPERIMENTALMODE     10
+#define PROPERTYNAME_MACRORECORDERMODE       ASCII_STR("MacroRecorderMode")
+#define PROPERTYHANDLE_MACRORECORDERMODE    11
 
 #define VCL_TOOLBOX_STYLE_FLAT              ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx>
 
@@ -99,6 +101,7 @@ class SvtMiscOptions_Impl : public ConfigItem
     sal_Bool    m_bDisableUICustomization;
     sal_Bool    m_bAlwaysAllowSave;
     sal_Bool    m_bExperimentalMode;
+    sal_Bool    m_bMacroRecorderMode;
 
     public:
 
@@ -179,6 +182,12 @@ class SvtMiscOptions_Impl : public ConfigItem
         inline sal_Bool IsExperimentalMode() const
         { return m_bExperimentalMode; }
 
+        inline void SetMacroRecorderMode( sal_Bool bSet )
+        { m_bMacroRecorderMode = bSet; SetModified(); }
+
+        inline sal_Bool IsMacroRecorderMode() const
+        { return m_bMacroRecorderMode; }
+
         inline sal_Bool IsPluginsEnabled() const
         { return m_bPluginsEnabled; }
 
@@ -287,6 +296,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
     , m_bIsShowLinkWarningDialogRO( sal_False )
     , m_bAlwaysAllowSave( sal_False )
     , m_bExperimentalMode( sal_False )
+    , m_bMacroRecorderMode( sal_False )
 
 {
     // Use our static list of configuration keys to get his values.
@@ -409,6 +419,12 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
                     OSL_FAIL("Wrong type of \"Misc\\ExperimentalMode\"!" );
                 break;
             }
+            case PROPERTYHANDLE_MACRORECORDERMODE :
+            {
+                if( !(seqValues[nProperty] >>= m_bMacroRecorderMode) )
+                    OSL_FAIL("Wrong type of \"Misc\\MacroRecorderMode\"!" );
+                break;
+            }
         }
     }
 
@@ -700,6 +716,11 @@ void SvtMiscOptions_Impl::Commit()
                 seqValues[nProperty] <<= m_bExperimentalMode;
                 break;
             }
+            case PROPERTYHANDLE_MACRORECORDERMODE :
+            {
+                seqValues[nProperty] <<= m_bMacroRecorderMode;
+                break;
+            }
         }
     }
     // Set properties in configuration.
@@ -724,7 +745,8 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
         PROPERTYNAME_SHOWLINKWARNINGDIALOG,
         PROPERTYNAME_DISABLEUICUSTOMIZATION,
         PROPERTYNAME_ALWAYSALLOWSAVE,
-        PROPERTYNAME_EXPERIMENTALMODE
+        PROPERTYNAME_EXPERIMENTALMODE,
+        PROPERTYNAME_MACRORECORDERMODE
     };
 
     // Initialize return sequence with these list ...
@@ -915,6 +937,16 @@ sal_Bool SvtMiscOptions::IsExperimentalMode() const
     return m_pDataContainer->IsExperimentalMode();
 }
 
+void SvtMiscOptions::SetMacroRecorderMode( sal_Bool bSet )
+{
+    m_pDataContainer->SetMacroRecorderMode( bSet );
+}
+
+sal_Bool SvtMiscOptions::IsMacroRecorderMode() const
+{
+    return m_pDataContainer->IsMacroRecorderMode();
+}
+
 namespace
 {
     class theSvtMiscOptionsMutex :


More information about the Libreoffice-commits mailing list