summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-10-29 14:39:07 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-29 14:39:07 +0100
commit2e16cac1bd6785e4b367b68f2fd514bb5d5f129f (patch)
tree111a7936d47e200af55b5b2af2e97127b18abab8 /sfx2
parentbb802db33e2c3fd897be993b82c3d4ee76bd8e61 (diff)
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.
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 0c54e4d0ff..3f9693beec 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;