diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-17 11:51:41 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:37 +0100 |
commit | 54d820a7815af03a248c1aa424fae9bf9a4881f4 (patch) | |
tree | 39fbdc1950ed87d86c0cf936b26741927b591daf /sfx2/source/view | |
parent | e9c2d5b26b1e1b52bdf87192a76314b7362fa80c (diff) |
add experimental option for sidebar to 'Advanced' pane.
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 4faf84fae3e9..801b08c2199d 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -92,6 +92,10 @@ #include <svtools/svtresid.hxx> #include <framework/framelistanalyzer.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/configuration.hxx> +#include "officecfg/Office/Common.hxx" + #include <boost/optional.hpp> using namespace ::com::sun::star; @@ -3391,4 +3395,24 @@ void SfxViewFrame::RemoveInfoBar( const OUString& sId ) } } +bool SfxViewFrame::IsSidebarEnabled() +{ + static bool bInitialized = false; + static bool bEnabled = false; + + // read the setting once at start, and that's what we + // stick with for now. + if (!bInitialized) + { + bInitialized = true; + try { + bEnabled = officecfg::Office::Common::Misc::ExperimentalSidebar::get( + comphelper::getProcessComponentContext()); + } catch (const uno::Exception &e) { + SAL_WARN("sfx2.view", "don't have experimental sidebar option installed"); + } + } + return bEnabled; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |