diff options
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/confignode.hxx | 3 | ||||
-rw-r--r-- | unotools/source/config/confignode.cxx | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/unotools/inc/unotools/confignode.hxx b/unotools/inc/unotools/confignode.hxx index 33ee99f17138..9be8b20d7a3e 100644 --- a/unotools/inc/unotools/confignode.hxx +++ b/unotools/inc/unotools/confignode.hxx @@ -100,6 +100,9 @@ namespace utl /// returns the local name of the node ::rtl::OUString getLocalName() const; + /// returns the fully qualified path of the node + ::rtl::OUString getNodePath() const; + /** open a sub node @param _rPath access path of the to-be-opened sub node. May be a hierarchical path. */ diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 4927f82023eb..c6ff13a6590a 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -155,6 +155,22 @@ namespace utl } //------------------------------------------------------------------------ + ::rtl::OUString OConfigurationNode::getNodePath() const + { + ::rtl::OUString sNodePath; + try + { + Reference< XHierarchicalName > xNamed( m_xDirectAccess, UNO_QUERY_THROW ); + sNodePath = xNamed->getHierarchicalName(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sNodePath; + } + + //------------------------------------------------------------------------ ::rtl::OUString OConfigurationNode::normalizeName(const ::rtl::OUString& _rName, NAMEORIGIN _eOrigin) const { ::rtl::OUString sName(_rName); |