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

Tor Lillqvist tml at collabora.com
Thu Dec 18 02:01:29 PST 2014


 offapi/com/sun/star/awt/XToolkitExperimental.idl |   11 ----------
 toolkit/source/awt/vclxtoolkit.cxx               |   25 -----------------------
 2 files changed, 1 insertion(+), 35 deletions(-)

New commits:
commit 58bec49af36c3e7554bf20664ac15c45b1ce88c4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 18 11:11:04 2014 +0200

    Kill createScreenCompatibleDeviceUsingBuffer
    
    A certain 3rd party uses processEventsToIdle() from XToolkitExperimental, and
    their code is not C++, so it should be OK to change the ABI of
    XToolkitExperimental, says mmeeks.
    
    Change-Id: I4ba641ad98c17ae42a2ae2eff389fd3354618597

diff --git a/offapi/com/sun/star/awt/XToolkitExperimental.idl b/offapi/com/sun/star/awt/XToolkitExperimental.idl
index 7114446..d120290 100644
--- a/offapi/com/sun/star/awt/XToolkitExperimental.idl
+++ b/offapi/com/sun/star/awt/XToolkitExperimental.idl
@@ -19,17 +19,6 @@ module com {  module sun {  module star {  module awt {
 
 interface XToolkitExperimental : XToolkit2
 {
-  /** Don't use this.
-   */
-
-  com::sun::star::awt::XDevice createScreenCompatibleDeviceUsingBuffer( [in] long Width,
-                                                                        [in] long Height,
-                                                                        [in] long ScaleNumerator,
-                                                                        [in] long ScaleDenominator,
-                                                                        [in] long XOffset,
-                                                                        [in] long YOffset,
-                                                                        [in] hyper AddressOfMemoryBufferForSharedArrayWrapper );
-
   /** Process all pending idle events
    */
   void processEventsToIdle();
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 680fc0c..38b55027 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -64,11 +64,6 @@
 #include "postmac.h"
 #endif
 
-#ifdef ANDROID
-#include <sal/ByteBufferWrapper.hxx>
-using org::libreoffice::touch::ByteBufferWrapper;
-#endif
-
 #include <vcl/sysdata.hxx>
 
 #include <toolkit/awt/vclxwindows.hxx>
@@ -195,8 +190,6 @@ public:
     virtual ~VCLXToolkit();
 
     // css::awt::XToolkitExperimental
-    css::uno::Reference< css::awt::XDevice >      SAL_CALL createScreenCompatibleDeviceUsingBuffer( sal_Int32 Width, sal_Int32 Height, sal_Int32 ScaleNumerator, sal_Int32 ScaleDenominator, sal_Int32 XOffset, sal_Int32 YOffset, sal_Int64 AddressOfMemoryBufferForSharedArrayWrapper ) throw
-(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL processEventsToIdle()
         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
@@ -730,11 +723,6 @@ void SAL_CALL VCLXToolkit::disposing()
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXToolkit::createScreenCompatibleDevice( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException, std::exception)
 {
-    return createScreenCompatibleDeviceUsingBuffer( Width, Height, 1, 1, 0, 0, 0 );
-}
-
-::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXToolkit::createScreenCompatibleDeviceUsingBuffer( sal_Int32 Width, sal_Int32 Height, sal_Int32 ScaleNumerator, sal_Int32 ScaleDenominator, sal_Int32 XOffset, sal_Int32 YOffset, sal_Int64 addressOfMemoryBufferForSharedArrayWrapper ) throw(::com::sun::star::uno::RuntimeException, std::exception)
-{
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > xRef;
@@ -743,18 +731,7 @@ void SAL_CALL VCLXToolkit::disposing()
     SolarMutexGuard aSolarGuard;
 
     VirtualDevice* pV = new VirtualDevice;
-    if ( addressOfMemoryBufferForSharedArrayWrapper != 0 ) {
-#if defined(ANDROID)
-        ByteBufferWrapper *bbw = (ByteBufferWrapper *) (intptr_t) addressOfMemoryBufferForSharedArrayWrapper;
-        pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ), Fraction(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset), basebmp::RawMemorySharedArray( bbw->pointer(), *bbw ));
-#else
-        pV->SetOutputSizePixelScaleOffsetAndBuffer( Size( Width, Height ),
-            Fraction(ScaleNumerator, ScaleDenominator), Point( XOffset, YOffset),
-            basebmp::RawMemorySharedArray( reinterpret_cast<sal_uInt8*>( addressOfMemoryBufferForSharedArrayWrapper )));
-#endif
-    } else {
-        pV->SetOutputSizePixel( Size( Width, Height ) );
-    }
+    pV->SetOutputSizePixel( Size( Width, Height ) );
     pVDev->SetVirtualDevice( pV );
 
     xRef = pVDev;


More information about the Libreoffice-commits mailing list