From b80d9acb3e0c3caf7d760b9ee3f5cfaf07bb32cd Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 19 Dec 2011 14:44:10 +0100 Subject: use officecfg/Office/Common.hxx directly --- vcl/generic/app/gensys.cxx | 63 ---------------------------------------------- 1 file changed, 63 deletions(-) (limited to 'vcl/generic') diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index f7d3f0a8b43a..ddde4a152fa6 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -181,67 +181,4 @@ rtl::OString SalGenericSystem::getFrameResName( SalExtStyle nStyle ) return aBuf.makeStringAndClear(); } -bool -SalGenericSystem::enableExperimentalFeatures() -{ - bool bEnable = true; - try - { - // get service provider - uno::Reference const xSMgr(vcl::unohelper::GetMultiServiceFactory()); - // create configuration hierachical access name - if (xSMgr.is()) - { - try - { - uno::Reference const xConfigProvider( - uno::Reference( - xSMgr->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider"))), - uno::UNO_QUERY)) - ; - if (xConfigProvider.is()) - { - uno::Sequence aArgs(1); - beans::PropertyValue aVal; - aVal.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); - aVal.Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/Misc")); - aArgs.getArray()[0] <<= aVal; - uno::Reference const xConfigAccess( - uno::Reference( - xConfigProvider->createInstanceWithArguments( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), - aArgs), - uno::UNO_QUERY)) - ; - if (xConfigAccess.is()) - { - try - { - sal_Bool bValue = sal_False; - uno::Any const aAny(xConfigAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExperimentalMode")))); - if (aAny >>= bValue) - bEnable = bValue; - } - catch (container::NoSuchElementException const&) - { - } - catch (lang::WrappedTargetException const&) - { - } - } - } - } - catch (uno::Exception const&) - { - } - } - } - catch (lang::WrappedTargetException const&) - { - } - - return bEnable; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit