summaryrefslogtreecommitdiff
path: root/configmgr/source/childaccess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr/source/childaccess.cxx')
-rw-r--r--configmgr/source/childaccess.cxx38
1 files changed, 11 insertions, 27 deletions
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index 87def984be17..abf3795f1d55 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <cassert>
+#include <utility>
#include <vector>
#include <com/sun/star/container/XChild.hpp>
@@ -55,17 +56,11 @@
namespace configmgr {
-css::uno::Sequence< sal_Int8 > const & ChildAccess::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit theChildAccessUnoTunnelId;
- return theChildAccessUnoTunnelId.getSeq();
-}
-
ChildAccess::ChildAccess(
Components & components, rtl::Reference< RootAccess > const & root,
- rtl::Reference< Access > const & parent, OUString const & name,
+ rtl::Reference< Access > const & parent, OUString name,
rtl::Reference< Node > const & node):
- Access(components), root_(root), parent_(parent), name_(name), node_(node),
+ Access(components), root_(root), parent_(parent), name_(std::move(name)), node_(node),
inTransaction_(false),
lock_( lock() )
{
@@ -112,7 +107,7 @@ OUString ChildAccess::getRelativePathRepresentation() {
return path.makeStringAndClear();
}
-rtl::Reference< Node > ChildAccess::getNode() {
+const rtl::Reference< Node > & ChildAccess::getNode() {
return node_;
}
@@ -121,7 +116,7 @@ bool ChildAccess::isFinalized() {
(parent_.is() && parent_->isFinalized());
}
-OUString ChildAccess::getNameInternal() {
+const OUString & ChildAccess::getNameInternal() {
return name_;
}
@@ -146,7 +141,7 @@ css::uno::Reference< css::uno::XInterface > ChildAccess::getParent()
assert(thisIs(IS_ANY));
osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
- return static_cast< cppu::OWeakObject * >(parent_.get());
+ return cppu::getXWeak(parent_.get());
}
void ChildAccess::setParent(css::uno::Reference< css::uno::XInterface > const &)
@@ -155,16 +150,7 @@ void ChildAccess::setParent(css::uno::Reference< css::uno::XInterface > const &)
osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
throw css::lang::NoSupportException(
- "setParent", static_cast< cppu::OWeakObject * >(this));
-}
-
-sal_Int64 ChildAccess::getSomething(
- css::uno::Sequence< sal_Int8 > const & aIdentifier)
-{
- assert(thisIs(IS_ANY));
- osl::MutexGuard g(*lock_);
- checkLocalizedPropertyAccess();
- return comphelper::getSomethingImpl(aIdentifier, this);
+ "setParent", getXWeak());
}
void ChildAccess::bind(
@@ -259,8 +245,7 @@ css::uno::Any ChildAccess::asValue()
return child.is() ? child->asValue() : css::uno::Any();
}
}
- value <<= css::uno::Reference< css::uno::XInterface >(
- static_cast< cppu::OWeakObject * >(this));
+ value <<= css::uno::Reference(getXWeak());
}
return value;
}
@@ -294,11 +279,11 @@ void ChildAccess::commitChanges(bool valid, Modifications * globalModifications)
switch (node_->kind()) {
case Node::KIND_PROPERTY:
static_cast< PropertyNode * >(node_.get())->setValue(
- Data::NO_LAYER, *changedValue_);
+ Data::NO_LAYER, *changedValue_, true);
break;
case Node::KIND_LOCALIZED_VALUE:
static_cast< LocalizedValueNode * >(node_.get())->setValue(
- Data::NO_LAYER, *changedValue_);
+ Data::NO_LAYER, *changedValue_, true);
break;
default:
assert(false); // this cannot happen
@@ -340,8 +325,7 @@ css::uno::Any ChildAccess::queryInterface(css::uno::Type const & aType)
return res.hasValue()
? res
: cppu::queryInterface(
- aType, static_cast< css::container::XChild * >(this),
- static_cast< css::lang::XUnoTunnel * >(this));
+ aType, static_cast< css::container::XChild * >(this));
}
}