Line data Source code
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 :
20 :
21 : #include "swcache.hxx"
22 : #include "fntcache.hxx" // pFntCache ( SwFont/ScrFont-PrtFont cache )
23 : #include "swfntcch.hxx" // pSwFontCache ( SwAttrSet/SwFont cache )
24 : #include "txtfrm.hxx"
25 : #include "txtcache.hxx"
26 : #include "porlay.hxx"
27 : #include "porglue.hxx"
28 : #include "porexp.hxx"
29 : #include "porrst.hxx"
30 : #include "portab.hxx"
31 : #include "porfly.hxx"
32 : #include "portox.hxx"
33 : #include "porref.hxx"
34 : #include "porftn.hxx"
35 : #include "porhyph.hxx"
36 : #include "pordrop.hxx"
37 : #include "blink.hxx" // Blink manager
38 : #include "init.hxx" // Declarations for _TextInit() and _TextFinit()
39 : #include "txtfly.hxx" // SwContourCache
40 : #include "dbg_lay.hxx" // Layout Debug file output
41 :
42 : SwCache *SwTxtFrm::pTxtCache = 0;
43 : long SwTxtFrm::nMinPrtLine = 0;
44 : SwContourCache *pContourCache = 0;
45 : SwDropCapCache *pDropCapCache = 0;
46 :
47 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtLine )
48 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion ) // Paragraphs
49 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout ) // Lines
50 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion ) // e.g. Blanks at the line end
51 33 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion ) // Attribute change
52 :
53 : /*************************************************************************
54 : * _TextInit(), _TextFinit()
55 : *************************************************************************/
56 :
57 : // Are ONLY used in init.cxx.
58 : // There we have extern void _TextFinit()
59 : // and extern void _TextInit(...)
60 :
61 33 : void _TextInit()
62 : {
63 33 : pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
64 33 : pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
65 : SwCache *pTxtCache = new SwCache( 250 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
66 : #ifdef DBG_UTIL
67 : , "static SwTxtFrm::pTxtCache"
68 : #endif
69 33 : );
70 33 : SwTxtFrm::SetTxtCache( pTxtCache );
71 33 : pWaveCol = new Color( COL_GRAY );
72 : PROTOCOL_INIT
73 33 : }
74 :
75 33 : void _TextFinit()
76 : {
77 : PROTOCOL_STOP
78 33 : delete SwTxtFrm::GetTxtCache();
79 33 : delete pSwFontCache;
80 33 : delete pFntCache;
81 33 : delete pBlink;
82 33 : delete pWaveCol;
83 33 : delete pContourCache;
84 33 : SwDropPortion::DeleteDropCapCache();
85 132 : }
86 :
87 :
88 :
89 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|