diff options
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/confignode.hxx | 8 | ||||
-rw-r--r-- | unotools/source/config/confignode.cxx | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/unotools/inc/unotools/confignode.hxx b/unotools/inc/unotools/confignode.hxx index a1271b1eeed1..33ee99f17138 100644 --- a/unotools/inc/unotools/confignode.hxx +++ b/unotools/inc/unotools/confignode.hxx @@ -283,6 +283,14 @@ namespace utl const bool i_bUpdatable ); + /** creates a configuration tree for the given path in the given mode + */ + OConfigurationTreeRoot( + const ::comphelper::ComponentContext& i_rContext, + const ::rtl::OUString& i_rNodePath, + const bool i_bUpdatable + ); + /// copy ctor OConfigurationTreeRoot(const OConfigurationTreeRoot& _rSource) :OConfigurationNode(_rSource), m_xCommitter(_rSource.m_xCommitter) { } diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index fc4e20e6f600..4927f82023eb 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -571,6 +571,19 @@ namespace utl } //------------------------------------------------------------------------ + OConfigurationTreeRoot::OConfigurationTreeRoot( const ::comphelper::ComponentContext& i_rContext, const ::rtl::OUString& i_rNodePath, const bool i_bUpdatable ) + :OConfigurationNode( lcl_createConfigurationRoot( lcl_getConfigProvider( i_rContext.getLegacyServiceFactory() ), + i_rNodePath, i_bUpdatable, -1, false ).get() ) + ,m_xCommitter() + { + if ( i_bUpdatable ) + { + m_xCommitter.set( getUNONode(), UNO_QUERY ); + OSL_ENSURE( m_xCommitter.is(), "OConfigurationTreeRoot::OConfigurationTreeRoot: could not create an updatable node!" ); + } + } + + //------------------------------------------------------------------------ void OConfigurationTreeRoot::clear() throw() { OConfigurationNode::clear(); |