diff options
author | Michael Stahl <mst@openoffice.org> | 2010-12-15 09:14:17 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-12-15 09:14:17 +0100 |
commit | 50c0114c660ac8c3024dacd7332fbf060178ecae (patch) | |
tree | 1f612b0ad7ac3457d0398307b8fbdc606dc3fa36 /sw/source/core/inc/UndoCore.hxx | |
parent | f1946b72a928100d0ab8eabb2924a879bca61b3a (diff) |
undoapi: UndoCore.hxx: split out UndoInsert.hxx
Diffstat (limited to 'sw/source/core/inc/UndoCore.hxx')
-rw-r--r-- | sw/source/core/inc/UndoCore.hxx | 193 |
1 files changed, 0 insertions, 193 deletions
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx index 37dc8581ef65..e1ccb23b3925 100644 --- a/sw/source/core/inc/UndoCore.hxx +++ b/sw/source/core/inc/UndoCore.hxx @@ -34,8 +34,6 @@ #include <tools/mempool.hxx> -#include <swtypes.hxx> -#include <IDocumentContentOperations.hxx> #include <calbck.hxx> @@ -45,13 +43,10 @@ class SwTxtNode; class SwSectionData; class SwSectionFmt; class SwTOXBase; -class Graphic; -class SwGrfNode; class SwFmtAnchor; class SdrMarkList; class SwUndoDelete; class SwRedlineSaveData; -class SwUndoFmtAttr; namespace sfx2 { class MetadatableUndo; @@ -132,57 +127,6 @@ private: -class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt -{ - SwPosition *pPos; // Inhalt fuers Redo - String *pTxt, *pUndoTxt; - SwRedlineData* pRedlData; - ULONG nNode; - xub_StrLen nCntnt, nLen; - BOOL bIsWordDelim : 1; - BOOL bIsAppend : 1; - - const IDocumentContentOperations::InsertFlags m_nInsertFlags; - - friend class SwDoc; // eigentlich nur SwDoc::Insert( String ) - BOOL CanGrouping( sal_Unicode cIns ); - BOOL CanGrouping( const SwPosition& rPos ); - - SwDoc * pDoc; - - void Init(const SwNodeIndex & rNode); - String * GetTxtFromDoc() const; - -public: - SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen, - const IDocumentContentOperations::InsertFlags nInsertFlags, - BOOL bWDelim = TRUE ); - SwUndoInsert( const SwNodeIndex& rNode ); - virtual ~SwUndoInsert(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - virtual void RepeatImpl( ::sw::RepeatContext & ); - - // #111827# - /** - Returns rewriter for this undo object. - - The returned rewriter has the following rule: - - $1 -> '<inserted text>' - - <inserted text> is shortened to a length of nUndoStringLength. - - @return rewriter for this undo object - */ - virtual SwRewriter GetRewriter() const; - - - DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert) -}; - - class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt { SwNodeIndex* pMvStt; // Position der Nodes im UndoNodes-Array @@ -385,53 +329,6 @@ public: virtual SwRewriter GetRewriter() const; }; -//-------------------------------------------------------------------- - -SwRewriter SW_DLLPRIVATE -MakeUndoReplaceRewriter(ULONG const ocurrences, - ::rtl::OUString const& sOld, ::rtl::OUString const& sNew); - -class SwUndoReplace - : public SwUndo -{ -public: - SwUndoReplace(SwPaM const& rPam, - ::rtl::OUString const& rInsert, bool const bRegExp); - - virtual ~SwUndoReplace(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - - // #111827# - /** - Returns the rewriter of this undo object. - - If this undo object represents several replacements the - rewriter contains the following rules: - - $1 -> <number of replacements> - $2 -> occurrences of - $3 -> <replaced text> - - If this undo object represents one replacement the rewriter - contains these rules: - - $1 -> <replaced text> - $2 -> "->" (STR_YIELDS) - $3 -> <replacing text> - - @return the rewriter of this undo object - */ - virtual SwRewriter GetRewriter() const; - - void SetEnd( const SwPaM& rPam ); - -private: - struct Impl; - ::std::auto_ptr<Impl> m_pImpl; -}; - //------------ Undo von Insert-/Delete-Sections ---------------------- @@ -483,96 +380,6 @@ public: virtual void RepeatImpl( ::sw::RepeatContext & ); }; -//-------------------------------------------------------------------- - -class SwUndoReRead : public SwUndo -{ - Graphic *pGrf; - String *pNm, *pFltr; - ULONG nPos; - USHORT nMirr; - - void SaveGraphicData( const SwGrfNode& ); - void SetAndSave( ::sw::UndoRedoContext & ); - -public: - SwUndoReRead( const SwPaM& rPam, const SwGrfNode& pGrfNd ); - - virtual ~SwUndoReRead(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); -}; - -//-------------------------------------------------------------------- - -class SwUndoInsertLabel : public SwUndo -{ - union { - struct { - // fuer NoTxtFrms - SwUndoInsLayFmt* pUndoFly; - SwUndoFmtAttr* pUndoAttr; - } OBJECT; - struct { - // fuer Tabelle/TextRahmen - SwUndoDelete* pUndoInsNd; - ULONG nNode; - } NODE; - }; - - String sText; - // --> PB 2005-01-06 #i39983# the separator is drawn with a character style - String sSeparator; - // <-- - String sNumberSeparator; - String sCharacterStyle; - // OD 2004-04-15 #i26791# - re-store of drawing object position no longer needed - USHORT nFldId; - SwLabelType eType; - BYTE nLayerId; // fuer Zeichen-Objekte - BOOL bBefore :1; - BOOL bUndoKeep :1; - BOOL bCpyBrd :1; - -public: - SwUndoInsertLabel( const SwLabelType eTyp, const String &rText, - // --> PB 2005-01-06 #i39983# the separator is drawn with a character style - const String& rSeparator, - // <-- - const String& rNumberSeparator, //#i61007# order of captions - const BOOL bBefore, const USHORT nId, - const String& rCharacterStyle, - const BOOL bCpyBrd ); - virtual ~SwUndoInsertLabel(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - virtual void RepeatImpl( ::sw::RepeatContext & ); - - // #111827# - /** - Returns the rewriter of this undo object. - - The rewriter contains this rule: - - $1 -> '<text of inserted label>' - - <text of inserted label> is shortened to nUndoStringLength - characters. - - @return the rewriter of this undo object - */ - virtual SwRewriter GetRewriter() const; - - void SetNodePos( ULONG nNd ) - { if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; } - - void SetUndoKeep() { bUndoKeep = TRUE; } - void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly ); - void SetDrawObj( BYTE nLayerId ); -}; - //-------------------------------------------------------------------- |