85 bool bNewFlyPor =
false;
86 sal_uInt16 subType = 0;
95 bool const bInClipboard( pDoc ==
nullptr || pDoc->
IsClipBoard() );
96 bool bPlaceHolder =
false;
116 OUString
const aStr( bName
127 &static_txtattr_cast<SwTextField const*>(pHint)->GetTextNode());
130 OUString
const aStr( bName
143 OUString
const aStr( bName
161 sal_uInt16 nNumPages = pTmpRootFrame->
GetPageNum();
166 ->ChangeExpansion(nVirtNum, nNumPages);
168 bVirt, nNumFormat !=
SvxNumType(-1) ? &nNumFormat :
nullptr);
171 OUString
const aStr( bName
188 *static_txtattr_cast<SwTextField const*>(pHint));
194 *static_txtattr_cast<SwTextField const*>(pHint));
199 OUString
const aStr( bName
214 OUString
const aStr( bName
225 static_txtattr_cast<SwTextField const*>(pHint));
228 OUString
const aStr( bName
244 OUString
const str( bName
257 OUString
const str( bName
269 OUString
const aStr( bName
278 std::unique_ptr<SwFont> pTmpFnt;
284 OUString
const aStr( bName
299 OSL_ENSURE(pField,
"lcl_NewMetaPortion: no meta field?");
367 switch( pHint->
Which() )
407 pFieldPortion->SetContentControl(
true);
409 pRet = pFieldPortion;
428 std::shared_ptr<SfxItemSet> pSet(rListAutoFormat.
GetStyleHandle());
434 std::unique_ptr<SfxItemSet>
const pCleanedSet = pSet->Clone();
446 && !pCleanedSet->HasItem(nWhich)
447 && !(pFormat && pFormat->
HasItem(nWhich)) )
452 pCleanedSet->Put(*pItem);
466 pCleanedSet->ClearItem(pItem->
Which());
468 pCleanedSet->ClearItem(pItem->
Which());
471 bool bShadingWasImported =
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;
484 if (bShadingWasImported
488 pCleanedSet->ClearItem(pItem->
Which());
496 const std::optional<Color> oFontBackColor = pNumFnt->
GetBackColor();
500 pNumFnt->
SetDiffFnt(pCleanedSet.get(), pIDSA);
518 for( ; nRedlPos < rTable.
size() ; ++nRedlPos )
524 std::swap(nStart, nEnd);
525 if( RedlineType::Delete == pTmp->
GetType() ||
526 RedlineType::Insert == pTmp->
GetType() )
528 if( nStart <= nNdIdx && nEnd > nNdIdx )
534 if( nStart > nNdIdx )
555 if ( RedlineType::Delete == pRedlineNum->
GetType() )
569 if ( RedlineType::Delete == pRedlineNum->
GetType() )
570 SW_MOD()->GetDeletedAuthorAttr(aAuthor, aSet);
572 SW_MOD()->GetInsertAuthorAttr(aAuthor, aSet);
575 pNumFnt->SetColor(pItem->GetValue());
577 pNumFnt->SetUnderline(pItem->GetLineStyle());
579 pNumFnt->SetStrikeout( pItem->GetStrikeout() );
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
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();
633 bLeft, bCenter, nMinDist,
634 bLabelAlignmentPosAndSpaceModeActive );
638 static_cast<SwGrfNumPortion*
>(pRet)->SetBase( nTmpA, nTmpD, nTmpA, nTmpD );
652 const std::optional<vcl::Font> pFormatFnt = rNumFormat.
GetBulletFont();
678 pNumFnt->SetDiffFnt( pFormat, pIDSA );
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 );
693 pNumFnt->SetVertical( pNumFnt->GetOrientation(),
704 bLeft, bCenter, nMinDist,
705 bLabelAlignmentPosAndSpaceModeActive);
714 bool bHasHiddenNum =
false;
722 if ( !aText.isEmpty() || !aHiddenText.isEmpty() )
724 if (aText != aHiddenText && !aHiddenText.isEmpty())
726 bHasHiddenNum =
true;
730 aText = aText +
"[" + aHiddenText +
"]"
733 else if (!aText.isEmpty())
745 if( !aText.isEmpty() )
755 for (
size_t i = 0;
i < pHints->Count(); ++
i)
757 const SwTextAttr* pHint = pHints->GetSortedByEnd(
i);
762 std::shared_ptr<SfxItemSet> pSet
766 pNumFnt->SetDiffFnt(pSet.get(), pIDSA);
786 pNumFnt->SetDiffFnt( pFormat, pIDSA );
797 bLeft, bCenter, nMinDist,
798 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