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())
245 auto pNew =
const_cast<sw::BroadcastingModify*
>(
static_cast<const sw::BroadcastingModify*
>(pModifyChangedHint->m_pNew));
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 )
438 auto [pStt, pEnd] = rPam.
StartEnd();
440 const sal_Int32 nSttCnt = pStt->GetContentIndex();
442 const sal_Int32 nEndCnt = pEnd->GetContentIndex();
447 std::unique_ptr<SwUndoChangeFootNote> pUndo;
455 bool bTypeChgd =
false;
456 const size_t nPosSave =
nPos;
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 void UpdateRefFields()=0
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual void SetModified()=0
Must be called manually at changes of format.
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
std::optional< sw::ModifyChangedHint > CheckRegistration(const SfxPoolItem *pOldValue)
const SwFootnoteInfo & GetFootnoteInfo() const
IDocumentState const & getIDocumentState() const
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
IDocumentUndoRedo & GetIDocumentUndoRedo()
bool SetCurFootnote(const SwPaM &rPam, const OUString &rNumStr, bool bIsEndNote)
change footnotes in range
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
std::unique_ptr< SwFootnoteInfo > mpFootnoteInfo
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwFootnoteIdxs & GetFootnoteIdxs()
const SwEndNoteInfo & GetEndNoteInfo() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
std::unique_ptr< SwEndNoteInfo > mpEndNoteInfo
void SetCharFormat(SwCharFormat *)
void UpdateFormatOrAttr()
SwCharFormat * GetCurrentCharFormat(const bool bAnchor) const
SwEndNoteInfo & operator=(const SwEndNoteInfo &)
SwPageDesc * GetPageDesc(SwDoc &rDoc) const
bool DependsOn(const SwPageDesc *) const
SwCharFormat * m_pCharFormat
const OUString & GetPrefix() const
bool operator==(const SwEndNoteInfo &rInf) const
void ChgPageDesc(SwPageDesc *pDesc)
sw::WriterMultiListener m_aDepends
SwCharFormat * m_pAnchorFormat
sal_uInt16 m_nFootnoteOffset
bool KnowsPageDesc() const
const OUString & GetSuffix() const
void SetFootnoteTextColl(SwTextFormatColl &rColl)
SwTextFormatColl * m_pTextFormatColl
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
SwCharFormat * GetCharFormat(SwDoc &rDoc) const
SwCharFormat * GetAnchorCharFormat(SwDoc &rDoc) const
void SetAnchorCharFormat(SwCharFormat *)
PaM is Point and Mark: a selection of the document model.
std::pair< const SwPosition *, const SwPosition * > StartEnd() const
Because sometimes the cost of the operator<= can add up.
The root element of a Writer document layout.
const SwFormatFootnote & GetFootnote() const
sal_Int32 GetStart() const
Represents the style of a paragraph.
void EndListening(SwModify *pDepend)
bool IsListeningTo(const SwModify *const pDepend) const
void StartListening(SwModify *pDepend)
#define SwTextFootnote_GetIndex(pFIdx)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(169)
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(168)
@ RES_POOLPAGE_ENDNOTE
Endnote page.
@ RES_POOLPAGE_FOOTNOTE
Footnote at end of document.
@ RES_POOLCHR_FOOTNOTE
Footnote.
@ RES_POOLCHR_ENDNOTE
Endnote.
@ RES_POOLCHR_ENDNOTE_ANCHOR
Endnote anchor.
@ RES_POOLCHR_FOOTNOTE_ANCHOR
Footnote anchor.