fdo#33994: Fixed several crashes around config UNO API

This commit is contained in:
Cédric Bosdonnat 2011-02-07 18:52:27 +01:00
parent 71eb11b3f7
commit 4387ebc208
3 changed files with 17 additions and 6 deletions

View file

@ -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(

View file

@ -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: */

View file

@ -86,6 +86,11 @@ public:
bool isUpdate() const;
protected:
virtual rtl::OUString SAL_CALL getImplementationName()
throw (com::sun::star::uno::RuntimeException);
private:
virtual ~RootAccess();