From 9c47fae01bac6374c24cb8e3653becbfc773e0e7 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Tue, 3 Jul 2012 14:54:18 +0200 Subject: Template dialog: show the menu entry when enabling experimental features Change-Id: Idfd57169d40e9bb60d72559f3ca09f7d34cf60df --- sfx2/sdi/appslots.sdi | 1 + sfx2/source/appl/appserv.cxx | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'sfx2') diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 11d7e3aefa93..0d7c7a0c72c3 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -130,6 +130,7 @@ interface Application SID_TEMPLATE_MANAGER // ole(no) api(final/play/rec) [ ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; ] SID_ORGANIZER // ole(no) api(final/play/rec) [ diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index ad6012ff55d8..5e83a9f4ecf9 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -53,6 +53,7 @@ #include "comphelper/configurationhelper.hxx" #include +#include #include #include @@ -778,6 +779,17 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) rSet.DisableItem(SID_SHOW_IME_STATUS_WINDOW); break; + case SID_TEMPLATE_MANAGER: + { + SvtMiscOptions aMiscOptions; + if ( !aMiscOptions.IsExperimentalMode() ) + { + rSet.DisableItem( nWhich ); + rSet.Put( SfxVisibilityItem( nWhich, sal_False ) ); + } + } + break; + default: break; } -- cgit