summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-28 12:42:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-09-28 12:48:43 +0100
commite59821570b1b2a79f2f13504ec0bdb0be133a9b5 (patch)
treef1565dcf8d84b4c2a623e9971b7342d414f082a1 /sw
parent7b0aed617f1e57335837cf56ef2d222a96f8270d (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.cxx9
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;