[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Wed Sep 28 11:51:19 UTC 2016


 sw/source/core/unocore/unodraw.cxx |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit e59821570b1b2a79f2f13504ec0bdb0be133a9b5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 28 12:42:57 2016 +0100

    GetSvxShape does the same checks, so use it directly
    
    and drop the worthless unused xShapeTunnel
    
    Change-Id: Id9875691e8a01a11a84b0dd08a53fdee517924f4

diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 04291f6..af0bfe2 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;


More information about the Libreoffice-commits mailing list