xref: /trunk/main/sw/source/core/text/txtfld.cxx (revision 4d7c9de0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 #include "hintids.hxx"
29 #include <fmtfld.hxx>
30 #include <txtfld.hxx>
31 #include <charfmt.hxx>
32 
33 #include "viewsh.hxx"   // NewFldPortion, GetDoc()
34 #include "doc.hxx"      // NewFldPortion, GetSysFldType()
35 #include "rootfrm.hxx"  // Info ueber virt. PageNumber
36 #include "pagefrm.hxx"  // NewFldPortion, GetVirtPageNum()
37 #include "ndtxt.hxx"    // NewNumberPortion, pHints->GetNum()
38 #include "fldbas.hxx"      // SwField
39 #include "viewopt.hxx"	// SwViewOptions
40 #include "flyfrm.hxx"	//IsInBody()
41 #include "viewimp.hxx"
42 #include "txtatr.hxx"   // SwTxtFld
43 #include "txtcfg.hxx"
44 #include "swfont.hxx"   // NewFldPortion, new SwFont
45 #include "fntcache.hxx"   // NewFldPortion, SwFntAccess
46 #include "porfld.hxx"
47 #include "porftn.hxx"   // NewExtraPortion
48 #include "porref.hxx"   // NewExtraPortion
49 #include "portox.hxx"   // NewExtraPortion
50 #include "porhyph.hxx"   // NewExtraPortion
51 #include "porfly.hxx"   // NewExtraPortion
52 #include "itrform2.hxx"   // SwTxtFormatter
53 #include "chpfld.hxx"
54 #include "dbfld.hxx"
55 #include "expfld.hxx"
56 #include "docufld.hxx"
57 #include "pagedesc.hxx"  // NewFldPortion, GetNum()
58 #include <pormulti.hxx> 	// SwMultiPortion
59 #include "fmtmeta.hxx" // lcl_NewMetaPortion
60 
61 
62 #ifndef _REFFLD_HXX
63 #include "reffld.hxx"
64 #endif
65 #ifndef _FLDDAT_HXX
66 #include "flddat.hxx"
67 #endif
68 /*************************************************************************
69  *                      SwTxtFormatter::NewFldPortion()
70  *************************************************************************/
71 
72 
73 sal_Bool lcl_IsInBody( SwFrm *pFrm )
74 {
75 	if ( pFrm->IsInDocBody() )
76 		return sal_True;
77 	else
78 	{
79         const SwFrm *pTmp = pFrm;
80         const SwFlyFrm *pFly;
81 		while ( 0 != (pFly = pTmp->FindFlyFrm()) )
82             pTmp = pFly->GetAnchorFrm();
83 		return pTmp->IsInDocBody();
84 	}
85 }
86 
87 
88 SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
89 												const SwTxtAttr *pHint ) const
90 {
91 	SwExpandPortion *pRet = 0;
92 	SwFrm *pFrame = (SwFrm*)pFrm;
93 	SwField *pFld = (SwField*)pHint->GetFmtFld().GetField();
94 	const sal_Bool bName = rInf.GetOpt().IsFldName();
95 
96 	SwCharFmt* pChFmt = 0;
97 	sal_Bool bNewFlyPor = sal_False,
98 		 bINet = sal_False;
99 	sal_uInt16 subType;
100 	// set language
101 	((SwTxtFormatter*)this)->SeekAndChg( rInf );
102 	if (pFld->GetLanguage() != GetFnt()->GetLanguage())
103 	{
104 		pFld->SetLanguage( GetFnt()->GetLanguage() );
105 		// let the visual note know about its new language
106 		if (pFld->GetTyp()->Which()==RES_POSTITFLD)
107 			const_cast<SwFmtFld*> (&pHint->GetFmtFld())->Broadcast( SwFmtFldHint( &pHint->GetFmtFld(), SWFMTFLD_LANGUAGE ) );
108 	}
109 
110 	ViewShell *pSh = rInf.GetVsh();
111     SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 );
112     bool const bInClipboard( (pDoc) ? pDoc->IsClipBoard() : true );
113     sal_Bool bPlaceHolder = sal_False;
114 
115 	switch( pFld->GetTyp()->Which() )
116 	{
117 		case RES_SCRIPTFLD:
118 		case RES_POSTITFLD:
119 			pRet = new SwPostItsPortion( RES_SCRIPTFLD == pFld->GetTyp()->Which() );
120 			break;
121 
122 		case RES_COMBINED_CHARS:
123 			{
124 				if( bName )
125                 {
126                     String const sName( pFld->GetFieldName() );
127                     pRet = new SwFldPortion(sName);
128                 }
129 				else
130                 {
131                     String const sContent( pFld->ExpandField(bInClipboard) );
132                     pRet = new SwCombinedPortion(sContent);
133                 }
134 			}
135 			break;
136 
137 		case RES_HIDDENTXTFLD:
138             {
139                 String const str( (bName)
140                         ? pFld->GetFieldName()
141                         : pFld->ExpandField(bInClipboard) );
142                 pRet = new SwHiddenPortion(str);
143             }
144 			break;
145 
146 		case RES_CHAPTERFLD:
147 			if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
148 			{
149 				((SwChapterField*)pFld)->ChangeExpansion( pFrame,
150 										&((SwTxtFld*)pHint)->GetTxtNode() );
151 			}
152             {
153                 String const str( (bName)
154                         ? pFld->GetFieldName()
155                         : pFld->ExpandField(bInClipboard) );
156                 pRet = new SwFldPortion( str );
157             }
158 			break;
159 
160 		case RES_DOCSTATFLD:
161 			if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
162             {
163 				((SwDocStatField*)pFld)->ChangeExpansion( pFrame );
164             }
165             {
166                 String const str( (bName)
167                         ? pFld->GetFieldName()
168                         : pFld->ExpandField(bInClipboard) );
169                 pRet = new SwFldPortion( str );
170             }
171             if(pRet)
172                 ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_PAGECOOUNTFLD;
173             break;
174 
175 		case RES_PAGENUMBERFLD:
176 		{
177 			if( !bName && pSh && pSh->GetLayout() && !pSh->Imp()->IsUpdateExpFlds() )//swmod 080122
178 			{
179                 SwPageNumberFieldType *pPageNr = (SwPageNumberFieldType *)pFld->GetTyp();
180 
181                 const SwRootFrm* pTmpRootFrm = pSh->GetLayout();
182                 const sal_Bool bVirt = pTmpRootFrm->IsVirtPageNum();
183 
184                 MSHORT nVirtNum = pFrame->GetVirtPageNum();
185                 MSHORT nNumPages = pTmpRootFrm->GetPageNum();
186 				sal_Int16 nNumFmt = -1;
187 				if(SVX_NUM_PAGEDESC == pFld->GetFormat())
188 					nNumFmt = pFrame->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType();
189 
190 				pPageNr->ChangeExpansion( pDoc, nVirtNum, nNumPages,
191 											bVirt, nNumFmt > -1 ? &nNumFmt : 0);
192 			}
193             {
194                 String const str( (bName)
195                         ? pFld->GetFieldName()
196                         : pFld->ExpandField(bInClipboard) );
197                 pRet = new SwFldPortion( str );
198             }
199             if(pRet)
200                 ((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_PAGENUMBERFLD;
201             break;
202 		}
203 		case RES_GETEXPFLD:
204 		{
205 			if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
206 			{
207 				SwGetExpField* pExpFld = (SwGetExpField*)pFld;
208 				if( !::lcl_IsInBody( pFrame ) )
209 				{
210 					pExpFld->ChgBodyTxtFlag( sal_False );
211 					pExpFld->ChangeExpansion( *pFrame, *((SwTxtFld*)pHint) );
212 				}
213 				else if( !pExpFld->IsInBodyTxt() )
214 				{
215 					// war vorher anders, also erst expandieren, dann umsetzen!!
216 					pExpFld->ChangeExpansion( *pFrame, *((SwTxtFld*)pHint) );
217 					pExpFld->ChgBodyTxtFlag( sal_True );
218 				}
219 			}
220             {
221                 String const str( (bName)
222                         ? pFld->GetFieldName()
223                         : pFld->ExpandField(bInClipboard) );
224                 pRet = new SwFldPortion( str );
225             }
226 			break;
227 		}
228 		case RES_DBFLD:
229 		{
230 			if( !bName )
231 			{
232 				SwDBField* pDBFld = (SwDBField*)pFld;
233 				pDBFld->ChgBodyTxtFlag( ::lcl_IsInBody( pFrame ) );
234 /* Solange das ChangeExpansion auskommentiert ist.
235  * Aktualisieren in Kopf/Fuszeilen geht aktuell nicht.
236 				if( !::lcl_IsInBody( pFrame ) )
237 				{
238 					pDBFld->ChgBodyTxtFlag( sal_False );
239 					pDBFld->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
240 				}
241 				else if( !pDBFld->IsInBodyTxt() )
242 				{
243 					// war vorher anders, also erst expandieren, dann umsetzen!!
244 					pDBFld->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
245 					pDBFld->ChgBodyTxtFlag( sal_True );
246 				}
247 */
248 			}
249             {
250                 String const str( (bName)
251                         ? pFld->GetFieldName()
252                         : pFld->ExpandField(bInClipboard) );
253                 pRet = new SwFldPortion(str);
254             }
255 			break;
256 		}
257 		case RES_REFPAGEGETFLD:
258 			if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
259             {
260 				((SwRefPageGetField*)pFld)->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
261             }
262             {
263                 String const str( (bName)
264                         ? pFld->GetFieldName()
265                         : pFld->ExpandField(bInClipboard) );
266                 pRet = new SwFldPortion(str);
267             }
268 			break;
269 
270 		case RES_JUMPEDITFLD:
271 			if( !bName )
272 				pChFmt =  ((SwJumpEditField*)pFld)->GetCharFmt();
273 			bNewFlyPor = sal_True;
274             bPlaceHolder = sal_True;
275 			break;
276 		case RES_GETREFFLD:
277 			subType = ((SwGetRefField*)pFld)->GetSubType();
278             {
279                 String const str( (bName)
280                         ? pFld->GetFieldName()
281                         : pFld->ExpandField(bInClipboard) );
282                 pRet = new SwFldPortion(str);
283             }
284             if(pRet)
285 			{
286 				if( subType == REF_BOOKMARK  )
287                     ((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_BOOKMARKFLD;
288 				else if( subType == REF_SETREFATTR )
289 					((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_SETREFATTRFLD;
290 				break;
291 			}
292 		case RES_DATETIMEFLD:
293 			subType = ((SwDateTimeField*)pFld)->GetSubType();
294             {
295                 String const str( (bName)
296                         ? pFld->GetFieldName()
297                         : pFld->ExpandField(bInClipboard) );
298                 pRet = new SwFldPortion(str);
299             }
300             if(pRet)
301 			{
302 				if( subType & DATEFLD  )
303 					((SwFldPortion*)pRet)->m_nAttrFldType= ATTR_DATEFLD;
304 				else if( subType & TIMEFLD )
305 					((SwFldPortion*)pRet)->m_nAttrFldType = ATTR_TIMEFLD;
306 				break;
307 			}
308 		default:
309             {
310                 String const str( (bName)
311                         ? pFld->GetFieldName()
312                         : pFld->ExpandField(bInClipboard) );
313                 pRet = new SwFldPortion(str);
314             }
315 	}
316 
317 	if( bNewFlyPor )
318 	{
319 		SwFont *pTmpFnt = 0;
320 		if( !bName )
321 		{
322 			pTmpFnt = new SwFont( *pFnt );
323 			if( bINet )
324 			{
325 				SwAttrPool* pPool = pChFmt->GetAttrSet().GetPool();
326 				SfxItemSet aSet( *pPool, RES_CHRATR_BEGIN, RES_CHRATR_END );
327 				SfxItemSet aTmpSet( aSet );
328                 pFrm->GetTxtNode()->GetAttr(aSet,rInf.GetIdx(),rInf.GetIdx()+1);
329 				aTmpSet.Set( pChFmt->GetAttrSet() );
330 				aTmpSet.Differentiate( aSet );
331 				if( aTmpSet.Count() )
332                     pTmpFnt->SetDiffFnt( &aTmpSet, pFrm->GetTxtNode()->getIDocumentSettingAccess() );
333 			}
334 			else
335                 pTmpFnt->SetDiffFnt( &pChFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() );
336 		}
337         {
338             String const str( (bName)
339                     ? pFld->GetFieldName()
340                     : pFld->ExpandField(bInClipboard) );
341             pRet = new SwFldPortion(str, pTmpFnt, bPlaceHolder);
342         }
343 	}
344 
345 	return pRet;
346 }
347 
348 /*************************************************************************
349  *                      SwTxtFormatter::TryNewNoLengthPortion()
350  *************************************************************************/
351 
352 SwFldPortion * lcl_NewMetaPortion(SwTxtAttr & rHint, const bool bPrefix)
353 {
354     ::sw::Meta *const pMeta(
355         static_cast<SwFmtMeta &>(rHint.GetAttr()).GetMeta() );
356     ::rtl::OUString fix;
357     ::sw::MetaField *const pField( dynamic_cast< ::sw::MetaField * >(pMeta) );
358     OSL_ENSURE(pField, "lcl_NewMetaPortion: no meta field?");
359     if (pField)
360     {
361         pField->GetPrefixAndSuffix((bPrefix) ? &fix : 0, (bPrefix) ? 0 : &fix);
362     }
363     return new SwFldPortion( fix );
364 }
365 
366 /** Try to create a new portion with zero length, for an end of a hint
367     (where there is no CH_TXTATR). Because there may be multiple hint ends at a
368     given index, m_nHintEndIndex is used to keep track of the already created
369     portions. But the portions created here may actually be deleted again,
370     due to UnderFlow. In that case, m_nHintEndIndex must be decremented,
371     so the portion will be created again on the next line.
372  */
373 SwExpandPortion *
374 SwTxtFormatter::TryNewNoLengthPortion(SwTxtFormatInfo & rInfo)
375 {
376     if (pHints)
377     {
378         const xub_StrLen nIdx(rInfo.GetIdx());
379         while (m_nHintEndIndex < pHints->GetEndCount())
380         {
381             SwTxtAttr & rHint( *pHints->GetEnd(m_nHintEndIndex) );
382             xub_StrLen const nEnd( *rHint.GetAnyEnd() );
383             if (nEnd > nIdx)
384             {
385                 break;
386             }
387             ++m_nHintEndIndex;
388             if (nEnd == nIdx)
389             {
390                 if (RES_TXTATR_METAFIELD == rHint.Which())
391                 {
392                     SwFldPortion *const pPortion(
393                             lcl_NewMetaPortion(rHint, false));
394                     pPortion->SetNoLength(); // no CH_TXTATR at hint end!
395                     return pPortion;
396                 }
397             }
398         }
399     }
400     return 0;
401 }
402 
403 /*************************************************************************
404  *                      SwTxtFormatter::NewExtraPortion()
405  *************************************************************************/
406 
407 SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
408 {
409     SwTxtAttr *pHint = GetAttr( rInf.GetIdx() );
410     SwLinePortion *pRet = 0;
411     if( !pHint )
412     {
413         pRet = new SwTxtPortion;
414         pRet->SetLen( 1 );
415         rInf.SetLen( 1 );
416         return pRet;
417     }
418 
419     switch( pHint->Which() )
420     {
421     case RES_TXTATR_FLYCNT :
422         {
423             pRet = NewFlyCntPortion( rInf, pHint );
424             break;
425         }
426     case RES_TXTATR_FTN :
427         {
428             pRet = NewFtnPortion( rInf, pHint );
429             break;
430         }
431     case RES_TXTATR_FIELD :
432         {
433             pRet = NewFldPortion( rInf, pHint );
434             break;
435         }
436     case RES_TXTATR_REFMARK :
437         {
438             pRet = new SwIsoRefPortion;
439             break;
440         }
441     case RES_TXTATR_TOXMARK :
442         {
443             pRet = new SwIsoToxPortion;
444             break;
445         }
446     case RES_TXTATR_METAFIELD:
447         {
448             pRet = lcl_NewMetaPortion( *pHint, true );
449             break;
450         }
451     default: ;
452     }
453     if( !pRet )
454     {
455         const XubString aNothing;
456         pRet = new SwFldPortion( aNothing );
457         rInf.SetLen( 1 );
458     }
459     return pRet;
460 }
461 
462 /*************************************************************************
463  *                      SwTxtFormatter::NewNumberPortion()
464  *************************************************************************/
465 
466 
467 SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
468 {
469 	if( rInf.IsNumDone() || rInf.GetTxtStart() != nStart
470 				|| rInf.GetTxtStart() != rInf.GetIdx() )
471 		return 0;
472 
473 	SwNumberPortion *pRet = 0;
474 	const SwTxtNode* pTxtNd = GetTxtFrm()->GetTxtNode();
475 	const SwNumRule* pNumRule = pTxtNd->GetNumRule();
476 
477 	// hat ein "gueltige" Nummer ?
478     if( pTxtNd->IsNumbered() && pTxtNd->IsCountedInList())
479 	{
480         const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
481 		const sal_Bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust();
482 		const sal_Bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust();
483         // --> OD 2008-01-23 #newlistlevelattrs#
484         const bool bLabelAlignmentPosAndSpaceModeActive(
485                 rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT );
486         const KSHORT nMinDist = bLabelAlignmentPosAndSpaceModeActive
487                                 ? 0 : rNumFmt.GetCharTextDistance();
488         // <--
489 
490 		if( SVX_NUM_BITMAP == rNumFmt.GetNumberingType() )
491 		{
492             // --> OD 2008-01-23 #newlistlevelattrs#
493             pRet = new SwGrfNumPortion( (SwFrm*)GetTxtFrm(),
494                                         pTxtNd->GetLabelFollowedBy(),
495                                         rNumFmt.GetBrush(),
496                                         rNumFmt.GetGraphicOrientation(),
497                                         rNumFmt.GetGraphicSize(),
498                                         bLeft, bCenter, nMinDist,
499                                         bLabelAlignmentPosAndSpaceModeActive );
500             // <--
501 			long nTmpA = rInf.GetLast()->GetAscent();
502 			long nTmpD = rInf.GetLast()->Height() - nTmpA;
503 			if( !rInf.IsTest() )
504 				((SwGrfNumPortion*)pRet)->SetBase( nTmpA, nTmpD, nTmpA, nTmpD );
505 		}
506 		else
507 		{
508 			// Der SwFont wird dynamisch angelegt und im CTOR uebergeben,
509 			// weil das CharFmt nur einen SV-Font zurueckliefert.
510 			// Im Dtor vom SwNumberPortion wird der SwFont deletet.
511 			SwFont *pNumFnt = 0;
512 			const SwAttrSet* pFmt = rNumFmt.GetCharFmt() ?
513                                     &rNumFmt.GetCharFmt()->GetAttrSet() :
514                                     NULL;
515             const IDocumentSettingAccess* pIDSA = pTxtNd->getIDocumentSettingAccess();
516 
517             if( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
518 			{
519 				const Font *pFmtFnt = rNumFmt.GetBulletFont();
520 
521                 //
522                 // Build a new bullet font basing on the current paragraph font:
523                 //
524                 pNumFnt = new SwFont( &rInf.GetCharAttr(), pIDSA );
525 
526                 // --> FME 2005-08-11 #i53199#
527                 if ( !pIDSA->get(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT) )
528                 {
529                     // i18463:
530                     // Underline style of paragraph font should not be considered
531                     // Overline style of paragraph font should not be considered
532                     // Weight style of paragraph font should not be considered
533                     // Posture style of paragraph font should not be considered
534                     pNumFnt->SetUnderline( UNDERLINE_NONE );
535                     pNumFnt->SetOverline( UNDERLINE_NONE );
536                     pNumFnt->SetItalic( ITALIC_NONE, SW_LATIN );
537                     pNumFnt->SetItalic( ITALIC_NONE, SW_CJK );
538                     pNumFnt->SetItalic( ITALIC_NONE, SW_CTL );
539                     pNumFnt->SetWeight( WEIGHT_NORMAL, SW_LATIN );
540                     pNumFnt->SetWeight( WEIGHT_NORMAL, SW_CJK );
541                     pNumFnt->SetWeight( WEIGHT_NORMAL, SW_CTL );
542                 }
543 
544                 //
545                 // Apply the explicit attributes from the character style
546                 // associated with the numering to the new bullet font.
547                 //
548 				if( pFmt )
549                     pNumFnt->SetDiffFnt( pFmt, pIDSA );
550 
551                 if ( pFmtFnt )
552 				{
553 					const sal_uInt8 nAct = pNumFnt->GetActual();
554 					pNumFnt->SetFamily( pFmtFnt->GetFamily(), nAct );
555 					pNumFnt->SetName( pFmtFnt->GetName(), nAct );
556 					pNumFnt->SetStyleName( pFmtFnt->GetStyleName(), nAct );
557 					pNumFnt->SetCharSet( pFmtFnt->GetCharSet(), nAct );
558 					pNumFnt->SetPitch( pFmtFnt->GetPitch(), nAct );
559 				}
560 
561                 // we do not allow a vertical font
562                 pNumFnt->SetVertical( pNumFnt->GetOrientation(),
563                                       pFrm->IsVertical() );
564 
565                 // --> OD 2008-01-23 #newlistelevelattrs#
566                 pRet = new SwBulletPortion( rNumFmt.GetBulletChar(),
567                                             pTxtNd->GetLabelFollowedBy(),
568                                             pNumFnt,
569                                             bLeft, bCenter, nMinDist,
570                                             bLabelAlignmentPosAndSpaceModeActive );
571                 // <--
572 			}
573 			else
574 			{
575                 XubString aTxt( pTxtNd->GetNumString() );
576                 // --> OD 2008-01-23 #newlistlevelattrs#
577                 if ( aTxt.Len() > 0 )
578                 {
579                     aTxt.Insert( pTxtNd->GetLabelFollowedBy() );
580                 }
581                 // <--
582 
583 				// 7974: Nicht nur eine Optimierung...
584 				// Eine Numberportion ohne Text wird die Breite von 0
585 				// erhalten. Die nachfolgende Textportion wird im BreakLine
586 				// in das BreakCut laufen, obwohl rInf.GetLast()->GetFlyPortion()
587 				// vorliegt!
588 				if( aTxt.Len() )
589 				{
590                     //
591                     // Build a new numbering font basing on the current paragraph font:
592                     //
593                     pNumFnt = new SwFont( &rInf.GetCharAttr(), pIDSA );
594 
595                     // --> FME 2005-08-11 #i53199#
596                     if ( !pIDSA->get(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT) )
597                     {
598                         // i18463:
599                         // Underline style of paragraph font should not be considered
600                         pNumFnt->SetUnderline( UNDERLINE_NONE );
601                         // Overline style of paragraph font should not be considered
602                         pNumFnt->SetOverline( UNDERLINE_NONE );
603                     }
604 
605 
606                     //
607                     // Apply the explicit attributes from the character style
608                     // associated with the numering to the new bullet font.
609                     //
610 					if( pFmt )
611                         pNumFnt->SetDiffFnt( pFmt, pIDSA );
612 
613                     // we do not allow a vertical font
614                     pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() );
615 
616                     // --> OD 2008-01-23 #newlistlevelattrs#
617                     pRet = new SwNumberPortion( aTxt, pNumFnt,
618                                                 bLeft, bCenter, nMinDist,
619                                                 bLabelAlignmentPosAndSpaceModeActive );
620                     // <--
621 				}
622 			}
623 		}
624 	}
625 	return pRet;
626 }
627 
628