update credits
[LibreOffice.git] / include / editeng / fontitem.hxx
blobe9d14755906e501ad334171bd455f13c7576a921
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _SVX_FONTITEM_HXX
20 #define _SVX_FONTITEM_HXX
22 #include <svl/poolitem.hxx>
23 #include <tools/string.hxx>
24 #include <vcl/font.hxx>
25 #include "editeng/editengdllapi.h"
27 class SvXMLUnitConverter;
29 // class SvxFontItem -----------------------------------------------------
31 /* [Description]
33 This item describes a Font.
36 class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
38 String aFamilyName;
39 String aStyleName;
40 FontFamily eFamily;
41 FontPitch ePitch;
42 rtl_TextEncoding eTextEncoding;
44 static sal_Bool bEnableStoreUnicodeNames;
46 public:
47 TYPEINFO();
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 );
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 );
64 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
65 SfxMapUnit eCoreMetric,
66 SfxMapUnit ePresMetric,
67 OUString &rText, const IntlWrapper * = 0 ) const;
69 // Access methods:
70 void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; }
71 inline const String &GetFamilyName() const { return aFamilyName; }
73 void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; }
74 inline const String &GetStyleName() const { return aStyleName; }
76 void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
77 inline FontFamily GetFamily() const { return eFamily; }
79 void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
80 inline FontPitch GetPitch() const { return ePitch; }
82 void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
84 inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
86 SvxFontItem& operator=(const SvxFontItem& rFont);
88 static void EnableStoreUnicodeNames( sal_Bool bEnable );
92 EDITENG_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian,
93 SvxFontItem& rComplex );
95 #endif // #ifndef _SVX_FONTITEM_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */