LCOV - code coverage report
Current view: top level - include/editeng - fontitem.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 26 26 100.0 %
Date: 2015-06-13 12:38:46 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 INCLUDED_EDITENG_FONTITEM_HXX
      20             : #define INCLUDED_EDITENG_FONTITEM_HXX
      21             : 
      22             : #include <editeng/editengdllapi.h>
      23             : #include <rtl/ustring.hxx>
      24             : #include <svl/poolitem.hxx>
      25             : #include <vcl/font.hxx>
      26             : 
      27             : class SvXMLUnitConverter;
      28             : 
      29             : /** This item describes a Font.
      30             : */
      31     2197077 : class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
      32             : {
      33             :     OUString aFamilyName;
      34             :     OUString  aStyleName;
      35             :     FontFamily eFamily;
      36             :     FontPitch ePitch;
      37             :     rtl_TextEncoding eTextEncoding;
      38             : 
      39             :     static bool bEnableStoreUnicodeNames;
      40             : 
      41             : public:
      42             :     TYPEINFO_OVERRIDE();
      43             : 
      44             :     explicit SvxFontItem(const sal_uInt16 nId);
      45             :     SvxFontItem(const FontFamily eFam, const OUString& rFamilyName,
      46             :                 const OUString& rStyleName,
      47             :                 const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
      48             :                 const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
      49             :                 const sal_uInt16 nId);
      50             : 
      51             :     // "pure virtual Methods" from SfxPoolItem
      52             :     virtual bool operator==(const SfxPoolItem& rItem) const SAL_OVERRIDE;
      53             :     virtual SfxPoolItem* Clone(SfxItemPool *pPool = 0) const SAL_OVERRIDE;
      54             :     virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16) const SAL_OVERRIDE;
      55             :     virtual SvStream& Store(SvStream& rStream, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
      56             :     virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
      57             :     virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
      58             : 
      59             :     virtual bool GetPresentation(SfxItemPresentation ePres,
      60             :                                  SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
      61             :                                  OUString &rText, const IntlWrapper* = 0) const SAL_OVERRIDE;
      62             : 
      63             :     // Access methods:
      64       18657 :     void SetFamilyName(const OUString& rFamilyName)
      65             :     {
      66       18657 :         aFamilyName = rFamilyName;
      67       18657 :     }
      68     1286060 :     const OUString &GetFamilyName() const
      69             :     {
      70     1286060 :         return aFamilyName;
      71             :     }
      72             : 
      73       18657 :     void SetStyleName(const OUString &rStyleName)
      74             :     {
      75       18657 :         aStyleName = rStyleName;
      76       18657 :     }
      77      328473 :     const OUString &GetStyleName() const
      78             :     {
      79      328473 :         return aStyleName;
      80             :     }
      81             : 
      82       18657 :     void SetFamily(FontFamily _eFamily)
      83             :     {
      84       18657 :         eFamily = _eFamily;
      85       18657 :     }
      86     1217892 :     FontFamily GetFamily() const
      87             :     {
      88     1217892 :         return eFamily;
      89             :     }
      90             : 
      91       18657 :     void SetPitch(FontPitch _ePitch)
      92             :     {
      93       18657 :         ePitch = _ePitch;
      94       18657 :     }
      95     1217732 :     FontPitch GetPitch() const
      96             :     {
      97     1217732 :         return ePitch;
      98             :     }
      99             : 
     100       19259 :     void SetCharSet(rtl_TextEncoding _eEncoding)
     101             :     {
     102       19259 :         eTextEncoding = _eEncoding;
     103       19259 :     }
     104     1237008 :     rtl_TextEncoding GetCharSet() const
     105             :     {
     106     1237008 :         return eTextEncoding;
     107             :     }
     108             : 
     109             :     SvxFontItem& operator=(const SvxFontItem& rFont);
     110             : 
     111             :     static void EnableStoreUnicodeNames(bool bEnable);
     112             : 
     113             :     void dumpAsXml(struct _xmlTextWriter* pWriter) const SAL_OVERRIDE;
     114             : };
     115             : 
     116             : EDITENG_DLLPUBLIC void GetDefaultFonts(SvxFontItem& rLatin,
     117             :                                        SvxFontItem& rAsian,
     118             :                                        SvxFontItem& rComplex);
     119             : 
     120             : #endif // INCLUDED_EDITENG_FONTITEM_HXX
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11