[Libreoffice-commits] core.git: sfx2/source

Caolán McNamara caolanm at redhat.com
Thu May 30 09:28:41 PDT 2013


 sfx2/source/dialog/taskpane.cxx |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit dcb11907aee648fe2e382cdc16137d3fa469b530
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 30 17:27:59 2013 +0100

    show experimental tab-layout only if in experimental mode
    
    Change-Id: I10cb366abfeedf50b4c3be21968997a260e020ea

diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 894dc54..5a6b593 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -44,6 +44,7 @@
 #include <comphelper/types.hxx>
 #include <comphelper/processfactory.hxx>
 #include <tools/diagnose_ex.h>
+#include <svtools/miscopt.hxx>
 #include <svtools/toolpanel/toolpaneldeck.hxx>
 #include <svtools/toolpanel/tablayouter.hxx>
 #include <svtools/toolpanel/drawerlayouter.hxx>
@@ -1237,14 +1238,17 @@ namespace sfx2
         }
         pMenu->InsertSeparator();
 
-    #if OSL_DEBUG_LEVEL > 0
-        pMenu->InsertItem( MID_LAYOUT_TABS, OUString("Tab-Layout (exp.)"), MIB_CHECKABLE );
-        pMenu->CheckItem( MID_LAYOUT_TABS, impl_getLayout() != LAYOUT_DRAWERS );
-        pMenu->InsertItem( MID_LAYOUT_DRAWERS, OUString("Drawer-Layout"), MIB_CHECKABLE );
-        pMenu->CheckItem( MID_LAYOUT_DRAWERS, impl_getLayout() == LAYOUT_DRAWERS );
+#if OSL_DEBUG_LEVEL > 0
+        if (SvtMiscOptions().IsExperimentalMode())
+        {
+            pMenu->InsertItem( MID_LAYOUT_TABS, OUString("Tab-Layout (exp.)"), MIB_CHECKABLE );
+            pMenu->CheckItem( MID_LAYOUT_TABS, impl_getLayout() != LAYOUT_DRAWERS );
+            pMenu->InsertItem( MID_LAYOUT_DRAWERS, OUString("Drawer-Layout"), MIB_CHECKABLE );
+            pMenu->CheckItem( MID_LAYOUT_DRAWERS, impl_getLayout() == LAYOUT_DRAWERS );
 
-        pMenu->InsertSeparator();
-    #endif
+            pMenu->InsertSeparator();
+        }
+#endif
 
         // Add entry for docking or un-docking the tool panel.
         if ( m_rDockingWindow.IsFloatingMode() )


More information about the Libreoffice-commits mailing list