2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2017-10-23 22:30:30 +02:00
|
|
|
#include <swcache.hxx>
|
|
|
|
#include <fntcache.hxx>
|
|
|
|
#include <swfntcch.hxx>
|
|
|
|
#include <txtfrm.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include "txtcache.hxx"
|
|
|
|
#include "porlay.hxx"
|
|
|
|
#include "porglue.hxx"
|
|
|
|
#include "porexp.hxx"
|
|
|
|
#include "porrst.hxx"
|
|
|
|
#include "portab.hxx"
|
|
|
|
#include "porfly.hxx"
|
|
|
|
#include "portox.hxx"
|
|
|
|
#include "porref.hxx"
|
|
|
|
#include "porftn.hxx"
|
|
|
|
#include "porhyph.hxx"
|
|
|
|
#include "pordrop.hxx"
|
2017-10-23 22:30:30 +02:00
|
|
|
#include <blink.hxx>
|
|
|
|
#include <init.hxx>
|
|
|
|
#include <txtfly.hxx>
|
|
|
|
#include <dbg_lay.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2015-11-25 06:03:10 -05:00
|
|
|
SwCache *SwTextFrame::pTextCache = nullptr;
|
|
|
|
long SwTextFrame::nMinPrtLine = 0;
|
2015-11-10 10:25:48 +01:00
|
|
|
SwContourCache *pContourCache = nullptr;
|
|
|
|
SwDropCapCache *pDropCapCache = nullptr;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
IMPL_FIXEDMEMPOOL_NEWDEL( SwTextLine )
|
2012-03-28 17:24:08 +02:00
|
|
|
IMPL_FIXEDMEMPOOL_NEWDEL( SwParaPortion ) // Paragraphs
|
|
|
|
IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout ) // Lines
|
|
|
|
IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion ) // e.g. Blanks at the line end
|
2015-05-20 13:05:49 +02:00
|
|
|
IMPL_FIXEDMEMPOOL_NEWDEL( SwTextPortion ) // Attribute change
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2012-03-28 17:24:08 +02:00
|
|
|
// Are ONLY used in init.cxx.
|
2016-04-22 10:08:07 +02:00
|
|
|
// There we have extern void TextFinit()
|
|
|
|
// and extern void TextInit_(...)
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2016-04-22 10:08:07 +02:00
|
|
|
void TextInit_()
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2012-03-28 17:24:08 +02:00
|
|
|
pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
|
2015-05-20 13:05:49 +02:00
|
|
|
pSwFontCache = new SwFontCache; // Cache for SwTextFormatColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
|
2015-11-25 06:03:10 -05:00
|
|
|
SwCache *pTextCache = new SwCache( 250 // Cache for SwTextFrame -> SwTextLine = { SwParaPortion* pLine }
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
2015-11-25 06:03:10 -05:00
|
|
|
, "static SwTextFrame::pTextCache"
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
);
|
2015-11-25 06:03:10 -05:00
|
|
|
SwTextFrame::SetTextCache( pTextCache );
|
2006-01-10 12:40:50 +00:00
|
|
|
pWaveCol = new Color( COL_GRAY );
|
2000-09-18 23:08:29 +00:00
|
|
|
PROTOCOL_INIT
|
|
|
|
}
|
|
|
|
|
2016-04-22 10:08:07 +02:00
|
|
|
void TextFinit()
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2001-10-01 13:33:00 +00:00
|
|
|
PROTOCOL_STOP
|
2015-11-25 06:03:10 -05:00
|
|
|
delete SwTextFrame::GetTextCache();
|
2000-09-18 23:08:29 +00:00
|
|
|
delete pSwFontCache;
|
|
|
|
delete pFntCache;
|
|
|
|
delete pBlink;
|
|
|
|
delete pWaveCol;
|
|
|
|
delete pContourCache;
|
|
|
|
SwDropPortion::DeleteDropCapCache();
|
|
|
|
}
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|