diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-28 12:42:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-28 12:48:43 +0100 |
commit | e59821570b1b2a79f2f13504ec0bdb0be133a9b5 (patch) | |
tree | f1565dcf8d84b4c2a623e9971b7342d414f082a1 /sw | |
parent | 7b0aed617f1e57335837cf56ef2d222a96f8270d (diff) |
GetSvxShape does the same checks, so use it directly
and drop the worthless unused xShapeTunnel
Change-Id: Id9875691e8a01a11a84b0dd08a53fdee517924f4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 04291f64b810..af0bfe21cc7a 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2207,13 +2207,8 @@ sal_Bool SwXShape::supportsService(const OUString& rServiceName) throw( uno::Run uno::Sequence< OUString > SwXShape::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { uno::Sequence< OUString > aSeq; - if (xShapeAgg.is()) - { - uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShapeAgg, uno::UNO_QUERY); - SvxShape* pSvxShape = GetSvxShape(); - if(pSvxShape) - aSeq = pSvxShape->getSupportedServiceNames(); - } + if (SvxShape* pSvxShape = GetSvxShape()) + aSeq = pSvxShape->getSupportedServiceNames(); aSeq.realloc(aSeq.getLength() + 1); aSeq.getArray()[aSeq.getLength() - 1] = "com.sun.star.drawing.Shape"; return aSeq; |