2001-09-26 02:53:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-01-06 23:30:13 +03:00
|
|
|
|
|
|
|
#ifndef EditTxn_h__
|
|
|
|
#define EditTxn_h__
|
|
|
|
|
2012-07-13 10:33:42 +04:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsISupportsImpl.h"
|
1999-01-06 23:30:13 +03:00
|
|
|
#include "nsITransaction.h"
|
2001-03-09 17:23:59 +03:00
|
|
|
#include "nsPIEditorTransaction.h"
|
2012-07-13 10:33:42 +04:00
|
|
|
#include "nscore.h"
|
1999-01-09 03:24:48 +03:00
|
|
|
|
1999-01-06 23:30:13 +03:00
|
|
|
/**
|
2007-01-11 17:38:02 +03:00
|
|
|
* Base class for all document editing transactions.
|
1999-01-06 23:30:13 +03:00
|
|
|
*/
|
2007-01-11 17:38:02 +03:00
|
|
|
class EditTxn : public nsITransaction,
|
|
|
|
public nsPIEditorTransaction
|
1999-01-06 23:30:13 +03:00
|
|
|
{
|
|
|
|
public:
|
2009-05-09 08:59:25 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(EditTxn, nsITransaction)
|
1999-01-06 23:30:13 +03:00
|
|
|
|
2013-07-09 21:30:58 +04:00
|
|
|
virtual void LastRelease() {}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD RedoTransaction(void) override;
|
|
|
|
NS_IMETHOD GetIsTransient(bool *aIsTransient) override;
|
|
|
|
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge) override;
|
2014-06-24 02:40:02 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~EditTxn();
|
2007-01-11 17:38:02 +03:00
|
|
|
};
|
1999-01-06 23:30:13 +03:00
|
|
|
|
2007-01-11 17:38:02 +03:00
|
|
|
#define NS_DECL_EDITTXN \
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD DoTransaction() override; \
|
|
|
|
NS_IMETHOD UndoTransaction() override; \
|
|
|
|
NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription) override;
|
1999-01-06 23:30:13 +03:00
|
|
|
|
1999-02-18 15:14:59 +03:00
|
|
|
#endif
|