22 #include <libxml/xmlwriter.h>
57 #include <strings.hrc>
69 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistoryHint"));
70 xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
71 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"symbol"), BAD_CAST(
typeid(*this).name()));
72 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"m_eWhichId"),
73 BAD_CAST(OString::number(
m_eWhichId).getStr()));
74 xmlTextWriterEndElement(pWriter);
79 , m_pAttr( pFormatHt->
Clone() )
124 switch (static_cast<SvxFormatBreakItem &>(*m_pAttr).GetBreak())
126 case SvxBreak::PageBefore:
127 case SvxBreak::PageAfter:
128 case SvxBreak::PageBoth:
129 aResult =
SwResId(STR_UNDO_PAGEBREAKS);
132 case SvxBreak::ColumnBefore:
133 case SvxBreak::ColumnAfter:
134 case SvxBreak::ColumnBoth:
135 aResult =
SwResId(STR_UNDO_COLBRKS);
151 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistorySetFormat"));
152 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"m_nNodeIndex"),
161 xmlTextWriterEndElement(pWriter);
173 static_cast<SwTableNode*
>(pNode)->GetTable().GetFrameFormat()->SetFormatAttr(
177 static_cast<SwStartNode*
>(pNode)->GetStartNodeType()) )
202 , m_nNodeIndex( nNodeIdx )
203 , m_nWhich( pFormatHt->Which() )
216 static_cast<SwTableNode*
>(pNode)->GetTable().GetFrameFormat()->
223 , m_nNodeIndex( nNodePos )
224 , m_nStart( pTextHt->GetStart() )
225 , m_nEnd( pTextHt->GetAnyEnd() )
226 , m_bFormatIgnoreStart(pTextHt->IsFormatIgnoreStart())
227 , m_bFormatIgnoreEnd (pTextHt->IsFormatIgnoreEnd ())
262 OSL_ENSURE( pTextNd,
"SwHistorySetText::SetInDoc: not a TextNode" );
284 , m_pField( new
SwFormatField( *pTextField->GetFormatField().GetField() ) )
305 return m_pField->GetField()->GetDescription();
318 if ( !pNewFieldType )
328 m_pField->GetField()->ChgTyp( pNewFieldType );
331 OSL_ENSURE( pTextNd,
"SwHistorySetTextField: no TextNode" );
342 , m_RefName( pTextHt->GetRefMark().GetRefName() )
343 , m_nNodeIndex( nNodePos )
344 , m_nStart( pTextHt->GetStart() )
345 , m_nEnd( pTextHt->GetAnyEnd() )
352 OSL_ENSURE( pTextNd,
"SwHistorySetRefMark: no TextNode" );
369 , m_TOXMark( pTextHt->GetTOXMark() )
370 , m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() )
371 , m_eTOXTypes( m_TOXMark.GetTOXType()->GetType() )
372 , m_nNodeIndex( nNodePos )
373 , m_nStart( pTextHt->GetStart() )
374 , m_nEnd( pTextHt->GetAnyEnd() )
384 for ( sal_uInt16
n = 0;
n < nCnt; ++
n )
404 OSL_ENSURE( pTextNd,
"SwHistorySetTOXMark: no TextNode" );
430 sal_Int32 nAttrStart, sal_Int32 nAttrEnd,
sal_uLong nNodePos )
432 , m_nNodeIndex( nNodePos ), m_nStart( nAttrStart ), m_nEnd( nAttrEnd )
440 OSL_ENSURE( pTextNd,
"SwHistoryResetText: no TextNode" );
450 , m_FootnoteNumber( pTextFootnote->GetFootnote().GetNumStr() )
451 , m_nNodeIndex( nNodePos )
452 , m_nStart( pTextFootnote->GetStart() )
453 , m_bEndNote( pTextFootnote->GetFootnote().IsEndNote() )
456 "SwHistorySetFootnote: Footnote without Section" );
468 m_pUndo->SaveSection( aSttIdx );
474 , m_FootnoteNumber( rTextFootnote.GetFootnote().GetNumStr() )
476 , m_nStart( rTextFootnote.GetStart() )
477 , m_bEndNote( rTextFootnote.GetFootnote().IsEndNote() )
480 "SwHistorySetFootnote: Footnote without Section" );
495 OSL_ENSURE( pTextNd,
"SwHistorySetFootnote: no TextNode" );
518 m_pUndo->GetHistory()->Rollback( pDoc );
542 , m_pColl( pFormatColl )
543 , m_nNodeIndex( nNd )
544 , m_nNodeType( nNodeWhich )
551 OSL_ENSURE( pContentNd,
"SwHistoryChangeFormatColl: no ContentNode" );
575 OSL_ENSURE( pFlyFormat,
"SwHistoryTextFlyCnt: no Format" );
593 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistoryTextFlyCnt"));
601 xmlTextWriterEndElement(pWriter);
605 const ::sw::mark::IMark& rBkmk,
612 rBkmk.GetMarkPos().nNode.GetIndex() : 0)
613 , m_nOtherNode(bSaveOtherPos ?
614 rBkmk.GetOtherMarkPos().nNode.GetIndex() : 0)
615 , m_nContent(bSavePos ?
616 rBkmk.GetMarkPos().nContent.GetIndex() : 0)
617 , m_nOtherContent(bSaveOtherPos ?
618 rBkmk.GetOtherMarkPos().nContent.GetIndex() :0)
619 , m_bSavePos(bSavePos)
620 , m_bSaveOtherPos(bSaveOtherPos)
621 , m_bHadOtherPos(rBkmk.IsExpanded())
624 const ::sw::mark::IBookmark*
const pBookmark =
dynamic_cast< const ::
sw::mark::IBookmark*
>(&rBkmk);
634 dynamic_cast< ::sfx2::Metadatable const* >(pBookmark));
647 std::unique_ptr<SwPaM> pPam;
653 OSL_ENSURE(pContentNd,
654 "<SwHistoryBookmark::SetInDoc(..)>"
655 " - wrong node for a mark");
670 OSL_ENSURE(pContentNd,
671 "<SwHistoryBookmark::SetInDoc(..)>"
672 " - wrong node for a mark");
674 if (pPam !=
nullptr && pContentNd)
686 "<SwHistoryBookmark::SetInDoc(..)>"
687 " - missing pos on old mark");
695 if ( pMark !=
nullptr )
702 if ( pBookmark ==
nullptr )
713 dynamic_cast< ::sfx2::Metadatable* >(pBookmark));
714 OSL_ENSURE(pMeta,
"metadata undo, but not metadatable?");
724 return m_nNode == rBkmk.GetMarkPos().nNode.GetIndex()
725 &&
m_nContent == rBkmk.GetMarkPos().nContent.GetIndex()
731 , m_sType(rFieldMark.GetFieldname())
732 , m_nNode(rFieldMark.GetMarkPos().nNode.GetIndex())
733 , m_nContent(rFieldMark.GetMarkPos().nContent.GetIndex())
742 std::unique_ptr<SwPaM> pPam;
760 std::unique_ptr<SwPaM> pPam;
775 ,
m_sName(rFieldMark.GetName())
776 , m_sType(rFieldMark.GetFieldname())
777 , m_nStartNode(rFieldMark.GetMarkStart().nNode.GetIndex())
778 , m_nStartContent(rFieldMark.GetMarkStart().nContent.GetIndex())
779 , m_nEndNode(rFieldMark.GetMarkEnd().nNode.GetIndex())
780 , m_nEndContent(rFieldMark.GetMarkEnd().nContent.GetIndex())
833 , m_ResetArray( 0, 4 )
834 , m_nNodeIndex( nNodePos )
839 while (pItem && pOrigItem)
841 if( !rSetArr.
count( pOrigItem->Which() ))
848 switch ( pItem->
Which() )
895 pItem = aIter.NextItem();
905 if ( pNode->IsContentNode() )
913 else if ( pNode->IsTableNode() )
916 *
static_cast<SwTableNode*
>(pNode)->GetTable().GetFrameFormat();
927 , m_rFormat( rFormat )
928 , m_nOldNodeIndex( rFormat.GetAnchor().GetContentAnchor()->nNode.GetIndex() )
930 ? rFormat.GetAnchor().GetContentAnchor()->nContent.GetIndex()
949 OSL_ENSURE(pCNd,
"SwHistoryChangeFlyAnchor: no ContentNode");
955 aTmp.SetAnchor( &aPos );
969 , m_pPrevFormat( rAttr.GetPrev() )
970 , m_pNextFormat( rAttr.GetNext() )
971 , m_pFlyFormat( &rFormat )
1008 const OUString & sFormat)
1010 , m_OldSet(rSet), m_Format(sFormat)
1040 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1041 const sal_uInt16 nWhich(pNewValue->
Which());
1050 std::unique_ptr<SwHistoryHint> pHt;
1074 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1076 std::unique_ptr<SwHistoryHint> pHt;
1079 switch ( pHint->
Which() )
1083 static_cast<SwTextFootnote*>(pHint), nNodeIdx ) );
1087 ->GetFlyCnt().GetFrameFormat() ) );
1092 static_txtattr_cast<SwTextField*>(pHint), nNodeIdx) );
1096 static_txtattr_cast<SwTextTOXMark*>(pHint), nNodeIdx) );
1100 static_txtattr_cast<SwTextRefMark*>(pHint), nNodeIdx) );
1116 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1118 std::unique_ptr<SwHistoryHint> pHt(
1123 void SwHistory::Add(const ::sw::mark::IMark& rBkmk,
bool bSavePos,
bool bSaveOtherPos)
1125 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1127 std::unique_ptr<SwHistoryHint> pHt;
1133 assert(bSavePos && bSaveOtherPos);
1138 assert(bSavePos && bSaveOtherPos);
1158 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1160 const sal_uInt16 nWh = rFormat.
Which();
1164 || (
RES_DRAWFRMFMT == nWh && dynamic_cast<SwDrawFrameFormat*>(&rFormat)));
1171 reinterpret_cast<const SfxPoolItem**>(&pChainItem) ))
1176 std::unique_ptr<SwHistoryHint> pHt(
1215 for ( sal_uInt16
i =
Count();
i > nStart ; )
1228 if ( !
Count() || !nEnd || nStart >= nEnd )
1241 for ( ; nStart < nEnd; ++
m_nEndDiff, ++nStart )
1252 OSL_ENSURE( nNewTmpEnd <=
Count(),
"SwHistory::SetTmpEnd: out of bounds" );
1259 for ( sal_uInt16
n = nOld;
n < nNewTmpEnd;
n++ )
1264 ->GetUDelLFormat()->RedoForRollback();
1284 Add(pItem, pItem, nNodeIdx);
1294 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistory"));
1295 xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
1297 xmlTextWriterStartElement(pWriter, BAD_CAST(
"m_SwpHstry"));
1300 pHistory->dumpAsXml(pWriter);
1302 xmlTextWriterEndElement(pWriter);
1304 xmlTextWriterEndElement(pWriter);
1310 const sal_Int32 nStart,
1311 const sal_Int32 nEnd,
1312 const bool bCopyFields )
1319 for(
size_t n = 0;
n < pHts->
Count(); ++
n )
1323 const sal_Int32 nAttrStt = pHt->
GetStart();
1324 const sal_Int32 * pEndIdx = pHt->
GetEnd();
1325 if(
nullptr != pEndIdx && nAttrStt > nEnd )
1329 bool bNextAttr =
false;
1330 switch( pHt->
Which() )
1348 if ( nStart <= nAttrStt )
1350 if ( nEnd > nAttrStt )
1352 Add( pHt, nNodeIdx,
false );
1355 else if ( pEndIdx && nStart < *pEndIdx )
1357 Add( pHt, nNodeIdx,
false );
1365 , m_pHistory( pHst )
1366 , m_nNodeIndex( ULONG_MAX )
1374 , m_pHistory( pHst )
1375 , m_nNodeIndex( rNd.GetIndex() )
1382 , m_pHistory( pHst )
1383 , m_nNodeIndex( rNd.GetIndex() )
1391 if ( !(
m_pHistory && pLegacyHint && pLegacyHint->m_pNew && pLegacyHint->m_pOld != pLegacyHint->m_pNew) )
1402 OSL_ENSURE(
false,
"Unexpected update attribute (!)");
1405 else if (pLegacyHint->m_pOld &&
RES_ATTRSET_CHG == pLegacyHint->m_pNew->Which())
1407 std::unique_ptr<SwHistoryHint> pNewHstr;
1410 if ( 1 < rSet.
Count() )
1437 sal_Int32
const nStart, sal_Int32
const nEnd,
SetAttrMode const nFlags,
1446 OSL_ENSURE(pTextNode,
"SwRegHistory not registered at text node?");
1455 const bool bInserted = pTextNode->
SetAttr( rSet, nStart, nEnd, nFlags, ppNewTextAttr );
1473 sal_uInt16
const nWhich(pItem->Which());
1474 sal_uInt16
const nExpected(
1484 [nExpected](std::unique_ptr<SwHistoryHint>
const& pHint) ->
bool {
1486 dynamic_cast<SwHistoryResetText const*>(pHint.get()));
1487 return pReset && (pReset->
GetWhich() == nExpected);
1500 pRegIn->
Add(
this );
1520 if(
auto pContentNode = dynamic_cast< const SwContentNode *>(
GetRegisteredIn() ) )
1522 pSet = pContentNode->GetpSwAttrSet();
1524 else if (
auto pSwFormat = dynamic_cast< const SwFormat *>(
GetRegisteredIn() ) )
1526 pSet = &pSwFormat->GetAttrSet();
1528 if( pSet && pSet->
Count() )
1533 sal_uInt16 nW = pItem->Which();
const std::unique_ptr< SwFormatField > m_pField
Instances of SwFields and those derived from it occur 0 to n times.
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
Starts a section of nodes in the document model.
History object containing all information used during undo / redo of text form field insertion...
const SwGrfFormatColls * GetGrfFormatColls() const
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
const TOXTypes m_eTOXTypes
void dumpAsXml(xmlTextWriterPtr pWriter) const override
SwHistoryNoTextFieldmark(const ::sw::mark::IFieldmark &rFieldMark)
sal_uLong GetIndex() const
void Add(SwClient *pDepend)
sal_uInt16 GetWhich() const
Marks a position in the document model.
std::vector< std::unique_ptr< SwHistoryHint > > m_SwpHstry
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
SwCharFormat * FindCharFormatByName(std::u16string_view rName) const
bool isCHRATR(const sal_uInt16 nWhich)
const sal_uInt16 m_nWhich
virtual const SwRootFrame * GetCurrentLayout() const =0
OUString const & GetPrimaryKey() const
const bool m_bHadOtherPos
size_type count(const Value &v) const
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
SwpHints * GetpSwpHints()
SwHistoryChangeCharFormat(const SfxItemSet &rSet, const OUString &sFormat)
static SwContentNode * GetContentNode(SwDoc &rDoc, SwNodeIndex &rIdx, bool bNext)
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(150)
const sal_Int32 m_nEndContent
bool Rollback(SwDoc *pDoc, sal_uInt16 nStart=0)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
const SwTOXType * InsertTOXType(const SwTOXType &rTyp)
const SfxItemSet m_OldSet
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(165)
virtual const sal_Int32 * GetEnd() const
end position
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
virtual ~SwHistorySetFormat() override
SwHistorySetTextField(const SwTextField *pTextField, sal_uLong nNode)
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
Provides access to the marks of a document.
void SetFormatIgnoreStart(bool bFlag)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(57)
virtual const SwPosition & GetMarkPos() const =0
SwPosition FindFieldSep(IFieldmark const &rMark)
return position of the CH_TXT_ATR_FIELDSEP for rMark
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
virtual void SetInDoc(SwDoc *pDoc, bool) override
bool IsEqual(const SwTOXMark &rCmp) const
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
virtual OUString GetDescription() const
bool TmpRollback(SwDoc *pDoc, sal_uInt16 nStart, bool ToFirst=true)
IDocumentMarkAccess * getIDocumentMarkAccess()
IDocumentUndoRedo & GetIDocumentUndoRedo()
void dumpAsXml(xmlTextWriterPtr pWriter) const
const SwTOXType * GetTOXType() const
void SetFormatIgnoreEnd(bool bFlag)
sal_Int32 GetAnyEnd() const
end (if available), else start
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(59)
For old documents the Field-Which IDs must be preserved !!!
const sal_uLong m_nStartNode
const SwFrameFormats * GetSpzFrameFormats() const
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet)=0
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
virtual ~SwHistorySetText() override
void AddDeleteFly(SwFrameFormat &, sal_uInt16 &rSetPos)
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
const SfxPoolItem * NextItem()
const sal_uLong m_nNodeIndex
SwHistoryChangeFormatColl(SwFormatColl *pColl, sal_uLong nNode, SwNodeType nNodeWhich)
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
SwNodeType GetNodeType() const
void RegisterInModify(sw::BroadcastingModify *pRegIn, const SwNode &rNd)
const sal_uLong m_nOldNodeIndex
const sal_uLong m_nNodeIndex
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const IDocumentMarkAccess::MarkType m_eBkmkType
History object containing all information used during undo / redo of checkbox and drop-down form fiel...
SwFlyFrameFormat *const m_pPrevFormat
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
virtual ::sw::mark::IMark * makeMark(const SwPaM &rPaM, const OUString &rProposedName, MarkType eMark,::sw::mark::InsertMode eMode, SwPosition const *pSepPos=nullptr)=0
Generates a new mark in the document for a certain selection.
std::unique_ptr< SwFieldType > m_pFieldType
! beware of the order for the declaration of the unique_ptrs.
sal_uLong GetIndex() const
bool IsEqualBookmark(const ::sw::mark::IMark &rBkmk)
sal_Int32 GetStart() const
OUString m_aHideCondition
SwHistoryChangeFlyChain(SwFlyFrameFormat &rFormat, const SwFormatChain &rAttr)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(161)
const sal_uLong m_nOtherNode
SwTextAttr * InsertItem(SfxPoolItem &rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, const SetAttrMode nMode=SetAttrMode::DEFAULT)
create new text attribute from rAttr and insert it
const SwTable & GetTable() const
sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const
Manage table of content types.
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
virtual OUString GetDescription() const override
SwHistorySetFormat(const SfxPoolItem *pFormatHt, sal_uLong nNode)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
const sal_Int32 m_nContent
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(58)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
virtual void SetKeyCode(const vcl::KeyCode &)=0
SwHistoryTextFieldmark(const ::sw::mark::IFieldmark &rFieldMark)
virtual void SetShortName(const OUString &)=0
SwHistory *const m_pHistory
std::unique_ptr< SfxPoolItem > m_pAttr
bool IsAlive(typename std::remove_pointer< Value >::type const *const p) const
check that given format is still alive (i.e. contained here)
SwHistoryResetFormat(const SfxPoolItem *pFormatHt, sal_uLong nNodeIdx)
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark)=0
Deletes a mark.
const OUString & GetAlternativeText() const
SwHistoryTextFlyCnt(SwFrameFormat *const pFlyFormat)
bool IsContentNode() const
PaM is Point and Mark: a selection of the document model.
struct _xmlTextWriter * xmlTextWriterPtr
virtual void Hide(bool hide)=0
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
void DeRegister()
deregister the currently registered History
SwTextAttr * Get(size_t nPos) const
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
SwHistoryResetText(sal_uInt16 nWhich, sal_Int32 nStt, sal_Int32 nEnd, sal_uLong nNode)
o3tl::sorted_vector< sal_uInt16 > m_WhichIdSet
const sal_uLong m_nNodeIndex
SwIndex & Assign(SwIndexReg *, sal_Int32)
virtual ~SwHistorySetTextField() override
void CopyAttr(SwpHints const *pHts, const sal_uLong nNodeIdx, const sal_Int32 nStart, const sal_Int32 nEnd, const bool bCopyFields)
void ChgDefinedIn(const sw::BroadcastingModify *pNew)
const sal_uLong m_nEndNode
SwContentNode * GetContentNode()
sal_uInt16 GetLevel() const
const sal_uLong m_nNodeIndex
void RegisterToTOXType(SwTOXType &rMark)
const sal_uLong m_nNodeIndex
virtual void SetInDoc(SwDoc *pDoc, bool) override
const OUString & GetTypeName() const
void CopyFormatAttr(const SfxItemSet &rSet, sal_uLong nNodeIdx)
std::unique_ptr< SwUndoDelLayFormat > m_pUndo
Marks a node in the document model.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
#define SwTextFootnote_GetIndex(pFIdx)
virtual sw::mark::IFieldmark * makeFieldBookmark(const SwPaM &rPaM, const OUString &rName, const OUString &rType, SwPosition const *pSepPos=nullptr)=0
const sal_uLong m_nNodeIndex
void Register(SwRegHistory *pHist)
register a History, which receives all attribute changes (for Undo)
OUString SwResId(const char *pId)
virtual void SetHideCondition(const OUString &)=0
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
SwFrameFormat & m_rFormat
virtual void deleteFieldmarkAt(const SwPosition &rPos)=0
void Add(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, sal_uLong nNodeIdx)
attention: NOHINTADJUST prevents MergePortions! when using this need to pay attention to ignore start...
void AddChangeFlyAnchor(SwFrameFormat &rFormat)
const SwFormatFootnote & GetFootnote() const
virtual sw::mark::IFieldmark * makeNoTextFieldBookmark(const SwPaM &rPaM, const OUString &rName, const OUString &rType)=0
const sal_uLong m_nNodeIndex
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
The Undo actions need to create new Shell cursors.
void ResetInDoc(SwDoc &rDoc)
SwTextNode is a paragraph in the document model.
void DeleteAttributes(const sal_uInt16 nWhich, const sal_Int32 nStart, const sal_Int32 nEnd=0)
delete all attributes of type nWhich at nStart (opt. end nEnd)
SwHistorySetTOXMark(const SwTextTOXMark *pTextHt, sal_uLong nNode)
void AddHint(SwTextAttr *pHt, const bool bNew)
const sal_Int32 m_nOldContentIndex
SwHistorySetRefMark(const SwTextRefMark *pTextHt, sal_uLong nNode)
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(114)
SwHistorySetAttrSet(const SfxItemSet &rSet, sal_uLong nNode, const o3tl::sorted_vector< sal_uInt16 > &rSetArr)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(149)
An SwTextAttr container, stores all directly formatted text portions for a text node.
const SwCharFormats * GetCharFormats() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
OUString const & GetSecondaryKey() const
const SwTextFormatColls * GetTextFormatColls() const
virtual SwFieldType * InsertFieldType(const SwFieldType &)=0
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const sal_Int32 m_nContent
void dumpAsXml(xmlTextWriterPtr pWriter) const override
sal_Int32 GetIndex() const
virtual ~SwHistoryTextFlyCnt() override
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
sal_uInt16 SetTmpEnd(sal_uInt16 nTmpEnd)
SwFlyFrameFormat *const m_pFlyFormat
const SwModify * GetRegisteredIn() const
SwTableBox is one table cell in the document model.
SwFlyFrameFormat *const m_pNextFormat
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(157)
const sal_Int32 m_nStartContent
void ResetInDoc(SwDoc &rDoc)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
SwFrameFormat * ClaimFrameFormat()
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(154)
virtual void SetInDoc(SwDoc *pDoc, bool) override
SwTableNode * FindTableNode()
Search table node, in which it is.
bool InsertHint(SwTextAttr *const pAttr, const SetAttrMode nMode=SetAttrMode::DEFAULT)
Insert pAttr into hints array.
const bool m_bSaveOtherPos
const SfxPoolItem & GetAttr() const
SwHistorySetText(SwTextAttr *pTextHt, sal_uLong nNode)
const HISTORY_HINT m_eWhichId
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
std::unique_ptr< SfxPoolItem > m_pAttr
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
const SwTOXType * GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
SwTextNode & GetTextNode() const
const SwFormatCharFormat & GetCharFormat() const
bool InsertItems(const SfxItemSet &rSet, sal_Int32 const nStart, sal_Int32 const nEnd, SetAttrMode const nFlags, SwTextAttr **ppNewTextAttr)
std::pair< const_iterator, bool > insert(Value &&x)
bool IsInvalidItem(const SfxPoolItem *pItem)
SwHistoryBookmark(const ::sw::mark::IMark &rBkmk, bool bSavePos, bool bSaveOtherPos)
SwFormatColl *const m_pColl
virtual bool IsExpanded() const =0
const SwNodeType m_nNodeType
std::vector< sal_uInt16 > m_ResetArray
::sw::IShellCursorSupplier * GetIShellCursorSupplier()
bool m_bFormatIgnoreStart
static SwTOXType * GetSwTOXType(SwDoc &rDoc, TOXTypes eTOXTypes, const OUString &rTOXName)
SwHistoryChangeFlyAnchor(SwFrameFormat &rFormat)
const sal_Int32 COMPLETE_STRING
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_TXTATR_UNKNOWN_CONTAINER(54)
const SfxPoolItem * GetCurItem() const
const SwAttrPool & GetAttrPool() const
SwRegHistory(SwHistory *pHst)
const sal_Int32 m_nOtherContent
SwpHints & GetOrCreateSwpHints()
virtual const SwPosition & GetOtherMarkPos() const =0
bool IsDefaultItem(const SfxPoolItem *pItem)
const sal_uLong m_nNodeIndex
Base class of the Writer document model elements.
virtual OUString GetDescription() const override