Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include "swcache.hxx"
31 : : #include "fntcache.hxx" // pFntCache ( SwFont/ScrFont-PrtFont cache )
32 : : #include "swfntcch.hxx" // pSwFontCache ( SwAttrSet/SwFont cache )
33 : : #include "txtfrm.hxx"
34 : : #include "txtcache.hxx"
35 : : #include "porlay.hxx"
36 : : #include "porglue.hxx"
37 : : #include "porexp.hxx"
38 : : #include "porrst.hxx"
39 : : #include "portab.hxx"
40 : : #include "porfly.hxx"
41 : : #include "portox.hxx"
42 : : #include "porref.hxx"
43 : : #include "porftn.hxx"
44 : : #include "porhyph.hxx"
45 : : #include "pordrop.hxx"
46 : : #include "blink.hxx" // Blink manager
47 : : #include "init.hxx" // Declarations for _TextInit() and _TextFinit()
48 : : #include "txtfly.hxx" // SwContourCache
49 : : #include "dbg_lay.hxx" // Layout Debug file output
50 : :
51 : : SwCache *SwTxtFrm::pTxtCache = 0;
52 : : long SwTxtFrm::nMinPrtLine = 0;
53 : : SwContourCache *pContourCache = 0;
54 : : SwDropCapCache *pDropCapCache = 0;
55 : :
56 : 73 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtLine )
57 : 73 : IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion ) // Paragraphs
58 : 73 : IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout ) // Lines
59 : 73 : IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion ) // e.g. Blanks at the line end
60 : 73 : IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion ) // Attribute change
61 : :
62 : : /*************************************************************************
63 : : * _TextInit(), _TextFinit()
64 : : *************************************************************************/
65 : :
66 : : // Are ONLY used in init.cxx.
67 : : // There we have extern void _TextFinit()
68 : : // and extern void _TextInit(...)
69 : :
70 : 73 : void _TextInit()
71 : : {
72 [ + - ]: 73 : pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
73 [ + - ]: 73 : pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
74 : : SwCache *pTxtCache = new SwCache( 250 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
75 : : #ifdef DBG_UTIL
76 : : , "static SwTxtFrm::pTxtCache"
77 : : #endif
78 [ + - ]: 73 : );
79 : 73 : SwTxtFrm::SetTxtCache( pTxtCache );
80 : 73 : pWaveCol = new Color( COL_GRAY );
81 : : PROTOCOL_INIT
82 : 73 : }
83 : :
84 : 73 : void _TextFinit()
85 : : {
86 : : PROTOCOL_STOP
87 [ + - ]: 73 : delete SwTxtFrm::GetTxtCache();
88 [ + - ]: 73 : delete pSwFontCache;
89 [ + - ]: 73 : delete pFntCache;
90 [ + + ]: 73 : delete pBlink;
91 : 73 : delete pWaveCol;
92 [ + + ]: 73 : delete pContourCache;
93 : 73 : SwDropPortion::DeleteDropCapCache();
94 [ + - ][ + - ]: 292 : }
95 : :
96 : :
97 : :
98 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|