1*efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*efeef26fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*efeef26fSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*efeef26fSAndrew Rist * distributed with this work for additional information
6*efeef26fSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*efeef26fSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*efeef26fSAndrew Rist * "License"); you may not use this file except in compliance
9*efeef26fSAndrew Rist * with the License. You may obtain a copy of the License at
10*efeef26fSAndrew Rist *
11*efeef26fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*efeef26fSAndrew Rist *
13*efeef26fSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*efeef26fSAndrew Rist * software distributed under the License is distributed on an
15*efeef26fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*efeef26fSAndrew Rist * KIND, either express or implied. See the License for the
17*efeef26fSAndrew Rist * specific language governing permissions and limitations
18*efeef26fSAndrew Rist * under the License.
19*efeef26fSAndrew Rist *
20*efeef26fSAndrew Rist *************************************************************/
21*efeef26fSAndrew Rist
22*efeef26fSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir
29cdf0e10cSrcweir #include "errhdl.hxx"
30cdf0e10cSrcweir #include "txtcfg.hxx"
31cdf0e10cSrcweir #include "swcache.hxx"
32cdf0e10cSrcweir #include "fntcache.hxx" // pFntCache ( SwFont/ScrFont-PrtFont Cache )
33cdf0e10cSrcweir #include "swfntcch.hxx" // pSwFontCache ( SwAttrSet/SwFont Cache )
34cdf0e10cSrcweir #include "txtfrm.hxx"
35cdf0e10cSrcweir #include "txtcache.hxx"
36cdf0e10cSrcweir #include "porlay.hxx"
37cdf0e10cSrcweir #include "porglue.hxx"
38cdf0e10cSrcweir #include "porexp.hxx"
39cdf0e10cSrcweir #include "porrst.hxx"
40cdf0e10cSrcweir #include "portab.hxx"
41cdf0e10cSrcweir #include "porfly.hxx"
42cdf0e10cSrcweir #include "portox.hxx"
43cdf0e10cSrcweir #include "porref.hxx"
44cdf0e10cSrcweir #include "porftn.hxx"
45cdf0e10cSrcweir #include "porhyph.hxx"
46cdf0e10cSrcweir #include "pordrop.hxx"
47cdf0e10cSrcweir #include "blink.hxx" // Blink-Manager
48cdf0e10cSrcweir #include "init.hxx" // Deklarationen fuer _TextInit() und _TextFinit()
49cdf0e10cSrcweir #include "txtfly.hxx" // SwContourCache
50cdf0e10cSrcweir #include "dbg_lay.hxx" // Layout Debug Fileausgabe
51cdf0e10cSrcweir
52cdf0e10cSrcweir SwCache *SwTxtFrm::pTxtCache = 0;
53cdf0e10cSrcweir long SwTxtFrm::nMinPrtLine = 0;
54cdf0e10cSrcweir SwContourCache *pContourCache = 0;
55cdf0e10cSrcweir SwDropCapCache *pDropCapCache = 0;
56cdf0e10cSrcweir
57cdf0e10cSrcweir IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtLine, 50, 50 )
58cdf0e10cSrcweir IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion, 50, 50 ) //Absaetze
59cdf0e10cSrcweir IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout, 150, 150 ) //Zeilen
60cdf0e10cSrcweir IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion, 150, 150 ) //z.B. Blanks am Zeilenende
61cdf0e10cSrcweir IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion, 200, 100 ) //Attributwechsel
62cdf0e10cSrcweir
63cdf0e10cSrcweir /*************************************************************************
64cdf0e10cSrcweir * _TextInit(), _TextFinit()
65cdf0e10cSrcweir *************************************************************************/
66cdf0e10cSrcweir
67cdf0e10cSrcweir // Werden _nur_ in init.cxx verwendet, dort stehen extern void _TextFinit()
68cdf0e10cSrcweir // und extern void _TextInit(...)
69cdf0e10cSrcweir
_TextInit()70cdf0e10cSrcweir void _TextInit()
71cdf0e10cSrcweir {
72cdf0e10cSrcweir pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
73cdf0e10cSrcweir pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
74cdf0e10cSrcweir SwCache *pTxtCache = new SwCache( 250, 100 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
75cdf0e10cSrcweir #ifdef DBG_UTIL
76cdf0e10cSrcweir , "static SwTxtFrm::pTxtCache"
77cdf0e10cSrcweir #endif
78cdf0e10cSrcweir );
79cdf0e10cSrcweir SwTxtFrm::SetTxtCache( pTxtCache );
80cdf0e10cSrcweir pWaveCol = new Color( COL_GRAY );
81cdf0e10cSrcweir PROTOCOL_INIT
82cdf0e10cSrcweir }
83cdf0e10cSrcweir
_TextFinit()84cdf0e10cSrcweir void _TextFinit()
85cdf0e10cSrcweir {
86cdf0e10cSrcweir PROTOCOL_STOP
87cdf0e10cSrcweir delete SwTxtFrm::GetTxtCache();
88cdf0e10cSrcweir delete pSwFontCache;
89cdf0e10cSrcweir delete pFntCache;
90cdf0e10cSrcweir delete pBlink;
91cdf0e10cSrcweir delete pWaveCol;
92cdf0e10cSrcweir delete pContourCache;
93cdf0e10cSrcweir SwDropPortion::DeleteDropCapCache();
94cdf0e10cSrcweir }
95cdf0e10cSrcweir
96cdf0e10cSrcweir
97cdf0e10cSrcweir
98