LibreOffice Module sw (master) 1
swfntcch.hxx
Go to the documentation of this file.
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_SW_SOURCE_CORE_INC_SWFNTCCH_HXX
20#define INCLUDED_SW_SOURCE_CORE_INC_SWFNTCCH_HXX
21
22#define NUM_DEFAULT_VALUES 39
23
24#include "swcache.hxx"
25#include "swfont.hxx"
26
27class SwViewShell;
28class SfxPoolItem;
29
30class SwFontCache : public SwCache
31{
32public:
33
35#ifdef DBG_UTIL
36 , "Global AttributeSet/Font-Cache pSwFontCache"
37#endif
38 ) {}
39
40};
41
42// AttributeSet/Font-Cache, globale Variable, in FontCache.Cxx angelegt
44
45class SwFontObj final : public SwCacheObj
46{
47 friend class SwFontAccess;
48
49private:
52
53public:
54 SwFontObj( const void* pOwner, SwViewShell *pSh );
55
56 virtual ~SwFontObj() override;
57
58 SwFont& GetFont() { return m_aSwFont; }
59 const SwFont& GetFont() const { return m_aSwFont; }
61};
62
63class SwFontAccess final : public SwCacheAccess
64{
66
67 virtual SwCacheObj *NewObj( ) override;
68
69public:
70 SwFontAccess( const void *pOwner, SwViewShell *pSh );
71 SwFontObj *Get();
72};
73
74#endif
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Access class for the Cache.
Definition: swcache.hxx:198
The Cache object base class Users of the Cache must derive a class from the SwCacheObj and store thei...
Definition: swcache.hxx:137
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
Definition: swfntcch.cxx:61
SwViewShell * m_pShell
Definition: swfntcch.hxx:65
SwFontAccess(const void *pOwner, SwViewShell *pSh)
Definition: swfntcch.cxx:49
SwFontObj * Get()
Definition: swfntcch.cxx:56
SwFontObj(const void *pOwner, SwViewShell *pSh)
Definition: swfntcch.cxx:35
SwFont & GetFont()
Definition: swfntcch.hxx:58
const SfxPoolItem * m_pDefaultArray[NUM_DEFAULT_VALUES]
Definition: swfntcch.hxx:51
virtual ~SwFontObj() override
Definition: swfntcch.cxx:45
SwFont m_aSwFont
Definition: swfntcch.hxx:50
const SfxPoolItem ** GetDefault()
Definition: swfntcch.hxx:60
const SwFont & GetFont() const
Definition: swfntcch.hxx:59
#define NUM_DEFAULT_VALUES
Definition: swfntcch.hxx:22
SwFontCache * pSwFontCache
Definition: swfntcch.cxx:33