[Libreoffice-commits] .: sfx2/source

Michael Meeks mmeeks at kemper.freedesktop.org
Fri Oct 29 06:42:34 PDT 2010


 sfx2/source/view/viewfrm.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 2e16cac1bd6785e4b367b68f2fd514bb5d5f129f
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Oct 29 14:39:07 2010 +0100

    disable macro recording unless in experimental mode
    
    Macro recording is extremely buggy, and generates un-readable or
    debuggable macros, keep it available, but only in experimental mode.

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 0c54e4d..3f9693b 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -49,6 +49,7 @@
 #include <svl/undo.hxx>
 #include <vcl/msgbox.hxx>
 #include <svtools/sfxecode.hxx>
+#include <svtools/miscopt.hxx>
 #include <svtools/ehdl.hxx>
 #include <tools/diagnose_ex.h>
 #include <com/sun/star/container/XIndexAccess.hpp>
@@ -3242,8 +3243,10 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
 
                 case SID_RECORDMACRO :
                 {
+                    SvtMiscOptions aMiscOptions;
                     const char* pName = GetObjectShell()->GetFactory().GetShortName();
-                    if (  strcmp(pName,"swriter") && strcmp(pName,"scalc") )
+                    if ( !aMiscOptions.IsExperimentalMode() ||
+                         ( strcmp(pName,"swriter") && strcmp(pName,"scalc") ) )
                     {
                         rSet.DisableItem( nWhich );
                         break;
@@ -3265,8 +3268,10 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
 
                 case SID_STOP_RECORDING :
                 {
+                    SvtMiscOptions aMiscOptions;
                     const char* pName = GetObjectShell()->GetFactory().GetShortName();
-                    if (  strcmp(pName,"swriter") && strcmp(pName,"scalc") )
+                    if ( !aMiscOptions.IsExperimentalMode() ||
+                         ( strcmp(pName,"swriter") && strcmp(pName,"scalc") ) )
                     {
                         rSet.DisableItem( nWhich );
                         break;


More information about the Libreoffice-commits mailing list