diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-02-07 18:52:27 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-02-07 18:52:37 +0100 |
commit | 4387ebc208bd432717f970bc1627eedb3902005c (patch) | |
tree | 1b965e96913548dbc93a54b16cfda80a6676c409 /configmgr | |
parent | 71eb11b3f78765ae1a06eeb7c94a0a38a71eab71 (diff) |
fdo#33994: Fixed several crashes around config UNO API
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/access.cxx | 10 | ||||
-rw-r--r-- | configmgr/source/rootaccess.cxx | 8 | ||||
-rw-r--r-- | configmgr/source/rootaccess.hxx | 5 |
3 files changed, 17 insertions, 6 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 0382054533da..7fcd7a1c3402 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -912,11 +912,7 @@ rtl::OUString Access::getImplementationName() throw (css::uno::RuntimeException) OSL_ASSERT(thisIs(IS_ANY)); osl::MutexGuard g(*lock_); checkLocalizedPropertyAccess(); - throw css::uno::RuntimeException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "configmgr Access has no service implementation name")), - static_cast< cppu::OWeakObject * >(this)); + return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "configmgr.Access" ) ); } sal_Bool Access::supportsService(rtl::OUString const & ServiceName) @@ -2095,7 +2091,9 @@ css::beans::Property Access::asProperty() { default: type = cppu::UnoType< css::uno::XInterface >::get(); //TODO: correct? nillable = false; - removable = getParentNode()->kind() == Node::KIND_SET; + removable = false; + if ( getParentNode() != NULL ) + removable = getParentNode()->kind() == Node::KIND_SET; break; } return css::beans::Property( diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx index 27f3884f2fb0..ef5982e3a56d 100644 --- a/configmgr/source/rootaccess.cxx +++ b/configmgr/source/rootaccess.cxx @@ -327,6 +327,14 @@ css::util::ChangesSet RootAccess::getPendingChanges() return changes.getAsConstList(); } +rtl::OUString RootAccess::getImplementationName() throw (css::uno::RuntimeException) +{ + OSL_ASSERT(thisIs(IS_ANY)); + osl::MutexGuard g(*lock_); + checkLocalizedPropertyAccess(); + return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "configmgr.RootAccess" ) ); +} + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx index 4d74167c8505..c1751210c50c 100644 --- a/configmgr/source/rootaccess.hxx +++ b/configmgr/source/rootaccess.hxx @@ -86,6 +86,11 @@ public: bool isUpdate() const; +protected: + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (com::sun::star::uno::RuntimeException); + private: virtual ~RootAccess(); |