LCOV - code coverage report
Current view: top level - include/toolkit/awt - vclxdevice.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 6 6 100.0 %
Date: 2014-11-03 Functions: 6 6 100.0 %
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 INCLUDED_TOOLKIT_AWT_VCLXDEVICE_HXX
      21             : #define INCLUDED_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             :                             virtual ~VCLXDevice();
      63             : 
      64      412286 :     void                    SetOutputDevice( OutputDevice* pOutDev ) { mpOutputDevice = pOutDev; }
      65     4672578 :     OutputDevice*           GetOutputDevice() const { return mpOutputDevice; }
      66             : 
      67             :     void                    SetCreatedWithToolkit( 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, std::exception) SAL_OVERRIDE;
      71     7487302 :     void                                        SAL_CALL acquire() throw() SAL_OVERRIDE  { OWeakObject::acquire(); }
      72     7441472 :     void                                        SAL_CALL release() throw() SAL_OVERRIDE  { 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 );
      77             :     sal_Int64                                                   SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      81             :     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      86             :     ::com::sun::star::awt::DeviceInfo                                       SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      87             :     ::com::sun::star::uno::Sequence< ::com::sun::star::awt::FontDescriptor > SAL_CALL getFontDescriptors(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      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, std::exception) SAL_OVERRIDE;
      97             : 
      98             : 
      99             : };
     100             : 
     101             : 
     102             : //  class VCLXVirtualDevice
     103             : 
     104             : 
     105          64 : class VCLXVirtualDevice : public VCLXDevice
     106             : {
     107             : public:
     108             :                     virtual ~VCLXVirtualDevice();
     109             : 
     110          64 :     void            SetVirtualDevice( VirtualDevice* pVDev ) { SetOutputDevice( (OutputDevice*)pVDev ); }
     111             : };
     112             : 
     113             : 
     114             : 
     115             : 
     116             : #endif // INCLUDED_TOOLKIT_AWT_VCLXDEVICE_HXX
     117             : 
     118             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10