зеркало из https://github.com/mozilla/gecko-dev.git
Fixed mismatched declarations/implementations
This commit is contained in:
Родитель
8c24b0a7f5
Коммит
27e9ab27a5
|
@ -47,12 +47,12 @@ public:
|
|||
/**
|
||||
* Executes the transaction.
|
||||
*/
|
||||
virtual nsresult Do(void) = 0;
|
||||
NS_IMETHOD Do(void) = 0;
|
||||
|
||||
/**
|
||||
* Restores the state to what it was before the transaction was executed.
|
||||
*/
|
||||
virtual nsresult Undo(void) = 0;
|
||||
NS_IMETHOD Undo(void) = 0;
|
||||
|
||||
/**
|
||||
* Executes the transaction again. Can only be called on a transaction that
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
* In most cases, the Redo() method will actually call the Do() method to
|
||||
* execute the transaction again.
|
||||
*/
|
||||
virtual nsresult Redo(void) = 0;
|
||||
NS_IMETHOD Redo(void) = 0;
|
||||
|
||||
/**
|
||||
* Retrieves the transaction's transient state. This method is called by
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
* manager.
|
||||
* @param aIsTransient will contain the transaction's transient state.
|
||||
*/
|
||||
virtual nsresult GetIsTransient(PRBool *aIsTransient) = 0;
|
||||
NS_IMETHOD GetIsTransient(PRBool *aIsTransient) = 0;
|
||||
|
||||
/**
|
||||
* Attempts to merge a transaction into "this" transaction. Both transactions
|
||||
|
@ -88,25 +88,25 @@ public:
|
|||
* pushing it on the undo stack.
|
||||
* @param aTransaction the previously executed transaction to merge.
|
||||
*/
|
||||
virtual nsresult Merge(PRBool *aDidMerge, nsITransaction *aTransaction) = 0;
|
||||
NS_IMETHOD Merge(PRBool *aDidMerge, nsITransaction *aTransaction) = 0;
|
||||
|
||||
/**
|
||||
* Write a stream representation of the current state of the transaction.
|
||||
* @param aOutputStream the stream to write to.
|
||||
*/
|
||||
virtual nsresult Write(nsIOutputStream *aOutputStream) = 0;
|
||||
NS_IMETHOD Write(nsIOutputStream *aOutputStream) = 0;
|
||||
|
||||
/**
|
||||
* Returns the string to display for the undo menu item.
|
||||
* @param aString will point to string to display.
|
||||
*/
|
||||
virtual nsresult GetUndoString(nsString **aString) = 0;
|
||||
NS_IMETHOD GetUndoString(nsString **aString) = 0;
|
||||
|
||||
/**
|
||||
* Returns the string to display for the redo menu item.
|
||||
* @param aString will point to string to display.
|
||||
*/
|
||||
virtual nsresult GetRedoString(nsString **aString) = 0;
|
||||
NS_IMETHOD GetRedoString(nsString **aString) = 0;
|
||||
};
|
||||
|
||||
#endif // nsITransaction_h__
|
||||
|
|
|
@ -550,7 +550,7 @@ public:
|
|||
mVal = -1;
|
||||
}
|
||||
|
||||
virtual nsresult Do()
|
||||
NS_IMETHOD Do()
|
||||
{
|
||||
//
|
||||
// Make sure Do() is called in the order we expect!
|
||||
|
@ -573,7 +573,7 @@ public:
|
|||
return (mFlags & THROWS_DO_ERROR_FLAG) ? NS_ERROR_FAILURE : NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult Undo()
|
||||
NS_IMETHOD Undo()
|
||||
{
|
||||
//
|
||||
// Make sure Undo() is called in the order we expect!
|
||||
|
@ -596,7 +596,7 @@ public:
|
|||
return (mFlags & THROWS_UNDO_ERROR_FLAG) ? NS_ERROR_FAILURE : NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult Redo()
|
||||
NS_IMETHOD Redo()
|
||||
{
|
||||
//
|
||||
// Make sure Redo() is called in the order we expect!
|
||||
|
@ -619,7 +619,7 @@ public:
|
|||
return (mFlags & THROWS_REDO_ERROR_FLAG) ? NS_ERROR_FAILURE : NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult GetIsTransient(PRBool *aIsTransient)
|
||||
NS_IMETHOD GetIsTransient(PRBool *aIsTransient)
|
||||
{
|
||||
if (aIsTransient)
|
||||
*aIsTransient = (mFlags & TRANSIENT_FLAG) ? PR_TRUE : PR_FALSE;
|
||||
|
@ -627,7 +627,7 @@ public:
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult Merge(PRBool *aDidMerge, nsITransaction *aTransaction)
|
||||
NS_IMETHOD Merge(PRBool *aDidMerge, nsITransaction *aTransaction)
|
||||
{
|
||||
if (aDidMerge)
|
||||
*aDidMerge = (mFlags & MERGE_FLAG) ? PR_TRUE : PR_FALSE;
|
||||
|
@ -635,7 +635,7 @@ public:
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult Write(nsIOutputStream *aOutputStream)
|
||||
NS_IMETHOD Write(nsIOutputStream *aOutputStream)
|
||||
{
|
||||
char buf[256];
|
||||
PRUint32 amt;
|
||||
|
@ -644,13 +644,13 @@ public:
|
|||
return aOutputStream->Write(buf, 0, strlen(buf), &amt);
|
||||
}
|
||||
|
||||
virtual nsresult GetUndoString(nsString **aString)
|
||||
NS_IMETHOD GetUndoString(nsString **aString)
|
||||
{
|
||||
*aString = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual nsresult GetRedoString(nsString **aString)
|
||||
NS_IMETHOD GetRedoString(nsString **aString)
|
||||
{
|
||||
*aString = 0;
|
||||
return NS_OK;
|
||||
|
@ -706,7 +706,7 @@ public:
|
|||
// printf("~AggregateTransaction(0x%.8x) - %3d (%3d)\n", this, mLevel, mVal);
|
||||
}
|
||||
|
||||
virtual nsresult Do()
|
||||
NS_IMETHOD Do()
|
||||
{
|
||||
if (mLevel >= mMaxLevel) {
|
||||
// Only leaf nodes can throw errors!
|
||||
|
|
Загрузка…
Ссылка в новой задаче