1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: txtinit.cxx,v $
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"
38 #include "swcache.hxx"
39 #include "fntcache.hxx" // pFntCache ( SwFont/ScrFont-PrtFont Cache )
40 #include "swfntcch.hxx" // pSwFontCache ( SwAttrSet/SwFont Cache )
42 #include "txtcache.hxx"
44 #include "porglue.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(...)
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 }
83 , "static SwTxtFrm::pTxtCache"
86 SwTxtFrm::SetTxtCache( pTxtCache
);
87 pWaveCol
= new Color( COL_GRAY
);
94 delete SwTxtFrm::GetTxtCache();
100 SwDropPortion::DeleteDropCapCache();