Kaydet (Commit) 5e4aec90 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

getTypes/queryInterface/getEvents: remove superfluous getArray() and simplify

Change-Id: I5b19d01d2760c95d9c52b15f8d6174dc4aafb4e3
üst 47b62399
......@@ -3202,28 +3202,28 @@ const SfxPoolItem* SwXFrameStyle::GetItem(enum RES_FRMATR eAtr)
return &xStyle->GetItemSet().Get(eAtr);
}
uno::Sequence< uno::Type > SwXFrameStyle::getTypes( ) throw(uno::RuntimeException, std::exception)
uno::Sequence<uno::Type> SwXFrameStyle::getTypes()
throw(uno::RuntimeException, std::exception)
{
uno::Sequence< uno::Type > aTypes = SwXStyle::getTypes();
uno::Sequence<uno::Type> aTypes = SwXStyle::getTypes();
sal_Int32 nLen = aTypes.getLength();
aTypes.realloc(nLen + 1);
aTypes.getArray()[nLen] = cppu::UnoType<XEventsSupplier>::get();
aTypes[nLen] = cppu::UnoType<XEventsSupplier>::get();
return aTypes;
}
uno::Any SwXFrameStyle::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException, std::exception)
uno::Any SwXFrameStyle::queryInterface(const uno::Type& rType)
throw(uno::RuntimeException, std::exception)
{
uno::Any aRet;
if(rType == cppu::UnoType<XEventsSupplier>::get())
aRet <<= uno::Reference<XEventsSupplier>(this);
else
aRet = SwXStyle::queryInterface(rType);
return aRet;
return uno::makeAny(uno::Reference<XEventsSupplier>(this));
return SwXStyle::queryInterface(rType);
}
uno::Reference< container::XNameReplace > SwXFrameStyle::getEvents( ) throw(uno::RuntimeException, std::exception)
uno::Reference<container::XNameReplace> SwXFrameStyle::getEvents()
throw(uno::RuntimeException, std::exception)
{
return new SwFrameStyleEventDescriptor( *this );
return new SwFrameStyleEventDescriptor(*this);
}
// Already implemented autostyle families: 3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment