[Libreoffice-commits] core.git: include/toolkit toolkit/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 8 06:26:24 UTC 2019


 include/toolkit/awt/vclxbitmap.hxx |   21 +++++----------------
 toolkit/source/awt/vclxbitmap.cxx  |   25 -------------------------
 2 files changed, 5 insertions(+), 41 deletions(-)

New commits:
commit e1771399490fe0d2c40fb250f03c362128916223
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:22:47 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:25:24 2019 +0200

    use cppu::WeakImplHelper in VCLXBitmap
    
    Change-Id: I789646591caca8ee164d32e07b050b862f627973
    Reviewed-on: https://gerrit.libreoffice.org/80385
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/toolkit/awt/vclxbitmap.hxx b/include/toolkit/awt/vclxbitmap.hxx
index 22b339f96194..d2ff89c2845c 100644
--- a/include/toolkit/awt/vclxbitmap.hxx
+++ b/include/toolkit/awt/vclxbitmap.hxx
@@ -25,7 +25,7 @@
 #include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <comphelper/servicehelper.hxx>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <osl/mutex.hxx>
 #include <vcl/bitmapex.hxx>
 
@@ -33,11 +33,10 @@
 //  class VCLXBitmap
 
 
-class VCLXBitmap final : public css::awt::XBitmap,
-                    public css::awt::XDisplayBitmap,
-                    public css::lang::XTypeProvider,
-                    public css::lang::XUnoTunnel,
-                    public ::cppu::OWeakObject
+class VCLXBitmap final : public cppu::WeakImplHelper<
+                            css::awt::XBitmap,
+                            css::awt::XDisplayBitmap,
+                            css::lang::XUnoTunnel>
 {
     ::osl::Mutex    maMutex;
     BitmapEx        maBitmap;
@@ -49,19 +48,9 @@ public:
     void            SetBitmap( const BitmapEx& rBmp )   { maBitmap = rBmp; }
     const BitmapEx& GetBitmap() const                   { return maBitmap; }
 
-
-    // css::uno::XInterface
-    css::uno::Any                  SAL_CALL queryInterface( const css::uno::Type & rType ) override;
-    void                                        SAL_CALL acquire() throw() override  { OWeakObject::acquire(); }
-    void                                        SAL_CALL release() throw() override  { OWeakObject::release(); }
-
     // css::lang::XUnoTunnel
     UNO3_GETIMPLEMENTATION_DECL(VCLXBitmap)
 
-    // css::lang::XTypeProvider
-    css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
-    css::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() override;
-
     // css::awt::XBitmap
     css::awt::Size                 SAL_CALL getSize() override;
     css::uno::Sequence< sal_Int8 > SAL_CALL getDIB() override;
diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx
index 4155027dbc77..bfd95f791404 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -28,34 +28,9 @@
 //  class VCLXBitmap
 
 
-// css::uno::XInterface
-css::uno::Any VCLXBitmap::queryInterface( const css::uno::Type & rType )
-{
-    css::uno::Any aRet = ::cppu::queryInterface( rType,
-                                        static_cast< css::awt::XBitmap* >(this),
-                                        static_cast< css::awt::XDisplayBitmap* >(this),
-                                        static_cast< css::lang::XUnoTunnel* >(this),
-                                        static_cast< css::lang::XTypeProvider* >(this) );
-    return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
-}
-
 // css::lang::XUnoTunnel
 UNO3_GETIMPLEMENTATION_IMPL( VCLXBitmap );
 
-IMPL_IMPLEMENTATION_ID( VCLXBitmap )
-
-// css::lang::XTypeProvider
-css::uno::Sequence< css::uno::Type > VCLXBitmap::getTypes()
-{
-    static const css::uno::Sequence< css::uno::Type > aTypeList {
-        cppu::UnoType<css::lang::XTypeProvider>::get(),
-        cppu::UnoType<css::awt::XBitmap>::get(),
-        cppu::UnoType<css::awt::XDisplayBitmap>::get()
-    };
-    return aTypeList;
-}
-
-
 // css::awt::XBitmap
 css::awt::Size VCLXBitmap::getSize()
 {


More information about the Libreoffice-commits mailing list