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
|
|
|
|
2016-07-08 08:03:31 +03:00
|
|
|
#ifndef mozilla_EditTransactionBase_h
|
|
|
|
#define mozilla_EditTransactionBase_h
|
1999-01-06 23:30:13 +03:00
|
|
|
|
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
|
|
|
|
2016-07-08 03:48:34 +03:00
|
|
|
namespace mozilla {
|
|
|
|
|
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
|
|
|
*/
|
2016-07-08 03:48:34 +03:00
|
|
|
class EditTransactionBase : 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
|
2016-07-08 03:48:34 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(EditTransactionBase, 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;
|
2016-07-08 03:48:34 +03:00
|
|
|
NS_IMETHOD GetIsTransient(bool* aIsTransient) override;
|
|
|
|
NS_IMETHOD Merge(nsITransaction* aTransaction, bool* aDidMerge) override;
|
2014-06-24 02:40:02 +04:00
|
|
|
|
|
|
|
protected:
|
2016-07-08 03:48:34 +03:00
|
|
|
virtual ~EditTransactionBase();
|
2007-01-11 17:38:02 +03:00
|
|
|
};
|
1999-01-06 23:30:13 +03:00
|
|
|
|
2016-07-08 03:48:34 +03:00
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#define NS_DECL_EDITTRANSACTIONBASE \
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD DoTransaction() override; \
|
|
|
|
NS_IMETHOD UndoTransaction() override; \
|
2016-07-08 03:48:34 +03:00
|
|
|
NS_IMETHOD GetTxnDescription(nsAString& aTransactionDescription) override;
|
1999-01-06 23:30:13 +03:00
|
|
|
|
2016-07-08 08:03:31 +03:00
|
|
|
#endif // #ifndef mozilla_EditTransactionBase_h
|