diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-14 14:19:07 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-14 14:19:07 +0100 |
commit | 161c3f179f71eda2a32dabaf68ff6fb3ba487062 (patch) | |
tree | 2920a3b4fc55e65512b198aec0c5fbdac1a13619 /desktop | |
parent | 00717e8550ac41069a01c7ef7c11fbe40d75e91d (diff) |
Some more comphelper/configurationhelper clean up
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index c6cb535f6707..a3dabd43fc60 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -68,10 +68,10 @@ #include <toolkit/unohlp.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/componentcontext.hxx> -#include <comphelper/configurationhelper.hxx> #include <unotools/configmgr.hxx> #include <unotools/confignode.hxx> #include <unotools/moduleoptions.hxx> +#include <officecfg/Office/Recovery.hxx> #include <osl/file.hxx> #include <osl/process.h> #include <rtl/uri.hxx> @@ -1117,47 +1117,14 @@ void Desktop::HandleBootstrapErrors( BootstrapError aBootstrapError ) void Desktop::retrieveCrashReporterState() { - static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/")); - static const ::rtl::OUString CFG_PATH_CRASHREPORTER(RTL_CONSTASCII_USTRINGPARAM("CrashReporter")); - static const ::rtl::OUString CFG_ENTRY_ENABLED(RTL_CONSTASCII_USTRINGPARAM("Enabled")); - - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); - - sal_Bool bEnabled(sal_False); - if ( xSMGR.is() ) - { - css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey( - xSMGR, - CFG_PACKAGE_RECOVERY, - CFG_PATH_CRASHREPORTER, - CFG_ENTRY_ENABLED, - ::comphelper::ConfigurationHelper::E_READONLY); - aVal >>= bEnabled; - } - _bCrashReporterEnabled = bEnabled; + _bCrashReporterEnabled + = officecfg::Office::Recovery::CrashReporter::Enabled::get(); } sal_Bool Desktop::isUIOnSessionShutdownAllowed() { - static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/")); - static const ::rtl::OUString CFG_PATH_SESSION(RTL_CONSTASCII_USTRINGPARAM("SessionShutdown")); - static const ::rtl::OUString CFG_ENTRY_UIENABLED(RTL_CONSTASCII_USTRINGPARAM("DocumentStoreUIEnabled")); - - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); - - sal_Bool bResult = sal_False; - if ( xSMGR.is() ) - { - css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey( - xSMGR, - CFG_PACKAGE_RECOVERY, - CFG_PATH_SESSION, - CFG_ENTRY_UIENABLED, - ::comphelper::ConfigurationHelper::E_READONLY); - aVal >>= bResult; - } - - return bResult; + return officecfg::Office::Recovery::SessionShutdown::DocumentStoreUIEnabled + ::get(); } //----------------------------------------------- |