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 {
92 pField->SetLanguage( GetFnt()->GetLanguage() );
93 // let the visual note know about its new language
94 if (pField->GetTyp()->Which()==SwFieldIds::Postit)
95 const_cast<SwFormatField*> (&pHint->GetFormatField())->Broadcast( SwFormatFieldHint( &pHint->GetFormatField(), SwFormatFieldHintWhich::LANGUAGE ) );
96 }
97
98 SwViewShell *pSh = rInf.GetVsh();
99 SwDoc *const pDoc( pSh ? pSh->GetDoc() : nullptr );
100 bool const bInClipboard( pDoc == nullptr || pDoc->IsClipBoard() );
101 bool bPlaceHolder = false;
102
103 switch( pField->GetTyp()->Which() )
104 {
107 pRet = new SwPostItsPortion( SwFieldIds::Script == pField->GetTyp()->Which() );
108 break;
109
111 {
112 if( bName )
113 pRet = new SwFieldPortion( pField->GetFieldName() );
114 else
115 pRet = new SwCombinedPortion( pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
116 }
117 break;
118
120 {
121 OUString const aStr( bName
122 ? pField->GetFieldName()
123 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
124 pRet = new SwHiddenPortion(aStr);
125 }
126 break;
127
129 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
130 {
131 static_cast<SwChapterField*>(pField)->ChangeExpansion(*pFrame,
132 &static_txtattr_cast<SwTextField const*>(pHint)->GetTextNode());
133 }
134 {
135 OUString const aStr( bName
136 ? pField->GetFieldName()
137 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
138 pRet = new SwFieldPortion( aStr );
139 }
140 break;
141
143 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
144 {
145 static_cast<SwDocStatField*>(pField)->ChangeExpansion( pFrame );
146 }
147 {
148 OUString const aStr( bName
149 ? pField->GetFieldName()
150 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
151 pRet = new SwFieldPortion( aStr );
152 }
153 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_PAGECOUNTFLD;
154 break;
155
157 {
158 if( !bName && pSh && pSh->GetLayout() && !pSh->Imp()->IsUpdateExpFields() )
159 {
160 SwPageNumberFieldType *pPageNr = static_cast<SwPageNumberFieldType *>(pField->GetTyp());
161
162 const SwRootFrame* pTmpRootFrame = pSh->GetLayout();
163 const bool bVirt = pTmpRootFrame->IsVirtPageNum();
164
165 sal_uInt16 nVirtNum = pFrame->GetVirtPageNum();
166 sal_uInt16 nNumPages = pTmpRootFrame->GetPageNum();
167 SvxNumType nNumFormat = SvxNumType(-1);
168 if(SVX_NUM_PAGEDESC == pField->GetFormat())
169 nNumFormat = pFrame->FindPageFrame()->GetPageDesc()->GetNumType().GetNumberingType();
170 static_cast<SwPageNumberField*>(pField)
171 ->ChangeExpansion(nVirtNum, nNumPages);
172 pPageNr->ChangeExpansion(pDoc,
173 bVirt, nNumFormat != SvxNumType(-1) ? &nNumFormat : nullptr);
174 }
175 {
176 OUString const aStr( bName
177 ? pField->GetFieldName()
178 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
179 pRet = new SwFieldPortion( aStr );
180 }
181 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_PAGENUMBERFLD;
182 break;
183 }
185 {
186 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
187 {
188 SwGetExpField* pExpField = static_cast<SwGetExpField*>(pField);
189 if( !::lcl_IsInBody( pFrame ) )
190 {
191 pExpField->ChgBodyTextFlag( false );
192 pExpField->ChangeExpansion(*pFrame,
193 *static_txtattr_cast<SwTextField const*>(pHint));
194 }
195 else if( !pExpField->IsInBodyText() )
196 {
197 // Was something else previously, thus: expand first, then convert it!
198 pExpField->ChangeExpansion(*pFrame,
199 *static_txtattr_cast<SwTextField const*>(pHint));
200 pExpField->ChgBodyTextFlag( true );
201 }
202 }
203 {
204 OUString const aStr( bName
205 ? pField->GetFieldName()
206 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
207 pRet = new SwFieldPortion( aStr );
208 }
209 break;
210 }
212 {
213 if( !bName )
214 {
215 SwDBField* pDBField = static_cast<SwDBField*>(pField);
216 pDBField->ChgBodyTextFlag( ::lcl_IsInBody( pFrame ) );
217 }
218 {
219 OUString const aStr( bName
220 ? pField->GetFieldName()
221 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
222 pRet = new SwFieldPortion(aStr);
223 }
224 break;
225 }
227 if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
228 {
229 static_cast<SwRefPageGetField*>(pField)->ChangeExpansion(*pFrame,
230 static_txtattr_cast<SwTextField const*>(pHint));
231 }
232 {
233 OUString const aStr( bName
234 ? pField->GetFieldName()
235 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
236 pRet = new SwFieldPortion(aStr);
237 }
238 break;
239
241 if( !bName )
242 pChFormat = static_cast<SwJumpEditField*>(pField)->GetCharFormat();
243 bNewFlyPor = true;
244 bPlaceHolder = true;
245 break;
247 subType = static_cast<SwGetRefField*>(pField)->GetSubType();
248 {
249 OUString const str( bName
250 ? pField->GetFieldName()
251 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
252 pRet = new SwFieldPortion(str);
253 }
254 if( subType == REF_BOOKMARK )
255 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_BOOKMARKFLD;
256 else if( subType == REF_SETREFATTR )
257 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_SETREFATTRFLD;
258 break;
260 subType = static_cast<SwDateTimeField*>(pField)->GetSubType();
261 {
262 OUString const str( bName
263 ? pField->GetFieldName()
264 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
265 pRet = new SwFieldPortion(str);
266 }
267 if( subType & DATEFLD )
268 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= ATTR_DATEFLD;
269 else if( subType & TIMEFLD )
270 static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = ATTR_TIMEFLD;
271 break;
272 default:
273 {
274 OUString const aStr( bName
275 ? pField->GetFieldName()
276 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
277 pRet = new SwFieldPortion(aStr);
278 }
279 }
280
281 if( bNewFlyPor )
282 {
283 std::unique_ptr<SwFont> pTmpFnt;
284 if( !bName )
285 {
286 pTmpFnt.reset(new SwFont( *m_pFont ));
287 pTmpFnt->SetDiffFnt(&pChFormat->GetAttrSet(), &m_pFrame->GetDoc().getIDocumentSettingAccess());
288 }
289 OUString const aStr( bName
290 ? pField->GetFieldName()
291 : pField->ExpandField(bInClipboard, pFrame->getRootFrame()) );
292 pRet = new SwFieldPortion(aStr, std::move(pTmpFnt), bPlaceHolder);
293 }
294
295 return pRet;
296}
297
298static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr & rHint, const bool bPrefix)
299{
300 ::sw::Meta *const pMeta(
301 static_cast<SwFormatMeta &>(rHint.GetAttr()).GetMeta() );
302 OUString fix;
303 ::sw::MetaField *const pField( dynamic_cast< ::sw::MetaField * >(pMeta) );
304 OSL_ENSURE(pField, "lcl_NewMetaPortion: no meta field?");
305 if (pField)
306 {
307 OUString color;
308 pField->GetPrefixAndSuffix(bPrefix ? &fix : nullptr, bPrefix ? nullptr : &fix, &color);
309 }
310 return new SwFieldPortion( fix );
311}
312
322{
323 const TextFrameIndex nIdx(rInfo.GetIdx());
324
325 // sw_redlinehide: because there is a dummy character at the start of these
326 // hints, it's impossible to have ends of hints from different nodes at the
327 // same view position, so it's sufficient to check the hints of the current
328 // node. However, m_pByEndIter exists for the whole text frame, so
329 // it's necessary to iterate all hints for that purpose...
330 if (!m_pByEndIter)
331 {
333 }
334 SwTextNode const* pNode(nullptr);
335 for (SwTextAttr const* pHint = m_pByEndIter->NextAttr(pNode); pHint;
336 pHint = m_pByEndIter->NextAttr(pNode))
337 {
338 SwTextAttr & rHint(const_cast<SwTextAttr&>(*pHint));
339 TextFrameIndex const nEnd(
340 rInfo.GetTextFrame()->MapModelToView(pNode, rHint.GetAnyEnd()));
341 if (nEnd > nIdx)
342 {
343 m_pByEndIter->PrevAttr();
344 break;
345 }
346 if (nEnd == nIdx)
347 {
348 if (RES_TXTATR_METAFIELD == rHint.Which())
349 {
350 SwFieldPortion *const pPortion(
351 lcl_NewMetaPortion(rHint, false));
352 pPortion->SetNoLength(); // no CH_TXTATR at hint end!
353 return pPortion;
354 }
355 }
356 }
357 return nullptr;
358}
359
361{
362 SwTextAttr *pHint = GetAttr( rInf.GetIdx() );
363 SwLinePortion *pRet = nullptr;
364 if( !pHint )
365 {
366 pRet = new SwTextPortion;
367 pRet->SetLen(TextFrameIndex(1));
368 rInf.SetLen(TextFrameIndex(1));
369 return pRet;
370 }
371
372 switch( pHint->Which() )
373 {
374 case RES_TXTATR_FLYCNT :
375 {
376 pRet = NewFlyCntPortion( rInf, pHint );
377 break;
378 }
379 case RES_TXTATR_FTN :
380 {
381 pRet = NewFootnotePortion( rInf, pHint );
382 break;
383 }
384 case RES_TXTATR_FIELD :
386 {
387 pRet = NewFieldPortion( rInf, pHint );
388 break;
389 }
390 case RES_TXTATR_REFMARK :
391 {
392 pRet = new SwIsoRefPortion;
393 break;
394 }
395 case RES_TXTATR_TOXMARK :
396 {
397 pRet = new SwIsoToxPortion;
398 break;
399 }
401 {
402 pRet = lcl_NewMetaPortion( *pHint, true );
403 break;
404 }
405 default: ;
406 }
407 if( !pRet )
408 {
409 auto pFieldPortion = new SwFieldPortion( "" );
410 if (pHint->Which() == RES_TXTATR_CONTENTCONTROL)
411 {
412 pFieldPortion->SetContentControl(true);
413 }
414 pRet = pFieldPortion;
415 rInf.SetLen(TextFrameIndex(1));
416 }
417 return pRet;
418}
419
426 const IDocumentSettingAccess* pIDSA,
427 const SwAttrSet* pFormat)
428{
430 return;
431
433 std::shared_ptr<SfxItemSet> pSet(rListAutoFormat.GetStyleHandle());
434
435 // TODO remove this fallback for RTF
436 bool isDOC = pIDSA->get(DocumentSettingId::ADD_FLY_OFFSETS);
438 if (!isDOC && !isDOCX && !pSet)
439 {
440 TextFrameIndex const nTextLen(rInf.GetTextFrame()->GetText().getLength());
441 SwTextNode const* pNode(nullptr);
443 for (SwTextAttr const* pHint = iter.PrevAttr(&pNode); pHint;
444 pHint = iter.PrevAttr(&pNode))
445 {
446 TextFrameIndex const nHintEnd(
447 rInf.GetTextFrame()->MapModelToView(pNode, pHint->GetAnyEnd()));
448 if (nHintEnd < nTextLen)
449 {
450 break; // only those at para end are interesting
451 }
452 // Formatting for the paragraph mark is usually set to apply only to the
453 // (non-existent) extra character at end of the text node, but there can be
454 // other hints too (ending at nTextLen), so look for all matching hints.
455 // Still the (non-existent) extra character at the end is preferred if it exists.
456 if (pHint->Which() == RES_TXTATR_AUTOFMT)
457 {
458 pSet = pHint->GetAutoFormat().GetStyleHandle();
459 // When we find an empty hint (start == end) we got what we are looking for.
460 if (pHint->GetStart() == *pHint->End())
461 break;
462 }
463 }
464 }
465
466 // Check each item and in case it should be ignored, then clear it.
467 if (!pSet)
468 return;
469
470 std::unique_ptr<SfxItemSet> const pCleanedSet = pSet->Clone();
471
472 if (pCleanedSet->HasItem(RES_TXTATR_CHARFMT))
473 {
474 // Insert attributes of referenced char format into current set
475 const SwFormatCharFormat& rCharFormat = pCleanedSet->Get(RES_TXTATR_CHARFMT);
476 const SwAttrSet& rStyleAttrs = static_cast<const SwCharFormat *>(rCharFormat.GetRegisteredIn())->GetAttrSet();
477 SfxWhichIter aIter(rStyleAttrs);
478 sal_uInt16 nWhich = aIter.FirstWhich();
479 while (nWhich)
480 {
481 if (!SwTextNode::IsIgnoredCharFormatForNumbering(nWhich, /*bIsCharStyle=*/true)
482 && !pCleanedSet->HasItem(nWhich)
483 && !(pFormat && pFormat->HasItem(nWhich)) )
484 {
485 // Copy from parent sets only allowed items which will not overwrite
486 // values explicitly defined in current set (pCleanedSet) or in pFormat
487 if (const SfxPoolItem* pItem = rStyleAttrs.GetItem(nWhich, true))
488 pCleanedSet->Put(*pItem);
489 }
490 nWhich = aIter.NextWhich();
491 }
492
493 // It is not required here anymore, all referenced items are inserted
494 pCleanedSet->ClearItem(RES_TXTATR_CHARFMT);
495 };
496
497 SfxItemIter aIter(*pSet);
498 const SfxPoolItem* pItem = aIter.GetCurItem();
499 while (pItem)
500 {
502 pCleanedSet->ClearItem(pItem->Which());
503 else if (pFormat && pFormat->HasItem(pItem->Which()))
504 pCleanedSet->ClearItem(pItem->Which());
505 else if (pItem->Which() == RES_CHRATR_BACKGROUND)
506 {
507 bool bShadingWasImported = false;
508 // If Shading was imported, it should not be converted to a Highlight,
509 // but remain as Shading which is ignored for numbering.
510 if (pCleanedSet->HasItem(RES_CHRATR_GRABBAG))
511 {
512 SfxGrabBagItem aGrabBag = pCleanedSet->Get(RES_CHRATR_GRABBAG, /*bSrchInParent=*/false);
513 std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
514 auto aIterator = rMap.find("CharShadingMarker");
515 if (aIterator != rMap.end())
516 aIterator->second >>= bShadingWasImported;
517 }
518
519 // If used, BACKGROUND is converted to HIGHLIGHT. So also ignore if a highlight already exists.
520 if (bShadingWasImported
521 || pCleanedSet->HasItem(RES_CHRATR_HIGHLIGHT)
522 || (pFormat && pFormat->HasItem(RES_CHRATR_HIGHLIGHT)))
523 {
524 pCleanedSet->ClearItem(pItem->Which());
525 }
526 }
527 pItem = aIter.NextItem();
528 };
529
530 // SetDiffFnt resets the background color (why?), so capture it and re-apply if it had a value,
531 // because an existing value should override anything inherited from the paragraph marker.
532 const std::optional<Color> oFontBackColor = pNumFnt->GetBackColor();
533 // The same is true for the highlight color.
534 const Color aHighlight = pNumFnt->GetHighlightColor();
535
536 pNumFnt->SetDiffFnt(pCleanedSet.get(), pIDSA);
537
538 if (oFontBackColor)
539 pNumFnt->SetBackColor(oFontBackColor);
540 if (aHighlight != COL_TRANSPARENT)
541 pNumFnt->SetHighlightColor(aHighlight);
542}
543
545 bool& bIsMoved )
546{
547 const SwDoc& rDoc = rTextNode.GetDoc();
548 SwRedlineTable::size_type nRedlPos = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rTextNode, RedlineType::Any );
549
550 if( SwRedlineTable::npos != nRedlPos )
551 {
552 const SwNodeOffset nNdIdx = rTextNode.GetIndex();
554 for( ; nRedlPos < rTable.size() ; ++nRedlPos )
555 {
556 const SwRangeRedline* pTmp = rTable[ nRedlPos ];
557 SwNodeOffset nStart = pTmp->GetPoint()->GetNodeIndex(),
558 nEnd = pTmp->GetMark()->GetNodeIndex();
559 if( nStart > nEnd )
560 std::swap(nStart, nEnd);
561 if( RedlineType::Delete == pTmp->GetType() ||
562 RedlineType::Insert == pTmp->GetType() )
563 {
564 if( nStart <= nNdIdx && nEnd > nNdIdx )
565 {
566 bIsMoved = pTmp->IsMoved();
567 return pTmp;
568 }
569 }
570 if( nStart > nNdIdx )
571 break;
572 }
573 }
574 return nullptr;
575}
576
577static bool lcl_setRedlineAttr( SwTextFormatInfo &rInf, const SwTextNode& rTextNode, const std::unique_ptr<SwFont>& pNumFnt )
578{
579 if ( rInf.GetVsh()->GetLayout()->IsHideRedlines() )
580 return false;
581
582 bool bIsMoved;
583 const SwRangeRedline* pRedlineNum = lcl_GetRedlineAtNodeInsertionOrDeletion( rTextNode, bIsMoved );
584 if (!pRedlineNum)
585 return false;
586
587 // moved text: dark green with double underline or strikethrough
588 if ( bIsMoved )
589 {
590 pNumFnt->SetColor(COL_GREEN);
591 if ( RedlineType::Delete == pRedlineNum->GetType() )
592 pNumFnt->SetStrikeout(STRIKEOUT_DOUBLE);
593 else
594 pNumFnt->SetUnderline(LINESTYLE_DOUBLE);
595 return true;
596 }
597
598 SwAttrPool& rPool = rInf.GetVsh()->GetDoc()->GetAttrPool();
600
601 std::size_t aAuthor = (1 < pRedlineNum->GetStackCount())
602 ? pRedlineNum->GetAuthor( 1 )
603 : pRedlineNum->GetAuthor();
604
605 if ( RedlineType::Delete == pRedlineNum->GetType() )
606 SW_MOD()->GetDeletedAuthorAttr(aAuthor, aSet);
607 else
608 SW_MOD()->GetInsertAuthorAttr(aAuthor, aSet);
609
610 if (const SvxColorItem* pItem = aSet.GetItemIfSet(RES_CHRATR_COLOR))
611 pNumFnt->SetColor(pItem->GetValue());
612 if (const SvxUnderlineItem* pItem = aSet.GetItemIfSet(RES_CHRATR_UNDERLINE))
613 pNumFnt->SetUnderline(pItem->GetLineStyle());
614 if (const SvxCrossedOutItem* pItem = aSet.GetItemIfSet(RES_CHRATR_CROSSEDOUT))
615 pNumFnt->SetStrikeout( pItem->GetStrikeout() );
616
617 return true;
618}
619
621{
622 if( rInf.IsNumDone() || rInf.GetTextStart() != m_nStart
623 || rInf.GetTextStart() != rInf.GetIdx() )
624 return nullptr;
625
626 SwNumberPortion *pRet = nullptr;
627 // sw_redlinehide: at this point it's certain that pTextNd is the node with
628 // the numbering of the frame; only the actual number-vector (GetNumString)
629 // depends on the hide-mode in the layout so other calls don't need to care
630 const SwTextNode *const pTextNd = GetTextFrame()->GetTextNodeForParaProps();
631 const SwNumRule* pNumRule = pTextNd->GetNumRule();
632
633 // Has a "valid" number?
634 // sw_redlinehide: check that pParaPropsNode is the correct one
635 assert(pTextNd->IsNumbered(m_pFrame->getRootFrame()) == pTextNd->IsNumbered(nullptr));
636 if (pTextNd->IsNumbered(m_pFrame->getRootFrame()) && pTextNd->IsCountedInList())
637 {
638 int nLevel = pTextNd->GetActualListLevel();
639
640 if (nLevel < 0)
641 nLevel = 0;
642
643 if (nLevel >= MAXLEVEL)
644 nLevel = MAXLEVEL - 1;
645
646 const SwNumFormat &rNumFormat = pNumRule->Get( nLevel );
647 const bool bLeft = SvxAdjust::Left == rNumFormat.GetNumAdjust();
648 const bool bCenter = SvxAdjust::Center == rNumFormat.GetNumAdjust();
649 const bool bLabelAlignmentPosAndSpaceModeActive(
651 const sal_uInt16 nMinDist = bLabelAlignmentPosAndSpaceModeActive
652 ? 0 : rNumFormat.GetCharTextDistance();
653
654 if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() )
655 {
656 OUString referer;
657 if (auto const sh1 = rInf.GetVsh()) {
658 if (auto const doc = sh1->GetDoc()) {
659 auto const sh2 = doc->GetPersist();
660 if (sh2 != nullptr && sh2->HasName()) {
661 referer = sh2->GetMedium()->GetName();
662 }
663 }
664 }
665 pRet = new SwGrfNumPortion( pTextNd->GetLabelFollowedBy(),
666 rNumFormat.GetBrush(), referer,
667 rNumFormat.GetGraphicOrientation(),
668 rNumFormat.GetGraphicSize(),
669 bLeft, bCenter, nMinDist,
670 bLabelAlignmentPosAndSpaceModeActive );
671 tools::Long nTmpA = rInf.GetLast()->GetAscent();
672 tools::Long nTmpD = rInf.GetLast()->Height() - nTmpA;
673 if( !rInf.IsTest() )
674 static_cast<SwGrfNumPortion*>(pRet)->SetBase( nTmpA, nTmpD, nTmpA, nTmpD );
675 }
676 else
677 {
678 // The SwFont is created dynamically and passed in the ctor,
679 // as the CharFormat only returns an SV-Font.
680 // In the dtor of SwNumberPortion, the SwFont is deleted.
681 const SwAttrSet* pFormat = rNumFormat.GetCharFormat() ?
682 &rNumFormat.GetCharFormat()->GetAttrSet() :
683 nullptr;
684 const IDocumentSettingAccess* pIDSA = pTextNd->getIDocumentSettingAccess();
685
686 if( SVX_NUM_CHAR_SPECIAL == rNumFormat.GetNumberingType() )
687 {
688 const std::optional<vcl::Font> pFormatFnt = rNumFormat.GetBulletFont();
689
690 // Build a new bullet font basing on the current paragraph font:
691 std::unique_ptr<SwFont> pNumFnt(new SwFont( &rInf.GetCharAttr(), pIDSA ));
692
693 // #i53199#
695 {
696 // i18463:
697 // Underline style of paragraph font should not be considered
698 // Overline style of paragraph font should not be considered
699 // Weight style of paragraph font should not be considered
700 // Posture style of paragraph font should not be considered
701 pNumFnt->SetUnderline( LINESTYLE_NONE );
702 pNumFnt->SetOverline( LINESTYLE_NONE );
703 pNumFnt->SetItalic( ITALIC_NONE, SwFontScript::Latin );
704 pNumFnt->SetItalic( ITALIC_NONE, SwFontScript::CJK );
705 pNumFnt->SetItalic( ITALIC_NONE, SwFontScript::CTL );
706 pNumFnt->SetWeight( WEIGHT_NORMAL, SwFontScript::Latin );
707 pNumFnt->SetWeight( WEIGHT_NORMAL, SwFontScript::CJK );
708 pNumFnt->SetWeight( WEIGHT_NORMAL, SwFontScript::CTL );
709 }
710
711 // Apply the explicit attributes from the character style
712 // associated with the numbering to the new bullet font.
713 if( pFormat )
714 pNumFnt->SetDiffFnt( pFormat, pIDSA );
715
716 checkApplyParagraphMarkFormatToNumbering(pNumFnt.get(), rInf, pIDSA, pFormat);
717
718 if ( pFormatFnt )
719 {
720 const SwFontScript nAct = pNumFnt->GetActual();
721 pNumFnt->SetFamily( pFormatFnt->GetFamilyType(), nAct );
722 pNumFnt->SetName( pFormatFnt->GetFamilyName(), nAct );
723 pNumFnt->SetStyleName( pFormatFnt->GetStyleName(), nAct );
724 pNumFnt->SetCharSet( pFormatFnt->GetCharSet(), nAct );
725 pNumFnt->SetPitch( pFormatFnt->GetPitch(), nAct );
726 }
727
728 // we do not allow a vertical font
729 pNumFnt->SetVertical( pNumFnt->GetOrientation(),
730 m_pFrame->IsVertical() );
731
732 lcl_setRedlineAttr( rInf, *pTextNd, pNumFnt );
733
734 // --> OD 2008-01-23 #newlistelevelattrs#
735 if (rNumFormat.GetBulletChar())
736 {
737 pRet = new SwBulletPortion(rNumFormat.GetBulletChar(),
738 pTextNd->GetLabelFollowedBy(),
739 std::move(pNumFnt),
740 bLeft, bCenter, nMinDist,
741 bLabelAlignmentPosAndSpaceModeActive);
742 }
743 }
744 else
745 {
746 // Show Changes mode shows the actual numbering (SwListRedlineType::HIDDEN) and
747 // the original one (SwListRedlineType::ORIGTEXT) instead of the fake numbering
748 // (SwListRedlineType::SHOW, which counts removed and inserted numbered paragraphs
749 // in a single list)
750 bool bHasHiddenNum = false;
751 OUString aText( pTextNd->GetNumString(true, MAXLEVEL, m_pFrame->getRootFrame(), SwListRedlineType::HIDDEN) );
752 const SwDoc& rDoc = pTextNd->GetDoc();
754 if ( rTable.size() && !rInf.GetVsh()->GetLayout()->IsHideRedlines() )
755 {
756 OUString aHiddenText( pTextNd->GetNumString(true, MAXLEVEL, m_pFrame->getRootFrame(), SwListRedlineType::ORIGTEXT) );
757
758 if ( !aText.isEmpty() || !aHiddenText.isEmpty() )
759 {
760 if (aText != aHiddenText && !aHiddenText.isEmpty())
761 {
762 bHasHiddenNum = true;
763 // show also original number after the actual one enclosed in [ and ],
764 // and replace tabulator with space to avoid messy indentation
765 // resulted by the longer numbering, e.g. "1.[2.]" instead of "1.".
766 aText = aText + "[" + aHiddenText + "]"
767 + pTextNd->GetLabelFollowedBy().replaceAll("\t", " ");
768 }
769 else if (!aText.isEmpty())
770 aText += pTextNd->GetLabelFollowedBy();
771 }
772 }
774 || !aText.isEmpty())
775 aText += pTextNd->GetLabelFollowedBy();
776
777 // Not just an optimization ...
778 // A number portion without text will be assigned a width of 0.
779 // The succeeding text portion will flow into the BreakCut in the BreakLine,
780 // although we have rInf.GetLast()->GetFlyPortion()!
781 if( !aText.isEmpty() )
782 {
783
784 // Build a new numbering font basing on the current paragraph font:
785 std::unique_ptr<SwFont> pNumFnt(new SwFont( &rInf.GetCharAttr(), pIDSA ));
786
787 // #i53199#
789 {
790 // i18463:
791 // Underline style of paragraph font should not be considered
792 pNumFnt->SetUnderline( LINESTYLE_NONE );
793 // Overline style of paragraph font should not be considered
794 pNumFnt->SetOverline( LINESTYLE_NONE );
795 }
796
797 // Apply the explicit attributes from the character style
798 // associated with the numbering to the new bullet font.
799 if( pFormat )
800 pNumFnt->SetDiffFnt( pFormat, pIDSA );
801
802 checkApplyParagraphMarkFormatToNumbering(pNumFnt.get(), rInf, pIDSA, pFormat);
803
804 if ( !lcl_setRedlineAttr( rInf, *pTextNd, pNumFnt ) && bHasHiddenNum )
805 pNumFnt->SetColor(NON_PRINTING_CHARACTER_COLOR);
806
807 // we do not allow a vertical font
808 pNumFnt->SetVertical( pNumFnt->GetOrientation(), m_pFrame->IsVertical() );
809
810 pRet = new SwNumberPortion( aText, std::move(pNumFnt),
811 bLeft, bCenter, nMinDist,
812 bLabelAlignmentPosAndSpaceModeActive );
813 }
814 }
815 }
816 }
817 return pRet;
818}
819
820/* 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:143
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:164
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:192
bool IsClipBoard() const
Definition: doc.hxx:967
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:336
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:177
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1322
void SetNoLength()
Definition: porfld.hxx:59
SwFieldIds Which() const
Definition: fldbas.hxx:273
Base class of all fields.
Definition: fldbas.hxx:292
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:442
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:403
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
Definition: fldbas.cxx:484
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:305
SwFieldType * GetTyp() const
Definition: fldbas.hxx:398
LanguageType GetLanguage() const
Language at field position.
Definition: fldbas.hxx:408
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
const std::optional< Color > & GetBackColor() const
Definition: swfont.hxx:192
void SetHighlightColor(const Color &aNewColor)
Definition: swfont.hxx:948
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:283
const Color & GetHighlightColor() const
Definition: swfont.hxx:194
const std::shared_ptr< SfxItemSet > & GetStyleHandle() const
Definition: fmtautofmt.hxx:49
const SwField * GetField() const
Definition: fmtfld.hxx:130
::sw::Meta * GetMeta()
Definition: fmtmeta.hxx:122
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:943
SwFlyFrame * FindFlyFrame()
Definition: frame.hxx:1111
bool IsVertical() const
Definition: frame.hxx:973
SwRootFrame * getRootFrame()
Definition: frame.hxx:679
SwPageFrame * FindPageFrame()
Definition: frame.hxx:680
void ChangeExpansion(const SwFrame &, const SwTextField &)
For fields in header/footer/footnotes/flys: Only called by formatting!!
Definition: expfld.cxx:342
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:296
SwDoc & GetDoc()
Definition: node.hxx:217
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
Definition: node.cxx:2147
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:263
const SwPosition * GetPoint() const
Definition: pam.hxx:261
const SvxNumberType & GetNumType() const
Definition: pagedesc.hxx:202
SwPageDesc * GetPageDesc()
Definition: pagefrm.hxx:143
void ChangeExpansion(SwDoc *pDoc, bool bVirtPageNum, const SvxNumType *pNumFormat)
Definition: docufld.cxx:130
SwTwips Height() const
Definition: possiz.hxx:49
sal_uInt16 GetStackCount() const
Definition: docredln.cxx:1911
std::size_t GetAuthor(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1919
bool IsMoved() const
Definition: redline.hxx:276
RedlineType GetType(sal_uInt16 nPos=0) const
Definition: docredln.cxx:1934
static constexpr size_type npos
Definition: docary.hxx:223
size_type size() const
Definition: docary.hxx:267
vector_type::size_type size_type
Definition: docary.hxx:222
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
bool IsVirtPageNum() const
Definition: rootfrm.hxx:315
sal_uInt16 GetPageNum() const
Definition: rootfrm.hxx:312
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
Definition: rootfrm.hxx:421
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
sal_uInt16 Which() const
Definition: txatbase.hxx:116
const SwFormatField & GetFormatField() const
Definition: txatbase.hxx:199
SwLinePortion * GetLast()
Definition: inftxt.hxx:564
bool IsTest() const
Definition: inftxt.hxx:591
bool IsNumDone() const
Definition: inftxt.hxx:632
const SwAttrSet & GetCharAttr() const
Definition: inftxt.hxx:779
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:321
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:620
SwLinePortion * NewExtraPortion(SwTextFormatInfo &rInf)
Definition: txtfld.cxx:360
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:2795
SwDoc & GetDoc()
Definition: txtfrm.hxx:466
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
Definition: txtfrm.cxx:1252
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
Definition: txtfrm.cxx:1293
SwTextNode const * GetTextNodeForParaProps() const
Definition: txtfrm.cxx:1303
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:89
OUString GetLabelFollowedBy() const
Retrieves the character following the list label, if the paragraph's list level defines one.
Definition: ndtxt.cxx:4674
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
End: Data collected during idle time.
Definition: node.hxx:750
bool IsCountedInList() const
Definition: ndtxt.cxx:4356
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:1894
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2889
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:4211
bool IsNumbered(SwRootFrame const *pLayout=nullptr) const
Returns is this text node is numbered.
Definition: ndtxt.cxx:2957
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:3216
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:269
bool IsUpdateExpFields()
Definition: viewimp.cxx:194
SwViewShellImp * Imp()
Definition: viewsh.hxx:190
SwRootFrame * GetLayout() const
Definition: viewsh.cxx:2172
SwDoc * GetDoc() const
Definition: viewsh.hxx:290
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:228
void GetPrefixAndSuffix(OUString *const o_pPrefix, OUString *const o_pSuffix, OUString *const o_pShadingColor)
get prefix/suffix from the RDF repository.
Definition: fmtatr2.cxx:737
constexpr ::Color COL_GREEN(0x00, 0x80, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
@ ATTR_PAGENUMBERFLD
Definition: fldbas.hxx:148
@ ATTR_DATEFLD
Definition: fldbas.hxx:146
@ ATTR_BOOKMARKFLD
Definition: fldbas.hxx:150
@ ATTR_SETREFATTRFLD
Definition: fldbas.hxx:151
@ ATTR_PAGECOUNTFLD
Definition: fldbas.hxx:149
@ ATTR_TIMEFLD
Definition: fldbas.hxx:147
@ DATEFLD
Definition: fldbas.hxx:230
@ TIMEFLD
Definition: fldbas.hxx:231
@ 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
long Long
@ REF_SETREFATTR
Definition: reffld.hxx:37
@ REF_BOOKMARK
Definition: reffld.hxx:39
SwNodeOffset GetNodeIndex() const
Definition: pam.hxx:77
SvxNumType
SVX_NUM_BITMAP
SVX_NUM_CHAR_SPECIAL
SVX_NUM_PAGEDESC
SwFontScript
Definition: swfont.hxx:124
#define SW_MOD()
Definition: swmodule.hxx:256
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
static const SwRangeRedline * lcl_GetRedlineAtNodeInsertionOrDeletion(const SwTextNode &rTextNode, bool &bIsMoved)
Definition: txtfld.cxx:544
static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr &rHint, const bool bPrefix)
Definition: txtfld.cxx:298
static bool lcl_setRedlineAttr(SwTextFormatInfo &rInf, const SwTextNode &rTextNode, const std::unique_ptr< SwFont > &pNumFnt)
Definition: txtfld.cxx:577
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:425
static bool lcl_IsInBody(SwFrame const *pFrame)
Definition: txtfld.cxx:62
#define NON_PRINTING_CHARACTER_COLOR
Definition: txtfrm.hxx:54