1f8e07b45SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3f8e07b45SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4f8e07b45SAndrew Rist * or more contributor license agreements. See the NOTICE file 5f8e07b45SAndrew Rist * distributed with this work for additional information 6f8e07b45SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7f8e07b45SAndrew Rist * to you under the Apache License, Version 2.0 (the 8f8e07b45SAndrew Rist * "License"); you may not use this file except in compliance 9f8e07b45SAndrew Rist * with the License. You may obtain a copy of the License at 10f8e07b45SAndrew Rist * 11f8e07b45SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12f8e07b45SAndrew Rist * 13f8e07b45SAndrew Rist * Unless required by applicable law or agreed to in writing, 14f8e07b45SAndrew Rist * software distributed under the License is distributed on an 15f8e07b45SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16f8e07b45SAndrew Rist * KIND, either express or implied. See the License for the 17f8e07b45SAndrew Rist * specific language governing permissions and limitations 18f8e07b45SAndrew Rist * under the License. 19f8e07b45SAndrew Rist * 20f8e07b45SAndrew Rist *************************************************************/ 21f8e07b45SAndrew Rist 22f8e07b45SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef __FRAMEWORK_CLASSES_IMAGEWRAPPER_HXX_ 25cdf0e10cSrcweir #define __FRAMEWORK_CLASSES_IMAGEWRAPPER_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx> 28cdf0e10cSrcweir #include <com/sun/star/awt/XBitmap.hpp> 29cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 30cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp> 31cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 32cdf0e10cSrcweir #include <vcl/image.hxx> 33cdf0e10cSrcweir #include <framework/fwedllapi.h> 34cdf0e10cSrcweir 35cdf0e10cSrcweir namespace framework 36cdf0e10cSrcweir { 37cdf0e10cSrcweir 38*30acf5e8Spfg class FWE_DLLPUBLIC ImageWrapper : public ThreadHelpBase , // Struct for right initialization of mutex member! Must be first of baseclasses. 39cdf0e10cSrcweir public ::cppu::WeakImplHelper2< ::com::sun::star::awt::XBitmap, 40cdf0e10cSrcweir ::com::sun::star::lang::XUnoTunnel > 41cdf0e10cSrcweir { 42cdf0e10cSrcweir public: 43cdf0e10cSrcweir ImageWrapper( const Image& aImage ); 44cdf0e10cSrcweir virtual ~ImageWrapper(); 45cdf0e10cSrcweir GetImage() const46cdf0e10cSrcweir const Image& GetImage() const 47cdf0e10cSrcweir { 48cdf0e10cSrcweir return m_aImage; 49cdf0e10cSrcweir } 50cdf0e10cSrcweir 51cdf0e10cSrcweir static ::com::sun::star::uno::Sequence< sal_Int8 > GetUnoTunnelId(); 52cdf0e10cSrcweir 53cdf0e10cSrcweir // XBitmap 54cdf0e10cSrcweir virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw (::com::sun::star::uno::RuntimeException); 55cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getDIB() throw (::com::sun::star::uno::RuntimeException); 56cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw (::com::sun::star::uno::RuntimeException); 57cdf0e10cSrcweir 58cdf0e10cSrcweir // XUnoTunnel 59cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException); 60cdf0e10cSrcweir 61cdf0e10cSrcweir private: 62cdf0e10cSrcweir Image m_aImage; 63cdf0e10cSrcweir }; 64cdf0e10cSrcweir 65cdf0e10cSrcweir } 66cdf0e10cSrcweir 67cdf0e10cSrcweir #endif // __FRAMEWORK_CLASSES_IMAGEWRAPPER_HXX_ 68