26#include <osl/diagnose.h>
31 EPaM aEPaM( nPara, 0 );
62 OSL_FAIL(
"Undo in engine is not possible without a View! ");
77 aNewSel.
Min() = aNewSel.
Max();
98 OSL_FAIL(
"Redo in Engine without View not possible!" );
113 aNewSel.
Min() = aNewSel.
Max();
122 nId(nI), mnViewShellId(-1), mpEditEngine(pEE)
165 pContentNode(pNode) {}
216 EditEngine* pEE, sal_Int32 nN, sal_uInt16 nSP,
222 aLeftParaAttribs(
std::move(_aLeftParaAttribs)),
223 aRightParaAttribs(
std::move(_aRightParaAttribs)),
286 EditEngine* pEE, sal_Int32 nN, sal_uInt16 nSP) :
288 nNode(nN), nSepPos(nSP) {}
352 aEPaM(rEPaM), aText(
std::move(
aStr)) {}
378 pFeature(rFeature.
Clone())
424 aTmpRange.
Min() += nDiff;
425 aTmpRange.
Max() += nDiff;
430 aTmpRange.
Min() -= nLen;
431 aTmpRange.
Max() -= nLen;
434 nTmpDest += aTmpRange.
Len();
452 aPrevName(
std::move(_aPrevName)),
453 aNewName(
std::move(_aNewName)),
454 ePrevFamily(ePrevFam),
456 aPrevParaAttribs(
std::move(_aPrevParaAttribs))
483 aPrevItems(
std::move(_aPrevItems)),
484 aNewItems(
std::move(_aNewItems)) {}
505 aNewAttribs(
std::move(aNewItems)),
507 m_bSetSelection(true),
512 bRemoveParaAttribs(false),
519struct RemoveAttribsFromPool
523 explicit RemoveAttribsFromPool(
SfxItemPool& rPool) : mrPool(rPool) {}
524 void operator() (std::unique_ptr<ContentAttribsInfo>
const & rInfo)
526 rInfo->RemoveAllCharAttribsFromPool(mrPool);
543 bool bFields =
false;
592 aPrevAttribs.push_back(std::unique_ptr<ContentAttribsInfo>(pNew));
604 aOldESel(rESel), nMode(nM) {}
622 aDelSel.
Max() = aSel.
Min();
void DeleteEmptyAttribs(SfxItemPool &rItemPool)
const SfxItemSet & GetPrevParaAttribs() const
const CharAttribsType & GetPrevCharAttribs() const
CharAttribList & GetCharAttribs()
const SfxPoolItem * GetItem() const
void InsertAttrib(const SfxPoolItem &rItem, ContentNode *pNode, sal_Int32 nStart, sal_Int32 nEnd)
SfxItemPool & GetItemPool()
const ContentNode * GetObject(sal_Int32 nPos) const
void Release(sal_Int32 nPos)
does not delete
ViewsType & GetEditViews()
void RemoveParaPortion(sal_Int32 nNode)
EditSelection MoveParagraphs(const Range &rParagraphs, sal_Int32 nNewPos)
virtual OUString GetUndoComment(sal_uInt16 nUndoId) const
EditPaM DeleteSelection(const EditSelection &rSel)
void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich=0, bool bRemoveFeatures=false)
EditPaM DeleteSelected(const EditSelection &rSel)
virtual void ParagraphDeleted(sal_Int32 nDeletedParagraph)
void SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet &rSet)
EditPaM ConnectContents(sal_Int32 nLeftNode, bool bBackward)
void AppendDeletedNodeInfo(DeletedNodeInfo *pInfo)
EditSelection CreateSelection(const ESelection &rSel)
EditView * GetActiveView() const
EditSelection InsertText(css::uno::Reference< css::datatransfer::XTransferable > const &rxDataObj, const OUString &rBaseURL, const EditPaM &rPaM, bool bUseSpecial)
void SetStyleSheet(const EditSelection &aSel, SfxStyleSheet *pStyle)
void InsertContent(ContentNode *pNode, sal_Int32 nPos)
void InsertFeature(const EditSelection &rEditSelection, const SfxPoolItem &rItem)
EditPaM CreateEditPaM(const EPaM &rEPaM)
bool IsUpdateLayout() const
virtual void ParagraphInserted(sal_Int32 nNewParagraph)
bool IsCallParaInsertedOrDeleted() const
EditPaM SplitContent(sal_Int32 nNode, sal_Int32 nSepPos)
void FormatAndLayout(EditView *pCurView, bool bCalledFromUndo=false)
EditPaM InsertParaBreak(const EditSelection &rEditSelection)
void SetCallParaInsertedOrDeleted(bool b)
void SetAttribs(const EditSelection &rSel, const SfxItemSet &rSet, SetAttribsMode nSpecial=SetAttribsMode::NONE)
void TransliterateText(const ESelection &rSelection, TransliterationFlags nTransliterationMode)
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet)
void SetActiveView(EditView *pView)
void SetIndex(sal_Int32 n)
void SetNode(ContentNode *p)
const ContentNode * GetNode() const
sal_Int32 GetIndex() const
bool DbgIsBuggy(EditDoc const &rDoc) const
EditUndoConnectParas(EditEngine *pEE, sal_Int32 nNode, sal_uInt16 nSepPos, SfxItemSet aLeftParaAttribs, SfxItemSet aRightParaAttribs, const SfxStyleSheet *pLeftStyle, const SfxStyleSheet *pRightStyle, bool bBackward)
SfxStyleFamily eLeftStyleFamily
SfxItemSet aRightParaAttribs
virtual void Redo() override
virtual ~EditUndoConnectParas() override
virtual void Undo() override
SfxStyleFamily eRightStyleFamily
SfxItemSet aLeftParaAttribs
EditUndoDelContent(EditEngine *pEE, ContentNode *pNode, sal_Int32 nPortion)
ContentNode * pContentNode
virtual ~EditUndoDelContent() override
virtual void Redo() override
virtual void Undo() override
virtual void Redo() override
virtual void Undo() override
EditUndoInsertChars(EditEngine *pEE, const EPaM &rEPaM, OUString aStr)
virtual bool Merge(SfxUndoAction *pNextAction) override
std::unique_ptr< SfxPoolItem > pFeature
virtual ~EditUndoInsertFeature() override
EditUndoInsertFeature(EditEngine *pEE, const EPaM &rEPaM, const SfxPoolItem &rFeature)
virtual void Redo() override
virtual void Undo() override
EditEngine * mpEditEngine
EditUndoManager(sal_uInt16 nMaxUndoActionCount=20)
virtual bool Redo() override
void SetEditEngine(EditEngine *pNew)
virtual bool Undo() override
EditUndoMarkSelection(EditEngine *pEE, const ESelection &rSel)
virtual void Redo() override
virtual ~EditUndoMarkSelection() override
virtual void Undo() override
virtual void Undo() override
EditUndoMoveParagraphs(EditEngine *pEE, const Range &rParas, sal_Int32 nDest)
virtual void Redo() override
virtual ~EditUndoMoveParagraphs() override
EditUndoRemoveChars(EditEngine *pEE, const EPaM &rEPaM, OUString aStr)
virtual void Redo() override
virtual void Undo() override
InfoArrayType aPrevAttribs
void AppendContentInfo(ContentAttribsInfo *pNew)
EditUndoSetAttribs(EditEngine *pEE, const ESelection &rESel, SfxItemSet aNewItems)
virtual void Undo() override
bool m_bSetSelection
Once the attributes are set / unset, set the selection to the end of the formatted range?
virtual ~EditUndoSetAttribs() override
virtual void Redo() override
virtual void Redo() override
virtual ~EditUndoSetParaAttribs() override
EditUndoSetParaAttribs(EditEngine *pEE, sal_Int32 nPara, SfxItemSet aPrevItems, SfxItemSet aNewItems)
virtual void Undo() override
EditUndoSetStyleSheet(EditEngine *pEE, sal_Int32 nPara, OUString aPrevName, SfxStyleFamily ePrevFamily, OUString aNewName, SfxStyleFamily eNewFamily, SfxItemSet aPrevParaAttribs)
virtual void Undo() override
SfxStyleFamily ePrevFamily
SfxItemSet aPrevParaAttribs
virtual void Redo() override
virtual ~EditUndoSetStyleSheet() override
SfxStyleFamily eNewFamily
virtual void Redo() override
virtual ~EditUndoSplitPara() override
virtual void Undo() override
EditUndoSplitPara(EditEngine *pEE, sal_Int32 nNode, sal_uInt16 nSepPos)
virtual void Undo() override
virtual void Redo() override
EditUndoTransliteration(EditEngine *pEE, const ESelection &rESel, TransliterationFlags nMode)
virtual ~EditUndoTransliteration() override
TransliterationFlags nMode
std::unique_ptr< EditTextObject > pTxtObj
virtual OUString GetComment() const override
virtual ~EditUndo() override
ViewShellId GetViewShellId() const override
See SfxUndoAction::GetViewShellId().
EditEngine * mpEditEngine
virtual bool CanRepeat(SfxRepeatTarget &) const override
EditEngine * GetEditEngine()
ViewShellId mnViewShellId
EditUndo(sal_uInt16 nI, EditEngine *pEE)
ImpEditView * GetImpEditView() const
void SetSelection(const ESelection &rNewSel)
ImpEditEngine * GetImpEditEngine() const
EditPaM CreateEditPaM(const EPaM &rEPaM)
const OutlinerViewShell * GetViewShell() const
const EditSelection & GetEditSelection() const
void SetEditSelection(const EditSelection &rEditSelection)
Interface class to not depend on SfxViewShell in editeng.
virtual ViewShellId GetViewShellId() const =0
SfxItemPool * GetPool() const
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual size_t GetRedoActionCount(bool const i_currentLevel=CurrentLevel) const
virtual size_t GetUndoActionCount(bool const i_currentLevel=CurrentLevel) const
#define DBG_ASSERT(sCon, aError)
#define EDITUNDO_PARAATTRIBS
#define EDITUNDO_INSERTFEATURE
#define EDITUNDO_MOVEPARAGRAPHS
#define EDITUNDO_DELCONTENT
#define EDITUNDO_INSERTCHARS
#define EDITUNDO_MARKSELECTION
#define EDITUNDO_REMOVECHARS
#define EDITUNDO_SPLITPARA
#define EDITUNDO_STYLESHEET
#define EDITUNDO_TRANSLITERATE
#define EDITUNDO_CONNECTPARAS
static void lcl_DoSetSelection(EditView const *pView, sal_uInt16 nPara)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
SW_DLLPUBLIC SwView * GetActiveView()