xref: /aoo41x/main/sw/source/core/text/txtio.cxx (revision efeef26f)
1*efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*efeef26fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*efeef26fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*efeef26fSAndrew Rist  * distributed with this work for additional information
6*efeef26fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*efeef26fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*efeef26fSAndrew Rist  * "License"); you may not use this file except in compliance
9*efeef26fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*efeef26fSAndrew Rist  *
11*efeef26fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*efeef26fSAndrew Rist  *
13*efeef26fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*efeef26fSAndrew Rist  * software distributed under the License is distributed on an
15*efeef26fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*efeef26fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*efeef26fSAndrew Rist  * specific language governing permissions and limitations
18*efeef26fSAndrew Rist  * under the License.
19*efeef26fSAndrew Rist  *
20*efeef26fSAndrew Rist  *************************************************************/
21*efeef26fSAndrew Rist 
22*efeef26fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifdef DBG_UTIL
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "viewsh.hxx"       // IsDbg()
30cdf0e10cSrcweir #include "viewopt.hxx"      // IsDbg()
31cdf0e10cSrcweir #include "txtatr.hxx"
32cdf0e10cSrcweir #include "errhdl.hxx"
33cdf0e10cSrcweir #include "txtcfg.hxx"
34cdf0e10cSrcweir #include "txtfrm.hxx"       // IsDbg()
35cdf0e10cSrcweir #include "rootfrm.hxx"
36cdf0e10cSrcweir #include "flyfrms.hxx"
37cdf0e10cSrcweir #include "inftxt.hxx"
38cdf0e10cSrcweir #include "porexp.hxx"
39cdf0e10cSrcweir #include "porfld.hxx"
40cdf0e10cSrcweir #include "porfly.hxx"
41cdf0e10cSrcweir #include "porftn.hxx"
42cdf0e10cSrcweir #include "porglue.hxx"
43cdf0e10cSrcweir #include "porhyph.hxx"
44cdf0e10cSrcweir #include "porlay.hxx"
45cdf0e10cSrcweir #include "porlin.hxx"
46cdf0e10cSrcweir #include "porref.hxx"
47cdf0e10cSrcweir #include "porrst.hxx"
48cdf0e10cSrcweir #include "portab.hxx"
49cdf0e10cSrcweir #include "portox.hxx"
50cdf0e10cSrcweir #include "portxt.hxx"
51cdf0e10cSrcweir #include "pordrop.hxx"
52cdf0e10cSrcweir #include "pormulti.hxx"
53cdf0e10cSrcweir #include "ndhints.hxx"
54cdf0e10cSrcweir 
55cdf0e10cSrcweir // So kann man die Layoutstruktur ausgeben lassen
56cdf0e10cSrcweir // #define AMA_LAYOUT
57cdf0e10cSrcweir #ifdef AMA_LAYOUT
58cdf0e10cSrcweir #include <stdio.h>
59cdf0e10cSrcweir #include <stdlib.h> 		// getenv()
60cdf0e10cSrcweir #include <flowfrm.hxx>
61cdf0e10cSrcweir #include <pagefrm.hxx>
62cdf0e10cSrcweir #include <svx/svdobj.hxx>
63cdf0e10cSrcweir #include <dflyobj.hxx>
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 
lcl_OutFollow(XubString & rTmp,const SwFrm * pFrm)66cdf0e10cSrcweir void lcl_OutFollow( XubString &rTmp, const SwFrm* pFrm )
67cdf0e10cSrcweir {
68cdf0e10cSrcweir 	if( pFrm->IsFlowFrm() )
69cdf0e10cSrcweir 	{
70cdf0e10cSrcweir 		const SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( pFrm );
71cdf0e10cSrcweir 		if( pFlow->IsFollow() || pFlow->GetFollow() )
72cdf0e10cSrcweir 		{
73cdf0e10cSrcweir 			rTmp += "(";
74cdf0e10cSrcweir 			if( pFlow->IsFollow() )
75cdf0e10cSrcweir 				rTmp += ".";
76cdf0e10cSrcweir 			if( pFlow->GetFollow() )
77cdf0e10cSrcweir 			{
78cdf0e10cSrcweir 				MSHORT nFrmId = pFlow->GetFollow()->GetFrm()->GetFrmId();
79cdf0e10cSrcweir 				rTmp += nFrmId;
80cdf0e10cSrcweir 			}
81cdf0e10cSrcweir 			rTmp += ")";
82cdf0e10cSrcweir 		}
83cdf0e10cSrcweir 	}
84cdf0e10cSrcweir }
85cdf0e10cSrcweir 
lcl_OutFrame(SvFileStream & rStr,const SwFrm * pFrm,ByteString & rSp,sal_Bool bNxt)86cdf0e10cSrcweir void lcl_OutFrame( SvFileStream& rStr, const SwFrm* pFrm, ByteString& rSp, sal_Bool bNxt )
87cdf0e10cSrcweir {
88cdf0e10cSrcweir 	if( !pFrm )
89cdf0e10cSrcweir 		return;
90cdf0e10cSrcweir 	KSHORT nSpc = 0;
91cdf0e10cSrcweir 	MSHORT nFrmId = pFrm->GetFrmId();
92cdf0e10cSrcweir 	ByteString aTmp;
93cdf0e10cSrcweir 	if( pFrm->IsLayoutFrm() )
94cdf0e10cSrcweir 	{
95cdf0e10cSrcweir 		if( pFrm->IsRootFrm() )
96cdf0e10cSrcweir 			aTmp = "R";
97cdf0e10cSrcweir 		else if( pFrm->IsPageFrm() )
98cdf0e10cSrcweir 			aTmp = "P";
99cdf0e10cSrcweir 		else if( pFrm->IsBodyFrm() )
100cdf0e10cSrcweir 			aTmp = "B";
101cdf0e10cSrcweir 		else if( pFrm->IsColumnFrm() )
102cdf0e10cSrcweir 			aTmp = "C";
103cdf0e10cSrcweir 		else if( pFrm->IsTabFrm() )
104cdf0e10cSrcweir 			aTmp = "Tb";
105cdf0e10cSrcweir 		else if( pFrm->IsRowFrm() )
106cdf0e10cSrcweir 			aTmp = "Rw";
107cdf0e10cSrcweir 		else if( pFrm->IsCellFrm() )
108cdf0e10cSrcweir 			aTmp = "Ce";
109cdf0e10cSrcweir 		else if( pFrm->IsSctFrm() )
110cdf0e10cSrcweir 			aTmp = "S";
111cdf0e10cSrcweir 		else if( pFrm->IsFlyFrm() )
112cdf0e10cSrcweir 		{
113cdf0e10cSrcweir 			aTmp = "F";
114cdf0e10cSrcweir 			const SwFlyFrm *pFly = (SwFlyFrm*)pFrm;
115cdf0e10cSrcweir 			if( pFly->IsFlyInCntFrm() )
116cdf0e10cSrcweir 				aTmp += "in";
117cdf0e10cSrcweir 			else if( pFly->IsFlyAtCntFrm() )
118cdf0e10cSrcweir 			{
119cdf0e10cSrcweir 				aTmp += "a";
120cdf0e10cSrcweir 				if( pFly->IsAutoPos() )
121cdf0e10cSrcweir 					aTmp += "u";
122cdf0e10cSrcweir 				else
123cdf0e10cSrcweir 					aTmp += "t";
124cdf0e10cSrcweir 			}
125cdf0e10cSrcweir 			else
126cdf0e10cSrcweir 				aTmp += "l";
127cdf0e10cSrcweir 		}
128cdf0e10cSrcweir 		else if( pFrm->IsHeaderFrm() )
129cdf0e10cSrcweir 			aTmp = "H";
130cdf0e10cSrcweir 		else if( pFrm->IsFooterFrm() )
131cdf0e10cSrcweir 			aTmp = "Fz";
132cdf0e10cSrcweir 		else if( pFrm->IsFtnContFrm() )
133cdf0e10cSrcweir 			aTmp = "Fc";
134cdf0e10cSrcweir 		else if( pFrm->IsFtnFrm() )
135cdf0e10cSrcweir 			aTmp = "Fn";
136cdf0e10cSrcweir 		else
137cdf0e10cSrcweir 			aTmp = "?L?";
138cdf0e10cSrcweir 		aTmp += nFrmId;
139cdf0e10cSrcweir 		lcl_OutFollow( aTmp, pFrm );
140cdf0e10cSrcweir 		aTmp += " ";
141cdf0e10cSrcweir 		rStr << aTmp;
142cdf0e10cSrcweir 		nSpc = aTmp.Len();
143cdf0e10cSrcweir 		rSp.Expand( nSpc + rSp.Len() );
144cdf0e10cSrcweir 		lcl_OutFrame( rStr, ((SwLayoutFrm*)pFrm)->Lower(), rSp, sal_True );
145cdf0e10cSrcweir 	}
146cdf0e10cSrcweir 	else
147cdf0e10cSrcweir 	{
148cdf0e10cSrcweir 		if( pFrm->IsTxtFrm() )
149cdf0e10cSrcweir 			aTmp = "T";
150cdf0e10cSrcweir 		else if( pFrm->IsNoTxtFrm() )
151cdf0e10cSrcweir 			aTmp = "N";
152cdf0e10cSrcweir 		else
153cdf0e10cSrcweir 			aTmp = "?C?";
154cdf0e10cSrcweir 		aTmp += nFrmId;
155cdf0e10cSrcweir 		lcl_OutFollow( aTmp, pFrm );
156cdf0e10cSrcweir 		aTmp += " ";
157cdf0e10cSrcweir 		rStr << aTmp;
158cdf0e10cSrcweir 		nSpc = aTmp.Len();
159cdf0e10cSrcweir 		rSp.Expand( nSpc + rSp.Len() );
160cdf0e10cSrcweir 	}
161cdf0e10cSrcweir 	if( pFrm->IsPageFrm() )
162cdf0e10cSrcweir 	{
163cdf0e10cSrcweir 		const SwPageFrm* pPg = (SwPageFrm*)pFrm;
164cdf0e10cSrcweir         const SwSortedObjs *pSorted = pPg->GetSortedObjs();
165cdf0e10cSrcweir 		const MSHORT nCnt = pSorted ? pSorted->Count() : 0;
166cdf0e10cSrcweir 		if( nCnt )
167cdf0e10cSrcweir 		{
168cdf0e10cSrcweir 			for( MSHORT i=0; i < nCnt; ++i )
169cdf0e10cSrcweir 			{
170cdf0e10cSrcweir                 // --> OD 2004-07-07 #i28701# - consider changed type of
171cdf0e10cSrcweir                 // <SwSortedObjs> entries
172cdf0e10cSrcweir                 SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ];
173cdf0e10cSrcweir                 if( pAnchoredObj->ISA(SwFlyFrm) )
174cdf0e10cSrcweir 				{
175cdf0e10cSrcweir                     SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
176cdf0e10cSrcweir 					lcl_OutFrame( rStr, pFly, rSp, sal_False );
177cdf0e10cSrcweir 				}
178cdf0e10cSrcweir 				else
179cdf0e10cSrcweir 				{
180cdf0e10cSrcweir                     aTmp = pAnchoredObj->GetDrawObj()->IsUnoObj() ? "UNO" : "Drw";
181cdf0e10cSrcweir 					rStr << aTmp;
182cdf0e10cSrcweir 				}
183cdf0e10cSrcweir                 // <--
184cdf0e10cSrcweir 				if( i < nCnt - 1 )
185cdf0e10cSrcweir 					rStr << endl << rSp;
186cdf0e10cSrcweir 			}
187cdf0e10cSrcweir 		}
188cdf0e10cSrcweir 	}
189cdf0e10cSrcweir 	else if( pFrm->GetDrawObjs() )
190cdf0e10cSrcweir 	{
191cdf0e10cSrcweir 		MSHORT nCnt = pFrm->GetDrawObjs()->Count();
192cdf0e10cSrcweir 		if( nCnt )
193cdf0e10cSrcweir 		{
194cdf0e10cSrcweir 			for( MSHORT i=0; i < nCnt; ++i )
195cdf0e10cSrcweir 			{
196cdf0e10cSrcweir                 // --> OD 2004-07-07 #i28701# - consider changed type of
197cdf0e10cSrcweir                 // <SwSortedObjs> entries
198cdf0e10cSrcweir                 SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[ i ];
199cdf0e10cSrcweir                 if( pAnchoredObj->ISA(SwFlyFrm) )
200cdf0e10cSrcweir 				{
201cdf0e10cSrcweir                     SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
202cdf0e10cSrcweir 					lcl_OutFrame( rStr, pFly, rSp, sal_False );
203cdf0e10cSrcweir 				}
204cdf0e10cSrcweir 				else
205cdf0e10cSrcweir 				{
206cdf0e10cSrcweir                     aTmp = pAnchoredObj->GetDrawObj()->IsUnoObj() ? "UNO" : "Drw";
207cdf0e10cSrcweir 					rStr << aTmp;
208cdf0e10cSrcweir 				}
209cdf0e10cSrcweir 				if( i < nCnt - 1 )
210cdf0e10cSrcweir 					rStr << endl << rSp;
211cdf0e10cSrcweir 			}
212cdf0e10cSrcweir 		}
213cdf0e10cSrcweir 	}
214cdf0e10cSrcweir 	if( nSpc )
215cdf0e10cSrcweir 		rSp.Erase( rSp.Len() - nSpc );
216cdf0e10cSrcweir 	if( bNxt && pFrm->GetNext() )
217cdf0e10cSrcweir 	{
218cdf0e10cSrcweir 		do
219cdf0e10cSrcweir 		{
220cdf0e10cSrcweir 			pFrm = pFrm->GetNext();
221cdf0e10cSrcweir 			rStr << endl << rSp;
222cdf0e10cSrcweir 			lcl_OutFrame( rStr, pFrm, rSp, sal_False );
223cdf0e10cSrcweir 		} while ( pFrm->GetNext() );
224cdf0e10cSrcweir 	}
225cdf0e10cSrcweir }
226cdf0e10cSrcweir 
LayOutPut(const SwFrm * pFrm)227cdf0e10cSrcweir void LayOutPut( const SwFrm* pFrm )
228cdf0e10cSrcweir {
229cdf0e10cSrcweir     static char* pOutName = 0;
230cdf0e10cSrcweir 	const sal_Bool bFirstOpen = pOutName ? sal_False : sal_True;
231cdf0e10cSrcweir 	if( bFirstOpen )
232cdf0e10cSrcweir 	{
233cdf0e10cSrcweir 		char *pPath = getenv( "TEMP" );
234cdf0e10cSrcweir 		char *pName = "layout.txt";
235cdf0e10cSrcweir 		if( !pPath )
236cdf0e10cSrcweir 			pOutName = pName;
237cdf0e10cSrcweir 		else
238cdf0e10cSrcweir 		{
239cdf0e10cSrcweir 			const int nLen = strlen(pPath);
240cdf0e10cSrcweir 			// fuer dieses new wird es kein delete geben.
241cdf0e10cSrcweir 			pOutName = new char[nLen + strlen(pName) + 3];
242cdf0e10cSrcweir 			if(nLen && (pPath[nLen-1] == '\\') || (pPath[nLen-1] == '/'))
243cdf0e10cSrcweir 				snprintf( pOutName, sizeof(pOutName), "%s%s", pPath, pName );
244cdf0e10cSrcweir 			else
245cdf0e10cSrcweir 				snprintf( pOutName, sizeof(pOutName), "%s/%s", pPath, pName );
246cdf0e10cSrcweir 		}
247cdf0e10cSrcweir 	}
248cdf0e10cSrcweir 	SvFileStream aStream( pOutName, (bFirstOpen
249cdf0e10cSrcweir 										? STREAM_WRITE | STREAM_TRUNC
250cdf0e10cSrcweir 										: STREAM_WRITE ));
251cdf0e10cSrcweir 
252cdf0e10cSrcweir 	if( !aStream.GetError() )
253cdf0e10cSrcweir 	{
254cdf0e10cSrcweir 		if ( bFirstOpen )
255cdf0e10cSrcweir 			aStream << "Layout-Struktur";
256cdf0e10cSrcweir 		else
257cdf0e10cSrcweir 			aStream.Seek( STREAM_SEEK_TO_END );
258cdf0e10cSrcweir 		aStream << endl;
259cdf0e10cSrcweir 		aStream << "---------------------------------------------" << endl;
260cdf0e10cSrcweir 		XubString aSpace;
261cdf0e10cSrcweir 		lcl_OutFrame( aStream, pFrm, aSpace, sal_False );
262cdf0e10cSrcweir 	}
263cdf0e10cSrcweir }
264cdf0e10cSrcweir 
265cdf0e10cSrcweir #endif
266cdf0e10cSrcweir 
operator <<(SvStream & rOs,const SwpHints &)267cdf0e10cSrcweir SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ ostream
268cdf0e10cSrcweir {
269cdf0e10cSrcweir 	rOs << " {HINTS:";
270cdf0e10cSrcweir 
271cdf0e10cSrcweir // REMOVED
272cdf0e10cSrcweir 
273cdf0e10cSrcweir 	rOs << '}';
274cdf0e10cSrcweir 	return rOs;
275cdf0e10cSrcweir }
276cdf0e10cSrcweir 
277cdf0e10cSrcweir /*************************************************************************
278cdf0e10cSrcweir  *                          IsDbg()
279cdf0e10cSrcweir  *************************************************************************/
280cdf0e10cSrcweir 
IsDbg(const SwTxtFrm * pFrm)281cdf0e10cSrcweir sal_Bool IsDbg( const SwTxtFrm *pFrm )
282cdf0e10cSrcweir {
283cdf0e10cSrcweir 	if( pFrm && pFrm->getRootFrm()->GetCurrShell() )
284cdf0e10cSrcweir 		return pFrm->getRootFrm()->GetCurrShell()->GetViewOptions()->IsTest4();
285cdf0e10cSrcweir 	else
286cdf0e10cSrcweir 		return sal_False;
287cdf0e10cSrcweir }
288cdf0e10cSrcweir 
289cdf0e10cSrcweir #if OSL_DEBUG_LEVEL < 2
290cdf0e10cSrcweir 
Error()291cdf0e10cSrcweir static void Error()
292cdf0e10cSrcweir {
293cdf0e10cSrcweir 	// wegen PM und BCC
294cdf0e10cSrcweir 	sal_Bool bFalse = sal_False;
295cdf0e10cSrcweir 	ASSERT( bFalse, "txtio: No debug version" );
296cdf0e10cSrcweir }
297cdf0e10cSrcweir 
298cdf0e10cSrcweir #define IMPL_OUTOP(class) \
299cdf0e10cSrcweir         SvStream &class::operator<<( SvStream &rOs ) const /*$ostream*/\
300cdf0e10cSrcweir 		{ \
301cdf0e10cSrcweir 			Error(); \
302cdf0e10cSrcweir 			return rOs; \
303cdf0e10cSrcweir 		}
304cdf0e10cSrcweir 
305cdf0e10cSrcweir IMPL_OUTOP( SwTxtPortion )
IMPL_OUTOP(SwLinePortion)306cdf0e10cSrcweir IMPL_OUTOP( SwLinePortion )
307cdf0e10cSrcweir IMPL_OUTOP( SwBreakPortion )
308cdf0e10cSrcweir IMPL_OUTOP( SwGluePortion )
309cdf0e10cSrcweir IMPL_OUTOP( SwFldPortion )
310cdf0e10cSrcweir IMPL_OUTOP( SwHiddenPortion )
311cdf0e10cSrcweir IMPL_OUTOP( SwHyphPortion )
312cdf0e10cSrcweir IMPL_OUTOP( SwFixPortion )
313cdf0e10cSrcweir IMPL_OUTOP( SwFlyPortion )
314cdf0e10cSrcweir IMPL_OUTOP( SwFlyCntPortion )
315cdf0e10cSrcweir IMPL_OUTOP( SwMarginPortion )
316cdf0e10cSrcweir IMPL_OUTOP( SwNumberPortion )
317cdf0e10cSrcweir IMPL_OUTOP( SwBulletPortion )
318cdf0e10cSrcweir IMPL_OUTOP( SwGrfNumPortion )
319cdf0e10cSrcweir IMPL_OUTOP( SwLineLayout )
320cdf0e10cSrcweir IMPL_OUTOP( SwParaPortion )
321cdf0e10cSrcweir IMPL_OUTOP( SwFtnPortion )
322cdf0e10cSrcweir IMPL_OUTOP( SwFtnNumPortion )
323cdf0e10cSrcweir IMPL_OUTOP( SwTmpEndPortion )
324cdf0e10cSrcweir IMPL_OUTOP( SwHyphStrPortion )
325cdf0e10cSrcweir IMPL_OUTOP( SwExpandPortion )
326cdf0e10cSrcweir IMPL_OUTOP( SwBlankPortion )
327cdf0e10cSrcweir IMPL_OUTOP( SwToxPortion )
328cdf0e10cSrcweir IMPL_OUTOP( SwRefPortion )
329cdf0e10cSrcweir IMPL_OUTOP( SwIsoToxPortion )
330cdf0e10cSrcweir IMPL_OUTOP( SwIsoRefPortion )
331cdf0e10cSrcweir IMPL_OUTOP( SwSoftHyphPortion )
332cdf0e10cSrcweir IMPL_OUTOP( SwSoftHyphStrPortion )
333cdf0e10cSrcweir IMPL_OUTOP( SwTabPortion )
334cdf0e10cSrcweir IMPL_OUTOP( SwTabLeftPortion )
335cdf0e10cSrcweir IMPL_OUTOP( SwTabRightPortion )
336cdf0e10cSrcweir IMPL_OUTOP( SwTabCenterPortion )
337cdf0e10cSrcweir IMPL_OUTOP( SwTabDecimalPortion )
338cdf0e10cSrcweir IMPL_OUTOP( SwPostItsPortion )
339cdf0e10cSrcweir IMPL_OUTOP( SwQuoVadisPortion )
340cdf0e10cSrcweir IMPL_OUTOP( SwErgoSumPortion )
341cdf0e10cSrcweir IMPL_OUTOP( SwHolePortion )
342cdf0e10cSrcweir IMPL_OUTOP( SwDropPortion )
343cdf0e10cSrcweir IMPL_OUTOP( SwKernPortion )
344cdf0e10cSrcweir IMPL_OUTOP( SwArrowPortion )
345cdf0e10cSrcweir IMPL_OUTOP( SwMultiPortion )
346cdf0e10cSrcweir IMPL_OUTOP( SwCombinedPortion )
347cdf0e10cSrcweir 
348cdf0e10cSrcweir const char *GetPortionName( const MSHORT )
349cdf0e10cSrcweir {
350cdf0e10cSrcweir 	return 0;
351cdf0e10cSrcweir }
352cdf0e10cSrcweir 
GetPrepName(const PrepareHint)353cdf0e10cSrcweir const char *GetPrepName( const PrepareHint )
354cdf0e10cSrcweir {
355cdf0e10cSrcweir 	return 0;
356cdf0e10cSrcweir }
357cdf0e10cSrcweir 
DebugPortions(SvStream &,const XubString &,const xub_StrLen)358cdf0e10cSrcweir void SwLineLayout::DebugPortions( SvStream &, const XubString &, //$ ostream
359cdf0e10cSrcweir 												const xub_StrLen  )
360cdf0e10cSrcweir {
361cdf0e10cSrcweir }
362cdf0e10cSrcweir 
GetLangName(const MSHORT)363cdf0e10cSrcweir const char *GetLangName( const MSHORT  )
364cdf0e10cSrcweir {
365cdf0e10cSrcweir 	return 0;
366cdf0e10cSrcweir }
367cdf0e10cSrcweir 
368cdf0e10cSrcweir #else
369cdf0e10cSrcweir # include <limits.h>
370cdf0e10cSrcweir # include <stdlib.h>
371cdf0e10cSrcweir # include "swtypes.hxx"      // ZTCCONST
372cdf0e10cSrcweir # include "swfont.hxx"     // SwDropPortion
373cdf0e10cSrcweir 
374cdf0e10cSrcweir CONSTCHAR( pClose, "} " );
375cdf0e10cSrcweir 
376cdf0e10cSrcweir /*************************************************************************
377cdf0e10cSrcweir  *                    GetPortionName()
378cdf0e10cSrcweir  *************************************************************************/
379cdf0e10cSrcweir 
380cdf0e10cSrcweir CONSTCHAR( pPOR_LIN, "LIN" );
381cdf0e10cSrcweir CONSTCHAR( pPOR_TXT, "TXT" );
382cdf0e10cSrcweir CONSTCHAR( pPOR_SHADOW, "SHADOW" );
383cdf0e10cSrcweir CONSTCHAR( pPOR_TAB, "TAB" );
384cdf0e10cSrcweir CONSTCHAR( pPOR_TABLEFT, "TABLEFT" );
385cdf0e10cSrcweir CONSTCHAR( pPOR_TABRIGHT, "TABRIGHT" );
386cdf0e10cSrcweir CONSTCHAR( pPOR_TABCENTER, "TABCENTER" );
387cdf0e10cSrcweir CONSTCHAR( pPOR_TABDECIMAL, "TABDECIMAL" );
388cdf0e10cSrcweir CONSTCHAR( pPOR_EXP, "EXP" );
389cdf0e10cSrcweir CONSTCHAR( pPOR_HYPH, "HYPH" );
390cdf0e10cSrcweir CONSTCHAR( pPOR_HYPHSTR, "HYPHSTR" );
391cdf0e10cSrcweir CONSTCHAR( pPOR_FLD, "FLD" );
392cdf0e10cSrcweir CONSTCHAR( pPOR_FIX, "FIX" );
393cdf0e10cSrcweir CONSTCHAR( pPOR_FLY, "FLY" );
394cdf0e10cSrcweir CONSTCHAR( pPOR_FLYCNT, "FLYCNT" );
395cdf0e10cSrcweir CONSTCHAR( pPOR_MARGIN, "MARGIN" );
396cdf0e10cSrcweir CONSTCHAR( pPOR_GLUE, "GLUE" );
397cdf0e10cSrcweir CONSTCHAR( pPOR_HOLE, "HOLE" );
398cdf0e10cSrcweir CONSTCHAR( pPOR_END, "END" );
399cdf0e10cSrcweir CONSTCHAR( pPOR_BRK, "BRK" );
400cdf0e10cSrcweir CONSTCHAR( pPOR_LAY, "LAY" );
401cdf0e10cSrcweir CONSTCHAR( pPOR_BLANK, "BLANK" );
402cdf0e10cSrcweir CONSTCHAR( pPOR_FTN, "FTN" );
403cdf0e10cSrcweir CONSTCHAR( pPOR_FTNNUM, "FTNNUM" );
404cdf0e10cSrcweir CONSTCHAR( pPOR_POSTITS, "POSTITS" );
405cdf0e10cSrcweir CONSTCHAR( pPOR_SOFTHYPH, "SOFTHYPH" );
406cdf0e10cSrcweir CONSTCHAR( pPOR_SOFTHYPHSTR, "SOFTHYPHSTR" );
407cdf0e10cSrcweir CONSTCHAR( pPOR_TOX, "TOX" );
408cdf0e10cSrcweir CONSTCHAR( pPOR_REF, "REF" );
409cdf0e10cSrcweir 
410cdf0e10cSrcweir CONSTCHAR( pPOR_ISOTOX, "ISOTOX" );
411cdf0e10cSrcweir CONSTCHAR( pPOR_ISOREF, "ISOREF" );
412cdf0e10cSrcweir CONSTCHAR( pPOR_HIDDEN, "Hidden" );
413cdf0e10cSrcweir CONSTCHAR( pPOR_QUOVADIS, "QuoVadis" );
414cdf0e10cSrcweir CONSTCHAR( pPOR_ERGOSUM, "ErgoSum" );
415cdf0e10cSrcweir CONSTCHAR( pPOR_NUMBER, "NUMBER" );
416cdf0e10cSrcweir CONSTCHAR( pPOR_BULLET, "BULLET" );
417cdf0e10cSrcweir CONSTCHAR( pPOR_UNKW, "UNKW" );
418cdf0e10cSrcweir CONSTCHAR( pPOR_PAR, "PAR" );
419cdf0e10cSrcweir 
GetPortionName(const MSHORT)420cdf0e10cSrcweir const char *GetPortionName( const MSHORT /*nType*/ )
421cdf0e10cSrcweir {
422cdf0e10cSrcweir 	return 0;
423cdf0e10cSrcweir }
424cdf0e10cSrcweir 
425cdf0e10cSrcweir CONSTCHAR( pPREP_CLEAR, "CLEAR" );
426cdf0e10cSrcweir CONSTCHAR( pPREP_WIDOWS_ORPHANS, "WIDOWS_ORPHANS" );
427cdf0e10cSrcweir CONSTCHAR( pPREP_FIXSIZE_CHG, "FIXSIZE_CHG" );
428cdf0e10cSrcweir CONSTCHAR( pPREP_FOLLOW_FOLLOWS, "FOLLOW_FOLLOWS" );
429cdf0e10cSrcweir CONSTCHAR( pPREP_ADJUST_FRM, "ADJUST_FRM" );
430cdf0e10cSrcweir CONSTCHAR( pPREP_FREE_SPACE, "FREE_SPACE" );
431cdf0e10cSrcweir CONSTCHAR( pPREP_FLY_CHGD, "FLY_CHGD" );
432cdf0e10cSrcweir CONSTCHAR( pPREP_FLY_ATTR_CHG, "FLY_ATTR_CHG" );
433cdf0e10cSrcweir CONSTCHAR( pPREP_FLY_ARRIVE, "FLY_ARRIVE" );
434cdf0e10cSrcweir CONSTCHAR( pPREP_FLY_LEAVE, "FLY_LEAVE" );
435cdf0e10cSrcweir CONSTCHAR( pPREP_VIEWOPT, "VIEWOPT" );
436cdf0e10cSrcweir CONSTCHAR( pPREP_FTN, "FTN" );
437cdf0e10cSrcweir CONSTCHAR( pPREP_POS_CHGD, "POS" );
438cdf0e10cSrcweir CONSTCHAR( pPREP_UL_SPACE, "UL_SPACE" );
439cdf0e10cSrcweir CONSTCHAR( pPREP_MUST_FIT, "MUST_FIT" );
440cdf0e10cSrcweir CONSTCHAR( pPREP_WIDOWS, "ORPHANS" );
441cdf0e10cSrcweir CONSTCHAR( pPREP_QUOVADIS, "QUOVADIS" );
442cdf0e10cSrcweir CONSTCHAR( pPREP_PAGE, "PAGE" );
443cdf0e10cSrcweir 
GetPrepName(const PrepareHint ePrep)444cdf0e10cSrcweir const char *GetPrepName( const PrepareHint ePrep )
445cdf0e10cSrcweir {
446cdf0e10cSrcweir 	// Kurz und schmerzlos:
447cdf0e10cSrcweir 	const char *ppNameArr[PREP_END] =
448cdf0e10cSrcweir 	{
449cdf0e10cSrcweir 		pPREP_CLEAR, pPREP_WIDOWS_ORPHANS, pPREP_FIXSIZE_CHG,
450cdf0e10cSrcweir 		pPREP_FOLLOW_FOLLOWS, pPREP_ADJUST_FRM, pPREP_FREE_SPACE,
451cdf0e10cSrcweir 		pPREP_FLY_CHGD, pPREP_FLY_ATTR_CHG, pPREP_FLY_ARRIVE,
452cdf0e10cSrcweir 		pPREP_FLY_LEAVE, pPREP_VIEWOPT, pPREP_FTN, pPREP_POS_CHGD,
453cdf0e10cSrcweir 		pPREP_UL_SPACE, pPREP_MUST_FIT, pPREP_WIDOWS, pPREP_QUOVADIS,
454cdf0e10cSrcweir 		pPREP_PAGE
455cdf0e10cSrcweir 	};
456cdf0e10cSrcweir 	ASSERT( ePrep < PREP_END, "GetPrepName: unknown PrepareHint" );
457cdf0e10cSrcweir 	return( ppNameArr[ePrep] );
458cdf0e10cSrcweir }
459cdf0e10cSrcweir 
460cdf0e10cSrcweir /*************************************************************************
461cdf0e10cSrcweir  *                    SwLineLayout::DebugPortions()
462cdf0e10cSrcweir  *
463cdf0e10cSrcweir  * DebugPortion() iteriert ueber alle Portions einer Zeile und deckt die
464cdf0e10cSrcweir  * internen Strukturen auf.
465cdf0e10cSrcweir  * Im Gegensatz zum Ausgabe-Operator werden auch die Textteile ausgegeben.
466cdf0e10cSrcweir  *************************************************************************/
467cdf0e10cSrcweir 
DebugPortions(SvStream & rOs,const XubString &,const xub_StrLen)468cdf0e10cSrcweir void SwLineLayout::DebugPortions( SvStream &rOs, const XubString &/*rTxt*/, //$ ostream
469cdf0e10cSrcweir                                                 const xub_StrLen /*nStart*/ )
470cdf0e10cSrcweir {
471cdf0e10cSrcweir     SwLinePortion *pPortion2 = GetPortion();
472cdf0e10cSrcweir 
473cdf0e10cSrcweir 	xub_StrLen nPos = 0;
474cdf0e10cSrcweir 	MSHORT nNr = 0;
475cdf0e10cSrcweir 	KSHORT nPrtWidth, nLastPrt;
476cdf0e10cSrcweir 	nPrtWidth = nLastPrt = 0;
477cdf0e10cSrcweir 
478cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
479cdf0e10cSrcweir 	rOs << '\"' << endl;
480cdf0e10cSrcweir 
481cdf0e10cSrcweir     while( pPortion2 )
482cdf0e10cSrcweir 	{
483cdf0e10cSrcweir 		DBG_LOOP;
484cdf0e10cSrcweir         SwTxtPortion *pTxtPor = pPortion2->InTxtGrp() ?
485cdf0e10cSrcweir                                 (SwTxtPortion *)pPortion2 : NULL ;
486cdf0e10cSrcweir         (void)pTxtPor;
487cdf0e10cSrcweir 		++nNr;
488cdf0e10cSrcweir         nLastPrt = nPrtWidth;
489cdf0e10cSrcweir         nPrtWidth = nPrtWidth + pPortion2->PrtWidth();
490cdf0e10cSrcweir 		rOs << "\tNr:"  << nNr
491cdf0e10cSrcweir 			<< " Pos:" << nPos
492cdf0e10cSrcweir 			<< " Org:" << nLastPrt
493cdf0e10cSrcweir 			<< endl;
494cdf0e10cSrcweir 
495cdf0e10cSrcweir 		rOs << "\t";
496cdf0e10cSrcweir         pPortion2->operator<<( rOs );
497cdf0e10cSrcweir 		rOs << endl;
498cdf0e10cSrcweir         nPos = nPos + pPortion2->GetLen();
499cdf0e10cSrcweir         pPortion2 = pPortion2->GetPortion();
500cdf0e10cSrcweir 	}
501cdf0e10cSrcweir }
502cdf0e10cSrcweir 
GetLangName(const MSHORT)503cdf0e10cSrcweir const char *GetLangName( const MSHORT /*nLang*/ )
504cdf0e10cSrcweir {
505cdf0e10cSrcweir 	return "???";
506cdf0e10cSrcweir }
507cdf0e10cSrcweir 
operator <<(SvStream & rOs) const508cdf0e10cSrcweir SvStream &SwLinePortion::operator<<( SvStream &rOs ) const //$ ostream
509cdf0e10cSrcweir {
510cdf0e10cSrcweir 	rOs << " {";
511cdf0e10cSrcweir 	rOs <<	"L:" << nLineLength;
512cdf0e10cSrcweir 	rOs << " H:" << Height();
513cdf0e10cSrcweir 	rOs << " W:" << PrtWidth();
514cdf0e10cSrcweir 	rOs << " A:" << nAscent;
515cdf0e10cSrcweir 	rOs << pClose;
516cdf0e10cSrcweir 	return rOs;
517cdf0e10cSrcweir }
518cdf0e10cSrcweir 
operator <<(SvStream & rOs) const519cdf0e10cSrcweir SvStream &SwTxtPortion::operator<<( SvStream &rOs ) const //$ ostream
520cdf0e10cSrcweir {
521cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TXT:" );
522cdf0e10cSrcweir 	rOs << pTxt;
523cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
524cdf0e10cSrcweir 	rOs << pClose;
525cdf0e10cSrcweir 	return rOs;
526cdf0e10cSrcweir }
527cdf0e10cSrcweir 
operator <<(SvStream & rOs) const528cdf0e10cSrcweir SvStream &SwTmpEndPortion::operator<<( SvStream &rOs ) const //$ ostream
529cdf0e10cSrcweir {
530cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {END:" );
531cdf0e10cSrcweir 	rOs << pTxt;
532cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
533cdf0e10cSrcweir 	if( PrtWidth() )
534cdf0e10cSrcweir 		rOs << "(view)";
535cdf0e10cSrcweir 	rOs << pClose;
536cdf0e10cSrcweir 	return rOs;
537cdf0e10cSrcweir }
538cdf0e10cSrcweir 
operator <<(SvStream & rOs) const539cdf0e10cSrcweir SvStream &SwBreakPortion::operator<<( SvStream &rOs ) const //$ ostream
540cdf0e10cSrcweir {
541cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {BREAK:" );
542cdf0e10cSrcweir 	rOs << pTxt;
543cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
544cdf0e10cSrcweir 	rOs << pClose;
545cdf0e10cSrcweir 	return rOs;
546cdf0e10cSrcweir }
547cdf0e10cSrcweir 
operator <<(SvStream & rOs) const548cdf0e10cSrcweir SvStream &SwKernPortion::operator<<( SvStream &rOs ) const //$ ostream
549cdf0e10cSrcweir {
550cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {KERN:" );
551cdf0e10cSrcweir 	rOs << pTxt;
552cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
553cdf0e10cSrcweir 	rOs << pClose;
554cdf0e10cSrcweir 	return rOs;
555cdf0e10cSrcweir }
556cdf0e10cSrcweir 
operator <<(SvStream & rOs) const557cdf0e10cSrcweir SvStream &SwArrowPortion::operator<<( SvStream &rOs ) const //$ ostream
558cdf0e10cSrcweir {
559cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {ARROW:" );
560cdf0e10cSrcweir 	rOs << pTxt;
561cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
562cdf0e10cSrcweir 	rOs << pClose;
563cdf0e10cSrcweir 	return rOs;
564cdf0e10cSrcweir }
565cdf0e10cSrcweir 
operator <<(SvStream & rOs) const566cdf0e10cSrcweir SvStream &SwMultiPortion::operator<<( SvStream &rOs ) const //$ ostream
567cdf0e10cSrcweir {
568cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {MULTI:" );
569cdf0e10cSrcweir 	rOs << pTxt;
570cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
571cdf0e10cSrcweir 	rOs << pClose;
572cdf0e10cSrcweir 	return rOs;
573cdf0e10cSrcweir }
574cdf0e10cSrcweir 
operator <<(SvStream & rOs) const575cdf0e10cSrcweir SvStream &SwCombinedPortion::operator<<( SvStream &rOs ) const //$ ostream
576cdf0e10cSrcweir {
577cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {COMBINED:" );
578cdf0e10cSrcweir 	rOs << pTxt;
579cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
580cdf0e10cSrcweir 	rOs << pClose;
581cdf0e10cSrcweir 	return rOs;
582cdf0e10cSrcweir }
583cdf0e10cSrcweir 
operator <<(SvStream & rOs) const584cdf0e10cSrcweir SvStream &SwLineLayout::operator<<( SvStream &rOs ) const //$ ostream
585cdf0e10cSrcweir {
586cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {LINE:" );
587cdf0e10cSrcweir 	rOs << pTxt;
588cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
589cdf0e10cSrcweir 	SwLinePortion *pPos = GetPortion();
590cdf0e10cSrcweir 	while( pPos )
591cdf0e10cSrcweir 	{
592cdf0e10cSrcweir 		DBG_LOOP;
593cdf0e10cSrcweir 		rOs << "\t";
594cdf0e10cSrcweir 		pPos->operator<<( rOs );
595cdf0e10cSrcweir 		pPos = pPos->GetPortion();
596cdf0e10cSrcweir 	}
597cdf0e10cSrcweir 	rOs << pClose;
598cdf0e10cSrcweir 	return rOs;
599cdf0e10cSrcweir }
600cdf0e10cSrcweir 
operator <<(SvStream & rOs) const601cdf0e10cSrcweir SvStream &SwGluePortion::operator<<( SvStream &rOs ) const //$ ostream
602cdf0e10cSrcweir {
603cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {GLUE:" );
604cdf0e10cSrcweir 	rOs << pTxt;
605cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
606cdf0e10cSrcweir 	rOs << " F:" << GetFixWidth();
607cdf0e10cSrcweir 	rOs << " G:" << GetPrtGlue();
608cdf0e10cSrcweir 	rOs << pClose;
609cdf0e10cSrcweir 	return rOs;
610cdf0e10cSrcweir }
611cdf0e10cSrcweir 
operator <<(SvStream & rOs) const612cdf0e10cSrcweir SvStream &SwFixPortion::operator<<( SvStream &rOs ) const //$ ostream
613cdf0e10cSrcweir {
614cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {FIX:" );
615cdf0e10cSrcweir 	rOs << pTxt;
616cdf0e10cSrcweir 	SwGluePortion::operator<<( rOs );
617cdf0e10cSrcweir 	rOs << " Fix:" << nFix;
618cdf0e10cSrcweir 	rOs << pClose;
619cdf0e10cSrcweir 	return rOs;
620cdf0e10cSrcweir }
621cdf0e10cSrcweir 
operator <<(SvStream & rOs) const622cdf0e10cSrcweir SvStream &SwFlyPortion::operator<<( SvStream &rOs ) const //$ ostream
623cdf0e10cSrcweir {
624cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {FLY:" );
625cdf0e10cSrcweir 	rOs << pTxt;
626cdf0e10cSrcweir 	SwFixPortion::operator<<( rOs );
627cdf0e10cSrcweir 	rOs << pClose;
628cdf0e10cSrcweir 	return rOs;
629cdf0e10cSrcweir }
630cdf0e10cSrcweir 
operator <<(SvStream & rOs) const631cdf0e10cSrcweir SvStream &SwMarginPortion::operator<<( SvStream &rOs ) const //$ ostream
632cdf0e10cSrcweir {
633cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {MAR:" );
634cdf0e10cSrcweir 	rOs << pTxt;
635cdf0e10cSrcweir 	SwGluePortion::operator<<( rOs );
636cdf0e10cSrcweir 	rOs << pClose;
637cdf0e10cSrcweir 	return rOs;
638cdf0e10cSrcweir }
639cdf0e10cSrcweir 
operator <<(SvStream & rOs) const640cdf0e10cSrcweir SvStream &SwFlyCntPortion::operator<<( SvStream &rOs ) const //$ ostream
641cdf0e10cSrcweir {
642cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {FLYCNT:" );
643cdf0e10cSrcweir 	rOs << pTxt;
644cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
645cdf0e10cSrcweir 	if( bDraw )
646cdf0e10cSrcweir 	{
647cdf0e10cSrcweir         CONSTCHAR( pTxt2, " {DRAWINCNT" );
648cdf0e10cSrcweir         rOs << pTxt2;
649cdf0e10cSrcweir 		rOs << pClose;
650cdf0e10cSrcweir 	}
651cdf0e10cSrcweir 	else
652cdf0e10cSrcweir 	{
653cdf0e10cSrcweir         CONSTCHAR( pTxt2, " {FRM:" );
654cdf0e10cSrcweir         rOs << pTxt2;
655cdf0e10cSrcweir 		rOs << " {FRM:" << GetFlyFrm()->Frm() << pClose;
656cdf0e10cSrcweir 		rOs << " {PRT:" << GetFlyFrm()->Prt() << pClose;
657cdf0e10cSrcweir 		rOs << pClose;
658cdf0e10cSrcweir 	}
659cdf0e10cSrcweir 	rOs << pClose;
660cdf0e10cSrcweir 	return rOs;
661cdf0e10cSrcweir }
662cdf0e10cSrcweir 
operator <<(SvStream & rOs) const663cdf0e10cSrcweir SvStream &SwExpandPortion::operator<<( SvStream &rOs ) const //$ ostream
664cdf0e10cSrcweir {
665cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {EXP:" );
666cdf0e10cSrcweir 	rOs << pTxt;
667cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
668cdf0e10cSrcweir 	rOs << pClose;
669cdf0e10cSrcweir 	return rOs;
670cdf0e10cSrcweir }
671cdf0e10cSrcweir 
operator <<(SvStream & rOs) const672cdf0e10cSrcweir SvStream &SwFtnPortion::operator<<( SvStream &rOs ) const //$ ostream
673cdf0e10cSrcweir {
674cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {FTN:" );
675cdf0e10cSrcweir 	rOs << pTxt;
676cdf0e10cSrcweir 	SwExpandPortion::operator<<( rOs );
677cdf0e10cSrcweir 	rOs << pClose;
678cdf0e10cSrcweir 	return rOs;
679cdf0e10cSrcweir }
680cdf0e10cSrcweir 
operator <<(SvStream & rOs) const681cdf0e10cSrcweir SvStream &SwFtnNumPortion::operator<<( SvStream &rOs ) const //$ ostream
682cdf0e10cSrcweir {
683cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {FTNNUM:" );
684cdf0e10cSrcweir 	rOs << pTxt;
685cdf0e10cSrcweir 	SwNumberPortion::operator<<( rOs );
686cdf0e10cSrcweir 	rOs << pClose;
687cdf0e10cSrcweir 	return rOs;
688cdf0e10cSrcweir }
689cdf0e10cSrcweir 
operator <<(SvStream & rOs) const690cdf0e10cSrcweir SvStream &SwNumberPortion::operator<<( SvStream &rOs ) const //$ ostream
691cdf0e10cSrcweir {
692cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {NUMBER:" );
693cdf0e10cSrcweir 	rOs << pTxt;
694cdf0e10cSrcweir 	SwExpandPortion::operator<<( rOs );
695cdf0e10cSrcweir 	rOs << " Exp:\"" << '\"';
696cdf0e10cSrcweir 	rOs << pClose;
697cdf0e10cSrcweir 	return rOs;
698cdf0e10cSrcweir }
699cdf0e10cSrcweir 
operator <<(SvStream & rOs) const700cdf0e10cSrcweir SvStream &SwBulletPortion::operator<<( SvStream &rOs ) const //$ ostream
701cdf0e10cSrcweir {
702cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {BULLET:" );
703cdf0e10cSrcweir 	rOs << pTxt;
704cdf0e10cSrcweir 	SwNumberPortion::operator<<( rOs );
705cdf0e10cSrcweir 	rOs << pClose;
706cdf0e10cSrcweir 	return rOs;
707cdf0e10cSrcweir }
708cdf0e10cSrcweir 
operator <<(SvStream & rOs) const709cdf0e10cSrcweir SvStream &SwGrfNumPortion::operator<<( SvStream &rOs ) const //$ ostream
710cdf0e10cSrcweir {
711cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {GRFNUM:" );
712cdf0e10cSrcweir 	rOs << pTxt;
713cdf0e10cSrcweir     SwNumberPortion::operator<<( rOs );
714cdf0e10cSrcweir 	rOs << pClose;
715cdf0e10cSrcweir 	return rOs;
716cdf0e10cSrcweir }
717cdf0e10cSrcweir 
operator <<(SvStream & rOs) const718cdf0e10cSrcweir SvStream &SwHiddenPortion::operator<<( SvStream &rOs ) const //$ ostream
719cdf0e10cSrcweir {
720cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {Hidden:" );
721cdf0e10cSrcweir 	rOs << pTxt;
722cdf0e10cSrcweir 	SwFldPortion::operator<<( rOs );
723cdf0e10cSrcweir 	rOs << pClose;
724cdf0e10cSrcweir 	return rOs;
725cdf0e10cSrcweir }
726cdf0e10cSrcweir 
operator <<(SvStream & rOs) const727cdf0e10cSrcweir SvStream &SwToxPortion::operator<<( SvStream &rOs ) const //$ ostream
728cdf0e10cSrcweir {
729cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TOX:" );
730cdf0e10cSrcweir 	rOs << pTxt;
731cdf0e10cSrcweir 	SwTxtPortion::operator<<( rOs );
732cdf0e10cSrcweir 	rOs << pClose;
733cdf0e10cSrcweir 	return rOs;
734cdf0e10cSrcweir }
735cdf0e10cSrcweir 
operator <<(SvStream & rOs) const736cdf0e10cSrcweir SvStream &SwRefPortion::operator<<( SvStream &rOs ) const //$ ostream
737cdf0e10cSrcweir {
738cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {Ref:" );
739cdf0e10cSrcweir 	rOs << pTxt;
740cdf0e10cSrcweir 	SwTxtPortion::operator<<( rOs );
741cdf0e10cSrcweir 	rOs << pClose;
742cdf0e10cSrcweir 	return rOs;
743cdf0e10cSrcweir }
744cdf0e10cSrcweir 
operator <<(SvStream & rOs) const745cdf0e10cSrcweir SvStream &SwIsoToxPortion::operator<<( SvStream &rOs ) const //$ ostream
746cdf0e10cSrcweir {
747cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {ISOTOX:" );
748cdf0e10cSrcweir 	rOs << pTxt;
749cdf0e10cSrcweir 	SwToxPortion::operator<<( rOs );
750cdf0e10cSrcweir 	rOs << pClose;
751cdf0e10cSrcweir 	return rOs;
752cdf0e10cSrcweir }
753cdf0e10cSrcweir 
operator <<(SvStream & rOs) const754cdf0e10cSrcweir SvStream &SwIsoRefPortion::operator<<( SvStream &rOs ) const //$ ostream
755cdf0e10cSrcweir {
756cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {ISOREF:" );
757cdf0e10cSrcweir 	rOs << pTxt;
758cdf0e10cSrcweir 	SwRefPortion::operator<<( rOs );
759cdf0e10cSrcweir 	rOs << pClose;
760cdf0e10cSrcweir 	return rOs;
761cdf0e10cSrcweir }
762cdf0e10cSrcweir 
operator <<(SvStream & rOs) const763cdf0e10cSrcweir SvStream &SwHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
764cdf0e10cSrcweir {
765cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {HYPH:" );
766cdf0e10cSrcweir 	rOs << pTxt;
767cdf0e10cSrcweir 	SwExpandPortion::operator<<( rOs );
768cdf0e10cSrcweir 	rOs << pClose;
769cdf0e10cSrcweir 	return rOs;
770cdf0e10cSrcweir }
771cdf0e10cSrcweir 
operator <<(SvStream & rOs) const772cdf0e10cSrcweir SvStream &SwHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
773cdf0e10cSrcweir {
774cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {HYPHSTR:" );
775cdf0e10cSrcweir 	rOs << pTxt;
776cdf0e10cSrcweir 	SwExpandPortion::operator<<( rOs );
777cdf0e10cSrcweir 	rOs << pClose;
778cdf0e10cSrcweir 	return rOs;
779cdf0e10cSrcweir }
780cdf0e10cSrcweir 
operator <<(SvStream & rOs) const781cdf0e10cSrcweir SvStream &SwSoftHyphPortion::operator<<( SvStream &rOs ) const //$ ostream
782cdf0e10cSrcweir {
783cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {SOFTHYPH:" );
784cdf0e10cSrcweir 	rOs << pTxt;
785cdf0e10cSrcweir 	SwHyphPortion::operator<<( rOs );
786cdf0e10cSrcweir 	rOs << (IsExpand() ? " on" : " off");
787cdf0e10cSrcweir 	rOs << pClose;
788cdf0e10cSrcweir 	return rOs;
789cdf0e10cSrcweir }
790cdf0e10cSrcweir 
operator <<(SvStream & rOs) const791cdf0e10cSrcweir SvStream &SwSoftHyphStrPortion::operator<<( SvStream &rOs ) const //$ ostream
792cdf0e10cSrcweir {
793cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {SOFTHYPHSTR:" );
794cdf0e10cSrcweir 	rOs << pTxt;
795cdf0e10cSrcweir 	SwHyphStrPortion::operator<<( rOs );
796cdf0e10cSrcweir 	rOs << pClose;
797cdf0e10cSrcweir 	return rOs;
798cdf0e10cSrcweir }
799cdf0e10cSrcweir 
operator <<(SvStream & rOs) const800cdf0e10cSrcweir SvStream &SwBlankPortion::operator<<( SvStream &rOs ) const //$ ostream
801cdf0e10cSrcweir {
802cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {BLANK:" );
803cdf0e10cSrcweir 	rOs << pTxt;
804cdf0e10cSrcweir 	SwExpandPortion::operator<<( rOs );
805cdf0e10cSrcweir 	rOs << pClose;
806cdf0e10cSrcweir 	return rOs;
807cdf0e10cSrcweir }
808cdf0e10cSrcweir 
operator <<(SvStream & rOs) const809cdf0e10cSrcweir SvStream &SwFldPortion::operator<<( SvStream &rOs ) const //$ ostream
810cdf0e10cSrcweir {
811cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {FLD:" );
812cdf0e10cSrcweir 	rOs << pTxt;
813cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
814cdf0e10cSrcweir 	if( IsFollow() )
815cdf0e10cSrcweir 		rOs << " F!";
816cdf0e10cSrcweir 	rOs << pClose;
817cdf0e10cSrcweir 	return rOs;
818cdf0e10cSrcweir }
819cdf0e10cSrcweir 
operator <<(SvStream & rOs) const820cdf0e10cSrcweir SvStream &SwPostItsPortion::operator<<( SvStream &rOs ) const //$ ostream
821cdf0e10cSrcweir {
822cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {POSTITS" );
823cdf0e10cSrcweir 	rOs << pTxt;
824cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
825cdf0e10cSrcweir 	rOs << pClose;
826cdf0e10cSrcweir 	return rOs;
827cdf0e10cSrcweir }
828cdf0e10cSrcweir 
operator <<(SvStream & rOs) const829cdf0e10cSrcweir SvStream &SwTabPortion::operator<<( SvStream &rOs ) const //$ ostream
830cdf0e10cSrcweir {
831cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TAB" );
832cdf0e10cSrcweir 	rOs << pTxt;
833cdf0e10cSrcweir 	SwFixPortion::operator<<( rOs );
834cdf0e10cSrcweir 	rOs << " T:" << nTabPos;
835cdf0e10cSrcweir 	if( IsFilled() )
836cdf0e10cSrcweir 		rOs << " \"" << cFill << '\"';
837cdf0e10cSrcweir 	rOs << pClose;
838cdf0e10cSrcweir 	return rOs;
839cdf0e10cSrcweir }
840cdf0e10cSrcweir 
operator <<(SvStream & rOs) const841cdf0e10cSrcweir SvStream &SwTabLeftPortion::operator<<( SvStream &rOs ) const //$ ostream
842cdf0e10cSrcweir {
843cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TABLEFT" );
844cdf0e10cSrcweir 	rOs << pTxt;
845cdf0e10cSrcweir 	SwTabPortion::operator<<( rOs );
846cdf0e10cSrcweir 	rOs << pClose;
847cdf0e10cSrcweir 	return rOs;
848cdf0e10cSrcweir }
849cdf0e10cSrcweir 
operator <<(SvStream & rOs) const850cdf0e10cSrcweir SvStream &SwTabRightPortion::operator<<( SvStream &rOs ) const //$ ostream
851cdf0e10cSrcweir {
852cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TABRIGHT" );
853cdf0e10cSrcweir 	rOs << pTxt;
854cdf0e10cSrcweir 	SwTabPortion::operator<<( rOs );
855cdf0e10cSrcweir 	rOs << pClose;
856cdf0e10cSrcweir 	return rOs;
857cdf0e10cSrcweir }
858cdf0e10cSrcweir 
operator <<(SvStream & rOs) const859cdf0e10cSrcweir SvStream &SwTabCenterPortion::operator<<( SvStream &rOs ) const //$ ostream
860cdf0e10cSrcweir {
861cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TABCENTER" );
862cdf0e10cSrcweir 	rOs << pTxt;
863cdf0e10cSrcweir 	SwTabPortion::operator<<( rOs );
864cdf0e10cSrcweir 	rOs << pClose;
865cdf0e10cSrcweir 	return rOs;
866cdf0e10cSrcweir }
867cdf0e10cSrcweir 
operator <<(SvStream & rOs) const868cdf0e10cSrcweir SvStream &SwTabDecimalPortion::operator<<( SvStream &rOs ) const //$ ostream
869cdf0e10cSrcweir {
870cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {TABDECIMAL" );
871cdf0e10cSrcweir 	rOs << pTxt;
872cdf0e10cSrcweir 	SwTabPortion::operator<<( rOs );
873cdf0e10cSrcweir 	rOs << pClose;
874cdf0e10cSrcweir 	return rOs;
875cdf0e10cSrcweir }
876cdf0e10cSrcweir 
operator <<(SvStream & rOs) const877cdf0e10cSrcweir SvStream &SwParaPortion::operator<<( SvStream &rOs ) const //$ ostream
878cdf0e10cSrcweir {
879cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {PAR" );
880cdf0e10cSrcweir 	rOs << pTxt;
881cdf0e10cSrcweir 	SwLineLayout::operator<<( rOs );
882cdf0e10cSrcweir 	rOs << pClose;
883cdf0e10cSrcweir 	return rOs;
884cdf0e10cSrcweir }
885cdf0e10cSrcweir 
operator <<(SvStream & rOs) const886cdf0e10cSrcweir SvStream &SwHolePortion::operator<<( SvStream &rOs ) const //$ ostream
887cdf0e10cSrcweir {
888cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {HOLE" );
889cdf0e10cSrcweir 	rOs << pTxt;
890cdf0e10cSrcweir 	SwLinePortion::operator<<( rOs );
891cdf0e10cSrcweir 	rOs << pClose;
892cdf0e10cSrcweir 	return rOs;
893cdf0e10cSrcweir }
894cdf0e10cSrcweir 
operator <<(SvStream & rOs) const895cdf0e10cSrcweir SvStream &SwQuoVadisPortion::operator<<( SvStream &rOs ) const //$ ostream
896cdf0e10cSrcweir {
897cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {QUOVADIS" );
898cdf0e10cSrcweir 	rOs << pTxt;
899cdf0e10cSrcweir 	SwFldPortion::operator<<( rOs );
900cdf0e10cSrcweir 	rOs << pClose;
901cdf0e10cSrcweir 	return rOs;
902cdf0e10cSrcweir }
903cdf0e10cSrcweir 
operator <<(SvStream & rOs) const904cdf0e10cSrcweir SvStream &SwErgoSumPortion::operator<<( SvStream &rOs ) const //$ ostream
905cdf0e10cSrcweir {
906cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {ERGOSUM" );
907cdf0e10cSrcweir 	rOs << pTxt;
908cdf0e10cSrcweir 	SwFldPortion::operator<<( rOs );
909cdf0e10cSrcweir 	rOs << pClose;
910cdf0e10cSrcweir 	return rOs;
911cdf0e10cSrcweir }
912cdf0e10cSrcweir 
operator <<(SvStream & rOs,const SwTxtSizeInfo & rInf)913cdf0e10cSrcweir SvStream &operator<<( SvStream &rOs, const SwTxtSizeInfo &rInf ) //$ ostream
914cdf0e10cSrcweir {
915cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {SIZEINFO:" );
916cdf0e10cSrcweir 	rOs << pTxt;
917cdf0e10cSrcweir 	rOs << ' ' << (rInf.OnWin() ? "WIN:" : "PRT:" );
918cdf0e10cSrcweir 	rOs << " Idx:" << rInf.GetIdx();
919cdf0e10cSrcweir 	rOs << " Len:" << rInf.GetLen();
920cdf0e10cSrcweir 	rOs << pClose;
921cdf0e10cSrcweir 	return rOs;
922cdf0e10cSrcweir }
923cdf0e10cSrcweir 
operator <<(SvStream & rOs) const924cdf0e10cSrcweir SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream
925cdf0e10cSrcweir {
926cdf0e10cSrcweir 	CONSTCHAR( pTxt, " {DROP:" );
927cdf0e10cSrcweir 	rOs << pTxt;
928cdf0e10cSrcweir 	SwTxtPortion::operator<<( rOs );
929cdf0e10cSrcweir     if( pPart && nDropHeight )
930cdf0e10cSrcweir 	{
931cdf0e10cSrcweir 		rOs << " H:" << nDropHeight;
932cdf0e10cSrcweir 		rOs << " L:" << nLines;
933cdf0e10cSrcweir         rOs <<" Fnt:" << pPart->GetFont().GetHeight();
934cdf0e10cSrcweir         if( nX || nY )
935cdf0e10cSrcweir             rOs << " [" << nX << '/' << nY << ']';
936cdf0e10cSrcweir 	}
937cdf0e10cSrcweir 	rOs << pClose;
938cdf0e10cSrcweir 	return rOs;
939cdf0e10cSrcweir }
940cdf0e10cSrcweir 
941cdf0e10cSrcweir #endif /* OSL_DEBUG_LEVEL */
942cdf0e10cSrcweir 
943cdf0e10cSrcweir #endif // DBG_UTIL
944cdf0e10cSrcweir 
945