Kaydet (Commit) 161c3f17 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more comphelper/configurationhelper clean up

üst 00717e85
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
#include <unotools/sharedunocomponent.hxx> #include <unotools/sharedunocomponent.hxx>
#include <comphelper/configurationhelper.hxx>
//......................................................................... //.........................................................................
namespace dbtools namespace dbtools
......
...@@ -138,7 +138,6 @@ struct LastPageSaver ...@@ -138,7 +138,6 @@ struct LastPageSaver
// class OfaTreeOptionsDialog -------------------------------------------- // class OfaTreeOptionsDialog --------------------------------------------
namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } } namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } }
namespace com { namespace sun { namespace star { namespace container { class XNameAccess; } } } }
namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } } namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
namespace com { namespace sun { namespace star { namespace awt { class XContainerWindowProvider; } } } } namespace com { namespace sun { namespace star { namespace awt { class XContainerWindowProvider; } } } }
...@@ -192,12 +191,8 @@ private: ...@@ -192,12 +191,8 @@ private:
com::sun::star::lang::XMultiServiceFactory >& xMFac, com::sun::star::lang::XMultiServiceFactory >& xMFac,
const com::sun::star::uno::Reference< const com::sun::star::uno::Reference<
com::sun::star::frame::XFrame >& xFrame ); com::sun::star::frame::XFrame >& xFrame );
Module* LoadModule( const rtl::OUString& rModuleIdentifier, Module* LoadModule( const rtl::OUString& rModuleIdentifier );
const com::sun::star::uno::Reference< void LoadNodes( Module* pModule,
com::sun::star::container::XNameAccess >& xRoot );
void LoadNodes( const com::sun::star::uno::Reference<
com::sun::star::container::XNameAccess >& xRoot,
Module* pModule,
const rtl::OUString& rExtensionId, const rtl::OUString& rExtensionId,
VectorOfNodes& rOutNodeList ); VectorOfNodes& rOutNodeList );
void InsertNodes( const VectorOfNodes& rNodeList ); void InsertNodes( const VectorOfNodes& rNodeList );
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include "optpath.hrc" #include "optpath.hrc"
#include <cuires.hrc> #include <cuires.hrc>
#include "helpid.hrc" #include "helpid.hrc"
#include <comphelper/configurationhelper.hxx> #include <comphelper/configuration.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <com/sun/star/uno/Exception.hpp> #include <com/sun/star/uno/Exception.hpp>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp> #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
#include <officecfg/Office/Common.hxx>
#include "optHeaderTabListbox.hxx" #include "optHeaderTabListbox.hxx"
#include <readonlyimage.hxx> #include <readonlyimage.hxx>
#include <vcl/help.hxx> #include <vcl/help.hxx>
...@@ -532,13 +533,11 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) ...@@ -532,13 +533,11 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder )
// Set configuration flag to notify file picker that it's necessary // Set configuration flag to notify file picker that it's necessary
// to take over the path provided. // to take over the path provided.
Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); boost::shared_ptr< comphelper::ConfigurationChanges > batch(
::comphelper::ConfigurationHelper::writeDirectKey(xFactory, comphelper::ConfigurationChanges::create());
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/")), officecfg::Office::Common::Path::Info::WorkPathChanged::set(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Path/Info")), true, batch);
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WorkPathChanged")), batch->commit();
::com::sun::star::uno::makeAny(true),
::comphelper::ConfigurationHelper::E_STANDARD);
} }
} }
} }
......
This diff is collapsed.
...@@ -68,10 +68,10 @@ ...@@ -68,10 +68,10 @@
#include <toolkit/unohlp.hxx> #include <toolkit/unohlp.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/componentcontext.hxx> #include <comphelper/componentcontext.hxx>
#include <comphelper/configurationhelper.hxx>
#include <unotools/configmgr.hxx> #include <unotools/configmgr.hxx>
#include <unotools/confignode.hxx> #include <unotools/confignode.hxx>
#include <unotools/moduleoptions.hxx> #include <unotools/moduleoptions.hxx>
#include <officecfg/Office/Recovery.hxx>
#include <osl/file.hxx> #include <osl/file.hxx>
#include <osl/process.h> #include <osl/process.h>
#include <rtl/uri.hxx> #include <rtl/uri.hxx>
...@@ -1117,47 +1117,14 @@ void Desktop::HandleBootstrapErrors( BootstrapError aBootstrapError ) ...@@ -1117,47 +1117,14 @@ void Desktop::HandleBootstrapErrors( BootstrapError aBootstrapError )
void Desktop::retrieveCrashReporterState() void Desktop::retrieveCrashReporterState()
{ {
static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/")); _bCrashReporterEnabled
static const ::rtl::OUString CFG_PATH_CRASHREPORTER(RTL_CONSTASCII_USTRINGPARAM("CrashReporter")); = officecfg::Office::Recovery::CrashReporter::Enabled::get();
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;
} }
sal_Bool Desktop::isUIOnSessionShutdownAllowed() sal_Bool Desktop::isUIOnSessionShutdownAllowed()
{ {
static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/")); return officecfg::Office::Recovery::SessionShutdown::DocumentStoreUIEnabled
static const ::rtl::OUString CFG_PATH_SESSION(RTL_CONSTASCII_USTRINGPARAM("SessionShutdown")); ::get();
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;
} }
//----------------------------------------------- //-----------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment