diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-15 09:16:51 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-15 09:16:51 +0100 |
commit | a94ddc5749d22d9e811ee03c5c42cf7950bc431e (patch) | |
tree | 71e5d3af21dfe17c0d019f82f01ca8d8b86c6c71 /unotools/source/config | |
parent | 8765a3bf9f2926a50d0f644e4263782269abe023 (diff) | |
parent | 4d4bfb28a75c7887a46fec3c0f71260781ae0471 (diff) |
dba33b: merge m69
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/confignode.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 4b1b9fe272db..56d258461e95 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/util/XStringEscape.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/container/XNamed.hpp> #include <comphelper/extract.hxx> #include <rtl/string.hxx> #if OSL_DEBUG_LEVEL > 0 @@ -139,6 +140,22 @@ namespace utl } //------------------------------------------------------------------------ + ::rtl::OUString OConfigurationNode::getLocalName() const + { + ::rtl::OUString sLocalName; + try + { + Reference< XNamed > xNamed( m_xDirectAccess, UNO_QUERY_THROW ); + sLocalName = xNamed->getName(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sLocalName; + } + + //------------------------------------------------------------------------ ::rtl::OUString OConfigurationNode::normalizeName(const ::rtl::OUString& _rName, NAMEORIGIN _eOrigin) const { ::rtl::OUString sName(_rName); @@ -155,13 +172,9 @@ namespace utl else sName = xEscaper->unescapeString(sName); } - catch(IllegalArgumentException&) - { - OSL_ENSURE(sal_False, "OConfigurationNode::normalizeName: illegal argument (caught an exception saying so)!"); - } catch(Exception&) { - OSL_ENSURE(sal_False, "OConfigurationNode::normalizeName: caught an exception!"); + DBG_UNHANDLED_EXCEPTION(); } } } |