22#include <libxml/xmlwriter.h>
58#include <bookmark.hxx>
70 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistoryHint"));
71 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
72 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"symbol"), BAD_CAST(
typeid(*this).name()));
73 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"m_eWhichId"),
74 BAD_CAST(OString::number(
m_eWhichId).getStr()));
75 (void)xmlTextWriterEndElement(pWriter);
80 , m_pAttr( pFormatHt->
Clone() )
127 case SvxBreak::PageBefore:
128 case SvxBreak::PageAfter:
129 case SvxBreak::PageBoth:
130 aResult =
SwResId(STR_UNDO_PAGEBREAKS);
133 case SvxBreak::ColumnBefore:
134 case SvxBreak::ColumnAfter:
135 case SvxBreak::ColumnBoth:
136 aResult =
SwResId(STR_UNDO_COLBRKS);
152 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistorySetFormat"));
153 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"m_nNodeIndex"),
154 BAD_CAST(OString::number(sal_Int32(
m_nNodeIndex)).getStr()));
162 (void)xmlTextWriterEndElement(pWriter);
174 static_cast<SwTableNode*
>(pNode)->GetTable().GetFrameFormat()->SetFormatAttr(
178 static_cast<SwStartNode*
>(pNode)->GetStartNodeType()) )
203 , m_nNodeIndex( nNodeIdx )
204 , m_nWhich( pFormatHt->Which() )
217 static_cast<SwTableNode*
>(pNode)->GetTable().GetFrameFormat()->
224 , m_nNodeIndex( nNodePos )
225 , m_nStart( pTextHt->GetStart() )
226 , m_nEnd( pTextHt->GetAnyEnd() )
227 , m_bFormatIgnoreStart(pTextHt->IsFormatIgnoreStart())
228 , m_bFormatIgnoreEnd (pTextHt->IsFormatIgnoreEnd ())
263 OSL_ENSURE( pTextNd,
"SwHistorySetText::SetInDoc: not a TextNode" );
285 , m_pField( new
SwFormatField( *pTextField->GetFormatField().GetField() ) )
306 return m_pField->GetField()->GetDescription();
319 if ( !pNewFieldType )
329 m_pField->GetField()->ChgTyp( pNewFieldType );
332 OSL_ENSURE( pTextNd,
"SwHistorySetTextField: no TextNode" );
343 , m_RefName( pTextHt->GetRefMark().GetRefName() )
344 , m_nNodeIndex( nNodePos )
345 , m_nStart( pTextHt->GetStart() )
346 , m_nEnd( pTextHt->GetAnyEnd() )
353 OSL_ENSURE( pTextNd,
"SwHistorySetRefMark: no TextNode" );
370 , m_TOXMark( pTextHt->GetTOXMark() )
371 , m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() )
372 , m_eTOXTypes( m_TOXMark.GetTOXType()->GetType() )
373 , m_nNodeIndex( nNodePos )
374 , m_nStart( pTextHt->GetStart() )
375 , m_nEnd( pTextHt->GetAnyEnd() )
385 for ( sal_uInt16
n = 0;
n < nCnt; ++
n )
405 OSL_ENSURE( pTextNd,
"SwHistorySetTOXMark: no TextNode" );
431 sal_Int32 nAttrStart, sal_Int32 nAttrEnd,
SwNodeOffset nNodePos )
433 , m_nNodeIndex( nNodePos ), m_nStart( nAttrStart ), m_nEnd( nAttrEnd )
441 OSL_ENSURE( pTextNd,
"SwHistoryResetText: no TextNode" );
451 , m_FootnoteNumber( pTextFootnote->GetFootnote().GetNumStr() )
452 , m_nNodeIndex( nNodePos )
453 , m_nStart( pTextFootnote->GetStart() )
454 , m_bEndNote( pTextFootnote->GetFootnote().IsEndNote() )
457 "SwHistorySetFootnote: Footnote without Section" );
469 m_pUndo->SaveSection( aSttIdx );
475 , m_FootnoteNumber( rTextFootnote.GetFootnote().GetNumStr() )
477 , m_nStart( rTextFootnote.GetStart() )
478 , m_bEndNote( rTextFootnote.GetFootnote().IsEndNote() )
481 "SwHistorySetFootnote: Footnote without Section" );
496 OSL_ENSURE( pTextNd,
"SwHistorySetFootnote: no TextNode" );
519 m_pUndo->GetHistory()->Rollback( pDoc );
543 , m_pColl( pFormatColl )
544 , m_nNodeIndex( nNd )
545 , m_nNodeType( nNodeWhich )
552 OSL_ENSURE( pContentNd,
"SwHistoryChangeFormatColl: no ContentNode" );
576 OSL_ENSURE( pFlyFormat,
"SwHistoryTextFlyCnt: no Format" );
594 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistoryTextFlyCnt"));
602 (void)xmlTextWriterEndElement(pWriter);
606 const ::sw::mark::IMark& rBkmk,
614 , m_nOtherNode(bSaveOtherPos ?
615 rBkmk.GetOtherMarkPos().GetNodeIndex() :
SwNodeOffset(0))
616 , m_nContent(bSavePos ?
617 rBkmk.GetMarkPos().GetContentIndex() : 0)
618 , m_nOtherContent(bSaveOtherPos ?
619 rBkmk.GetOtherMarkPos().GetContentIndex() :0)
620 , m_bSavePos(bSavePos)
621 , m_bSaveOtherPos(bSaveOtherPos)
622 , m_bHadOtherPos(rBkmk.IsExpanded())
625 const ::sw::mark::IBookmark*
const pBookmark =
dynamic_cast< const ::
sw::mark::IBookmark*
>(&rBkmk);
634 ::sfx2::Metadatable
const*
const pMetadatable(
635 dynamic_cast< ::sfx2::Metadatable const*
>(pBookmark));
648 std::optional<SwPaM> pPam;
654 OSL_ENSURE(pContentNd,
655 "<SwHistoryBookmark::SetInDoc(..)>"
656 " - wrong node for a mark");
671 OSL_ENSURE(pContentNd,
672 "<SwHistoryBookmark::SetInDoc(..)>"
673 " - wrong node for a mark");
675 if (pPam && pContentNd)
686 "<SwHistoryBookmark::SetInDoc(..)>"
687 " - missing pos on old mark");
695 if ( pMark !=
nullptr )
702 if ( pBookmark ==
nullptr )
712 ::sfx2::Metadatable *
const pMeta(
713 dynamic_cast< ::sfx2::Metadatable*
>(pBookmark));
714 OSL_ENSURE(pMeta,
"metadata undo, but not metadatable?");
724 return m_nNode == rBkmk.GetMarkPos().GetNodeIndex()
725 &&
m_nContent == rBkmk.GetMarkPos().GetContentIndex()
731 , m_sType(rFieldMark.GetFieldname())
732 , m_nNode(rFieldMark.GetMarkStart().GetNodeIndex())
733 , m_nContent(rFieldMark.GetMarkStart().GetContentIndex())
742 std::optional<SwPaM> pPam;
760 std::optional<SwPaM> pPam;
776 , m_sType(rFieldMark.GetFieldname())
777 , m_nStartNode(rFieldMark.GetMarkStart().GetNodeIndex())
778 , m_nStartContent(rFieldMark.GetMarkStart().GetContentIndex())
779 , m_nEndNode(rFieldMark.GetMarkEnd().GetNodeIndex())
780 , m_nEndContent(rFieldMark.GetMarkEnd().GetContentIndex())
833 , m_ResetArray( 0, 4 )
834 , m_nNodeIndex( nNodePos )
839 while (pItem && pOrigItem)
841 if( !rSetArr.
count( pOrigItem->Which() ))
848 switch ( pItem->
Which() )
894 pItem = aIter.NextItem();
915 *
static_cast<SwTableNode*
>(pNode)->GetTable().GetFrameFormat();
927 , m_nOldNodeIndex( rFormat.GetAnchor().GetAnchorNode()->GetIndex() )
929 ? rFormat.GetAnchor().GetAnchorContentOffset()
964 , m_pPrevFormat( rAttr.GetPrev() )
965 , m_pNextFormat( rAttr.GetNext() )
966 , m_pFlyFormat( &rFormat )
1005 , m_OldSet(
std::move(aSet)), m_Format(
std::move(sFormat))
1034 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1035 const sal_uInt16 nWhich(pNewValue->
Which());
1044 std::unique_ptr<SwHistoryHint> pHt;
1068 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1070 std::unique_ptr<SwHistoryHint> pHt;
1073 switch ( pHint->
Which() )
1081 ->GetFlyCnt().GetFrameFormat() ) );
1086 static_txtattr_cast<SwTextField*>(pHint), nNodeIdx) );
1090 static_txtattr_cast<SwTextTOXMark*>(pHint), nNodeIdx) );
1094 static_txtattr_cast<SwTextRefMark*>(pHint), nNodeIdx) );
1110 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1112 std::unique_ptr<SwHistoryHint> pHt(
1117void SwHistory::Add(const ::sw::mark::IMark& rBkmk,
bool bSavePos,
bool bSaveOtherPos)
1119 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1121 std::unique_ptr<SwHistoryHint> pHt;
1127 assert(bSavePos && bSaveOtherPos);
1132 assert(bSavePos && bSaveOtherPos);
1152 OSL_ENSURE( !
m_nEndDiff,
"History was not deleted after REDO" );
1154 const sal_uInt16 nWh = rFormat.
Which();
1166 if( pChainItem->GetNext() || pChainItem->GetPrev() )
1168 std::unique_ptr<SwHistoryHint> pHt(
1171 if ( pChainItem->GetNext() )
1175 pChainItem->GetNext()->SetFormatAttr( aTmp );
1177 if ( pChainItem->GetPrev() )
1181 pChainItem->GetPrev()->SetFormatAttr( aTmp );
1207 for ( sal_uInt16
i =
Count();
i > nStart ; )
1220 if ( !
Count() || !nEnd || nStart >= nEnd )
1233 for ( ; nStart < nEnd; ++
m_nEndDiff, ++nStart )
1244 OSL_ENSURE( nNewTmpEnd <=
Count(),
"SwHistory::SetTmpEnd: out of bounds" );
1251 for ( sal_uInt16
n = nOld;
n < nNewTmpEnd;
n++ )
1256 ->GetUDelLFormat()->RedoForRollback();
1276 Add(pItem, pItem, nNodeIdx);
1286 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwHistory"));
1287 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
1289 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"m_SwpHstry"));
1292 pHistory->dumpAsXml(pWriter);
1294 (void)xmlTextWriterEndElement(pWriter);
1296 (void)xmlTextWriterEndElement(pWriter);
1302 const sal_Int32 nStart,
1303 const sal_Int32 nEnd,
1304 const bool bCopyFields )
1311 for(
size_t n = 0;
n < pHts->
Count(); ++
n )
1315 const sal_Int32 nAttrStt = pHt->
GetStart();
1316 const sal_Int32 * pEndIdx = pHt->
GetEnd();
1317 if(
nullptr != pEndIdx && nAttrStt > nEnd )
1321 bool bNextAttr =
false;
1322 switch( pHt->
Which() )
1340 if ( nStart <= nAttrStt )
1342 if ( nEnd > nAttrStt )
1344 Add( pHt, nNodeIdx,
false );
1347 else if ( pEndIdx && nStart < *pEndIdx )
1349 Add( pHt, nNodeIdx,
false );
1357 , m_pHistory( pHst )
1366 , m_pHistory( pHst )
1367 , m_nNodeIndex( rNd.GetIndex() )
1374 , m_pHistory( pHst )
1375 , m_nNodeIndex( rNd.GetIndex() )
1382 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
1385 if ( !(
m_pHistory && pLegacyHint->m_pNew && pLegacyHint->m_pOld != pLegacyHint->m_pNew) )
1396 OSL_ENSURE(
false,
"Unexpected update attribute (!)");
1399 else if (pLegacyHint->m_pOld &&
RES_ATTRSET_CHG == pLegacyHint->m_pNew->Which())
1401 std::unique_ptr<SwHistoryHint> pNewHstr;
1431 sal_Int32
const nStart, sal_Int32
const nEnd,
SetAttrMode const nFlags,
1440 OSL_ENSURE(pTextNode,
"SwRegHistory not registered at text node?");
1449 const bool bInserted = pTextNode->
SetAttr(
rSet, nStart, nEnd, nFlags, ppNewTextAttr );
1467 sal_uInt16
const nWhich(pItem->Which());
1468 sal_uInt16
const nExpected(
1478 [nExpected](std::unique_ptr<SwHistoryHint>
const& pHint) ->
bool {
1479 SwHistoryResetText const*const pReset(
1480 dynamic_cast<SwHistoryResetText const*>(pHint.get()));
1481 return pReset && (pReset->GetWhich() == nExpected);
1494 pRegIn->Add(
this );
1516 pSet = pContentNode->GetpSwAttrSet();
1520 pSet = &pSwFormat->GetAttrSet();
1522 if( pSet && pSet->
Count() )
1527 sal_uInt16 nW = pItem->Which();
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual SwFieldType * InsertFieldType(const SwFieldType &)=0
virtual const SwRootFrame * GetCurrentLayout() const =0
Provides access to the marks of a document.
virtual sw::mark::IFieldmark * makeNoTextFieldBookmark(const SwPaM &rPaM, const OUString &rName, const OUString &rType)=0
virtual sw::mark::IFieldmark * makeFieldBookmark(const SwPaM &rPaM, const OUString &rName, const OUString &rType, SwPosition const *pSepPos=nullptr)=0
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
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.
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
Deletes a mark.
virtual void deleteFieldmarkAt(const SwPosition &rPos)=0
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
const SwModify * GetRegisteredIn() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
const SwTOXType * InsertTOXType(const SwTOXType &rTyp)
::sw::IShellCursorSupplier * GetIShellCursorSupplier()
sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const
Manage table of content types.
SwCharFormat * FindCharFormatByName(const OUString &rName) const
const SwCharFormats * GetCharFormats() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const SwTextFormatColls * GetTextFormatColls() const
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwGrfFormatColls * GetGrfFormatColls() const
const SwAttrPool & GetAttrPool() const
const SwTOXType * GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
Instances of SwFields and those derived from it occur 0 to n times.
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
void ChgDefinedIn(const sw::BroadcastingModify *pNew)
const bool m_bSaveOtherPos
SwHistoryBookmark(const ::sw::mark::IMark &rBkmk, bool bSavePos, bool bSaveOtherPos)
const SwNodeOffset m_nNode
OUString m_aHideCondition
const bool m_bHadOtherPos
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo
const sal_Int32 m_nOtherContent
virtual void SetInDoc(SwDoc *pDoc, bool) override
bool IsEqualBookmark(const ::sw::mark::IMark &rBkmk)
const SwNodeOffset m_nOtherNode
const IDocumentMarkAccess::MarkType m_eBkmkType
const sal_Int32 m_nContent
SwHistoryChangeCharFormat(SfxItemSet aSet, OUString sFormat)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const SfxItemSet m_OldSet
const sal_Int32 m_nOldContentIndex
sw::SpzFrameFormat & m_rFormat
const SwNodeOffset m_nOldNodeIndex
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
SwHistoryChangeFlyAnchor(sw::SpzFrameFormat &rFormat)
SwHistoryChangeFlyChain(SwFlyFrameFormat &rFormat, const SwFormatChain &rAttr)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
SwFlyFrameFormat *const m_pPrevFormat
SwFlyFrameFormat *const m_pFlyFormat
SwFlyFrameFormat *const m_pNextFormat
const SwNodeType m_nNodeType
const SwNodeOffset m_nNodeIndex
SwFormatColl *const m_pColl
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
SwHistoryChangeFormatColl(SwFormatColl *pColl, SwNodeOffset nNode, SwNodeType nNodeWhich)
const HISTORY_HINT m_eWhichId
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
virtual OUString GetDescription() const
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet)=0
History object containing all information used during undo / redo of checkbox and drop-down form fiel...
virtual void SetInDoc(SwDoc *pDoc, bool) override
void ResetInDoc(SwDoc &rDoc)
const SwNodeOffset m_nNode
SwHistoryNoTextFieldmark(const ::sw::mark::IFieldmark &rFieldMark)
const sal_Int32 m_nContent
const SwNodeOffset m_nNodeIndex
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const sal_uInt16 m_nWhich
SwHistoryResetFormat(const SfxPoolItem *pFormatHt, SwNodeOffset nNodeIdx)
SwHistoryResetText(sal_uInt16 nWhich, sal_Int32 nStt, sal_Int32 nEnd, SwNodeOffset nNode)
const SwNodeOffset m_nNodeIndex
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const SwNodeOffset m_nNodeIndex
std::vector< sal_uInt16 > m_ResetArray
SwHistorySetAttrSet(const SfxItemSet &rSet, SwNodeOffset nNode, const o3tl::sorted_vector< sal_uInt16 > &rSetArr)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const SwNodeOffset m_nNodeIndex
void dumpAsXml(xmlTextWriterPtr pWriter) const override
virtual ~SwHistorySetFormat() override
virtual OUString GetDescription() const override
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
std::unique_ptr< SfxPoolItem > m_pAttr
SwHistorySetFormat(const SfxPoolItem *pFormatHt, SwNodeOffset nNode)
SwHistorySetRefMark(const SwTextRefMark *pTextHt, SwNodeOffset nNode)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
const SwNodeOffset m_nNodeIndex
const TOXTypes m_eTOXTypes
bool IsEqual(const SwTOXMark &rCmp) const
static SwTOXType * GetSwTOXType(SwDoc &rDoc, TOXTypes eTOXTypes, const OUString &rTOXName)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
SwHistorySetTOXMark(const SwTextTOXMark *pTextHt, SwNodeOffset nNode)
const SwNodeOffset m_nNodeIndex
SwNodeOffset m_nNodeIndex
virtual ~SwHistorySetTextField() override
virtual OUString GetDescription() const override
const std::unique_ptr< SwFormatField > m_pField
std::unique_ptr< SwFieldType > m_pFieldType
! beware of the order for the declaration of the unique_ptrs.
SwHistorySetTextField(const SwTextField *pTextField, SwNodeOffset nNode)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
std::unique_ptr< SfxPoolItem > m_pAttr
const SwNodeOffset m_nNodeIndex
virtual ~SwHistorySetText() override
SwHistorySetText(SwTextAttr *pTextHt, SwNodeOffset nNode)
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
bool m_bFormatIgnoreStart
History object containing all information used during undo / redo of text form field insertion.
const sal_Int32 m_nStartContent
const sal_Int32 m_nEndContent
const SwNodeOffset m_nStartNode
virtual void SetInDoc(SwDoc *pDoc, bool) override
const SwNodeOffset m_nEndNode
SwHistoryTextFieldmark(const ::sw::mark::IFieldmark &rFieldMark)
void ResetInDoc(SwDoc &rDoc)
SwHistoryTextFlyCnt(SwFrameFormat *const pFlyFormat)
virtual ~SwHistoryTextFlyCnt() override
virtual void SetInDoc(SwDoc *pDoc, bool bTmpSet) override
void dumpAsXml(xmlTextWriterPtr pWriter) const override
std::unique_ptr< SwUndoDelLayFormat > m_pUndo
void CopyFormatAttr(const SfxItemSet &rSet, SwNodeOffset nNodeIdx)
void CopyAttr(SwpHints const *pHts, const SwNodeOffset nNodeIdx, const sal_Int32 nStart, const sal_Int32 nEnd, const bool bCopyFields)
void dumpAsXml(xmlTextWriterPtr pWriter) const
void AddDeleteFly(SwFrameFormat &, sal_uInt16 &rSetPos)
std::vector< std::unique_ptr< SwHistoryHint > > m_SwpHstry
sal_uInt16 SetTmpEnd(sal_uInt16 nTmpEnd)
void Add(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, SwNodeOffset nNodeIdx)
bool TmpRollback(SwDoc *pDoc, sal_uInt16 nStart, bool ToFirst=true)
void AddChangeFlyAnchor(sw::SpzFrameFormat &rFormat)
bool Rollback(SwDoc *pDoc, sal_uInt16 nStart=0)
Marks a node in the document model.
Base class of the Writer document model elements.
SwNodeOffset GetIndex() const
bool IsContentNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwContentNode * GetContentNode()
SwNodeType GetNodeType() const
PaM is Point and Mark: a selection of the document model.
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
SwRegHistory(SwHistory *pHst)
SwHistory *const m_pHistory
o3tl::sorted_vector< sal_uInt16 > m_WhichIdSet
SwNodeOffset m_nNodeIndex
bool InsertItems(const SfxItemSet &rSet, sal_Int32 const nStart, sal_Int32 const nEnd, SetAttrMode const nFlags, SwTextAttr **ppNewTextAttr)
void AddHint(SwTextAttr *pHt, const bool bNew)
void RegisterInModify(sw::BroadcastingModify *pRegIn, const SwNode &rNd)
Starts a section of nodes in the document model.
void RegisterToTOXType(SwTOXType &rMark)
const SwTOXType * GetTOXType() const
sal_uInt16 GetLevel() const
const OUString & GetAlternativeText() const
OUString const & GetSecondaryKey() const
OUString const & GetPrimaryKey() const
const OUString & GetTypeName() const
SwTableBox is one table cell in the document model.
SwFrameFormat * ClaimFrameFormat()
const SwTable & GetTable() const
SwTable is one table in the document model, containing rows (which contain cells).
void SwitchFormulasToExternalRepresentation()
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SfxPoolItem & GetAttr() const
void SetFormatIgnoreStart(bool bFlag)
sal_Int32 GetAnyEnd() const
end (if available), else start
virtual const sal_Int32 * GetEnd() const
end position
const SwFormatFootnote & GetFootnote() const
sal_Int32 GetStart() const
const SwFormatCharFormat & GetCharFormat() const
void SetFormatIgnoreEnd(bool bFlag)
SwTextNode & GetTextNode() const
Represents the style of a paragraph.
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)
SwpHints & GetOrCreateSwpHints()
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
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
SwpHints * GetpSwpHints()
bool InsertHint(SwTextAttr *const pAttr, const SetAttrMode nMode=SetAttrMode::DEFAULT)
Insert pAttr into hints array.
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...
bool IsAlive(typename std::remove_pointer< Value >::type const *const p) const
check that given format is still alive (i.e. contained here)
An SwTextAttr container, stores all directly formatted text portions for a text node.
void DeRegister()
deregister the currently registered History
SwTextAttr * Get(size_t nPos) const
void Register(SwRegHistory *pHist)
register a History, which receives all attribute changes (for Undo)
size_type count(const Value &v) const
std::pair< const_iterator, bool > insert(Value &&x)
The Undo actions need to create new Shell cursors.
virtual void Hide(bool hide)=0
virtual void SetHideCondition(const OUString &)=0
virtual void SetShortName(const OUString &)=0
virtual void SetKeyCode(const vcl::KeyCode &)=0
virtual const SwPosition & GetOtherMarkPos() const =0
virtual bool IsExpanded() const =0
virtual const SwPosition & GetMarkPos() const =0
struct _xmlTextWriter * xmlTextWriterPtr
virtual OUString GetName() const override
@ Database
For old documents the Field-Which IDs must be preserved !!!
static SwContentNode * GetContentNode(SwDoc &rDoc, SwPosition &rPos, bool bNext)
#define SwTextFootnote_GetIndex(pFIdx)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
bool isCHRATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(158)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(157)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(169)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(120)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_TXTATR_UNKNOWN_CONTAINER(54)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(170)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
SwPosition FindFieldSep(IFieldmark const &rMark)
return position of the CH_TXT_ATR_FIELDSEP for rMark
constexpr SwNodeOffset NODE_OFFSET_MAX(SAL_MAX_INT32)
bool IsDefaultItem(const SfxPoolItem *pItem)
bool IsInvalidItem(const SfxPoolItem *pItem)
Marks a position in the document model.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
OUString SwResId(TranslateId aId)
@ NOHINTADJUST
attention: NOHINTADJUST prevents MergePortions! when using this need to pay attention to ignore start...
constexpr sal_Int32 COMPLETE_STRING