[Libreoffice-commits] .: Branch 'feature/template-dialog' - sfx2/sdi sfx2/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Tue Jul 3 05:53:38 PDT 2012


 sfx2/sdi/appslots.sdi        |    1 +
 sfx2/source/appl/appserv.cxx |   12 ++++++++++++
 2 files changed, 13 insertions(+)

New commits:
commit 9c47fae01bac6374c24cb8e3653becbfc773e0e7
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Tue Jul 3 14:54:18 2012 +0200

    Template dialog: show the menu entry when enabling experimental features
    
    Change-Id: Idfd57169d40e9bb60d72559f3ca09f7d34cf60df

diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 11d7e3a..0d7c7a0 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 ad6012f..5e83a9f 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -53,6 +53,7 @@
 #include "comphelper/configurationhelper.hxx"
 
 #include <svtools/addresstemplate.hxx>
+#include <svtools/miscopt.hxx>
 #include <svl/visitem.hxx>
 #include <unotools/intlwrapper.hxx>
 
@@ -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;
             }


More information about the Libreoffice-commits mailing list