diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-08 10:54:51 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-08 10:54:51 +0200 |
commit | ae26801d4b351eee944156e3cb1d73879d011089 (patch) | |
tree | d554ec0ee06c576da0e6f0d7d15dfbd25037cc28 /unotools | |
parent | d2910d38be6f4eda0841b15f2b0a77a327d12305 (diff) |
slidecopy: +getNodePath
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); |