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