1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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 ************************************************************************/
33 #include <tools/mempool.hxx>
35 #define NUM_DEFAULT_VALUES 36
37 #include "swcache.hxx"
43 /*************************************************************************
45 *************************************************************************/
47 class SwFontCache
: public SwCache
51 inline SwFontCache() : SwCache(50,50
53 , "Globaler AttributSet/Font-Cache pSwFontCache"
59 // AttributSet/Font-Cache, globale Variable, in FontCache.Cxx angelegt
60 extern SwFontCache
*pSwFontCache
;
62 /*************************************************************************
64 *************************************************************************/
66 class SwFontObj
: public SwCacheObj
68 friend class SwFontAccess
;
72 const SfxPoolItem
* pDefaultArray
[ NUM_DEFAULT_VALUES
];
75 DECL_FIXEDMEMPOOL_NEWDEL(SwFontObj
)
77 SwFontObj( const void* pOwner
, ViewShell
*pSh
);
81 inline SwFont
*GetFont() { return &aSwFont
; }
82 inline const SwFont
*GetFont() const { return &aSwFont
; }
83 inline const SfxPoolItem
** GetDefault() { return pDefaultArray
; }
86 /*************************************************************************
88 *************************************************************************/
91 class SwFontAccess
: public SwCacheAccess
95 virtual SwCacheObj
*NewObj( );
98 SwFontAccess( const void *pOwner
, ViewShell
*pSh
);