LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/toolkit/awt - vclxdevice.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 6 66.7 %
Date: 2012-12-27 Functions: 4 6 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _TOOLKIT_AWT_VCLXDEVICE_HXX_
      21             : #define _TOOLKIT_AWT_VCLXDEVICE_HXX_
      22             : 
      23             : #include <toolkit/dllapi.h>
      24             : #include <com/sun/star/awt/XDevice.hpp>
      25             : #include <com/sun/star/lang/XTypeProvider.hpp>
      26             : #include <com/sun/star/lang/XUnoTunnel.hpp>
      27             : #include <cppuhelper/weak.hxx>
      28             : #include <osl/mutex.hxx>
      29             : 
      30             : #include <com/sun/star/awt/XUnitConversion.hpp>
      31             : 
      32             : class OutputDevice;
      33             : class VirtualDevice;
      34             : 
      35             : //  ----------------------------------------------------
      36             : //  class VCLXDevice
      37             : //  ----------------------------------------------------
      38             : 
      39             : // For using nDummy, no incompatible update, add a sal_Bool bCreatedWithToolkitMember later...
      40             : #define FLAGS_CREATEDWITHTOOLKIT    0x00000001
      41             : 
      42             : class TOOLKIT_DLLPUBLIC VCLXDevice :    public ::com::sun::star::awt::XDevice,
      43             :                     public ::com::sun::star::lang::XTypeProvider,
      44             :                     public ::com::sun::star::lang::XUnoTunnel,
      45             :                     public ::com::sun::star::awt::XUnitConversion,
      46             :                     public ::cppu::OWeakObject
      47             : {
      48             :     friend class VCLXGraphics;
      49             : 
      50             : private:
      51             :     OutputDevice*           mpOutputDevice;
      52             : 
      53             : public:
      54             :     void*                   pDummy;
      55             :     sal_uInt32              nFlags;
      56             : 
      57             : protected:
      58             :     void                    DestroyOutputDevice();
      59             : 
      60             : public:
      61             :                             VCLXDevice();
      62             :                             ~VCLXDevice();
      63             : 
      64        7027 :     void                    SetOutputDevice( OutputDevice* pOutDev ) { mpOutputDevice = pOutDev; }
      65      130828 :     OutputDevice*           GetOutputDevice() const { return mpOutputDevice; }
      66             : 
      67             :     void                    SetCreatedWithToolkit( sal_Bool bCreatedWithToolkit );
      68             : 
      69             :     // ::com::sun::star::uno::XInterface
      70             :     ::com::sun::star::uno::Any                  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
      71      238802 :     void                                        SAL_CALL acquire() throw()  { OWeakObject::acquire(); }
      72      233074 :     void                                        SAL_CALL release() throw()  { OWeakObject::release(); }
      73             : 
      74             :     // ::com::sun::star::lang::XUnoTunnel
      75             :     static const ::com::sun::star::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
      76             :     static VCLXDevice*                                          GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw();
      77             :     sal_Int64                                                   SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
      78             : 
      79             :     // ::com::sun::star::lang::XTypeProvider
      80             :     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
      81             :     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
      82             : 
      83             :     // ::com::sun::star::awt::XDevice,
      84             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >    SAL_CALL createGraphics(  ) throw(::com::sun::star::uno::RuntimeException);
      85             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >      SAL_CALL createDevice( sal_Int32 nWidth, sal_Int32 nHeight ) throw(::com::sun::star::uno::RuntimeException);
      86             :     ::com::sun::star::awt::DeviceInfo                                       SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException);
      87             :     ::com::sun::star::uno::Sequence< ::com::sun::star::awt::FontDescriptor > SAL_CALL getFontDescriptors(  ) throw(::com::sun::star::uno::RuntimeException);
      88             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >        SAL_CALL getFont( const ::com::sun::star::awt::FontDescriptor& aDescriptor ) throw(::com::sun::star::uno::RuntimeException);
      89             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >      SAL_CALL createBitmap( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight ) throw(::com::sun::star::uno::RuntimeException);
      90             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayBitmap > SAL_CALL createDisplayBitmap( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >& Bitmap ) throw(::com::sun::star::uno::RuntimeException);
      91             : 
      92             :     // ::com::sun::star::awt::XUnitConversion
      93             :     ::com::sun::star::awt::Point SAL_CALL convertPointToLogic( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
      94             :     ::com::sun::star::awt::Point SAL_CALL convertPointToPixel( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
      95             :     ::com::sun::star::awt::Size SAL_CALL convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
      96             :     ::com::sun::star::awt::Size SAL_CALL convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
      97             : 
      98             : 
      99             : };
     100             : 
     101             : //  ----------------------------------------------------
     102             : //  class VCLXVirtualDevice
     103             : //  ----------------------------------------------------
     104             : 
     105           0 : class VCLXVirtualDevice : public VCLXDevice
     106             : {
     107             : public:
     108             :                     ~VCLXVirtualDevice();
     109             : 
     110           0 :     void            SetVirtualDevice( VirtualDevice* pVDev ) { SetOutputDevice( (OutputDevice*)pVDev ); }
     111             : };
     112             : 
     113             : 
     114             : 
     115             : 
     116             : #endif // _TOOLKIT_AWT_VCLXDEVICE_HXX_
     117             : 
     118             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10