summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC├ędric Bosdonnat <cedricbosdo@openoffice.org>2011-02-07 18:52:27 +0100
committerNoel Power <noel.power@novell.com>2011-02-07 18:14:24 +0000
commited87a79ebafce971f91017ffb3adff55d9f34b42 (patch)
tree3435bdee1afd18fbab9e7d2eaa66ad6a6d62ac15
parentac044cb591a40e688e61bea24db63258e826cd78 (diff)
fdo#33994: Fixed several crashes around config UNO API
cherry picked from 21427f17e1f6901ac9a7148d5d8ac13e0aad958e Signed-off-by: Noel Power <noel.power@novell.com>
-rw-r--r--configmgr/source/access.cxx10
-rw-r--r--configmgr/source/rootaccess.cxx8
-rw-r--r--configmgr/source/rootaccess.hxx5
3 files changed, 17 insertions, 6 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 0382054533..7fcd7a1c34 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 27f3884f2f..ef5982e3a5 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 4d74167c85..c1751210c5 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();