85 bool bNewFlyPor =
false;
86 sal_uInt16 subType = 0;
100 bool const bInClipboard( pDoc ==
nullptr || pDoc->
IsClipBoard() );
101 bool bPlaceHolder =
false;
121 OUString
const aStr( bName
132 &static_txtattr_cast<SwTextField const*>(pHint)->GetTextNode());
135 OUString
const aStr( bName
148 OUString
const aStr( bName
166 sal_uInt16 nNumPages = pTmpRootFrame->
GetPageNum();
171 ->ChangeExpansion(nVirtNum, nNumPages);
173 bVirt, nNumFormat !=
SvxNumType(-1) ? &nNumFormat :
nullptr);
176 OUString
const aStr( bName
193 *static_txtattr_cast<SwTextField const*>(pHint));
199 *static_txtattr_cast<SwTextField const*>(pHint));
204 OUString
const aStr( bName
219 OUString
const aStr( bName
230 static_txtattr_cast<SwTextField const*>(pHint));
233 OUString
const aStr( bName
249 OUString
const str( bName
262 OUString
const str( bName
274 OUString
const aStr( bName
283 std::unique_ptr<SwFont> pTmpFnt;
289 OUString
const aStr( bName
304 OSL_ENSURE(pField,
"lcl_NewMetaPortion: no meta field?");
372 switch( pHint->
Which() )
412 pFieldPortion->SetContentControl(
true);
414 pRet = pFieldPortion;
433 std::shared_ptr<SfxItemSet> pSet(rListAutoFormat.
GetStyleHandle());
439 std::unique_ptr<SfxItemSet>
const pCleanedSet = pSet->Clone();
451 && !pCleanedSet->HasItem(nWhich)
452 && !(pFormat && pFormat->
HasItem(nWhich)) )
457 pCleanedSet->Put(*pItem);
471 pCleanedSet->ClearItem(pItem->
Which());
473 pCleanedSet->ClearItem(pItem->
Which());
476 bool bShadingWasImported =
false;
482 std::map<OUString, css::uno::Any>& rMap = aGrabBag.
GetGrabBag();
483 auto aIterator = rMap.find(
"CharShadingMarker");
484 if (aIterator != rMap.end())
485 aIterator->second >>= bShadingWasImported;
489 if (bShadingWasImported
493 pCleanedSet->ClearItem(pItem->
Which());
501 const std::optional<Color> oFontBackColor = pNumFnt->
GetBackColor();
505 pNumFnt->
SetDiffFnt(pCleanedSet.get(), pIDSA);
523 for( ; nRedlPos < rTable.
size() ; ++nRedlPos )
529 std::swap(nStart, nEnd);
530 if( RedlineType::Delete == pTmp->
GetType() ||
531 RedlineType::Insert == pTmp->
GetType() )
533 if( nStart <= nNdIdx && nEnd > nNdIdx )
539 if( nStart > nNdIdx )
560 if ( RedlineType::Delete == pRedlineNum->
GetType() )
574 if ( RedlineType::Delete == pRedlineNum->
GetType() )
575 SW_MOD()->GetDeletedAuthorAttr(aAuthor, aSet);
577 SW_MOD()->GetInsertAuthorAttr(aAuthor, aSet);
580 pNumFnt->SetColor(pItem->GetValue());
582 pNumFnt->SetUnderline(pItem->GetLineStyle());
584 pNumFnt->SetStrikeout( pItem->GetStrikeout() );
616 const bool bLeft = SvxAdjust::Left == rNumFormat.
GetNumAdjust();
617 const bool bCenter = SvxAdjust::Center == rNumFormat.
GetNumAdjust();
618 const bool bLabelAlignmentPosAndSpaceModeActive(
620 const sal_uInt16 nMinDist = bLabelAlignmentPosAndSpaceModeActive
626 if (
auto const sh1 = rInf.
GetVsh()) {
627 if (
auto const doc = sh1->GetDoc()) {
628 auto const sh2 = doc->GetPersist();
629 if (sh2 !=
nullptr && sh2->HasName()) {
630 referer = sh2->GetMedium()->GetName();
638 bLeft, bCenter, nMinDist,
639 bLabelAlignmentPosAndSpaceModeActive );
643 static_cast<SwGrfNumPortion*
>(pRet)->SetBase( nTmpA, nTmpD, nTmpA, nTmpD );
657 const std::optional<vcl::Font> pFormatFnt = rNumFormat.
GetBulletFont();
683 pNumFnt->SetDiffFnt( pFormat, pIDSA );
690 pNumFnt->SetFamily( pFormatFnt->GetFamilyType(), nAct );
691 pNumFnt->SetName( pFormatFnt->GetFamilyName(), nAct );
692 pNumFnt->SetStyleName( pFormatFnt->GetStyleName(), nAct );
693 pNumFnt->SetCharSet( pFormatFnt->GetCharSet(), nAct );
694 pNumFnt->SetPitch( pFormatFnt->GetPitch(), nAct );
698 pNumFnt->SetVertical( pNumFnt->GetOrientation(),
709 bLeft, bCenter, nMinDist,
710 bLabelAlignmentPosAndSpaceModeActive);
719 bool bHasHiddenNum =
false;
727 if ( !aText.isEmpty() || !aHiddenText.isEmpty() )
729 if (aText != aHiddenText && !aHiddenText.isEmpty())
731 bHasHiddenNum =
true;
735 aText = aText +
"[" + aHiddenText +
"]"
738 else if (!aText.isEmpty())
750 if( !aText.isEmpty() )
760 for (
size_t i = 0;
i < pHints->Count(); ++
i)
762 const SwTextAttr* pHint = pHints->GetSortedByEnd(
i);
767 std::shared_ptr<SfxItemSet> pSet
771 pNumFnt->SetDiffFnt(pSet.get(), pIDSA);
791 pNumFnt->SetDiffFnt( pFormat, pIDSA );
802 bLeft, bCenter, nMinDist,
803 bLabelAlignmentPosAndSpaceModeActive );
@ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
@ NO_NUMBERING_SHOW_FOLLOWBY
@ 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
SvxNumType GetNumberingType() const
const SwFrame * GetAnchorFrame() const
SwTextAttr * GetAttr(TextFrameIndex nPos) const
Returns the attribute for a position.
const SwModify * GetRegisteredIn() const
Used in for asian layout specialities to display up to six characters in 2 rows and 2-3 columns.
void ChgBodyTextFlag(bool bIsInBody)
set from UpdateExpFields (the Node-Position is known there)
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
const SwAttrPool & GetAttrPool() const
Base class of all fields.
virtual void SetLanguage(LanguageType nLng)
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
virtual OUString GetFieldName() const
get name or content
SwFieldType * GetTyp() const
LanguageType GetLanguage() const
Language at field position.
general base class for all free-flowing frames
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
const std::optional< Color > & GetBackColor() const
void SetHighlightColor(const Color &aNewColor)
void SetDiffFnt(const SfxItemSet *pSet, const IDocumentSettingAccess *pIDocumentSettingAccess)
void SetBackColor(std::optional< Color > xNewColor)
LanguageType GetLanguage() const
const Color & GetHighlightColor() const
Base class of the Writer layout elements.
sal_uInt16 GetVirtPageNum() const
SwFlyFrame * FindFlyFrame()
SwRootFrame * getRootFrame()
SwPageFrame * FindPageFrame()
void ChangeExpansion(const SwFrame &, const SwTextField &)
For fields in header/footer/footnotes/flys: Only called by formatting!!
bool IsInBodyText() const
Called by formatting.
void ChgBodyTextFlag(bool bIsInBody)
Set by UpdateExpFields where node position is known.
Distinguish only for painting/hide.
Base class for anything that can be part of a line in the Writer layout.
void SetLen(TextFrameIndex const nLen)
SwNodeOffset GetIndex() const
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
const SwNumFormat & Get(sal_uInt16 i) const
const SwPosition * GetMark() const
const SwPosition * GetPoint() const
const SvxNumberType & GetNumType() const
SwPageDesc * GetPageDesc()
void ChangeExpansion(SwDoc *pDoc, bool bVirtPageNum, const SvxNumType *pNumFormat)
sal_uInt16 GetStackCount() const
std::size_t GetAuthor(sal_uInt16 nPos=0) const
RedlineType GetType(sal_uInt16 nPos=0) const
static constexpr size_type npos
vector_type::size_type size_type
The root element of a Writer document layout.
bool IsVirtPageNum() const
sal_uInt16 GetPageNum() const
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SfxPoolItem & GetAttr() const
sal_Int32 GetAnyEnd() const
end (if available), else start
virtual const sal_Int32 * GetEnd() const
end position
sal_Int32 GetStart() const
const SwFormatAutoFormat & GetAutoFormat() const
const SwFormatField & GetFormatField() const
SwLinePortion * GetLast()
const SwAttrSet & GetCharAttr() const
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).
std::unique_ptr< sw::MergedAttrIterByEnd > m_pByEndIter
SwExpandPortion * NewFieldPortion(SwTextFormatInfo &rInf, const SwTextAttr *pHt) const
SwNumberPortion * NewNumberPortion(SwTextFormatInfo &rInf) const
SwLinePortion * NewExtraPortion(SwTextFormatInfo &rInf)
SwFootnotePortion * NewFootnotePortion(SwTextFormatInfo &rInf, SwTextAttr *pHt)
The portion for the Footnote Reference in the Text.
SwFlyCntPortion * NewFlyCntPortion(SwTextFormatInfo &rInf, SwTextAttr *pHt) const
Sets a new portion for an object anchored as character.
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
SwTextNode const * GetTextNodeForParaProps() const
TextFrameIndex GetTextStart() const
SwTextFrame * GetTextFrame()
bool SeekAndChg(SwTextSizeInfo &rInf)
SwTextNode is a paragraph in the document model.
OUString GetLabelFollowedBy() const
Retrieves the character following the list label, if the paragraph's list level defines one.
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
End: Data collected during idle time.
bool IsCountedInList() const
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...
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
bool IsNumbered(SwRootFrame const *pLayout=nullptr) const
Returns is this text node is numbered.
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.
SwpHints * GetpSwpHints()
const OUString & GetText() const
This portion represents a part of the paragraph string.
SwTextFrame * GetTextFrame()
const SwViewOption & GetOpt() const
void SetLen(const TextFrameIndex nNew)
TextFrameIndex GetIdx() const
SwRootFrame * GetLayout() const
An SwTextAttr container, stores all directly formatted text portions for a text node.
constexpr ::Color COL_GREEN(0x00, 0x80, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
@ Database
For old documents the Field-Which IDs must be preserved !!!
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)
SwNodeOffset GetNodeIndex() const
constexpr sal_uInt8 MAXLEVEL
static const SwRangeRedline * lcl_GetRedlineAtNodeInsertionOrDeletion(const SwTextNode &rTextNode, bool &bIsMoved)
static SwFieldPortion * lcl_NewMetaPortion(SwTextAttr &rHint, const bool bPrefix)
static bool lcl_setRedlineAttr(SwTextFormatInfo &rInf, const SwTextNode &rTextNode, const std::unique_ptr< SwFont > &pNumFnt)
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....
static bool lcl_IsInBody(SwFrame const *pFrame)
#define NON_PRINTING_CHARACTER_COLOR