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

Stephan Bergmann sbergman at redhat.com
Mon Jan 11 05:37:42 PST 2016


 extensions/source/scanner/sane.hxx    |    8 +-------
 extensions/source/scanner/scanunx.cxx |   11 -----------
 2 files changed, 1 insertion(+), 18 deletions(-)

New commits:
commit 9d4bfc6162e1627f7bfe82f98a4ba4916296f5dd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 11 14:37:03 2016 +0100

    Use WeakImplHelper
    
    Change-Id: Iee4aec239bf095233aac800f70688ad9db7949df

diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx
index 504ede7..b96e89c 100644
--- a/extensions/source/scanner/sane.hxx
+++ b/extensions/source/scanner/sane.hxx
@@ -29,7 +29,7 @@
 // - BitmapTransporter -
 
 
-class BitmapTransporter : public OWeakObject, public css::awt::XBitmap
+class BitmapTransporter: public cppu::WeakImplHelper<css::awt::XBitmap>
 {
     SvMemoryStream                      m_aStream;
     osl::Mutex                          m_aProtector;
@@ -39,12 +39,6 @@ public:
                                         BitmapTransporter();
     virtual                             ~BitmapTransporter();
 
-
-    // XInterface
-    virtual Any SAL_CALL                queryInterface( const Type & rType ) throw( RuntimeException, std::exception ) override;
-    virtual void SAL_CALL               acquire() throw() override { OWeakObject::acquire(); }
-    virtual void SAL_CALL               release() throw() override { OWeakObject::release(); }
-
     virtual css::awt::Size SAL_CALL          getSize() throw(std::exception) override;
     virtual Sequence< sal_Int8 > SAL_CALL    getDIB() throw(std::exception) override;
     virtual Sequence< sal_Int8 > SAL_CALL    getMaskDIB() throw(std::exception) override { return Sequence< sal_Int8 >(); }
diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx
index f43d2b4..aae2b25 100644
--- a/extensions/source/scanner/scanunx.cxx
+++ b/extensions/source/scanner/scanunx.cxx
@@ -41,17 +41,6 @@ BitmapTransporter::~BitmapTransporter()
 #endif
 }
 
-
-
-Any SAL_CALL BitmapTransporter::queryInterface( const Type& rType ) throw( RuntimeException, std::exception )
-{
-    const Any aRet( cppu::queryInterface( rType, static_cast< css::awt::XBitmap* >( this ) ) );
-
-    return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) );
-}
-
-
-
 css::awt::Size BitmapTransporter::getSize() throw(std::exception)
 {
     osl::MutexGuard aGuard( m_aProtector );


More information about the Libreoffice-commits mailing list