LibreOffice Module sw (master) 1
|
#include <UndoAttribute.hxx>
Public Member Functions | |
SwUndoFormatAttr (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) |
Public Member Functions inherited from SwUndo | |
virtual void | UndoImpl (::sw::UndoRedoContext &)=0 |
virtual void | RedoImpl (::sw::UndoRedoContext &)=0 |
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 () |
Public Member Functions inherited from SfxUndoAction | |
SfxUndoAction () | |
virtual | ~SfxUndoAction () COVERITY_NOEXCEPT_FALSE |
virtual void | Undo () |
virtual void | UndoWithContext (SfxUndoContext &i_context) |
virtual void | Redo () |
virtual void | RedoWithContext (SfxUndoContext &i_context) |
virtual void | Repeat (SfxRepeatTarget &) |
virtual bool | CanRepeat (SfxRepeatTarget &) const |
virtual bool | Merge (SfxUndoAction *pNextAction) |
virtual OUString | GetComment () const |
virtual OUString | GetRepeatComment (SfxRepeatTarget &) const |
virtual ViewShellId | GetViewShellId () 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::optional< SfxItemSet > | m_oOldSet |
sal_Int32 | m_nAnchorContentOffset |
SwNodeOffset | m_nNodeIndex |
const sal_uInt16 | m_nFormatWhich |
const bool | m_bSaveDrawPt |
Friends | |
class | SwUndoDefaultAttr |
Additional Inherited Members | |
Static Public Member Functions inherited from SwUndo | |
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) |
virtual SwRewriter | GetRewriter () const |
Returns the rewriter for this object. More... | |
virtual void | RepeatImpl (::sw::RepeatContext &) |
Static Protected Member Functions inherited from SwUndo | |
static void | RemoveIdxFromSection (SwDoc &, SwNodeOffset nSttIdx, const SwNodeOffset *pEndIdx=nullptr) |
static void | RemoveIdxFromRange (SwPaM &rPam, bool bMoveNext) |
static void | RemoveIdxRel (SwNodeOffset, const SwPosition &) |
static bool | CanRedlineGroup (SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd) |
Protected Attributes inherited from SwUndo | |
bool | m_bCacheComment |
std::optional< OUString > | maComment |
Definition at line 85 of file UndoAttribute.hxx.
SwUndoFormatAttr::SwUndoFormatAttr | ( | SfxItemSet && | rOldSet, |
SwFormat & | rFormat, | ||
bool | bSaveDrawPt | ||
) |
Definition at line 116 of file unattr.cxx.
References GetName(), Init(), INSFMTATTR, and m_sFormatName.
SwUndoFormatAttr::SwUndoFormatAttr | ( | const SfxPoolItem & | rItem, |
SwFormat & | rFormat, | ||
bool | bSaveDrawPt | ||
) |
Definition at line 133 of file unattr.cxx.
References GetName(), Init(), INSFMTATTR, m_oOldSet, and m_sFormatName.
|
overridevirtual |
Definition at line 179 of file unattr.cxx.
Definition at line 241 of file unattr.cxx.
References SwNodes::Count(), SwDoc::FindCharFormatByName(), SwFormatsModifyBase< Value >::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 361 of file unattr.cxx.
References SwRewriter::AddRule(), m_sFormatName, and UndoArg1.
|
private |
Definition at line 149 of file unattr.cxx.
References sw::FrameFormats< value_type >::ContainsFormat(), SwIterator< TElementType, TSource, eMode >::First(), SwFormat::GetContent(), SwFormatContent::GetContentIdx(), SwFormat::GetDoc(), SwDoc::GetTableFrameFormats(), SwTable::GetTabSortBoxes(), m_bSaveDrawPt, m_nFormatWhich, m_nNodeIndex, m_oOldSet, RES_ANCHOR(), RES_CNTNT(), RES_FRMFMT(), and SaveFlyAnchor().
Referenced by SwUndoFormatAttr().
void SwUndoFormatAttr::PutAttr | ( | const SfxPoolItem & | rItem, |
const SwDoc & | rDoc | ||
) |
Definition at line 370 of file unattr.cxx.
References GetFormat(), m_bSaveDrawPt, m_oOldSet, RES_ANCHOR(), RES_CNTNT(), SaveFlyAnchor(), and SfxPoolItem::Which().
|
overridevirtual |
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 305 of file unattr.cxx.
References SfxItemSet::ClearItem(), SfxItemSet::Count(), SwFormat::GetAttrSet(), sw::RepeatContext::GetDoc(), SwNode::GetFlyFormat(), GetFormat(), SwContentNode::GetFormatColl(), SfxItemSet::GetItemState(), SwNode::GetNoTextNode(), SwPaM::GetPointNode(), sw::RepeatContext::GetRepeatPaM(), SwNode::GetTextNode(), m_nFormatWhich, m_oOldSet, RES_CNTNT(), RES_CONDTXTFMTCOLL(), RES_FLYFRMFMT(), RES_GRFFMTCOLL(), RES_TXTFMTCOLL(), and SwDoc::SetAttr().
|
private |
Definition at line 422 of file unattr.cxx.
References SwTextNode::DeleteAttributes(), SwFrameFormat::DelFrames(), SwFrameFormat::FindSdrObject(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorContentOffset(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), SwPosition::GetContentIndex(), IDocumentLayoutAccess::GetCurrentViewShell(), sw::UndoRedoContext::GetDoc(), SwTextAttr::GetFlyCnt(), GetFormat(), SwFormatFlyCnt::GetFrameFormat(), SvxSizeItem::GetHeight(), SwFormat::GetHoriOrient(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetNodes(), SwFormatAnchor::GetPageNum(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SdrObject::GetRelativePos(), SwStartNode::GetStartNodeType(), SwTextNode::GetText(), SwTextNode::GetTextAttrForCharAt(), SwNode::GetTextNode(), SwUndoFormatAttrHelper::GetUndo(), SwFormat::GetVertOrient(), SvxSizeItem::GetWidth(), SwTextNode::HasHints(), SwTextNode::InsertItem(), SwNode::IsStartNode(), SwNode::IsTextNode(), m_bSaveDrawPt, m_nAnchorContentOffset, m_nNodeIndex, m_oOldSet, SwFrameFormat::MakeFrames(), sw::POST_RESTORE_FLY_ANCHOR, RES_ANCHOR(), RES_DRAWFRMFMT(), RES_FRM_SIZE(), RES_TXTATR_FLYCNT(), SwFormatAnchor::SetAnchor(), SwPosition::SetContent(), SwFormat::SetFormatAttr(), SwFormatAnchor::SetPageNum(), sw::UndoRedoContext::SetSelections(), Point::setX(), Point::setY(), SwFlyStartNode, Variable, SwFormat::Which(), SwTextAttr::Which(), Point::X(), and Point::Y().
Referenced by UndoImpl().
|
private |
Definition at line 384 of file unattr.cxx.
References SwFormatAnchor::GetAnchorContentOffset(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), SwNode::GetIndex(), m_nAnchorContentOffset, m_nNodeIndex, m_oOldSet, RES_ANCHOR(), RES_DRAWFRMFMT(), Variable, SwFormat::Which(), Point::X(), and Point::Y().
Referenced by Init(), PutAttr(), and UndoImpl().
|
overridevirtual |
Implements SwUndo.
Definition at line 183 of file unattr.cxx.
References SwDoc::BroadcastStyleOperation(), sw::UndoRedoContext::GetDoc(), GetFormat(), SwFormat::GetName(), SwUndoFormatAttrHelper::GetUndo(), m_bSaveDrawPt, m_nFormatWhich, m_oOldSet, RES_ANCHOR(), RES_CHRFMT(), RES_CONDTXTFMTCOLL(), RES_DRAWFRMFMT(), RES_FLYFRMFMT(), RES_TXTFMTCOLL(), RestoreFlyAnchor(), SaveFlyAnchor(), SwFormat::SetFormatAttr(), and sw::UndoRedoContext::SetSelections().
Referenced by RedoImpl().
|
friend |
Definition at line 87 of file UndoAttribute.hxx.
|
private |
Definition at line 93 of file UndoAttribute.hxx.
Referenced by Init(), PutAttr(), RestoreFlyAnchor(), and UndoImpl().
|
private |
Definition at line 90 of file UndoAttribute.hxx.
Referenced by RestoreFlyAnchor(), and SaveFlyAnchor().
|
private |
Definition at line 92 of file UndoAttribute.hxx.
Referenced by GetFormat(), Init(), RepeatImpl(), and UndoImpl().
|
private |
Definition at line 91 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(), UndoImpl(), and SwUndoDefaultAttr::UndoImpl().
|
private |
Definition at line 88 of file UndoAttribute.hxx.
Referenced by GetFormat(), GetRewriter(), and SwUndoFormatAttr().