diff options
Diffstat (limited to 'configmgr/source/rootaccess.cxx')
-rw-r--r-- | configmgr/source/rootaccess.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx index 17c8f7ec12a2..122401f6b068 100644 --- a/configmgr/source/rootaccess.cxx +++ b/configmgr/source/rootaccess.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <cassert> +#include <utility> #include <vector> #include <com/sun/star/lang/DisposedException.hpp> @@ -54,10 +55,10 @@ namespace configmgr { RootAccess::RootAccess( - Components & components, OUString const & pathRepresentation, - OUString const & locale, bool update): - Access(components), pathRepresentation_(pathRepresentation), - locale_(locale), + Components & components, OUString pathRepresentation, + OUString locale, bool update): + Access(components), pathRepresentation_(std::move(pathRepresentation)), + locale_(std::move(locale)), lock_( lock() ), update_(update), finalized_(false), alive_(true) { @@ -86,7 +87,7 @@ void RootAccess::initBroadcaster( broadcaster->addChangesNotification( changesListener, css::util::ChangesEvent( - pSource, css::uno::Any( xBase ), set)); + pSource, css::uno::Any( xBase ), set), path_.empty()); } } @@ -117,7 +118,7 @@ void RootAccess::addChangesListener( checkLocalizedPropertyAccess(); if (!aListener.is()) { throw css::uno::RuntimeException( - "null listener", static_cast< cppu::OWeakObject * >(this)); + "null listener", getXWeak()); } if (!isDisposed()) { changesListeners_.insert(aListener); @@ -126,7 +127,7 @@ void RootAccess::addChangesListener( } try { aListener->disposing( - css::lang::EventObject(static_cast< cppu::OWeakObject * >(this))); + css::lang::EventObject(getXWeak())); } catch (css::lang::DisposedException &) {} } @@ -203,7 +204,7 @@ OUString RootAccess::getRelativePathRepresentation() { return OUString(); } -rtl::Reference< Node > RootAccess::getNode() { +const rtl::Reference< Node > & RootAccess::getNode() { if (!node_.is()) { OUString canonic; int finalizedLayer; @@ -233,7 +234,7 @@ bool RootAccess::isFinalized() { return finalized_; } -OUString RootAccess::getNameInternal() { +const OUString & RootAccess::getNameInternal() { getNode(); return name_; } @@ -268,7 +269,7 @@ void RootAccess::initDisposeBroadcaster(Broadcaster * broadcaster) { { broadcaster->addDisposeNotification( changesListener, - css::lang::EventObject(static_cast< cppu::OWeakObject * >(this))); + css::lang::EventObject(getXWeak())); } Access::initDisposeBroadcaster(broadcaster); } |