76 m_pTextFormatColl(rInfo.m_pTextFormatColl),
77 m_pPageDesc(rInfo.m_pPageDesc),
78 m_pCharFormat(rInfo.m_pCharFormat),
79 m_pAnchorFormat(rInfo.m_pAnchorFormat),
80 m_sPrefix( rInfo.m_sPrefix ),
81 m_sSuffix( rInfo.m_sSuffix ),
83 m_aFormat( rInfo.m_aFormat ),
84 m_nFootnoteOffset( rInfo.m_nFootnoteOffset )
95 m_pTextFormatColl(nullptr),
97 m_pCharFormat(nullptr),
98 m_pAnchorFormat(nullptr),
100 m_nFootnoteOffset( 0 )
157 auto pDoc = pFormat->
GetDoc();
160 for(
auto pDocFormat : *pDoc->GetCharFormats())
162 if(pDocFormat == pFormat)
163 pDocFormat->SetPoolFormatId(nId);
164 else if(pDocFormat->GetPoolFormatId() == nId)
165 pDocFormat->SetPoolFormatId(0);
174 lcl_ResetPoolIdForDocAndSync(
197 lcl_ResetPoolIdForDocAndSync(
219 for(
auto pTextFootnote : rFootnoteIdxs)
230 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
233 switch(pLegacyHint->GetWhich())
243 else if (
auto pModifyChangedHint = dynamic_cast<const sw::ModifyChangedHint*>(&rHint))
278 m_aQuoVadis( rInfo.m_aQuoVadis ),
279 m_aErgoSum( rInfo.m_aErgoSum ),
280 m_ePos( rInfo.m_ePos ),
281 m_eNum( rInfo.m_eNum )
317 bool bFootnoteChrFormats = pOldChrFormat != pNewChrFormat;
325 for(
auto aLayout : aAllLayouts )
326 aLayout->AllRemoveFootnotes();
329 for(
auto aLayout : aAllLayouts )
330 aLayout->UpdateFootnoteNums();
332 for(
auto aLayout : aAllLayouts )
333 aLayout->CheckFootnotePageDescs(
false);
351 else if( bFootnoteChrFormats )
381 bool const bExtra = !bNumChg &&
391 bool bFootnoteChrFormats = pOldChrFormat != pNewChrFormat;
400 aLayout->CheckFootnotePageDescs(
true);
418 else if( bFootnoteChrFormats )
442 const sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
447 std::unique_ptr<SwUndoChangeFootNote> pUndo;
455 bool bTypeChgd =
false;
456 const size_t nPosSave = nPos;
457 while( nPos < rFootnoteArr.
size() )
461 if( nIdx >= nEndNd &&
462 ( nIdx != nEndNd || nEndCnt < pTextFootnote->GetStart() ) )
464 if( nIdx > nSttNd || ( nIdx == nSttNd &&
465 nSttCnt <= pTextFootnote->GetStart() ) )
474 pUndo->GetHistory().
Add( *pTextFootnote );
478 if( rFootnote.
IsEndNote() != bIsEndNote )
495 if( nIdx <= nSttNd &&
496 ( nIdx != nSttNd || nSttCnt > pTextFootnote->
GetStart() ) )
498 if( nIdx < nEndNd || ( nIdx == nEndNd &&
499 nEndCnt >= pTextFootnote->
GetStart() ) )
508 pUndo->GetHistory().
Add( *pTextFootnote );
512 if( rFootnote.
IsEndNote() != bIsEndNote )
540 aLayout->UpdateFootnoteNums();
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
SvxNumType GetNumberingType() const
SwCharFormat * GetAnchorCharFormat(SwDoc &rDoc) const
void Add(SwClient *pDepend)
Represents the style of a paragraph.
Marks a position in the document model.
Footnote at end of document.
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
SwCharFormat * GetCurrentCharFormat(const bool bAnchor) const
virtual const SwRootFrame * GetCurrentLayout() const =0
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(162)
const OUString & GetSuffix() const
virtual void SetModified()=0
Must be called manually at changes of format.
SwEndNoteInfo & operator=(const SwEndNoteInfo &)
SwTextFormatColl * m_pTextFormatColl
IDocumentUndoRedo & GetIDocumentUndoRedo()
The root element of a Writer document layout.
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
void SetCharFormat(SwCharFormat *)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
SwCharFormat * m_pAnchorFormat
sal_Int32 GetStart() const
void EndListening(SwModify *pDepend)
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
SwNodeOffset GetIndex() const
void SetAnchorCharFormat(SwCharFormat *)
bool KnowsPageDesc() const
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
void SetFootnoteTextColl(SwTextFormatColl &rColl)
std::optional< sw::ModifyChangedHint > CheckRegistration(const SfxPoolItem *pOldValue)
bool SetCurFootnote(const SwPaM &rPam, const OUString &rNumStr, bool bIsEndNote)
change footnotes in range
PaM is Point and Mark: a selection of the document model.
virtual void UpdateRefFields()=0
virtual void AppendUndo(std::unique_ptr< SwUndo > pUndo)=0
Add new Undo action.
virtual void ClearRedo()=0
Delete all Redo actions.
std::unique_ptr< SwEndNoteInfo > mpEndNoteInfo
bool IsListeningTo(const SwModify *const pDepend) const
sal_uInt16 m_nFootnoteOffset
SwCharFormat * m_pCharFormat
bool DependsOn(const SwPageDesc *) const
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(163)
IDocumentState const & getIDocumentState() const
#define SwTextFootnote_GetIndex(pFIdx)
const SwFormatFootnote & GetFootnote() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const SwPosition * Start() const
const OUString & GetPrefix() const
void StartListening(SwModify *pDepend)
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
SwCharFormat * GetCharFormat(SwDoc &rDoc) const
SwPageDesc * GetPageDesc(SwDoc &rDoc) const
void ChgPageDesc(SwPageDesc *pDesc)
sal_Int32 GetIndex() const
const SwPosition * End() const
void UpdateFormatOrAttr()
SwFootnoteIdxs & GetFootnoteIdxs()
void SetNumberingType(SvxNumType nSet)
std::unique_ptr< SwFootnoteInfo > mpFootnoteInfo
const SwFootnoteInfo & GetFootnoteInfo() const
const SwEndNoteInfo & GetEndNoteInfo() const
sw::WriterMultiListener m_aDepends
bool operator==(const SwEndNoteInfo &rInf) const