summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-03-16 15:05:39 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2016-03-17 23:54:43 +0100
commit5e4aec90aefbb86c98ccaba9c775d4a539f1b934 (patch)
tree8bf35bb0343fa9378a07513653daa61cec64ce96
parent47b6239950adef2ced7f4602acc7d6b22b9ca721 (diff)
getTypes/queryInterface/getEvents: remove superfluous getArray() and simplifyfeature/unostyles3
Change-Id: I5b19d01d2760c95d9c52b15f8d6174dc4aafb4e3
-rw-r--r--sw/source/core/unocore/unostyle.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 4c5490671119..da531407bb42 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -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