Update ooo320-m1
[ooovba.git] / sw / source / core / text / txtinit.cxx
blob4730568fbb64ee1c4a818c4a242cb0c707f4fe77
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: txtinit.cxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
36 #include "errhdl.hxx"
37 #include "txtcfg.hxx"
38 #include "swcache.hxx"
39 #include "fntcache.hxx" // pFntCache ( SwFont/ScrFont-PrtFont Cache )
40 #include "swfntcch.hxx" // pSwFontCache ( SwAttrSet/SwFont Cache )
41 #include "txtfrm.hxx"
42 #include "txtcache.hxx"
43 #include "porlay.hxx"
44 #include "porglue.hxx"
45 #include "porexp.hxx"
46 #include "porrst.hxx"
47 #include "portab.hxx"
48 #include "porfly.hxx"
49 #include "portox.hxx"
50 #include "porref.hxx"
51 #include "porftn.hxx"
52 #include "porhyph.hxx"
53 #include "pordrop.hxx"
54 #include "blink.hxx" // Blink-Manager
55 #include "init.hxx" // Deklarationen fuer _TextInit() und _TextFinit()
56 #include "txtfly.hxx" // SwContourCache
57 #include "dbg_lay.hxx" // Layout Debug Fileausgabe
59 SwCache *SwTxtFrm::pTxtCache = 0;
60 long SwTxtFrm::nMinPrtLine = 0;
61 SwContourCache *pContourCache = 0;
62 SwDropCapCache *pDropCapCache = 0;
64 IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtLine, 50, 50 )
65 IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion, 50, 50 ) //Absaetze
66 IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout, 150, 150 ) //Zeilen
67 IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion, 150, 150 ) //z.B. Blanks am Zeilenende
68 IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion, 200, 100 ) //Attributwechsel
70 /*************************************************************************
71 * _TextInit(), _TextFinit()
72 *************************************************************************/
74 // Werden _nur_ in init.cxx verwendet, dort stehen extern void _TextFinit()
75 // und extern void _TextInit(...)
77 void _TextInit()
79 pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
80 pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
81 SwCache *pTxtCache = new SwCache( 250, 100 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
82 #ifndef PRODUCT
83 , "static SwTxtFrm::pTxtCache"
84 #endif
86 SwTxtFrm::SetTxtCache( pTxtCache );
87 pWaveCol = new Color( COL_GRAY );
88 PROTOCOL_INIT
91 void _TextFinit()
93 PROTOCOL_STOP
94 delete SwTxtFrm::GetTxtCache();
95 delete pSwFontCache;
96 delete pFntCache;
97 delete pBlink;
98 delete pWaveCol;
99 delete pContourCache;
100 SwDropPortion::DeleteDropCapCache();