summaryrefslogtreecommitdiff
path: root/configmgr2/source/rootaccess.cxx
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2009-05-29 16:48:52 +0200
committersb <sb@openoffice.org>2009-05-29 16:48:52 +0200
commit7521363773979c9ab5c332fd548dbe057c216191 (patch)
tree303cac03cab77e078af909821fcc7413b55bf110 /configmgr2/source/rootaccess.cxx
parentb318e248d9185c76919bb6fcb39ef52e6e45439d (diff)
#i101955# work in progress of a configmgr reimplementation, continued (for now in an extra module "configmgr2")
Diffstat (limited to 'configmgr2/source/rootaccess.cxx')
-rw-r--r--configmgr2/source/rootaccess.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/configmgr2/source/rootaccess.cxx b/configmgr2/source/rootaccess.cxx
index ab159c8bbc79..040373ec4651 100644
--- a/configmgr2/source/rootaccess.cxx
+++ b/configmgr2/source/rootaccess.cxx
@@ -60,7 +60,8 @@ namespace css = com::sun::star;
RootAccess::RootAccess(
rtl::OUString const & path, rtl::OUString const & locale, bool update):
- path_(path), locale_(locale), update_(update) {}
+ path_(path), locale_(locale), update_(update)
+{}
rtl::OUString RootAccess::getLocale() const {
return locale_; //TODO: handle locale_ == ""
@@ -74,7 +75,7 @@ RootAccess::~RootAccess() {}
rtl::Reference< Node > RootAccess::getNode() {
if (!node_.is()) {
- node_ = Components::singleton().resolvePath(path_);
+ node_ = Components::singleton().resolvePath(path_, &name_);
if (!node_.is()) {
throw css::uno::RuntimeException(
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cannot find ")) +
@@ -89,6 +90,12 @@ rtl::Reference< RootAccess > RootAccess::getRoot() {
return this;
}
+rtl::OUString RootAccess::getName() throw (css::uno::RuntimeException) {
+ osl::MutexGuard g(lock);
+ getNode();
+ return name_;
+}
+
void RootAccess::addChangesListener(
css::uno::Reference< css::util::XChangesListener > const & aListener)
throw (css::uno::RuntimeException)
@@ -112,12 +119,14 @@ void RootAccess::commitChanges()
{
OSL_ASSERT(thisIs(IS_ANY|IS_UPDATE));
osl::MutexGuard g(lock);
+/*TOOD:
while (!modifiedChildren_.empty()) {
rtl::Reference< ChildAccess > child(modifiedChildren_.begin()->second);
modifiedChildren_.erase(modifiedChildren_.begin());
//TODO: commitChanges lost if this throws
child->commitChanges();
}
+*/
//TODO: write changes to disk
}