LibreOffice Module sw (master)
1
|
#include <UndoAttribute.hxx>
Public Member Functions | |
SwUndoFormatAttr (const SfxItemSet &rOldSet, SwFormat &rFormat, bool bSaveDrawPt) | |
SwUndoFormatAttr (const SfxPoolItem &rItem, SwFormat &rFormat, bool bSaveDrawPt) | |
virtual | ~SwUndoFormatAttr () override |
virtual void | UndoImpl (::sw::UndoRedoContext &) override |
virtual void | RedoImpl (::sw::UndoRedoContext &) override |
virtual void | RepeatImpl (::sw::RepeatContext &) override |
virtual SwRewriter | GetRewriter () const override |
Returns the rewriter for this object. More... | |
void | PutAttr (const SfxPoolItem &rItem, const SwDoc &rDoc) |
SwFormat * | GetFormat (const SwDoc &rDoc) |
![]() | |
SwUndo (SwUndoId const nId, const SwDoc *pDoc) | |
virtual | ~SwUndo () override |
SwUndoId | GetId () const |
virtual OUString | GetComment () const override |
Returns textual comment for this undo object. More... | |
ViewShellId | GetViewShellId () const override |
See SfxUndoAction::GetViewShellId(). More... | |
RedlineFlags | GetRedlineFlags () const |
void | SetRedlineFlags (RedlineFlags eMode) |
bool | IsDelBox () const |
void | IgnoreRepeat () |
![]() | |
SfxUndoAction () | |
virtual | ~SfxUndoAction () COVERITY_NOEXCEPT_FALSE |
virtual bool | Merge (SfxUndoAction *pNextAction) |
virtual OUString | GetRepeatComment (SfxRepeatTarget &) const |
const DateTime & | GetDateTime () const |
virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const |
Private Member Functions | |
void | SaveFlyAnchor (const SwFormat *pFormat, bool bSaveDrawPt=false) |
bool | RestoreFlyAnchor (::sw::UndoRedoContext &rContext) |
void | Init (const SwFormat &rFormat) |
Private Attributes | |
OUString | m_sFormatName |
std::unique_ptr< SfxItemSet > | m_pOldSet |
sal_uLong | m_nNodeIndex |
const sal_uInt16 | m_nFormatWhich |
const bool | m_bSaveDrawPt |
Friends | |
class | SwUndoDefaultAttr |
Additional Inherited Members | |
![]() | |
static bool | FillSaveData (const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true) |
static bool | FillSaveDataForFormat (const SwPaM &, SwRedlineSaveDatas &) |
static void | SetSaveData (SwDoc &rDoc, SwRedlineSaveDatas &rSData) |
static bool | HasHiddenRedlines (const SwRedlineSaveDatas &rSData) |
![]() | |
static void | RemoveIdxFromSection (SwDoc &, sal_uLong nSttIdx, const sal_uLong *pEndIdx=nullptr) |
static void | RemoveIdxFromRange (SwPaM &rPam, bool bMoveNext) |
static void | RemoveIdxRel (sal_uLong, const SwPosition &) |
static bool | CanRedlineGroup (SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd) |
![]() | |
bool | m_bCacheComment |
std::optional< OUString > | maComment |
Definition at line 85 of file UndoAttribute.hxx.
SwUndoFormatAttr::SwUndoFormatAttr | ( | const SfxItemSet & | rOldSet, |
SwFormat & | rFormat, | ||
bool | bSaveDrawPt | ||
) |
Definition at line 92 of file unattr.cxx.
References assert(), Init(), INSFMTATTR, and m_sFormatName.
SwUndoFormatAttr::SwUndoFormatAttr | ( | const SfxPoolItem & | rItem, |
SwFormat & | rFormat, | ||
bool | bSaveDrawPt | ||
) |
Definition at line 108 of file unattr.cxx.
References assert(), Clone(), Init(), INSFMTATTR, m_pOldSet, and m_sFormatName.
|
overridevirtual |
Definition at line 151 of file unattr.cxx.
Definition at line 201 of file unattr.cxx.
References SwNodes::Count(), SwDoc::FindCharFormatByName(), SwDoc::FindFormatByName(), SwNode::FindTableNode(), SwDoc::FindTextFormatCollByName(), SwTableBox::GetFrameFormat(), SwDoc::GetFrameFormats(), SwDoc::GetGrfFormatColls(), SwDoc::GetNodes(), SwDoc::GetSpzFrameFormats(), SwTableNode::GetTable(), SwTable::GetTableBox(), SwNode::IsSectionNode(), SwNode::IsStartNode(), SwNode::IsTableNode(), m_nFormatWhich, m_nNodeIndex, m_sFormatName, RES_CHRFMT(), RES_CONDTXTFMTCOLL(), RES_DRAWFRMFMT(), RES_FLYFRMFMT(), RES_FRMFMT(), RES_GRFFMTCOLL(), RES_TXTFMTCOLL(), and SwTableBoxStartNode.
Referenced by PutAttr(), RepeatImpl(), RestoreFlyAnchor(), and UndoImpl().
|
overridevirtual |
Returns the rewriter for this object.
Reimplemented from SwUndo.
Definition at line 321 of file unattr.cxx.
References SwRewriter::AddRule(), m_sFormatName, and UndoArg1.
Definition at line 123 of file unattr.cxx.
References SwFrameFormats::ContainsFormat(), SwFormatsModifyBase< Value >::ContainsFormat(), First, SwFormat::GetContent(), SwFormatContent::GetContentIdx(), SwFormat::GetDoc(), SwNodeIndex::GetIndex(), SwDoc::GetSections(), SwTableBox::GetSttIdx(), SwDoc::GetTableFrameFormats(), SwTable::GetTabSortBoxes(), m_bSaveDrawPt, m_nFormatWhich, m_nNodeIndex, m_pOldSet, RES_ANCHOR(), RES_CNTNT(), RES_FRMFMT(), and SaveFlyAnchor().
Referenced by SwUndoFormatAttr().
void SwUndoFormatAttr::PutAttr | ( | const SfxPoolItem & | rItem, |
const SwDoc & | rDoc | ||
) |
Definition at line 330 of file unattr.cxx.
References GetFormat(), m_bSaveDrawPt, m_pOldSet, RES_ANCHOR(), RES_CNTNT(), SaveFlyAnchor(), and SfxPoolItem::Which().
|
overridevirtual |
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 265 of file unattr.cxx.
References sw::RepeatContext::GetDoc(), SwNode::GetFlyFormat(), GetFormat(), SwContentNode::GetFormatColl(), SwPaM::GetNode(), SwNode::GetNoTextNode(), sw::RepeatContext::GetRepeatPaM(), SwNode::GetTextNode(), m_nFormatWhich, m_pOldSet, RES_CNTNT(), RES_CONDTXTFMTCOLL(), RES_FLYFRMFMT(), RES_GRFFMTCOLL(), RES_TXTFMTCOLL(), SwTextNode::SetAttr(), and SwContentNode::SetAttr().
|
private |
Definition at line 383 of file unattr.cxx.
References assert(), SwIndex::Assign(), sw::BroadcastingModify::CallSwClientNotify(), SwTextNode::DeleteAttributes(), SwFrameFormat::DelFrames(), SwFrameFormat::FindSdrObject(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), IDocumentLayoutAccess::GetCurrentViewShell(), sw::UndoRedoContext::GetDoc(), SwTextAttr::GetFlyCnt(), GetFormat(), SwFormatFlyCnt::GetFrameFormat(), SvxSizeItem::GetHeight(), SwDoc::getIDocumentLayoutAccess(), SwIndex::GetIndex(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwFormatAnchor::GetPageNum(), SdrObject::GetRelativePos(), SwTextNode::GetText(), SwTextNode::GetTextAttrForCharAt(), SwNode::GetTextNode(), SwUndoFormatAttrHelper::GetUndo(), SvxSizeItem::GetWidth(), SwTextNode::HasHints(), SwTextNode::InsertItem(), SwNode::IsStartNode(), SwNode::IsTextNode(), m_bSaveDrawPt, m_nNodeIndex, m_pOldSet, SwFrameFormat::MakeFrames(), SwPosition::nContent, SwPosition::nNode, Point, sw::POST_RESTORE_FLY_ANCHOR, RES_ANCHOR(), RES_DRAWFRMFMT(), RES_FRM_SIZE(), RES_TXTATR_FLYCNT(), SwFormat::SetFormatAttr(), sw::UndoRedoContext::SetSelections(), SwFlyStartNode, Variable, SwFormat::Which(), and SwTextAttr::Which().
Referenced by UndoImpl().
Definition at line 344 of file unattr.cxx.
References SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), SwIndex::GetIndex(), SwNodeIndex::GetIndex(), m_nNodeIndex, m_pOldSet, SwPosition::nContent, SwPosition::nNode, Point, RES_ANCHOR(), RES_DRAWFRMFMT(), Variable, and SwFormat::Which().
Referenced by Init(), PutAttr(), and UndoImpl().
|
overridevirtual |
Implements SwUndo.
Definition at line 155 of file unattr.cxx.
References sw::UndoRedoContext::GetDoc(), GetFormat(), SwUndoFormatAttrHelper::GetUndo(), m_bSaveDrawPt, m_nFormatWhich, m_pOldSet, RES_ANCHOR(), RES_DRAWFRMFMT(), RES_FLYFRMFMT(), RestoreFlyAnchor(), SaveFlyAnchor(), SwFormat::SetFormatAttr(), and sw::UndoRedoContext::SetSelections().
Referenced by RedoImpl().
|
friend |
Definition at line 87 of file UndoAttribute.hxx.
|
private |
Definition at line 92 of file UndoAttribute.hxx.
Referenced by Init(), PutAttr(), RestoreFlyAnchor(), and UndoImpl().
|
private |
Definition at line 91 of file UndoAttribute.hxx.
Referenced by GetFormat(), Init(), RepeatImpl(), and UndoImpl().
|
private |
Definition at line 90 of file UndoAttribute.hxx.
Referenced by GetFormat(), Init(), RestoreFlyAnchor(), and SaveFlyAnchor().
|
private |
Definition at line 89 of file UndoAttribute.hxx.
Referenced by Init(), PutAttr(), RepeatImpl(), RestoreFlyAnchor(), SaveFlyAnchor(), SwUndoFormatAttr(), and UndoImpl().
|
private |
Definition at line 88 of file UndoAttribute.hxx.
Referenced by GetFormat(), GetRewriter(), and SwUndoFormatAttr().