LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/editeng - fontitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 11 11 100.0 %
Date: 2013-07-09 Functions: 13 13 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             : #ifndef _SVX_FONTITEM_HXX
      20             : #define _SVX_FONTITEM_HXX
      21             : 
      22             : #include <svl/poolitem.hxx>
      23             : #include <tools/string.hxx>
      24             : #include <vcl/font.hxx>
      25             : #include "editeng/editengdllapi.h"
      26             : 
      27             : class SvXMLUnitConverter;
      28             : 
      29             : // class SvxFontItem -----------------------------------------------------
      30             : 
      31             : /*  [Description]
      32             : 
      33             :     This item describes a Font.
      34             : */
      35             : 
      36      825257 : class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
      37             : {
      38             :     String  aFamilyName;
      39             :     String  aStyleName;
      40             :     FontFamily  eFamily;
      41             :     FontPitch ePitch;
      42             :     rtl_TextEncoding eTextEncoding;
      43             : 
      44             :     static sal_Bool bEnableStoreUnicodeNames;
      45             : 
      46             : public:
      47             :     TYPEINFO();
      48             : 
      49             :     explicit SvxFontItem( const sal_uInt16 nId  );
      50             :     SvxFontItem( const FontFamily eFam, const String& rFamilyName,
      51             :         const String& rStyleName,
      52             :         const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
      53             :         const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
      54             :         const sal_uInt16 nId  );
      55             : 
      56             :     // "pure virtual Methods" from SfxPoolItem
      57             :     virtual int              operator==( const SfxPoolItem& ) const;
      58             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const;
      59             :     virtual SfxPoolItem*     Create(SvStream &, sal_uInt16) const;
      60             :     virtual SvStream&        Store(SvStream &, sal_uInt16 nItemVersion) const;
      61             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      62             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      63             : 
      64             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      65             :                                     SfxMapUnit eCoreMetric,
      66             :                                     SfxMapUnit ePresMetric,
      67             :                                     OUString &rText, const IntlWrapper * = 0 ) const;
      68             : 
      69             :     // Access methods:
      70        6210 :     void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; }
      71     1068599 :     inline const String &GetFamilyName() const { return aFamilyName; }
      72             : 
      73        6210 :     void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; }
      74       61397 :     inline const String &GetStyleName() const { return aStyleName; }
      75             : 
      76        6210 :     void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
      77     1060202 :     inline FontFamily GetFamily() const { return eFamily; }
      78             : 
      79        6210 :     void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
      80     1060197 :     inline FontPitch GetPitch() const { return ePitch; }
      81             : 
      82        6517 :     void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
      83             : 
      84     1061689 :     inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
      85             : 
      86             :     SvxFontItem& operator=(const SvxFontItem& rFont);
      87             : 
      88             :     static void EnableStoreUnicodeNames( sal_Bool bEnable );
      89             : 
      90             : };
      91             : 
      92             : EDITENG_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian,
      93             :                         SvxFontItem& rComplex );
      94             : 
      95             : #endif // #ifndef _SVX_FONTITEM_HXX
      96             : 
      97             : 
      98             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10