update dev300-m58
[ooovba.git] / sw / source / core / inc / swfntcch.hxx
blobe6e9859b9db57394e251198a9c4ababae04eb7a2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swfntcch.hxx,v $
10 * $Revision: 1.7.210.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWFNTCCH_HXX
31 #define _SWFNTCCH_HXX
33 #include <tools/mempool.hxx>
35 #define NUM_DEFAULT_VALUES 36
37 #include "swcache.hxx"
38 #include "swfont.hxx"
40 class ViewShell;
41 class SfxPoolItem;
43 /*************************************************************************
44 * class SwFontCache
45 *************************************************************************/
47 class SwFontCache : public SwCache
49 public:
51 inline SwFontCache() : SwCache(50,50
52 #ifndef PRODUCT
53 , "Globaler AttributSet/Font-Cache pSwFontCache"
54 #endif
55 ) {}
59 // AttributSet/Font-Cache, globale Variable, in FontCache.Cxx angelegt
60 extern SwFontCache *pSwFontCache;
62 /*************************************************************************
63 * class SwFontObj
64 *************************************************************************/
66 class SwFontObj : public SwCacheObj
68 friend class SwFontAccess;
70 private:
71 SwFont aSwFont;
72 const SfxPoolItem* pDefaultArray[ NUM_DEFAULT_VALUES ];
74 public:
75 DECL_FIXEDMEMPOOL_NEWDEL(SwFontObj)
77 SwFontObj( const void* pOwner, ViewShell *pSh );
79 virtual ~SwFontObj();
81 inline SwFont *GetFont() { return &aSwFont; }
82 inline const SwFont *GetFont() const { return &aSwFont; }
83 inline const SfxPoolItem** GetDefault() { return pDefaultArray; }
86 /*************************************************************************
87 * class SwFontAccess
88 *************************************************************************/
91 class SwFontAccess : public SwCacheAccess
93 ViewShell *pShell;
94 protected:
95 virtual SwCacheObj *NewObj( );
97 public:
98 SwFontAccess( const void *pOwner, ViewShell *pSh );
99 SwFontObj *Get();
102 #endif