/************************************************************************* * * $RCSfile: swtypes.cxx,v $ * * $Revision: 1.5 $ * * last change: $Author: jp $ $Date: 2000-11-13 10:47:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses * * - GNU Lesser General Public License Version 2.1 * - Sun Industry Standards Source License Version 1.1 * * Sun Microsystems Inc., October, 2000 * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2000 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * * Sun Industry Standards Source License Version 1.1 * ================================================= * The contents of this file are subject to the Sun Industry Standards * Source License Version 1.1 (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.openoffice.org/license.html. * * Software provided under this License is provided on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. * See the License for the specific provisions governing your rights and * obligations concerning the Software. * * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * * Copyright: 2000 by Sun Microsystems, Inc. * * All Rights Reserved. * * Contributor(s): _______________________________________ * * ************************************************************************/ #ifdef PRECOMPILED #include "core_pch.hxx" #endif #pragma hdrstop #ifndef _SV_WINDOW_HXX //autogen #include #endif #ifndef _SV_GRAPH_HXX //autogen #include #endif #ifndef _OFF_APP_HXX //autogen #include #endif #ifndef _OFA_OSPLCFG_HXX //autogen #include #endif #ifndef _COMPHELPER_PROCESSFACTORY_HXX_ #include #endif #ifndef _COM_SUN_STAR_LINGUISTIC2_XSPELLCHECKER1_HPP_ #include #endif #ifndef _COM_SUN_STAR_LINGUISTIC2_XHYPHENATOR_HPP_ #include #endif #ifndef _UNO_LINGU_HXX #include #endif #ifndef _COM_SUN_STAR_LINGUISTIC2_XTHESAURUS_HPP_ #include #endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include #endif #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include #endif #ifndef _PAGEFRM_HXX #include #endif #ifndef _SWATRSET_HXX #include #endif #ifndef _FRMFMT_HXX #include #endif #ifndef _FRMTOOL_HXX #include #endif #ifndef _NDTXT_HXX #include #endif #ifndef _UNDOBJ_HXX #include #endif #ifndef _SWTABLE_HXX #include #endif #ifndef _VISCRS_HXX #include #endif #ifndef _FNTCACHE_HXX #include #endif #ifndef _SWFNTCCH_HXX #include #endif #ifndef _HFFRM_HXX #include #endif #ifndef _COLFRM_HXX #include #endif #ifndef _BODYFRM_HXX #include #endif #ifndef _TABFRM_HXX #include #endif #ifndef _TXTFRM_HXX #include #endif #ifndef _SWTBLFMT_HXX #include #endif #ifndef _ROWFRM_HXX #include #endif #ifndef _CELLFRM_HXX #include #endif #ifndef _SECTFRM_HXX #include #endif using namespace ::com::sun::star; using namespace ::com::sun::star::linguistic2; using namespace ::comphelper; #ifndef PROFILE // Code zum Initialisieren von Statics im eigenen Code-Segment #pragma code_seg( "SWSTATICS" ) #endif ByteString aEmptyByteStr; // Konstante Strings String aEmptyStr; // Konstante Strings String aDotStr('.'); // Konstante Strings IMPL_FIXEDMEMPOOL_NEWDEL( SwAttrSet, 25, 25 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwStartNode, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwEndNode, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBox, 50, 50 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoDelete, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoInsert, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwPaM, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwCursor, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtNode, 50, 50 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwpHints, 25, 25 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFntObj, 50, 50 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFontObj, 50, 50 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFrmFmt, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFlyFrmFmt, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwDrawFrmFmt, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwBorderAttrs, 100, 100 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwCellFrm, 50, 50 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwRowFrm, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwColumnFrm, 40, 40 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwSectionFrm, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTabFrm, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwPageFrm, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwBodyFrm, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwHeaderFrm, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwFooterFrm, 20, 20 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtFrm, 50, 50 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableFmt, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFmt, 10, 10 ) IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFmt, 50, 50 ) #ifndef PROFILE #pragma code_seg() #endif Size GetGraphicSizeTwip( const Graphic& rGraphic, OutputDevice* pOutDev ) { const MapMode aMapTwip( MAP_TWIP ); Size aSize( rGraphic.GetPrefSize() ); if( MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit() ) { if( !pOutDev ) pOutDev = Application::GetDefaultDevice(); aSize = pOutDev->PixelToLogic( aSize, aMapTwip ); } else aSize = OutputDevice::LogicToLogic( aSize, rGraphic.GetPrefMapMode(), aMapTwip ); return aSize; } uno::Reference< XSpellChecker1 > GetSpellChecker() { return LinguMgr::GetSpellChecker(); } uno::Reference< XHyphenator > GetHyphenator() { return LinguMgr::GetHyphenator(); } uno::Reference< XThesaurus > GetThesaurus() { return LinguMgr::GetThesaurus(); } uno::Reference< XDictionaryList > GetDictionaryList() { return LinguMgr::GetDictionaryList(); } uno::Reference< beans::XPropertySet > GetLinguPropertySet() { return LinguMgr::GetLinguPropertySet(); }