23#include <com/sun/star/configuration/theDefaultProvider.hpp>
24#include <com/sun/star/beans/PropertyValue.hpp>
25#include <com/sun/star/util/XChangesBatch.hpp>
46 , m_sRoot (
std::move( sRoot ))
47 , m_eMode ( E_CLOSED )
106 css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider = css::configuration::theDefaultProvider::get(
m_xContext);
107 css::beans::PropertyValue aParam;
108 aParam.Name =
"nodepath";
111 css::uno::Sequence< css::uno::Any > lParams{ css::uno::Any(aParam) };
122 catch(
const css::uno::Exception&)
148 css::uno::Reference< css::util::XChangesBatch > xFlush(
m_xConfig, css::uno::UNO_QUERY);
150 xFlush->commitChanges();
void open(EOpenMode eMode)
open the configuration access in the specified mode @descr We set the opened configuration access as ...
css::uno::Reference< css::uno::XInterface > m_xConfig
hold an opened configuration alive
EOpenMode m_eMode
represent the current open mode
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to the uno service manager It's necessary to instantiate own needed services.
EOpenMode getMode() const
return the internal mode of this instance @descr May be the outside user need any information about s...
void close()
close the internal opened configuration access and flush all changes @descr It checks,...
~ConfigAccess()
last chance to close an open configuration access point @descr In case our user forgot to close this ...
OUString m_sRoot
knows the root of the opened config access point
const css::uno::Reference< css::uno::XInterface > & cfg()
provides an access to the internal wrapped configuration access @descr It's not allowed to safe this ...
EOpenMode
represent the possible modes of the internal wrapped configuration access
@ E_READONLY
config access is open for reading only
@ E_CLOSED
config isn't used yet
@ E_READWRITE
config access is open for reading/writing data
ConfigAccess(css::uno::Reference< css::uno::XComponentContext > xContext, OUString sRoot)
open the configuration of this job @descr We open the configuration of this job only.
#define TOOLS_INFO_EXCEPTION(area, stream)
css::uno::Reference< css::uno::XComponentContext > m_xContext
constexpr OUStringLiteral SERVICENAME_CFGREADACCESS
constexpr OUStringLiteral SERVICENAME_CFGUPDATEACCESS