LibreOffice Module sw (master) 1
txtfld.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <hintids.hxx>
21#include <fmtfld.hxx>
22#include <txtfld.hxx>
23#include <charfmt.hxx>
24#include <fmtautofmt.hxx>
25
26#include <viewsh.hxx>
27#include <doc.hxx>
28#include <rootfrm.hxx>
29#include <pagefrm.hxx>
30#include <ndtxt.hxx>
31#include <fldbas.hxx>
32#include <viewopt.hxx>
33#include <flyfrm.hxx>
34#include <viewimp.hxx>
35#include <swfont.hxx>
36#include <swmodule.hxx>
37#include "porfld.hxx"
38#include "porftn.hxx"
39#include "porref.hxx"
40#include "portox.hxx"
41#include "porfly.hxx"
42#include "itrform2.hxx"
43#include <chpfld.hxx>
44#include <dbfld.hxx>
45#include <expfld.hxx>
46#include <docufld.hxx>
47#include <pagedesc.hxx>
48#include <fmtmeta.hxx>
49#include <reffld.hxx>
50#include <flddat.hxx>
53#include <redline.hxx>
54#include <sfx2/docfile.hxx>
55#include <svl/grabbagitem.hxx>
56#include <svl/itemiter.hxx>
57#include <svl/whiter.hxx>
58#include <editeng/colritem.hxx>
59#include <editeng/udlnitem.hxx>
61
62static bool lcl_IsInBody( SwFrame const *pFrame )
63{
64 if ( pFrame->IsInDocBody() )
65 return true;
66 else
67 {
68 const SwFrame *pTmp = pFrame;
69 const SwFlyFrame *pFly;
70 while ( nullptr != (pFly = pTmp->FindFlyFrame()) )
71 pTmp = pFly->GetAnchorFrame();
72 return pTmp->IsInDocBody();
73 }
74}
75
77 const SwTextAttr *pHint ) const
78{
79 SwExpandPortion *pRet = nullptr;
80 SwFrame *pFrame = m_pFrame;
81 SwField *pField = const_cast<SwField*>(pHint->GetFormatField().GetField());
82 const bool bName = rInf.GetOpt().IsFieldName();
83
84 SwCharFormat* pChFormat = nullptr;
85 bool bNewFlyPor = false;
86 sal_uInt16 subType = 0;
87
88 // set language
89 const_cast<SwTextFormatter*>(this)->SeekAndChg( rInf );
90 if (pField->GetLanguage() != GetFnt()->GetLanguage())
91 pField->SetLanguage( GetFnt()->GetLanguage() );
92
93 SwViewShell *pSh = rInf.GetVsh();
94 SwDoc *const pDoc( pSh ? pSh->GetDoc() : nullptr );
95 bool const bInClipboard( pDoc == nullptr || pDoc->IsClipBoard() );
96 bool bPlaceHolder = false;
97
98 switch( pField->GetTyp()->Which() )
99 {
102 pRet = new SwPostItsPortion( SwFieldIds::Script == pField->GetTyp()->Which() );
103 break;
104
106 {
107 if( bName )
108 pRet = new SwFieldPortion( pField->GetFieldName() );
109 else
110 pRet = new SwCombinedPortion( pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
111 }
112 break;
113
115 {
116 OUString const aStr( bName
117 ? pField->GetFieldName()
118 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
119 pRet = new SwHiddenPortion(aStr);
120 }
121 break;
122
124 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
125 {
126 static_cast<SwChapterField*>(pField)->ChangeExpansion(*pFrame,
127 &static_txtattr_cast<SwTextField const*>(pHint)->GetTextNode());
128 }
129 {
130 OUString const aStr( bName
131 ? pField->GetFieldName()
132 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
133 pRet = new SwFieldPortion( aStr );
134 }
135 break;
136
138 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
139 {
140 static_cast<SwDocStatField*>(pField)->ChangeExpansion( pFrame );
141 }
142 {
143 OUString const aStr( bName
144 ? pField->GetFieldName()
145 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
146 pRet = new SwFieldPortion( aStr );
147 }
148 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_PAGECOUNTFLD;
149 break;
150
152 {
153 if( !bName && pSh && pSh->GetLayout() && !pSh->Imp()->IsUpdateExpFields() )
154 {
155 SwPageNumberFieldType *pPageNr = static_cast<SwPageNumberFieldType *>(pField->GetTyp());
156
157 const SwRootFrame* pTmpRootFrame = pSh->GetLayout();
158 const bool bVirt = pTmpRootFrame->IsVirtPageNum();
159
160 sal_uInt16 nVirtNum = pFrame->GetVirtPageNum();
161 sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum();
162 SvxNumType nNumFormat = SvxNumType(-1);
163 if(SVX_NUM_PAGEDESC == pField->GetFormat())
164 nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType();
165 static_cast<SwPageNumberField*>(pField)
166 ->ChangeExpansion(nVirtNum, nNumPages);
167 pPageNr->ChangeExpansion(pDoc,
168 bVirt, nNumFormat != SvxNumType(-1) ? &nNumFormat : nullptr);
169 }
170 {
171 OUString const aStr( bName
172 ? pField->GetFieldName()
173 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
174 pRet = new SwFieldPortion( aStr );
175 }
176 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_PAGENUMBERFLD;
177 break;
178 }
180 {
181 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
182 {
183 SwGetExpField* pExpField = static_cast<SwGetExpField*>(pField);
184 if( !::lcl_IsInBody( pFrame ) )
185 {
186 pExpField->ChgBodyTextFlag( false );
187 pExpField->ChangeExpansion(*pFrame,
188 *static_txtattr_cast<SwTextField const*>(pHint));
189 }
190 else if( !pExpField->IsInBodyText() )
191 {
192 // Was something else previously, thus: expand first, then convert it!
193 pExpField->ChangeExpansion(*pFrame,
194 *static_txtattr_cast<SwTextField const*>(pHint));
195 pExpField->ChgBodyTextFlag( true );
196 }
197 }
198 {
199 OUString const aStr( bName
200 ? pField->GetFieldName()
201 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
202 pRet = new SwFieldPortion( aStr );
203 }
204 break;
205 }
207 {
208 if( !bName )
209 {
210 SwDBField* pDBField = static_cast<SwDBField*>(pField);
211 pDBField->ChgBodyTextFlag( ::lcl_IsInBody( pFrame ) );
212 }
213 {
214 OUString const aStr( bName
215 ? pField->GetFieldName()
216 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
217 pRet = new SwFieldPortion(aStr);
218 }
219 break;
220 }
222 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
223 {
224 static_cast<SwRefPageGetField*>(pField)->ChangeExpansion(*pFrame,
225 static_txtattr_cast<SwTextField const*>(pHint));
226 }
227 {
228 OUString const aStr( bName
229 ? pField->GetFieldName()
230 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
231 pRet = new SwFieldPortion(aStr);
232 }
233 break;
234
236 if( !bName )
237 pChFormat = static_cast<SwJumpEditField*>(pField)->GetCharFormat();
238 bNewFlyPor = true;
239 bPlaceHolder = true;
240 break;
242 subType = static_cast<SwGetRefField*>(pField)->GetSubType();
243 {
244 OUString const str( bName
245 ? pField->GetFieldName()
246 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
247 pRet = new SwFieldPortion(str);
248 }
249 if( subType == REF_BOOKMARK )
250 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_BOOKMARKFLD;
251 else if( subType == REF_SETREFATTR )
252 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_SETREFATTRFLD;
253 break;
255 subType = static_cast<SwDateTimeField*>(pField)->GetSubType();
256 {
257 OUString const str( bName
258 ? pField->GetFieldName()
259 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
260 pRet = new SwFieldPortion(str);
261 }
262 if( subType & DATEFLD )
263 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_DATEFLD;
264 else if( subType & TIMEFLD )
265 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_TIMEFLD;
266 break;
267 default:
268 {
269 OUString const aStr( bName
270 ? pField->GetFieldName()
271 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
272 pRet = new SwFieldPortion(aStr);
273 }
274 }
275
276 if( bNewFlyPor )
277 {
278 std::unique_ptr<SwFont> pTmpFnt;
279 if( !bName )
280 {
281 pTmpFnt.reset(new SwFont( *m_pFont ));
282 pTmpFnt->SetDiffFnt(&pChFormat->GetAttrSet(), &m_pFrame->GetDoc().getIDocumentSettingAccess());
283 }
284 OUString const aStr( bName
285 ? pField->GetFieldName()
286 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
287 pRet = new SwFieldPortion(aStr, std::move(pTmpFnt), bPlaceHolder);
288 }
289
290 return pRet;
291}
292
293static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr & rHint, const bool bPrefix)
294{
295 ::sw::Meta *const pMeta(
296 static_cast<SwFormatMeta &>(rHint.GetAttr()).GetMeta() );
297 OUString fix;
298 ::sw::MetaField *const pField( dynamic_cast< ::sw::MetaField * >(pMeta) );
299 OSL_ENSURE(pField, "lcl_NewMetaPortion: no meta field?");
300 if (pField)
301 {
302 OUString color;
303 pField->GetPrefixAndSuffix(bPrefix ? &fix : nullptr, bPrefix ? nullptr : &fix, &color);
304 }
305 return new SwFieldPortion( fix );
306}
307
317{
318 const TextFrameIndex nIdx(rInfo.GetIdx());
319
320 // sw_redlinehide: because there is a dummy character at the start of these
321 // hints, it's impossible to have ends of hints from different nodes at the
322 // same view position, so it's sufficient to check the hints of the current
323 // node. However, m_pByEndIter exists for the whole text frame, so
324 // it's necessary to iterate all hints for that purpose...
325 if (!m_pByEndIter)
326 {
328 }
329 SwTextNode const* pNode(nullptr);
330 for (SwTextAttr const* pHint = m_pByEndIter->NextAttr(pNode); pHint;
331 pHint = m_pByEndIter->NextAttr(pNode))
332 {
333 SwTextAttr & rHint(const_cast<SwTextAttr&>(*pHint));
334 TextFrameIndex const nEnd(
335 rInfo.GetTextFrame()->MapModelToView(pNode, rHint.GetAnyEnd()));
336 if (nEnd > nIdx)
337 {
338 m_pByEndIter->PrevAttr();
339 break;
340 }
341 if (nEnd == nIdx)
342 {
343 if (RES_TXTATR_METAFIELD == rHint.Which())
344 {
345 SwFieldPortion *const pPortion(
346 lcl_NewMetaPortion(rHint, false));
347 pPortion->SetNoLength(); // no CH_TXTATR at hint end!
348 return pPortion;
349 }
350 }
351 }
352 return nullptr;
353}
354
356{
357 SwTextAttr *pHint = GetAttr( rInf.GetIdx() );
358 SwLinePortion *pRet = nullptr;
359 if( !pHint )
360 {
361 pRet = new SwTextPortion;
362 pRet->SetLen(TextFrameIndex(1));
363 rInf.SetLen(TextFrameIndex(1));
364 return pRet;
365 }
366
367 switch( pHint->Which() )
368 {
369 case RES_TXTATR_FLYCNT :
370 {
371 pRet = NewFlyCntPortion( rInf, pHint );
372 break;
373 }
374 case RES_TXTATR_FTN :
375 {
376 pRet = NewFootnotePortion( rInf, pHint );
377 break;
378 }
379 case RES_TXTATR_FIELD :
381 {
382 pRet = NewFieldPortion( rInf, pHint );
383 break;
384 }
385 case RES_TXTATR_REFMARK :
386 {
387 pRet = new SwIsoRefPortion;
388 break;
389 }
390 case RES_TXTATR_TOXMARK :
391 {
392 pRet = new SwIsoToxPortion;
393 break;
394 }
396 {
397 pRet = lcl_NewMetaPortion( *pHint, true );
398 break;
399 }
400 default: ;
401 }
402 if( !pRet )
403 {
404 auto pFieldPortion = new SwFieldPortion( "" );
405 if (pHint->Which() == RES_TXTATR_CONTENTCONTROL)
406 {
407 pFieldPortion->SetContentControl(true);
408 }
409 pRet = pFieldPortion;
410 rInf.SetLen(TextFrameIndex(1));
411 }
412 return pRet;
413}
414
421 const IDocumentSettingAccess* pIDSA,
422 const SwAttrSet* pFormat)
423{
425 return;
426
428 std::shared_ptr<SfxItemSet> pSet(rListAutoFormat.GetStyleHandle());
429
430 // Check each item and in case it should be ignored, then clear it.
431 if (!pSet)
432 return;
433
434 std::unique_ptr<SfxItemSet> const pCleanedSet = pSet->Clone();
435
436 if (pCleanedSet->HasItem(RES_TXTATR_CHARFMT))
437 {
438 // Insert attributes of referenced char format into current set
439 const SwFormatCharFormat& rCharFormat = pCleanedSet->Get(RES_TXTATR_CHARFMT);
440 const SwAttrSet& rStyleAttrs = static_cast<const SwCharFormat *>(rCharFormat.GetRegisteredIn())->GetAttrSet();
441 SfxWhichIter aIter(rStyleAttrs);
442 sal_uInt16 nWhich = aIter.FirstWhich();
443 while (nWhich)
444 {
445 if (!SwTextNode::IsIgnoredCharFormatForNumbering(nWhich, /*bIsCharStyle=*/true)
446 && !pCleanedSet->HasItem(nWhich)
447 && !(pFormat && pFormat->HasItem(nWhich)) )
448 {
449 // Copy from parent sets only allowed items which will not overwrite
450 // values explicitly defined in current set (pCleanedSet) or in pFormat
451 if (const SfxPoolItem* pItem = rStyleAttrs.GetItem(nWhich, true))
452 pCleanedSet->Put(*pItem);
453 }
454 nWhich = aIter.NextWhich();
455 }
456
457 // It is not required here anymore, all referenced items are inserted
458 pCleanedSet->ClearItem(RES_TXTATR_CHARFMT);
459 };
460
461 SfxItemIter aIter(*pSet);
462 const SfxPoolItem* pItem = aIter.GetCurItem();
463 while (pItem)
464 {
466 pCleanedSet->ClearItem(pItem->Which());
467 else if (pFormat && pFormat->HasItem(pItem->Which()))
468 pCleanedSet->ClearItem(pItem->Which());
469 else if (pItem->Which() == RES_CHRATR_BACKGROUND)
470 {
471 bool bShadingWasImported = false;
472 // If Shading was imported, it should not be converted to a Highlight,
473 // but remain as Shading which is ignored for numbering.
474 if (pCleanedSet->HasItem(RES_CHRATR_GRABBAG))
475 {
476 SfxGrabBagItem aGrabBag = pCleanedSet->Get(RES_CHRATR_GRABBAG, /*bSrchInParent=*/false);
477 std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
478 auto aIterator = rMap.find("CharShadingMarker");
479 if (aIterator != rMap.end())
480 aIterator->second >>= bShadingWasImported;
481 }
482
483 // If used, BACKGROUND is converted to HIGHLIGHT. So also ignore if a highlight already exists.
484 if (bShadingWasImported
485 || pCleanedSet->HasItem(RES_CHRATR_HIGHLIGHT)
486 || (pFormat && pFormat->HasItem(RES_CHRATR_HIGHLIGHT)))
487 {
488 pCleanedSet->ClearItem(pItem->Which());
489 }
490 }
491 pItem = aIter.NextItem();
492 };
493
494 // SetDiffFnt resets the background color (why?), so capture it and re-apply if it had a value,
495 // because an existing value should override anything inherited from the paragraph marker.
496 const std::optional<Color> oFontBackColor = pNumFnt->GetBackColor();
497 // The same is true for the highlight color.
498 const Color aHighlight = pNumFnt->GetHighlightColor();
499
500 pNumFnt->SetDiffFnt(pCleanedSet.get(), pIDSA);
501
502 if (oFontBackColor)
503 pNumFnt->SetBackColor(oFontBackColor);
504 if (aHighlight != COL_TRANSPARENT)
505 pNumFnt->SetHighlightColor(aHighlight);
506}
507
509 bool& bIsMoved )
510{
511 const SwDoc& rDoc = rTextNode.GetDoc();
512 SwRedlineTable::size_type nRedlPos = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rTextNode, RedlineType::Any );
513
514 if( SwRedlineTable::npos != nRedlPos )
515 {
516 const SwNodeOffset nNdIdx = rTextNode.GetIndex();
518 for( ; nRedlPos < rTable.size() ; ++nRedlPos )
519 {
520 const SwRangeRedline* pTmp = rTable[ nRedlPos ];
521 SwNodeOffset nStart = pTmp->GetPoint()->GetNodeIndex(),
522 nEnd = pTmp->GetMark()->GetNodeIndex();
523 if( nStart > nEnd )
524 std::swap(nStart, nEnd);
525 if( RedlineType::Delete == pTmp->GetType() ||
526 RedlineType::Insert == pTmp->GetType() )
527 {
528 if( nStart <= nNdIdx && nEnd > nNdIdx )
529 {
530 bIsMoved = pTmp->IsMoved();
531 return pTmp;
532 }
533 }
534 if( nStart > nNdIdx )
535 break;
536 }
537 }
538 return nullptr;
539}
540
541static bool lcl_setRedlineAttr( SwTextFormatInfo &rInf, const SwTextNode& rTextNode, const std::unique_ptr<SwFont>& pNumFnt )
542{
543 if ( rInf.GetVsh()->GetLayout()->IsHideRedlines() )
544 return false;
545
546 bool bIsMoved;
547 const SwRangeRedline* pRedlineNum = lcl_GetRedlineAtNodeInsertionOrDeletion( rTextNode, bIsMoved );
548 if (!pRedlineNum)
549 return false;
550
551 // moved text: dark green with double underline or strikethrough
552 if ( bIsMoved )
553 {
554 pNumFnt->SetColor(COL_GREEN);
555 if ( RedlineType::Delete == pRedlineNum->GetType() )
556 pNumFnt->SetStrikeout(STRIKEOUT_DOUBLE);
557 else
558 pNumFnt->SetUnderline(LINESTYLE_DOUBLE);
559 return true;
560 }
561
562 SwAttrPool& rPool = rInf.GetVsh()->GetDoc()->GetAttrPool();
564
565 std::size_t aAuthor = (1 < pRedlineNum->GetStackCount())
566 ? pRedlineNum->GetAuthor( 1 )
567 : pRedlineNum->GetAuthor();
568
569 if ( RedlineType::Delete == pRedlineNum->GetType() )
570 SW_MOD()->GetDeletedAuthorAttr(aAuthor, aSet);
571 else
572 SW_MOD()->GetInsertAuthorAttr(aAuthor, aSet);
573
574 if (const SvxColorItem* pItem = aSet.GetItemIfSet(RES_CHRATR_COLOR))
575 pNumFnt->SetColor(pItem->GetValue());
576 if (const SvxUnderlineItem* pItem = aSet.GetItemIfSet(RES_CHRATR_UNDERLINE))
577 pNumFnt->SetUnderline(pItem->GetLineStyle());
578 if (const SvxCrossedOutItem* pItem = aSet.GetItemIfSet(RES_CHRATR_CROSSEDOUT))
579 pNumFnt->SetStrikeout( pItem->GetStrikeout() );
580
581 return true;
582}
583
585{
586 if( rInf.IsNumDone() || rInf.GetTextStart() != m_nStart
587 || rInf.GetTextStart() != rInf.GetIdx() )
588 return nullptr;
589
590 SwNumberPortion *pRet = nullptr;
591 // sw_redlinehide: at this point it's certain that pTextNd is the node with
592 // the numbering of the frame; only the actual number-vector (GetNumString)
593 // depends on the hide-mode in the layout so other calls don't need to care
594 const SwTextNode *const pTextNd = GetTextFrame()->GetTextNodeForParaProps();
595 const SwNumRule* pNumRule = pTextNd->GetNumRule();
596
597 // Has a "valid" number?
598 // sw_redlinehide: check that pParaPropsNode is the correct one
599 assert(pTextNd->IsNumbered(m_pFrame->getRootFrame()) == pTextNd->IsNumbered(nullptr));
600 if (pTextNd->IsNumbered(m_pFrame->getRootFrame()) && pTextNd->IsCountedInList())
601 {
602 int nLevel = pTextNd->GetActualListLevel();
603
604 if (nLevel < 0)
605 nLevel = 0;
606
607 if (nLevel >= MAXLEVEL)
608 nLevel = MAXLEVEL - 1;
609
610 const SwNumFormat &rNumFormat = pNumRule->Get( nLevel );
611 const bool bLeft = SvxAdjust::Left == rNumFormat.GetNumAdjust();
612 const bool bCenter = SvxAdjust::Center == rNumFormat.GetNumAdjust();
613 const bool bLabelAlignmentPosAndSpaceModeActive(
615 const sal_uInt16 nMinDist = bLabelAlignmentPosAndSpaceModeActive
616 ? 0 : rNumFormat.GetCharTextDistance();
617
618 if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() )
619 {
620 OUString referer;
621 if (auto const sh1 = rInf.GetVsh()) {
622 if (auto const doc = sh1->GetDoc()) {
623 auto const sh2 = doc->GetPersist();
624 if (sh2 != nullptr && sh2->HasName()) {
625 referer = sh2->GetMedium()->GetName();
626 }
627 }
628 }
629 pRet = new SwGrfNumPortion( pTextNd->GetLabelFollowedBy(),
630 rNumFormat.GetBrush(), referer,
631 rNumFormat.GetGraphicOrientation(),
632 rNumFormat.GetGraphicSize(),
633 bLeft, bCenter, nMinDist,
634 bLabelAlignmentPosAndSpaceModeActive );
635 tools::Long nTmpA = rInf.GetLast()->GetAscent();
636 tools::Long nTmpD = rInf.GetLast()->Height() - nTmpA;
637 if( !rInf.IsTest() )
638 static_cast<SwGrfNumPortion*>(pRet)->SetBase( nTmpA, nTmpD, nTmpA, nTmpD );
639 }
640 else
641 {
642 // The SwFont is created dynamically and passed in the ctor,
643 // as the CharFormat only returns an SV-Font.
644 // In the dtor of SwNumberPortion, the SwFont is deleted.
645 const SwAttrSet* pFormat = rNumFormat.GetCharFormat() ?
646 &rNumFormat.GetCharFormat()->GetAttrSet() :
647 nullptr;
648 const IDocumentSettingAccess* pIDSA = pTextNd->getIDocumentSettingAccess();
649
650 if( SVX_NUM_CHAR_SPECIAL == rNumFormat.GetNumberingType() )
651 {
652 const std::optional<vcl::Font> pFormatFnt = rNumFormat.GetBulletFont();
653
654 // Build a new bullet font basing on the current paragraph font:
655 std::unique_ptr<SwFont> pNumFnt(new SwFont( &rInf.GetCharAttr(), pIDSA ));
656
657 // #i53199#
659 {
660 // i18463:
661 // Underline style of paragraph font should not be considered
662 // Overline style of paragraph font should not be considered
663 // Weight style of paragraph font should not be considered
664 // Posture style of paragraph font should not be considered
665 pNumFnt->SetUnderline( LINESTYLE_NONE );
666 pNumFnt->SetOverline( LINESTYLE_NONE );
667 pNumFnt->SetItalic( ITALIC_NONE, SwFontScript::Latin );
668 pNumFnt->SetItalic( ITALIC_NONE, SwFontScript::CJK );
669 pNumFnt->SetItalic( ITALIC_NONE, SwFontScript::CTL );
670 pNumFnt->SetWeight( WEIGHT_NORMAL, SwFontScript::Latin );
671 pNumFnt->SetWeight( WEIGHT_NORMAL, SwFontScript::CJK );
672 pNumFnt->SetWeight( WEIGHT_NORMAL, SwFontScript::CTL );
673 }
674
675 // Apply the explicit attributes from the character style
676 // associated with the numbering to the new bullet font.
677 if( pFormat )
678 pNumFnt->SetDiffFnt( pFormat, pIDSA );
679
680 checkApplyParagraphMarkFormatToNumbering(pNumFnt.get(), rInf, pIDSA, pFormat);
681
682 if ( pFormatFnt )
683 {
684 const SwFontScript nAct = pNumFnt->GetActual();
685 pNumFnt->SetFamily( pFormatFnt->GetFamilyType(), nAct );
686 pNumFnt->SetName( pFormatFnt->GetFamilyName(), nAct );
687 pNumFnt->SetStyleName( pFormatFnt->GetStyleName(), nAct );
688 pNumFnt->SetCharSet( pFormatFnt->GetCharSet(), nAct );
689 pNumFnt->SetPitch( pFormatFnt->GetPitch(), nAct );
690 }
691
692 // we do not allow a vertical font
693 pNumFnt->SetVertical( pNumFnt->GetOrientation(),
694 m_pFrame->IsVertical() );
695
696 lcl_setRedlineAttr( rInf, *pTextNd, pNumFnt );
697
698 // --> OD 2008-01-23 #newlistelevelattrs#
699 if (rNumFormat.GetBulletChar())
700 {
701 pRet = new SwBulletPortion(rNumFormat.GetBulletChar(),
702 pTextNd->GetLabelFollowedBy(),
703 std::move(pNumFnt),
704 bLeft, bCenter, nMinDist,
705 bLabelAlignmentPosAndSpaceModeActive);
706 }
707 }
708 else
709 {
710 // Show Changes mode shows the actual numbering (SwListRedlineType::HIDDEN) and
711 // the original one (SwListRedlineType::ORIGTEXT) instead of the fake numbering
712 // (SwListRedlineType::SHOW, which counts removed and inserted numbered paragraphs
713 // in a single list)
714 bool bHasHiddenNum = false;
715 OUString aText( pTextNd->GetNumString(true, MAXLEVEL, m_pFrame->getRootFrame(), SwListRedlineType::HIDDEN) );
716 const SwDoc& rDoc = pTextNd->GetDoc();
718 if ( rTable.size() && !rInf.GetVsh()->GetLayout()->IsHideRedlines() )
719 {
720 OUString aHiddenText( pTextNd->GetNumString(true, MAXLEVEL, m_pFrame->getRootFrame(), SwListRedlineType::ORIGTEXT) );
721
722 if ( !aText.isEmpty() || !aHiddenText.isEmpty() )
723 {
724 if (aText != aHiddenText && !aHiddenText.isEmpty())
725 {
726 bHasHiddenNum = true;
727 // show also original number after the actual one enclosed in [ and ],
728 // and replace tabulator with space to avoid messy indentation
729 // resulted by the longer numbering, e.g. "1.[2.]" instead of "1.".
730 aText = aText + "[" + aHiddenText + "]"
731 + pTextNd->GetLabelFollowedBy().replaceAll("\t", " ");
732 }
733 else if (!aText.isEmpty())
734 aText += pTextNd->GetLabelFollowedBy();
735 }
736 }
738 || !aText.isEmpty())
739 aText += pTextNd->GetLabelFollowedBy();
740
741 // Not just an optimization ...
742 // A number portion without text will be assigned a width of 0.
743 // The succeeding text portion will flow into the BreakCut in the BreakLine,
744 // although we have rInf.GetLast()->GetFlyPortion()!
745 if( !aText.isEmpty() )
746 {
747
748 // Build a new numbering font basing on the current paragraph font:
749 std::unique_ptr<SwFont> pNumFnt(new SwFont( &rInf.GetCharAttr(), pIDSA ));
750
751 const SwTextNode& rTextNode = *rInf.GetTextFrame()->GetTextNodeForParaProps();
752 if (const SwpHints* pHints = rTextNode.GetpSwpHints())
753 {
754 // Also look for an empty character hint that sits at the paragraph end:
755 for (size_t i = 0; i < pHints->Count(); ++i)
756 {
757 const SwTextAttr* pHint = pHints->GetSortedByEnd(i);
758 if (pHint->Which() == RES_TXTATR_AUTOFMT && pHint->GetEnd()
759 && pHint->GetStart() == *pHint->GetEnd()
760 && pHint->GetStart() == rTextNode.GetText().getLength())
761 {
762 std::shared_ptr<SfxItemSet> pSet
763 = pHint->GetAutoFormat().GetStyleHandle();
764 if (pSet)
765 {
766 pNumFnt->SetDiffFnt(pSet.get(), pIDSA);
767 break;
768 }
769 }
770 }
771 }
772
773 // #i53199#
775 {
776 // i18463:
777 // Underline style of paragraph font should not be considered
778 pNumFnt->SetUnderline( LINESTYLE_NONE );
779 // Overline style of paragraph font should not be considered
780 pNumFnt->SetOverline( LINESTYLE_NONE );
781 }
782
783 // Apply the explicit attributes from the character style
784 // associated with the numbering to the new bullet font.
785 if( pFormat )
786 pNumFnt->SetDiffFnt( pFormat, pIDSA );
787
788 checkApplyParagraphMarkFormatToNumbering(pNumFnt.get(), rInf, pIDSA, pFormat);
789
790 if ( !lcl_setRedlineAttr( rInf, *pTextNd, pNumFnt ) && bHasHiddenNum )
791 pNumFnt->SetColor(NON_PRINTING_CHARACTER_COLOR);
792
793 // we do not allow a vertical font
794 pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrame->IsVertical() );
795
796 pRet = new SwNumberPortion( aText, std::move(pNumFnt),
797 bLeft, bCenter, nMinDist,
798 bLabelAlignmentPosAndSpaceModeActive );
799 }
800 }
801 }
802 }
803 return pRet;
804}
805
806/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
@ DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
virtual SwRedlineTable::size_type GetRedlinePos(const SwNode &rNode, RedlineType nType) const =0
virtual const SwRedlineTable & GetRedlineTable() const =0
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
const std::map< OUString, css::uno::Any > & GetGrabBag() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
sal_uInt16 Which() const
sal_uInt16 FirstWhich()
sal_uInt16 NextWhich()
const SvxBrushItem * GetBrush() const
const std::optional< vcl::Font > & GetBulletFont() const
sal_UCS4 GetBulletChar() const
const Size & GetGraphicSize() const
SvxAdjust GetNumAdjust() const
SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const
short GetCharTextDistance() const
SvxNumType GetNumberingType() const
const SwFrame * GetAnchorFrame() const
SwFont * GetFnt()
Definition: itratr.hxx:103
SwTextAttr * GetAttr(TextFrameIndex nPos) const
Returns the attribute for a position.
Definition: itratr.cxx:147
SwFont * m_pFont
Definition: itratr.hxx:39
Represents the style of a text portion.
Definition: charfmt.hxx:27
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:166
Used in for asian layout specialities to display up to six characters in 2 rows and 2-3 columns.
Definition: porfld.hxx:214
void ChgBodyTextFlag(bool bIsInBody)
set from UpdateExpFields (the Node-Position is known there)
Definition: dbfld.hxx:118
Definition: doc.hxx:197
bool IsClipBoard() const
Definition: doc.hxx:978
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:190
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1337
void SetNoLength()
Definition: porfld.hxx:59
SwFieldIds Which() const
Definition: fldbas.hxx:276
Base class of all fields.
Definition: fldbas.hxx:296
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:449
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:407
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
Definition: fldbas.cxx:491
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:318
SwFieldType * GetTyp() const
Definition: fldbas.hxx:402
LanguageType GetLanguage() const
Language at field position.
Definition: fldbas.hxx:412
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
Definition: swfont.hxx:135
const std::optional< Color > & GetBackColor() const
Definition: swfont.hxx:195
void SetHighlightColor(const Color &aNewColor)
Definition: swfont.hxx:951
void SetDiffFnt(const SfxItemSet *pSet, const IDocumentSettingAccess *pIDocumentSettingAccess)
Definition: swfont.cxx:473
void SetBackColor(std::optional< Color > xNewColor)
Definition: swfont.cxx:64
LanguageType GetLanguage() const
Definition: swfont.hxx:286
const Color & GetHighlightColor() const
Definition: swfont.hxx:197
const std::shared_ptr< SfxItemSet > & GetStyleHandle() const
Definition: fmtautofmt.hxx:49
const SwField * GetField() const
Definition: fmtfld.hxx:131
SwFormatMeta is a pool item subclass that owns a Meta.
Definition: fmtmeta.hxx:93
::sw::Meta * GetMeta()
Definition: fmtmeta.hxx:123
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:136
Base class of the Writer layout elements.
Definition: frame.hxx:315
sal_uInt16 GetVirtPageNum() const
Definition: trvlfrm.cxx:1817
bool IsInDocBody() const
Definition: frame.hxx:949
SwFlyFrame * FindFlyFrame()
Definition: frame.hxx:1117
bool IsVertical() const
Definition: frame.hxx:979
SwRootFrame * getRootFrame()
Definition: frame.hxx:685
SwPageFrame * FindPageFrame()
Definition: frame.hxx:686
void ChangeExpansion(const SwFrame &, const SwTextField &)
For fields in header/footer/footnotes/flys: Only called by formatting!!
Definition: expfld.cxx:336
bool IsInBodyText() const
Called by formatting.
Definition: expfld.hxx:139
void ChgBodyTextFlag(bool bIsInBody)
Set by UpdateExpFields where node position is known.
Definition: expfld.hxx:143
Distinguish only for painting/hide.
Definition: porfld.hxx:122
Base class for anything that can be part of a line in the Writer layout.
Definition: porlin.hxx:52
SwTwips & GetAscent()
Definition: porlin.hxx:80
void SetLen(TextFrameIndex const nLen)
Definition: porlin.hxx:78
SwNodeOffset GetIndex() const
Definition: node.hxx:312
SwDoc & GetDoc()
Definition: node.hxx:233
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
Definition: node.cxx:2138
SwCharFormat * GetCharFormat() const
Definition: numrule.hxx:74
const SwFormatVertOrient * GetGraphicOrientation() const
Definition: number.cxx:352
const SwNumFormat & Get(sal_uInt16 i) const
Definition: number.cxx:87
const SwPosition * GetMark() const
Definition: pam.hxx:255
const SwPosition * GetPoint() const
Definition: pam.hxx:253
const SvxNumberType & GetNumType() const
Definition: pagedesc.hxx:202
SwPageDesc * GetPageDesc()
Definition: pagefrm.hxx:147
void ChangeExpansion(SwDoc *pDoc, bool bVirtPageNum, const SvxNumType *pNumFormat)
Definition: docufld.cxx:131
SwTwips Height() const
Definition: possiz.hxx:49
sal_uInt16 GetStackCount() const
Definition: docredln.cxx:1952
std::size_t GetAuthor(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1960
bool IsMoved() const
Definition: redline.hxx:282
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1975
static constexpr size_type npos
Definition: docary.hxx:224
size_type size() const
Definition: docary.hxx:268
vector_type::size_type size_type
Definition: docary.hxx:223
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
bool IsVirtPageNum() const
Definition: rootfrm.hxx:324
sal_uInt16 GetPageNum() const
Definition: rootfrm.hxx:321
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
Definition: rootfrm.hxx:434
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
const SfxPoolItem & GetAttr() const
Definition: txatbase.hxx:167
sal_Int32 GetAnyEnd() const
end (if available), else start
Definition: txatbase.hxx:161
virtual const sal_Int32 * GetEnd() const
end position
Definition: txatbase.cxx:48
sal_Int32 GetStart() const
Definition: txatbase.hxx:88
const SwFormatAutoFormat & GetAutoFormat() const
Definition: txatbase.hxx:193
sal_uInt16 Which() const
Definition: txatbase.hxx:116
const SwFormatField & GetFormatField() const
Definition: txatbase.hxx:199
SwLinePortion * GetLast()
Definition: inftxt.hxx:566
bool IsTest() const
Definition: inftxt.hxx:593
bool IsNumDone() const
Definition: inftxt.hxx:634
const SwAttrSet & GetCharAttr() const
Definition: inftxt.hxx:781
SwExpandPortion * TryNewNoLengthPortion(SwTextFormatInfo const &rInfo)
Try to create a new portion with zero length, for an end of a hint (where there is no CH_TXTATR).
Definition: txtfld.cxx:316
std::unique_ptr< sw::MergedAttrIterByEnd > m_pByEndIter
Definition: itrform2.hxx:45
SwExpandPortion * NewFieldPortion(SwTextFormatInfo &rInf, const SwTextAttr *pHt) const
Definition: txtfld.cxx:76
SwNumberPortion * NewNumberPortion(SwTextFormatInfo &rInf) const
Definition: txtfld.cxx:584
SwLinePortion * NewExtraPortion(SwTextFormatInfo &rInf)
Definition: txtfld.cxx:355
SwFootnotePortion * NewFootnotePortion(SwTextFormatInfo &rInf, SwTextAttr *pHt)
The portion for the Footnote Reference in the Text.
Definition: txtftn.cxx:793
SwFlyCntPortion * NewFlyCntPortion(SwTextFormatInfo &rInf, SwTextAttr *pHt) const
Sets a new portion for an object anchored as character.
Definition: itrform2.cxx:2925
SwDoc & GetDoc()
Definition: txtfrm.hxx:475
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
Definition: txtfrm.cxx:1339
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1390
TextFrameIndex GetTextStart() const
Definition: inftxt.hxx:123
SwTextFrame * m_pFrame
Definition: itrtxt.hxx:34
SwTextFrame * GetTextFrame()
Definition: itrtxt.hxx:134
TextFrameIndex m_nStart
Definition: itrtxt.hxx:41
bool SeekAndChg(SwTextSizeInfo &rInf)
Definition: itrtxt.hxx:311
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
OUString GetLabelFollowedBy() const
Retrieves the character following the list label, if the paragraph's list level defines one.
Definition: ndtxt.cxx:4725
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
End: Data collected during idle time.
Definition: node.hxx:732
bool IsCountedInList() const
Definition: ndtxt.cxx:4393
static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle=false)
In MS Word, the font underline setting of the paragraph end position won't affect the formatting of n...
Definition: thints.cxx:1893
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2921
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
Definition: ndtxt.cxx:4248
bool IsNumbered(SwRootFrame const *pLayout=nullptr) const
Returns is this text node is numbered.
Definition: ndtxt.cxx:2989
OUString GetNumString(const bool _bInclPrefixAndSuffixStrings=true, const unsigned int _nRestrictToThisLevel=MAXLEVEL, SwRootFrame const *pLayout=nullptr, SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns outline of numbering string.
Definition: ndtxt.cxx:3247
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:252
const OUString & GetText() const
Definition: ndtxt.hxx:244
This portion represents a part of the paragraph string.
Definition: portxt.hxx:27
SwTextFrame * GetTextFrame()
Definition: inftxt.hxx:288
SwViewShell * GetVsh()
Definition: inftxt.hxx:222
const SwViewOption & GetOpt() const
Definition: inftxt.hxx:239
void SetLen(const TextFrameIndex nNew)
Definition: inftxt.hxx:276
TextFrameIndex GetIdx() const
Definition: inftxt.hxx:273
bool IsFieldName() const
Definition: viewopt.hxx:417
bool IsUpdateExpFields()
Definition: viewimp.cxx:194
SwViewShellImp * Imp()
Definition: viewsh.hxx:211
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2163
SwDoc * GetDoc() const
Definition: viewsh.hxx:308
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:68
void GetPrefixAndSuffix(OUString *const o_pPrefix, OUString *const o_pSuffix, OUString *const o_pShadingColor)
get prefix/suffix from the RDF repository.
Definition: fmtatr2.cxx:748
Meta is an annotation on a range of text.
Definition: fmtmeta.hxx:137
constexpr ::Color COL_GREEN(0x00, 0x80, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
@ ATTR_PAGENUMBERFLD
Definition: fldbas.hxx:152
@ ATTR_DATEFLD
Definition: fldbas.hxx:150
@ ATTR_BOOKMARKFLD
Definition: fldbas.hxx:154
@ ATTR_SETREFATTRFLD
Definition: fldbas.hxx:155
@ ATTR_PAGECOUNTFLD
Definition: fldbas.hxx:153
@ ATTR_TIMEFLD
Definition: fldbas.hxx:151
@ DATEFLD
Definition: fldbas.hxx:234
@ TIMEFLD
Definition: fldbas.hxx:235
@ Database
For old documents the Field-Which IDs must be preserved !!!
LINESTYLE_DOUBLE
LINESTYLE_NONE
STRIKEOUT_DOUBLE
ITALIC_NONE
WEIGHT_NORMAL
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SfxGrabBagItem > RES_CHRATR_GRABBAG(43)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
aStr
int i
long Long
@ REF_SETREFATTR
Definition: reffld.hxx:37
@ REF_BOOKMARK
Definition: reffld.hxx:39
SwNodeOffset GetNodeIndex() const
Definition: pam.hxx:78
SvxNumType
SVX_NUM_BITMAP
SVX_NUM_CHAR_SPECIAL
SVX_NUM_PAGEDESC
SwFontScript
Definition: swfont.hxx:124
#define SW_MOD()
Definition: swmodule.hxx:254
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
static const SwRangeRedline * lcl_GetRedlineAtNodeInsertionOrDeletion(const SwTextNode &rTextNode, bool &bIsMoved)
Definition: txtfld.cxx:508
static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr &rHint, const bool bPrefix)
Definition: txtfld.cxx:293
static bool lcl_setRedlineAttr(SwTextFormatInfo &rInf, const SwTextNode &rTextNode, const std::unique_ptr< SwFont > &pNumFnt)
Definition: txtfld.cxx:541
static void checkApplyParagraphMarkFormatToNumbering(SwFont *pNumFnt, SwTextFormatInfo &rInf, const IDocumentSettingAccess *pIDSA, const SwAttrSet *pFormat)
OOXML spec says that w:rPr inside w:pPr specifies formatting for the paragraph mark symbol (i....
Definition: txtfld.cxx:420
static bool lcl_IsInBody(SwFrame const *pFrame)
Definition: txtfld.cxx:62
#define NON_PRINTING_CHARACTER_COLOR
Definition: txtfrm.hxx:57