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