26#include <com/sun/star/container/XChild.hpp>
27#include <com/sun/star/lang/NoSupportException.hpp>
28#include <com/sun/star/lang/XUnoTunnel.hpp>
29#include <com/sun/star/uno/Any.hxx>
30#include <com/sun/star/uno/Reference.hxx>
31#include <com/sun/star/uno/Sequence.hxx>
32#include <com/sun/star/uno/Type.hxx>
33#include <com/sun/star/uno/XInterface.hpp>
38#include <osl/mutex.hxx>
40#include <rtl/ustrbuf.hxx>
41#include <rtl/ustring.hxx>
62 return theChildAccessUnoTunnelId.
getSeq();
70 inTransaction_(false),
73 assert(root.is() && parent.is() && node.is());
79 Access(components),
root_(root), node_(node), inTransaction_(false),
82 assert(root.is() && node.is());
88 std::vector<OUString> path(parent->getAbsolutePath());
89 path.push_back(
name_);
94 std::vector<OUString> path;
97 path = parent->getRelativePath();
99 path.push_back(
name_);
104 OUStringBuffer path(128);
107 path.append(parent->getRelativePathRepresentation());
108 if (!path.isEmpty()) {
113 return path.makeStringAndClear();
148 osl::MutexGuard g(*
lock_);
156 osl::MutexGuard g(*
lock_);
158 throw css::lang::NoSupportException(
163 css::uno::Sequence< sal_Int8 >
const & aIdentifier)
166 osl::MutexGuard g(*
lock_);
176 assert(!parent_.is() && root.is() && parent.is() && !
name.isEmpty());
198 css::uno::Any
const & value,
Modifications * localModifications)
200 assert(localModifications !=
nullptr);
202 bool isNillable =
false;
203 switch (
node_->kind()) {
217 child->setProperty(
value, localModifications);
220 locale,
value, localModifications);
260 return child.is() ? child->asValue() : css::uno::Any();
263 value <<= css::uno::Reference< css::uno::XInterface >(
271 css::uno::Any &value,
274 switch (rNode->kind()) {
288 assert(globalModifications !=
nullptr);
294 globalModifications->
add(path);
295 switch (
node_->kind()) {
313 osl::MutexGuard g(*
lock_);
320 assert(types !=
nullptr);
326 std::vector<OUString> * services)
328 assert(services !=
nullptr);
331 ? OUString(
"com.sun.star.configuration.GroupElement")
332 : OUString(
"com.sun.star.configuration.SetElement"));
338 osl::MutexGuard g(*
lock_);
341 return res.hasValue()
344 aType,
static_cast< css::container::XChild *
>(
this),
345 static_cast< css::lang::XUnoTunnel *
>(
this));
const css::uno::Sequence< sal_Int8 > & getSeq() const
void commitChildChanges(bool valid, Modifications *globalModifications)
Components & getComponents() const
void checkValue(css::uno::Any const &value, Type type, bool nillable)
rtl::Reference< Node > getParentNode()
void insertLocalizedValueChild(OUString const &name, css::uno::Any const &value, Modifications *localModifications)
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &aType) override
rtl::Reference< ChildAccess > getChild(OUString const &name)
void checkLocalizedPropertyAccess()
virtual std::vector< OUString > getRelativePath() override
void setProperty(css::uno::Any const &value, Modifications *localModifications)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
virtual void addTypes(std::vector< css::uno::Type > *types) const override
virtual void SAL_CALL setParent(css::uno::Reference< css::uno::XInterface > const &) override
rtl::Reference< Access > parent_
rtl::Reference< RootAccess > root_
virtual ~ChildAccess() override
virtual rtl::Reference< Node > getNode() override
void bind(rtl::Reference< RootAccess > const &root, rtl::Reference< Access > const &parent, OUString const &name) noexcept
virtual OUString getRelativePathRepresentation() override
virtual rtl::Reference< RootAccess > getRootAccess() override
virtual std::vector< OUString > getAbsolutePath() override
virtual void SAL_CALL release() noexcept override
void commitChanges(bool valid, Modifications *globalModifications)
std::shared_ptr< osl::Mutex > lock_
virtual void SAL_CALL acquire() noexcept override
static css::uno::Sequence< sal_Int8 > const & getUnoTunnelId()
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &aType) override
ChildAccess(Components &components, rtl::Reference< RootAccess > const &root, rtl::Reference< Access > const &parent, OUString name, rtl::Reference< Node > const &node)
virtual const OUString & getNameInternal() override
std::optional< css::uno::Any > changedValue_
virtual void addSupportedServiceNames(std::vector< OUString > *services) override
static bool asSimpleValue(const rtl::Reference< Node > &rNode, css::uno::Any &value, Components &components)
Can we quickly extract a simple value into value ? if so returns true.
virtual rtl::Reference< Access > getParentAccess() override
rtl::Reference< Node > node_
virtual sal_Int64 SAL_CALL getSomething(css::uno::Sequence< sal_Int8 > const &aIdentifier) override
void setNode(rtl::Reference< Node > const &node)
virtual bool isFinalized() override
static bool allLocales(std::u16string_view locale)
void addModification(std::vector< OUString > const &path)
Type getStaticType() const
void add(std::vector< OUString > const &path)
@ KIND_LOCALIZED_PROPERTY
Type getStaticType() const
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
std::shared_ptr< osl::Mutex > lock_
const LanguageTag & getLocale()
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
std::shared_ptr< osl::Mutex > const & lock()
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
rtl::Reference< RootAccess > root_
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
static OUString createSegment(std::u16string_view templateName, OUString const &name)