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

Some more comphelper/configurationhelper clean up

üst 00717e85
......@@ -53,7 +53,6 @@
#include <tools/diagnose_ex.h>
#include <unotools/sharedunocomponent.hxx>
#include <comphelper/configurationhelper.hxx>
//.........................................................................
namespace dbtools
......
......@@ -138,7 +138,6 @@ struct LastPageSaver
// class OfaTreeOptionsDialog --------------------------------------------
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 awt { class XContainerWindowProvider; } } } }
......@@ -192,12 +191,8 @@ private:
com::sun::star::lang::XMultiServiceFactory >& xMFac,
const com::sun::star::uno::Reference<
com::sun::star::frame::XFrame >& xFrame );
Module* LoadModule( const rtl::OUString& rModuleIdentifier,
const com::sun::star::uno::Reference<
com::sun::star::container::XNameAccess >& xRoot );
void LoadNodes( const com::sun::star::uno::Reference<
com::sun::star::container::XNameAccess >& xRoot,
Module* pModule,
Module* LoadModule( const rtl::OUString& rModuleIdentifier );
void LoadNodes( Module* pModule,
const rtl::OUString& rExtensionId,
VectorOfNodes& rOutNodeList );
void InsertNodes( const VectorOfNodes& rNodeList );
......
......@@ -50,7 +50,7 @@
#include "optpath.hrc"
#include <cuires.hrc>
#include "helpid.hrc"
#include <comphelper/configurationhelper.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <com/sun/star/uno/Exception.hpp>
......@@ -59,6 +59,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
#include <officecfg/Office/Common.hxx>
#include "optHeaderTabListbox.hxx"
#include <readonlyimage.hxx>
#include <vcl/help.hxx>
......@@ -532,13 +533,11 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder )
// Set configuration flag to notify file picker that it's necessary
// to take over the path provided.
Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
::comphelper::ConfigurationHelper::writeDirectKey(xFactory,
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/")),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Path/Info")),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WorkPathChanged")),
::com::sun::star::uno::makeAny(true),
::comphelper::ConfigurationHelper::E_STANDARD);
boost::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Path::Info::WorkPathChanged::set(
true, batch);
batch->commit();
}
}
}
......
This diff is collapsed.
......@@ -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();
}
//-----------------------------------------------
......
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