LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/toolkit/awt - vclxfont.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 4 75.0 %
Date: 2012-08-25 Functions: 3 4 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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_VCLXFONT_HXX_
      21                 :            : #define _TOOLKIT_AWT_VCLXFONT_HXX_
      22                 :            : 
      23                 :            : #include <toolkit/dllapi.h>
      24                 :            : #include <com/sun/star/awt/XFont2.hpp>
      25                 :            : #include <com/sun/star/awt/XDevice.hpp>
      26                 :            : #include <com/sun/star/lang/XTypeProvider.hpp>
      27                 :            : #include <com/sun/star/lang/XUnoTunnel.hpp>
      28                 :            : #include <cppuhelper/weak.hxx>
      29                 :            : #include <osl/mutex.hxx>
      30                 :            : #include <vcl/metric.hxx>
      31                 :            : 
      32                 :            : //  ----------------------------------------------------
      33                 :            : //  class VCLXFont
      34                 :            : //  ----------------------------------------------------
      35                 :            : 
      36                 :            : class TOOLKIT_DLLPUBLIC VCLXFont :  public ::com::sun::star::awt::XFont2,
      37                 :            :                     public ::com::sun::star::lang::XTypeProvider,
      38                 :            :                     public ::com::sun::star::lang::XUnoTunnel,
      39                 :            :                     public ::cppu::OWeakObject
      40                 :            : {
      41                 :            : private:
      42                 :            :     ::osl::Mutex    maMutex;
      43                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice;
      44                 :            :     Font            maFont;
      45                 :            :     FontMetric*     mpFontMetric;
      46                 :            : 
      47                 :            : protected:
      48                 :            :     sal_Bool            ImplAssertValidFontMetric();
      49                 :       4701 :     ::osl::Mutex&   GetMutex() { return maMutex; }
      50                 :            : 
      51                 :            : public:
      52                 :            :                     VCLXFont();
      53                 :            :                     ~VCLXFont();
      54                 :            : 
      55                 :            :     void            Init( ::com::sun::star::awt::XDevice& rxDev, const Font& rFont );
      56                 :          0 :     const Font&     GetFont() const { return maFont; }
      57                 :            : 
      58                 :            :     // ::com::sun::star::uno::XInterface
      59                 :            :     ::com::sun::star::uno::Any                  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
      60                 :        751 :     void                                        SAL_CALL acquire() throw()  { OWeakObject::acquire(); }
      61                 :        751 :     void                                        SAL_CALL release() throw()  { OWeakObject::release(); }
      62                 :            : 
      63                 :            :     // ::com::sun::star::lang::XUnoTunnel
      64                 :            :     static const ::com::sun::star::uno::Sequence< sal_Int8 >&   GetUnoTunnelId() throw();
      65                 :            :     static VCLXFont*                                            GetImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw();
      66                 :            :     sal_Int64                                                   SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
      67                 :            : 
      68                 :            :     // ::com::sun::star::lang::XTypeProvider
      69                 :            :     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >  SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
      70                 :            :     ::com::sun::star::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
      71                 :            : 
      72                 :            :     // ::com::sun::star::lang::XFont
      73                 :            :     ::com::sun::star::awt::FontDescriptor           SAL_CALL getFontDescriptor(  ) throw(::com::sun::star::uno::RuntimeException);
      74                 :            :     ::com::sun::star::awt::SimpleFontMetric         SAL_CALL getFontMetric(  ) throw(::com::sun::star::uno::RuntimeException);
      75                 :            :     sal_Int16                                       SAL_CALL getCharWidth( sal_Unicode c ) throw(::com::sun::star::uno::RuntimeException);
      76                 :            :     ::com::sun::star::uno::Sequence< sal_Int16 >    SAL_CALL getCharWidths( sal_Unicode nFirst, sal_Unicode nLast ) throw(::com::sun::star::uno::RuntimeException);
      77                 :            :     sal_Int32                                       SAL_CALL getStringWidth( const ::rtl::OUString& str ) throw(::com::sun::star::uno::RuntimeException);
      78                 :            :     sal_Int32                                       SAL_CALL getStringWidthArray( const ::rtl::OUString& str, ::com::sun::star::uno::Sequence< sal_Int32 >& rDXArray ) throw(::com::sun::star::uno::RuntimeException);
      79                 :            :     void                                            SAL_CALL getKernPairs( ::com::sun::star::uno::Sequence< sal_Unicode >& rnChars1, ::com::sun::star::uno::Sequence< sal_Unicode >& rnChars2, ::com::sun::star::uno::Sequence< sal_Int16 >& rnKerns ) throw(::com::sun::star::uno::RuntimeException);
      80                 :            : 
      81                 :            :     // ::com::sun::star::lang::XFont2
      82                 :            :     sal_Bool                                        SAL_CALL hasGlyphs( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException);
      83                 :            : };
      84                 :            : 
      85                 :            : 
      86                 :            : 
      87                 :            : #endif // _TOOLKIT_AWT_VCLXFONT_HXX_
      88                 :            : 
      89                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10