diff --git a/mozilla/editor/idl/nsIEditor.idl b/mozilla/editor/idl/nsIEditor.idl index 5153c420e45..77413747498 100644 --- a/mozilla/editor/idl/nsIEditor.idl +++ b/mozilla/editor/idl/nsIEditor.idl @@ -37,7 +37,7 @@ interface nsIEditActionListener; %{C++ -#include "nsAWritableString.h" +#include "nsAString.h" class nsIPresShell; class nsIContent; diff --git a/mozilla/editor/libeditor/base/ChangeAttributeTxn.cpp b/mozilla/editor/libeditor/base/ChangeAttributeTxn.cpp index f133d99e2c9..0659b8444a5 100644 --- a/mozilla/editor/libeditor/base/ChangeAttributeTxn.cpp +++ b/mozilla/editor/libeditor/base/ChangeAttributeTxn.cpp @@ -51,8 +51,8 @@ ChangeAttributeTxn::~ChangeAttributeTxn() NS_IMETHODIMP ChangeAttributeTxn::Init(nsIEditor *aEditor, nsIDOMElement *aElement, - const nsAReadableString& aAttribute, - const nsAReadableString& aValue, + const nsAString& aAttribute, + const nsAString& aValue, PRBool aRemoveAttribute) { NS_ASSERTION(aEditor && aElement, "bad arg"); @@ -125,7 +125,7 @@ NS_IMETHODIMP ChangeAttributeTxn::Merge(nsITransaction *aTransaction, PRBool *aD return NS_OK; } -NS_IMETHODIMP ChangeAttributeTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP ChangeAttributeTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("ChangeAttributeTxn: ")); diff --git a/mozilla/editor/libeditor/base/ChangeAttributeTxn.h b/mozilla/editor/libeditor/base/ChangeAttributeTxn.h index 6c9e8a4b01c..2d4faa5f968 100644 --- a/mozilla/editor/libeditor/base/ChangeAttributeTxn.h +++ b/mozilla/editor/libeditor/base/ChangeAttributeTxn.h @@ -70,8 +70,8 @@ public: */ NS_IMETHOD Init(nsIEditor *aEditor, nsIDOMElement *aNode, - const nsAReadableString& aAttribute, - const nsAReadableString& aValue, + const nsAString& aAttribute, + const nsAString& aValue, PRBool aRemoveAttribute); private: @@ -87,7 +87,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp index 1d87ccc6adb..a4e09bd165d 100644 --- a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp +++ b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp @@ -49,9 +49,9 @@ #include "nsUnicharUtils.h" void -ChangeCSSInlineStyleTxn::AppendDeclaration(nsAWritableString & aOutputString, - nsAReadableString & aProperty, - nsAReadableString & aValues) +ChangeCSSInlineStyleTxn::AppendDeclaration(nsAString & aOutputString, + const nsAString & aProperty, + const nsAString & aValues) { aOutputString.Append(aProperty + NS_LITERAL_STRING(": ") @@ -62,7 +62,7 @@ ChangeCSSInlineStyleTxn::AppendDeclaration(nsAWritableString & aOutputString, // answers true if aValue is in the string list of white-space separated values aValueList // a case-sensitive search is performed if aCaseSensitive is true PRBool -ChangeCSSInlineStyleTxn::ValueIncludes(const nsAReadableString &aValueList, const nsAReadableString &aValue, PRBool aCaseSensitive) +ChangeCSSInlineStyleTxn::ValueIncludes(const nsAString &aValueList, const nsAString &aValue, PRBool aCaseSensitive) { nsAutoString valueList(aValueList); PRBool result = PR_FALSE; @@ -107,7 +107,7 @@ ChangeCSSInlineStyleTxn::ValueIncludes(const nsAReadableString &aValueList, cons // removes the value aRemoveValue from the string list of white-space separated values aValueList void -ChangeCSSInlineStyleTxn::RemoveValueFromListOfValues(nsAWritableString & aValues, const nsAReadableString & aRemoveValue) +ChangeCSSInlineStyleTxn::RemoveValueFromListOfValues(nsAString & aValues, const nsAString & aRemoveValue) { nsAutoString classStr(aValues); // copy to work buffer nsAutoString rv(aRemoveValue); nsAutoString outString; @@ -151,7 +151,7 @@ ChangeCSSInlineStyleTxn::~ChangeCSSInlineStyleTxn() NS_IMETHODIMP ChangeCSSInlineStyleTxn::Init(nsIEditor *aEditor, nsIDOMElement *aElement, nsIAtom *aProperty, - const nsAReadableString& aValue, + const nsAString& aValue, PRBool aRemoveProperty) { NS_ASSERTION(aEditor && aElement, "bad arg"); @@ -338,7 +338,7 @@ NS_IMETHODIMP ChangeCSSInlineStyleTxn::Merge(nsITransaction *aTransaction, PRBoo return NS_OK; } -NS_IMETHODIMP ChangeCSSInlineStyleTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP ChangeCSSInlineStyleTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("ChangeCSSInlineStyleTxn: ")); @@ -367,7 +367,7 @@ ChangeCSSInlineStyleTxn::AcceptsMoreThanOneValue(nsIAtom *aCSSProperty) // adds the value aNewValue to the list of white-space separated values aValues NS_IMETHODIMP -ChangeCSSInlineStyleTxn::AddValueToMultivalueProperty(nsAWritableString & aValues, const nsAReadableString & aNewValue) +ChangeCSSInlineStyleTxn::AddValueToMultivalueProperty(nsAString & aValues, const nsAString & aNewValue) { if (aValues.IsEmpty() || aValues.Equals(NS_LITERAL_STRING("none"), diff --git a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.h b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.h index 74de6a3ec2b..9a4b6af75fd 100644 --- a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.h +++ b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.h @@ -72,7 +72,7 @@ public: NS_IMETHOD Init(nsIEditor * aEditor, nsIDOMElement * aElement, nsIAtom * aProperty, - const nsAReadableString & aValue, + const nsAString & aValue, PRBool aRemoveProperty); /** returns true if the list of white-space separated values contains aValue @@ -82,14 +82,14 @@ public: * @param aValue [IN] the value to look for in the list * @param aCaseSensitive [IN] a boolean being true if a case-sensitive search is needed */ - static PRBool ValueIncludes(const nsAReadableString & aValueList, const nsAReadableString & aValue, PRBool aCaseSensitive); + static PRBool ValueIncludes(const nsAString & aValueList, const nsAString & aValue, PRBool aCaseSensitive); /** adds the value aNewValue to the list of white-space separated values aValues * * @param aValues [IN/OUT] a list of wite-space separated values * @param aNewValue [IN] a value this code adds to aValues if it is not already in */ - NS_IMETHOD AddValueToMultivalueProperty(nsAWritableString & aValues, const nsAReadableString & aNewValue); + NS_IMETHOD AddValueToMultivalueProperty(nsAString & aValues, const nsAString & aNewValue); private: ChangeCSSInlineStyleTxn(); @@ -105,7 +105,7 @@ private: * @param aValues [IN] a list of white-space separated values * @param aRemoveValue [IN] the value to remove from the list */ - void RemoveValueFromListOfValues(nsAWritableString & aValues, const nsAReadableString & aRemoveValue); + void RemoveValueFromListOfValues(nsAString & aValues, const nsAString & aRemoveValue); /** appends 'property : value' to the string * @@ -113,9 +113,9 @@ private: * @param aPropert [IN] the css property string * @param aValues [IN] the value string for the css property */ - void AppendDeclaration(nsAWritableString & aOutputString, - nsAReadableString & aProperty, - nsAReadableString & aValues); + void AppendDeclaration(nsAString & aOutputString, + const nsAString & aProperty, + const nsAString & aValues); public: @@ -127,7 +127,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/CreateElementTxn.cpp b/mozilla/editor/libeditor/base/CreateElementTxn.cpp index 81b1f5c6b26..96ca6dbddba 100644 --- a/mozilla/editor/libeditor/base/CreateElementTxn.cpp +++ b/mozilla/editor/libeditor/base/CreateElementTxn.cpp @@ -60,7 +60,7 @@ CreateElementTxn::CreateElementTxn() } NS_IMETHODIMP CreateElementTxn::Init(nsEditor *aEditor, - const nsAReadableString &aTag, + const nsAString &aTag, nsIDOMNode *aParent, PRUint32 aOffsetInParent) { @@ -225,7 +225,7 @@ NS_IMETHODIMP CreateElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDid return NS_OK; } -NS_IMETHODIMP CreateElementTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP CreateElementTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("CreateElementTxn: ")); aString += mTag; diff --git a/mozilla/editor/libeditor/base/CreateElementTxn.h b/mozilla/editor/libeditor/base/CreateElementTxn.h index 42ec3232b0a..af8a35eb15c 100644 --- a/mozilla/editor/libeditor/base/CreateElementTxn.h +++ b/mozilla/editor/libeditor/base/CreateElementTxn.h @@ -68,7 +68,7 @@ public: * if eAppend, the new element is appended as the last child */ NS_IMETHOD Init(nsEditor *aEditor, - const nsAReadableString& aTag, + const nsAString& aTag, nsIDOMNode *aParent, PRUint32 aOffsetInParent); @@ -87,7 +87,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); NS_IMETHOD GetNewNode(nsIDOMNode **aNewNode); diff --git a/mozilla/editor/libeditor/base/DeleteElementTxn.cpp b/mozilla/editor/libeditor/base/DeleteElementTxn.cpp index ebf8cb2707f..f87a03882fe 100644 --- a/mozilla/editor/libeditor/base/DeleteElementTxn.cpp +++ b/mozilla/editor/libeditor/base/DeleteElementTxn.cpp @@ -167,7 +167,7 @@ NS_IMETHODIMP DeleteElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDid return NS_OK; } -NS_IMETHODIMP DeleteElementTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP DeleteElementTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("DeleteElementTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/DeleteElementTxn.h b/mozilla/editor/libeditor/base/DeleteElementTxn.h index d33c67e2dca..24438a5c5a3 100644 --- a/mozilla/editor/libeditor/base/DeleteElementTxn.h +++ b/mozilla/editor/libeditor/base/DeleteElementTxn.h @@ -77,7 +77,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/DeleteRangeTxn.cpp b/mozilla/editor/libeditor/base/DeleteRangeTxn.cpp index 45ea2c72c79..8b457af39ad 100644 --- a/mozilla/editor/libeditor/base/DeleteRangeTxn.cpp +++ b/mozilla/editor/libeditor/base/DeleteRangeTxn.cpp @@ -208,7 +208,7 @@ NS_IMETHODIMP DeleteRangeTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe return NS_OK; } -NS_IMETHODIMP DeleteRangeTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP DeleteRangeTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("DeleteRangeTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/DeleteRangeTxn.h b/mozilla/editor/libeditor/base/DeleteRangeTxn.h index c9cca34a439..4ea4590a026 100644 --- a/mozilla/editor/libeditor/base/DeleteRangeTxn.h +++ b/mozilla/editor/libeditor/base/DeleteRangeTxn.h @@ -85,7 +85,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/DeleteTextTxn.cpp b/mozilla/editor/libeditor/base/DeleteTextTxn.cpp index 2cfde1b9fb6..2c42d3edbf2 100644 --- a/mozilla/editor/libeditor/base/DeleteTextTxn.cpp +++ b/mozilla/editor/libeditor/base/DeleteTextTxn.cpp @@ -126,7 +126,7 @@ NS_IMETHODIMP DeleteTextTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMer return NS_OK; } -NS_IMETHODIMP DeleteTextTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP DeleteTextTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("DeleteTextTxn: ")); aString += mDeletedText; diff --git a/mozilla/editor/libeditor/base/DeleteTextTxn.h b/mozilla/editor/libeditor/base/DeleteTextTxn.h index 64d3e43a9c9..a05ddd5bedb 100644 --- a/mozilla/editor/libeditor/base/DeleteTextTxn.h +++ b/mozilla/editor/libeditor/base/DeleteTextTxn.h @@ -81,7 +81,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/EditAggregateTxn.cpp b/mozilla/editor/libeditor/base/EditAggregateTxn.cpp index c84c8c69369..c499ffa2951 100644 --- a/mozilla/editor/libeditor/base/EditAggregateTxn.cpp +++ b/mozilla/editor/libeditor/base/EditAggregateTxn.cpp @@ -148,7 +148,7 @@ NS_IMETHODIMP EditAggregateTxn::Merge(nsITransaction *aTransaction, PRBool *aDid } -NS_IMETHODIMP EditAggregateTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP EditAggregateTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("EditAggregateTxn: ")); diff --git a/mozilla/editor/libeditor/base/EditAggregateTxn.h b/mozilla/editor/libeditor/base/EditAggregateTxn.h index f0f01edce50..fe0a451a2f8 100644 --- a/mozilla/editor/libeditor/base/EditAggregateTxn.h +++ b/mozilla/editor/libeditor/base/EditAggregateTxn.h @@ -76,7 +76,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); /** append a transaction to this aggregate */ NS_IMETHOD AppendChild(EditTxn *aTxn); diff --git a/mozilla/editor/libeditor/base/EditTxn.cpp b/mozilla/editor/libeditor/base/EditTxn.cpp index 29dd605eb58..4d09bb31d16 100644 --- a/mozilla/editor/libeditor/base/EditTxn.cpp +++ b/mozilla/editor/libeditor/base/EditTxn.cpp @@ -85,7 +85,7 @@ NS_IMETHODIMP EditTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) return NS_OK; } -NS_IMETHODIMP EditTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP EditTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("EditTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/EditTxn.h b/mozilla/editor/libeditor/base/EditTxn.h index 0359c8b64b3..edef4103855 100644 --- a/mozilla/editor/libeditor/base/EditTxn.h +++ b/mozilla/editor/libeditor/base/EditTxn.h @@ -79,7 +79,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); }; #endif diff --git a/mozilla/editor/libeditor/base/IMETextTxn.cpp b/mozilla/editor/libeditor/base/IMETextTxn.cpp index 776be553e53..6576261f6a4 100644 --- a/mozilla/editor/libeditor/base/IMETextTxn.cpp +++ b/mozilla/editor/libeditor/base/IMETextTxn.cpp @@ -81,7 +81,7 @@ NS_IMETHODIMP IMETextTxn::Init(nsIDOMCharacterData *aElement, PRUint32 aOffset, PRUint32 aReplaceLength, nsIPrivateTextRangeList *aTextRangeList, - const nsAReadableString &aStringToInsert, + const nsAString &aStringToInsert, nsWeakPtr aSelConWeak) { NS_ASSERTION(aElement, "illegal value- null ptr- aElement"); @@ -205,7 +205,7 @@ NS_IMETHODIMP IMETextTxn::MarkFixed(void) return NS_OK; } -NS_IMETHODIMP IMETextTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP IMETextTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("IMETextTxn: ")); aString += mStringToInsert; diff --git a/mozilla/editor/libeditor/base/IMETextTxn.h b/mozilla/editor/libeditor/base/IMETextTxn.h index d97184aab0e..3041d4bdd98 100644 --- a/mozilla/editor/libeditor/base/IMETextTxn.h +++ b/mozilla/editor/libeditor/base/IMETextTxn.h @@ -81,7 +81,7 @@ public: PRUint32 aOffset, PRUint32 aReplaceLength, nsIPrivateTextRangeList* aTextRangeList, - const nsAReadableString& aString, + const nsAString& aString, nsWeakPtr aSelCon); private: @@ -96,7 +96,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); NS_IMETHOD MarkFixed(void); diff --git a/mozilla/editor/libeditor/base/InsertElementTxn.cpp b/mozilla/editor/libeditor/base/InsertElementTxn.cpp index 0893b4c7553..5cde846e6c5 100644 --- a/mozilla/editor/libeditor/base/InsertElementTxn.cpp +++ b/mozilla/editor/libeditor/base/InsertElementTxn.cpp @@ -152,7 +152,7 @@ NS_IMETHODIMP InsertElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDid return NS_OK; } -NS_IMETHODIMP InsertElementTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP InsertElementTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("InsertElementTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/InsertElementTxn.h b/mozilla/editor/libeditor/base/InsertElementTxn.h index d0a5731738e..b2d71754be4 100644 --- a/mozilla/editor/libeditor/base/InsertElementTxn.h +++ b/mozilla/editor/libeditor/base/InsertElementTxn.h @@ -81,7 +81,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/InsertTextTxn.cpp b/mozilla/editor/libeditor/base/InsertTextTxn.cpp index 65f54214d8b..25a7ac935bf 100644 --- a/mozilla/editor/libeditor/base/InsertTextTxn.cpp +++ b/mozilla/editor/libeditor/base/InsertTextTxn.cpp @@ -74,7 +74,7 @@ InsertTextTxn::~InsertTextTxn() NS_IMETHODIMP InsertTextTxn::Init(nsIDOMCharacterData *aElement, PRUint32 aOffset, - const nsAReadableString &aStringToInsert, + const nsAString &aStringToInsert, nsIEditor *aEditor) { #if 0 //def DEBUG_cmanske @@ -204,7 +204,7 @@ NS_IMETHODIMP InsertTextTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMer return result; } -NS_IMETHODIMP InsertTextTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP InsertTextTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("InsertTextTxn: ")); aString += mStringToInsert; diff --git a/mozilla/editor/libeditor/base/InsertTextTxn.h b/mozilla/editor/libeditor/base/InsertTextTxn.h index 255b575fd38..0d8779fc968 100644 --- a/mozilla/editor/libeditor/base/InsertTextTxn.h +++ b/mozilla/editor/libeditor/base/InsertTextTxn.h @@ -75,7 +75,7 @@ public: */ NS_IMETHOD Init(nsIDOMCharacterData *aElement, PRUint32 aOffset, - const nsAReadableString& aString, + const nsAString& aString, nsIEditor *aEditor); private: @@ -90,7 +90,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); // nsISupports declarations diff --git a/mozilla/editor/libeditor/base/JoinElementTxn.cpp b/mozilla/editor/libeditor/base/JoinElementTxn.cpp index 2fe2d58fa02..f799f9684f0 100644 --- a/mozilla/editor/libeditor/base/JoinElementTxn.cpp +++ b/mozilla/editor/libeditor/base/JoinElementTxn.cpp @@ -173,7 +173,7 @@ nsresult JoinElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) return NS_OK; } -NS_IMETHODIMP JoinElementTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP JoinElementTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("JoinElementTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/JoinElementTxn.h b/mozilla/editor/libeditor/base/JoinElementTxn.h index 2c0fb8124cd..f26387a322c 100644 --- a/mozilla/editor/libeditor/base/JoinElementTxn.h +++ b/mozilla/editor/libeditor/base/JoinElementTxn.h @@ -89,7 +89,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/PlaceholderTxn.cpp b/mozilla/editor/libeditor/base/PlaceholderTxn.cpp index 4c12def5fd4..a3d98b011c4 100644 --- a/mozilla/editor/libeditor/base/PlaceholderTxn.cpp +++ b/mozilla/editor/libeditor/base/PlaceholderTxn.cpp @@ -232,7 +232,7 @@ NS_IMETHODIMP PlaceholderTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe return res; } -NS_IMETHODIMP PlaceholderTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP PlaceholderTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("PlaceholderTxn: ")); diff --git a/mozilla/editor/libeditor/base/PlaceholderTxn.h b/mozilla/editor/libeditor/base/PlaceholderTxn.h index ab9b2956211..9cb941cfcb1 100644 --- a/mozilla/editor/libeditor/base/PlaceholderTxn.h +++ b/mozilla/editor/libeditor/base/PlaceholderTxn.h @@ -89,7 +89,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); // ------------ nsIAbsorbingTransaction ----------------------- diff --git a/mozilla/editor/libeditor/base/SetDocTitleTxn.cpp b/mozilla/editor/libeditor/base/SetDocTitleTxn.cpp index 677ad556108..3c170894fb4 100644 --- a/mozilla/editor/libeditor/base/SetDocTitleTxn.cpp +++ b/mozilla/editor/libeditor/base/SetDocTitleTxn.cpp @@ -54,7 +54,7 @@ SetDocTitleTxn::SetDocTitleTxn() } NS_IMETHODIMP SetDocTitleTxn::Init(nsIHTMLEditor *aEditor, - const nsAReadableString *aValue) + const nsAString *aValue) { NS_ASSERTION(aEditor && aValue, "null args"); @@ -88,7 +88,7 @@ NS_IMETHODIMP SetDocTitleTxn::RedoTransaction(void) return SetDocTitle(mValue); } -nsresult SetDocTitleTxn::SetDocTitle(const nsAReadableString& aTitle) +nsresult SetDocTitleTxn::SetDocTitle(const nsAString& aTitle) { NS_ASSERTION(mEditor, "bad state"); if (!mEditor) return NS_ERROR_NOT_INITIALIZED; @@ -105,7 +105,7 @@ nsresult SetDocTitleTxn::SetDocTitle(const nsAReadableString& aTitle) return HTMLDoc->SetTitle(aTitle); } -nsresult SetDocTitleTxn::SetDomTitle(const nsAReadableString& aTitle) +nsresult SetDocTitleTxn::SetDomTitle(const nsAString& aTitle) { nsCOMPtr domDoc; nsCOMPtr editor = do_QueryInterface(mEditor); @@ -229,7 +229,7 @@ NS_IMETHODIMP SetDocTitleTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe return NS_OK; } -NS_IMETHODIMP SetDocTitleTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP SetDocTitleTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("SetDocTitleTxn: ")); aString += mValue; diff --git a/mozilla/editor/libeditor/base/SetDocTitleTxn.h b/mozilla/editor/libeditor/base/SetDocTitleTxn.h index 09865cf446c..e26d259fed7 100644 --- a/mozilla/editor/libeditor/base/SetDocTitleTxn.h +++ b/mozilla/editor/libeditor/base/SetDocTitleTxn.h @@ -69,11 +69,11 @@ public: * @param aValue the new value for document title */ NS_IMETHOD Init(nsIHTMLEditor *aEditor, - const nsAReadableString *aValue); + const nsAString *aValue); private: SetDocTitleTxn(); - nsresult SetDocTitle(const nsAReadableString& aTitle); - nsresult SetDomTitle(const nsAReadableString& aTitle); + nsresult SetDocTitle(const nsAString& aTitle); + nsresult SetDomTitle(const nsAString& aTitle); public: NS_IMETHOD DoTransaction(void); @@ -86,7 +86,7 @@ public: NS_IMETHOD GetIsTransient(PRBool *aIsTransient); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/libeditor/base/SplitElementTxn.cpp b/mozilla/editor/libeditor/base/SplitElementTxn.cpp index 48de7211559..467c5d12f3d 100644 --- a/mozilla/editor/libeditor/base/SplitElementTxn.cpp +++ b/mozilla/editor/libeditor/base/SplitElementTxn.cpp @@ -203,7 +203,7 @@ NS_IMETHODIMP SplitElementTxn::Merge(nsITransaction *aTransaction, PRBool *aDidM return NS_OK; } -NS_IMETHODIMP SplitElementTxn::GetTxnDescription(nsAWritableString& aString) +NS_IMETHODIMP SplitElementTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("SplitElementTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/SplitElementTxn.h b/mozilla/editor/libeditor/base/SplitElementTxn.h index b4c69cae1ae..c8632057795 100644 --- a/mozilla/editor/libeditor/base/SplitElementTxn.h +++ b/mozilla/editor/libeditor/base/SplitElementTxn.h @@ -85,7 +85,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); NS_IMETHOD GetNewNode(nsIDOMNode **aNewNode); diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index ef4d4b5d022..47a1240164c 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -896,7 +896,7 @@ nsEditor::GetDocumentModified(PRBool *outDocModified) } NS_IMETHODIMP -nsEditor::GetDocumentCharacterSet(nsAWritableString &characterSet) +nsEditor::GetDocumentCharacterSet(nsAString &characterSet) { nsresult rv; nsCOMPtr doc; @@ -916,7 +916,7 @@ nsEditor::GetDocumentCharacterSet(nsAWritableString &characterSet) } NS_IMETHODIMP -nsEditor::SetDocumentCharacterSet(const nsAReadableString& characterSet) +nsEditor::SetDocumentCharacterSet(const nsAString& characterSet) { nsresult rv; nsCOMPtr doc; @@ -1009,7 +1009,7 @@ nsEditor::InsertFromDrop(nsIDOMEvent *aEvent) NS_IMETHODIMP -nsEditor::SetAttribute(nsIDOMElement *aElement, const nsAReadableString & aAttribute, const nsAReadableString & aValue) +nsEditor::SetAttribute(nsIDOMElement *aElement, const nsAString & aAttribute, const nsAString & aValue) { ChangeAttributeTxn *txn; nsresult result = CreateTxnForSetAttribute(aElement, aAttribute, aValue, &txn); @@ -1023,8 +1023,8 @@ nsEditor::SetAttribute(nsIDOMElement *aElement, const nsAReadableString & aAttri NS_IMETHODIMP nsEditor::GetAttributeValue(nsIDOMElement *aElement, - const nsAReadableString & aAttribute, - nsAWritableString & aResultValue, + const nsAString & aAttribute, + nsAString & aResultValue, PRBool *aResultIsSet) { if (!aResultIsSet) @@ -1045,7 +1045,7 @@ nsEditor::GetAttributeValue(nsIDOMElement *aElement, } NS_IMETHODIMP -nsEditor::RemoveAttribute(nsIDOMElement *aElement, const nsAReadableString& aAttribute) +nsEditor::RemoveAttribute(nsIDOMElement *aElement, const nsAString& aAttribute) { ChangeAttributeTxn *txn; nsresult result = CreateTxnForRemoveAttribute(aElement, aAttribute, &txn); @@ -1075,7 +1075,7 @@ nsEditor::MarkNodeDirty(nsIDOMNode* aNode) #pragma mark - #endif -NS_IMETHODIMP nsEditor::CreateNode(const nsAReadableString& aTag, +NS_IMETHODIMP nsEditor::CreateNode(const nsAString& aTag, nsIDOMNode * aParent, PRInt32 aPosition, nsIDOMNode ** aNewNode) @@ -1326,9 +1326,9 @@ NS_IMETHODIMP nsEditor::DeleteNode(nsIDOMNode * aElement) nsresult nsEditor::ReplaceContainer(nsIDOMNode *inNode, nsCOMPtr *outNode, - const nsAReadableString &aNodeType, - const nsAReadableString *aAttribute, - const nsAReadableString *aValue, + const nsAString &aNodeType, + const nsAString *aAttribute, + const nsAString *aValue, PRBool aCloneAttributes) { if (!inNode || !outNode) @@ -1448,9 +1448,9 @@ nsEditor::RemoveContainer(nsIDOMNode *inNode) nsresult nsEditor::InsertContainerAbove( nsIDOMNode *inNode, nsCOMPtr *outNode, - const nsAReadableString &aNodeType, - const nsAReadableString *aAttribute, - const nsAReadableString *aValue) + const nsAString &aNodeType, + const nsAString *aAttribute, + const nsAString *aValue) { if (!inNode || !outNode) return NS_ERROR_NULL_POINTER; @@ -1706,8 +1706,8 @@ nsEditor::RemoveDocumentStateListener(nsIDocumentStateListener *aListener) #pragma mark - #endif -NS_IMETHODIMP nsEditor::OutputToString(nsAWritableString& aOutputString, - const nsAReadableString& aFormatType, +NS_IMETHODIMP nsEditor::OutputToString(nsAString& aOutputString, + const nsAString& aFormatType, PRUint32 aFlags) { // these should be implemented by derived classes. @@ -1716,8 +1716,8 @@ NS_IMETHODIMP nsEditor::OutputToString(nsAWritableString& aOutputString, NS_IMETHODIMP nsEditor::OutputToStream(nsIOutputStream* aOutputStream, - const nsAReadableString& aFormatType, - const nsAReadableString& aCharsetOverride, + const nsAString& aFormatType, + const nsAString& aCharsetOverride, PRUint32 aFlags) { // these should be implemented by derived classes. @@ -1886,7 +1886,7 @@ nsEditor::EndComposition(void) } NS_IMETHODIMP -nsEditor::SetCompositionString(const nsAReadableString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply) +nsEditor::SetCompositionString(const nsAString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply) { return NS_ERROR_NOT_IMPLEMENTED; } @@ -2226,7 +2226,7 @@ NS_IMETHODIMP nsEditor::ScrollIntoView(PRBool aScrollToBegin) } /** static helper method */ -nsresult nsEditor::GetTextNodeTag(nsAWritableString& aOutString) +nsresult nsEditor::GetTextNodeTag(nsAString& aOutString) { aOutString.SetLength(0); static nsString *gTextNodeTag=nsnull; @@ -2241,7 +2241,7 @@ nsresult nsEditor::GetTextNodeTag(nsAWritableString& aOutString) } -NS_IMETHODIMP nsEditor::InsertTextImpl(const nsAReadableString& aStringToInsert, +NS_IMETHODIMP nsEditor::InsertTextImpl(const nsAString& aStringToInsert, nsCOMPtr *aInOutNode, PRInt32 *aInOutOffset, nsIDOMDocument *aDoc) @@ -2302,7 +2302,7 @@ NS_IMETHODIMP nsEditor::InsertTextImpl(const nsAReadableString& aStringToInsert, } -NS_IMETHODIMP nsEditor::InsertTextIntoTextNodeImpl(const nsAReadableString& aStringToInsert, +NS_IMETHODIMP nsEditor::InsertTextIntoTextNodeImpl(const nsAString& aStringToInsert, nsIDOMCharacterData *aTextNode, PRInt32 aOffset) { @@ -2517,7 +2517,7 @@ nsEditor::NotifyDocumentListeners(TDocumentListenerNotification aNotificationTyp } -NS_IMETHODIMP nsEditor::CreateTxnForInsertText(const nsAReadableString & aStringToInsert, +NS_IMETHODIMP nsEditor::CreateTxnForInsertText(const nsAString & aStringToInsert, nsIDOMCharacterData *aTextNode, PRInt32 aOffset, InsertTextTxn ** aTxn) @@ -3449,7 +3449,7 @@ nsEditor::NodeIsType(nsIDOMNode *aNode, nsIAtom *aTag) } PRBool -nsEditor::NodeIsType(nsIDOMNode *aNode, const nsAReadableString &aTagStr) +nsEditor::NodeIsType(nsIDOMNode *aNode, const nsAString &aTagStr) { nsCOMPtrelement; element = do_QueryInterface(aNode); @@ -3464,7 +3464,7 @@ nsEditor::NodeIsType(nsIDOMNode *aNode, const nsAReadableString &aTagStr) } PRBool -nsEditor::CanContainTag(nsIDOMNode* aParent, const nsAReadableString &aChildTag) +nsEditor::CanContainTag(nsIDOMNode* aParent, const nsAString &aChildTag) { nsAutoString parentStringTag; @@ -3476,7 +3476,7 @@ nsEditor::CanContainTag(nsIDOMNode* aParent, const nsAReadableString &aChildTag) } PRBool -nsEditor::TagCanContain(const nsAReadableString &aParentTag, nsIDOMNode* aChild) +nsEditor::TagCanContain(const nsAString &aParentTag, nsIDOMNode* aChild) { nsAutoString childStringTag; @@ -3494,7 +3494,7 @@ nsEditor::TagCanContain(const nsAReadableString &aParentTag, nsIDOMNode* aChild) } PRBool -nsEditor::TagCanContainTag(const nsAReadableString &aParentTag, const nsAReadableString &aChildTag) +nsEditor::TagCanContainTag(const nsAString &aParentTag, const nsAString &aChildTag) { // if we don't have a dtd then assume we can insert whatever want if (!mDTD) return PR_TRUE; @@ -3757,7 +3757,7 @@ nsEditor::GetTag(nsIDOMNode *aNode) // GetTagString: digs out string for the tag of this node // nsresult -nsEditor::GetTagString(nsIDOMNode *aNode, nsAWritableString& outString) +nsEditor::GetTagString(nsIDOMNode *aNode, nsAString& outString) { nsCOMPtr atom; @@ -4338,7 +4338,7 @@ nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction) // XXX: error handling in this routine needs to be cleaned up! NS_IMETHODIMP -nsEditor::DeleteSelectionAndCreateNode(const nsAReadableString& aTag, +nsEditor::DeleteSelectionAndCreateNode(const nsAString& aTag, nsIDOMNode ** aNewNode) { nsCOMPtr parentSelectedNode; @@ -4505,8 +4505,8 @@ nsEditor::DoAfterRedoTransaction() NS_IMETHODIMP nsEditor::CreateTxnForSetAttribute(nsIDOMElement *aElement, - const nsAReadableString& aAttribute, - const nsAReadableString& aValue, + const nsAString& aAttribute, + const nsAString& aValue, ChangeAttributeTxn ** aTxn) { nsresult result = NS_ERROR_NULL_POINTER; @@ -4523,7 +4523,7 @@ nsEditor::CreateTxnForSetAttribute(nsIDOMElement *aElement, NS_IMETHODIMP nsEditor::CreateTxnForRemoveAttribute(nsIDOMElement *aElement, - const nsAReadableString& aAttribute, + const nsAString& aAttribute, ChangeAttributeTxn ** aTxn) { nsresult result = NS_ERROR_NULL_POINTER; @@ -4540,7 +4540,7 @@ nsEditor::CreateTxnForRemoveAttribute(nsIDOMElement *aElement, } -NS_IMETHODIMP nsEditor::CreateTxnForCreateElement(const nsAReadableString& aTag, +NS_IMETHODIMP nsEditor::CreateTxnForCreateElement(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition, CreateElementTxn ** aTxn) @@ -4628,7 +4628,7 @@ NS_IMETHODIMP nsEditor::CreateTxnForDeleteElement(nsIDOMNode * aElement, */ NS_IMETHODIMP -nsEditor::CreateTxnForIMEText(const nsAReadableString& aStringToInsert, +nsEditor::CreateTxnForIMEText(const nsAString& aStringToInsert, IMETextTxn ** aTxn) { NS_ASSERTION(aTxn, "illegal value- null ptr- aTxn"); @@ -5002,7 +5002,7 @@ nsresult nsEditor::ClearSelection() } nsresult -nsEditor::CreateHTMLContent(const nsAReadableString& aTag, nsIContent** aContent) +nsEditor::CreateHTMLContent(const nsAString& aTag, nsIContent** aContent) { nsresult rv; @@ -5049,15 +5049,15 @@ nsEditor::CreateHTMLContent(const nsAReadableString& aTag, nsIContent** aContent nsresult nsEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement, - const nsAReadableString & aAttribute, - const nsAReadableString & aValue) + const nsAString & aAttribute, + const nsAString & aValue) { return SetAttribute(aElement, aAttribute, aValue); } nsresult nsEditor::RemoveAttributeOrEquivalent(nsIDOMElement * aElement, - const nsAReadableString & aAttribute) + const nsAString & aAttribute) { return RemoveAttribute(aElement, aAttribute); } diff --git a/mozilla/editor/libeditor/base/nsEditor.h b/mozilla/editor/libeditor/base/nsEditor.h index 946d8573e35..9faca20ee67 100644 --- a/mozilla/editor/libeditor/base/nsEditor.h +++ b/mozilla/editor/libeditor/base/nsEditor.h @@ -144,7 +144,7 @@ public: NS_IMETHOD BeginComposition(nsTextEventReply* aReply); NS_IMETHOD QueryComposition(nsTextEventReply* aReply); - NS_IMETHOD SetCompositionString(const nsAReadableString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply); + NS_IMETHOD SetCompositionString(const nsAString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply); NS_IMETHOD EndComposition(void); NS_IMETHOD ForceCompositionEnd(void); NS_IMETHOD GetReconversionString(nsReconversionEventReply *aReply); @@ -152,31 +152,31 @@ public: public: - NS_IMETHOD InsertTextImpl(const nsAReadableString& aStringToInsert, + NS_IMETHOD InsertTextImpl(const nsAString& aStringToInsert, nsCOMPtr *aInOutNode, PRInt32 *aInOutOffset, nsIDOMDocument *aDoc); - NS_IMETHOD InsertTextIntoTextNodeImpl(const nsAReadableString& aStringToInsert, + NS_IMETHOD InsertTextIntoTextNodeImpl(const nsAString& aStringToInsert, nsIDOMCharacterData *aTextNode, PRInt32 aOffset); NS_IMETHOD DeleteSelectionImpl(EDirection aAction); - NS_IMETHOD DeleteSelectionAndCreateNode(const nsAReadableString& aTag, + NS_IMETHOD DeleteSelectionAndCreateNode(const nsAString& aTag, nsIDOMNode ** aNewNode); /* helper routines for node/parent manipulations */ nsresult ReplaceContainer(nsIDOMNode *inNode, nsCOMPtr *outNode, - const nsAReadableString &aNodeType, - const nsAReadableString *aAttribute = nsnull, - const nsAReadableString *aValue = nsnull, + const nsAString &aNodeType, + const nsAString *aAttribute = nsnull, + const nsAString *aValue = nsnull, PRBool aCloneAttributes = PR_FALSE); nsresult RemoveContainer(nsIDOMNode *inNode); nsresult InsertContainerAbove(nsIDOMNode *inNode, nsCOMPtr *outNode, - const nsAReadableString &aNodeType, - const nsAReadableString *aAttribute = nsnull, - const nsAReadableString *aValue = nsnull); + const nsAString &aNodeType, + const nsAString *aAttribute = nsnull, + const nsAString *aValue = nsnull); nsresult MoveNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aOffset); /* Method to replace certain CreateElementNS() calls. @@ -184,7 +184,7 @@ public: nsString& aTag - tag you want nsIContent** aContent - returned Content that was created with above namespace. */ - nsresult CreateHTMLContent(const nsAReadableString& aTag, nsIContent** aContent); + nsresult CreateHTMLContent(const nsAString& aTag, nsIContent** aContent); protected: @@ -196,19 +196,19 @@ protected: /** create a transaction for setting aAttribute to aValue on aElement */ NS_IMETHOD CreateTxnForSetAttribute(nsIDOMElement *aElement, - const nsAReadableString & aAttribute, - const nsAReadableString & aValue, + const nsAString & aAttribute, + const nsAString & aValue, ChangeAttributeTxn ** aTxn); /** create a transaction for removing aAttribute on aElement */ NS_IMETHOD CreateTxnForRemoveAttribute(nsIDOMElement *aElement, - const nsAReadableString & aAttribute, + const nsAString & aAttribute, ChangeAttributeTxn ** aTxn); /** create a transaction for creating a new child node of aParent of type aTag. */ - NS_IMETHOD CreateTxnForCreateElement(const nsAReadableString & aTag, + NS_IMETHOD CreateTxnForCreateElement(const nsAString & aTag, nsIDOMNode *aParent, PRInt32 aPosition, CreateElementTxn ** aTxn); @@ -237,12 +237,12 @@ protected: /** create a transaction for inserting aStringToInsert into aTextNode * if aTextNode is null, the string is inserted at the current selection. */ - NS_IMETHOD CreateTxnForInsertText(const nsAReadableString & aStringToInsert, + NS_IMETHOD CreateTxnForInsertText(const nsAString & aStringToInsert, nsIDOMCharacterData *aTextNode, PRInt32 aOffset, InsertTextTxn ** aTxn); - NS_IMETHOD CreateTxnForIMEText(const nsAReadableString & aStringToInsert, + NS_IMETHOD CreateTxnForIMEText(const nsAString & aStringToInsert, IMETextTxn ** aTxn); /** create a transaction for adding a style sheet @@ -338,7 +338,7 @@ public: /** return the string that represents text nodes in the content tree */ - static nsresult GetTextNodeTag(nsAWritableString& aOutString); + static nsresult GetTextNodeTag(nsAString& aOutString); /** * SplitNode() creates a new node identical to an existing node, and split the contents between the two nodes @@ -442,12 +442,12 @@ public: /** returns PR_TRUE if aNode is of the type implied by aTag */ static PRBool NodeIsType(nsIDOMNode *aNode, nsIAtom *aTag); - static PRBool NodeIsType(nsIDOMNode *aNode, const nsAReadableString &aTag); + static PRBool NodeIsType(nsIDOMNode *aNode, const nsAString &aTag); /** returns PR_TRUE if aParent can contain a child of type aTag */ - PRBool CanContainTag(nsIDOMNode* aParent, const nsAReadableString &aTag); - PRBool TagCanContain(const nsAReadableString &aParentTag, nsIDOMNode* aChild); - virtual PRBool TagCanContainTag(const nsAReadableString &aParentTag, const nsAReadableString &aChildTag); + PRBool CanContainTag(nsIDOMNode* aParent, const nsAString &aTag); + PRBool TagCanContain(const nsAString &aParentTag, nsIDOMNode* aChild); + virtual PRBool TagCanContainTag(const nsAString &aParentTag, const nsAString &aChildTag); /** returns PR_TRUE if aNode is our root node */ PRBool IsRootNode(nsIDOMNode *inNode); @@ -478,7 +478,7 @@ public: /** from html rules code - migration in progress */ - static nsresult GetTagString(nsIDOMNode *aNode, nsAWritableString& outString); + static nsresult GetTagString(nsIDOMNode *aNode, nsAString& outString); static nsCOMPtr GetTag(nsIDOMNode *aNode); virtual PRBool NodesSameType(nsIDOMNode *aNode1, nsIDOMNode *aNode2); static PRBool IsTextOrElementNode(nsIDOMNode *aNode); @@ -512,7 +512,7 @@ public: nsCOMPtr *outRightNode = 0); nsresult JoinNodeDeep(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsCOMPtr *aOutJoinNode, PRInt32 *outOffset); - nsresult GetString(const nsAReadableString& name, nsAWritableString& value); + nsresult GetString(const nsAString& name, nsAString& value); nsresult BeginUpdateViewBatch(void); nsresult EndUpdateViewBatch(void); diff --git a/mozilla/editor/libeditor/base/nsEditorCommands.cpp b/mozilla/editor/libeditor/base/nsEditorCommands.cpp index fc9d81990ce..c1fc3a4f3fe 100644 --- a/mozilla/editor/libeditor/base/nsEditorCommands.cpp +++ b/mozilla/editor/libeditor/base/nsEditorCommands.cpp @@ -66,7 +66,7 @@ NS_IMPL_ISUPPORTS1(nsBaseEditorCommand, nsIControllerCommand) NS_IMETHODIMP -nsUndoCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsUndoCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -80,7 +80,7 @@ nsUndoCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISuppo NS_IMETHODIMP -nsUndoCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsUndoCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (aEditor) @@ -108,7 +108,7 @@ nsUndoCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aCommandR } NS_IMETHODIMP -nsRedoCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsRedoCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -122,7 +122,7 @@ nsRedoCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISuppo NS_IMETHODIMP -nsRedoCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsRedoCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (aEditor) @@ -150,7 +150,7 @@ nsRedoCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aCommandR } NS_IMETHODIMP -nsCutCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsCutCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -162,7 +162,7 @@ nsCutCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISuppor NS_IMETHODIMP -nsCutCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsCutCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (aEditor) @@ -191,7 +191,7 @@ nsCutCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aCommandRe NS_IMETHODIMP -nsCutOrDeleteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsCutOrDeleteCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr editor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = (editor != nsnull); @@ -200,7 +200,7 @@ nsCutOrDeleteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, n NS_IMETHODIMP -nsCutOrDeleteCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsCutOrDeleteCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr editor = do_QueryInterface(aCommandRefCon); if (editor) @@ -239,7 +239,7 @@ nsCutOrDeleteCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aC } NS_IMETHODIMP -nsCopyCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsCopyCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -251,7 +251,7 @@ nsCopyCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISuppo NS_IMETHODIMP -nsCopyCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsCopyCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (aEditor) @@ -279,7 +279,7 @@ nsCopyCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aCommandR } NS_IMETHODIMP -nsCopyOrDeleteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsCopyOrDeleteCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr editor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = (editor != nsnull); @@ -288,7 +288,7 @@ nsCopyOrDeleteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, NS_IMETHODIMP -nsCopyOrDeleteCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsCopyOrDeleteCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr editor = do_QueryInterface(aCommandRefCon); if (editor) @@ -327,7 +327,7 @@ nsCopyOrDeleteCommand::GetCommandState(nsICommandParams *aParams, nsISupports *a } NS_IMETHODIMP -nsPasteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsPasteCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -339,7 +339,7 @@ nsPasteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupp NS_IMETHODIMP -nsPasteCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsPasteCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (!aEditor) @@ -379,7 +379,7 @@ nsPasteCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aCommand NS_IMETHODIMP -nsDeleteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsDeleteCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -411,7 +411,7 @@ nsDeleteCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISup NS_IMETHODIMP -nsDeleteCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsDeleteCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (!aEditor) @@ -458,7 +458,7 @@ nsDeleteCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aComman } NS_IMETHODIMP -nsSelectAllCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsSelectAllCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -470,7 +470,7 @@ nsSelectAllCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsI NS_IMETHODIMP -nsSelectAllCommand::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsSelectAllCommand::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (aEditor) @@ -499,7 +499,7 @@ nsSelectAllCommand::GetCommandState(nsICommandParams *aParams, nsISupports *aCom NS_IMETHODIMP -nsSelectionMoveCommands::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) +nsSelectionMoveCommands::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *outCmdEnabled) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); *outCmdEnabled = PR_FALSE; @@ -512,7 +512,7 @@ nsSelectionMoveCommands::IsCommandEnabled(const nsAReadableString & aCommandName NS_IMETHODIMP -nsSelectionMoveCommands::DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) +nsSelectionMoveCommands::DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) { nsCOMPtr aEditor = do_QueryInterface(aCommandRefCon); if (!aEditor) diff --git a/mozilla/editor/libeditor/base/nsEditorCommands.h b/mozilla/editor/libeditor/base/nsEditorCommands.h index 8cd144d0ba8..5e04dfc1368 100644 --- a/mozilla/editor/libeditor/base/nsEditorCommands.h +++ b/mozilla/editor/libeditor/base/nsEditorCommands.h @@ -55,8 +55,8 @@ public: NS_DECL_ISUPPORTS - NS_IMETHOD IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) = 0; - NS_IMETHOD DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon) = 0; + NS_IMETHOD IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) = 0; + NS_IMETHOD DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon) = 0; }; @@ -65,8 +65,8 @@ public: class _cmd : public nsBaseEditorCommand \ { \ public: \ - NS_IMETHOD IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *_retval); \ - NS_IMETHOD DoCommand(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon); \ + NS_IMETHOD IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *_retval); \ + NS_IMETHOD DoCommand(const nsAString & aCommandName, nsISupports *aCommandRefCon); \ NS_IMETHOD DoCommandParams(nsICommandParams *aParams, nsISupports *aCommandRefCon); \ NS_IMETHOD GetCommandState(nsICommandParams *aParams, nsISupports *aCommandRefCon); \ }; @@ -92,14 +92,14 @@ NS_DECL_EDITOR_COMMAND(nsSelectionMoveCommands) #if 0 // template for new command NS_IMETHODIMP -nsFooCommand::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) +nsFooCommand::IsCommandEnabled(const nsAString & aCommandName, nsISupports *aCommandRefCon, PRBool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP -nsFooCommand::DoCommand(const nsAReadableString & aCommandName, const nsAReadableString & aCommandParams, nsISupports *aCommandRefCon) +nsFooCommand::DoCommand(const nsAString & aCommandName, const nsAString & aCommandParams, nsISupports *aCommandRefCon) { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/mozilla/editor/libeditor/base/nsEditorController.cpp b/mozilla/editor/libeditor/base/nsEditorController.cpp index 1ecb7ebb10d..3a607cf232c 100644 --- a/mozilla/editor/libeditor/base/nsEditorController.cpp +++ b/mozilla/editor/libeditor/base/nsEditorController.cpp @@ -190,24 +190,24 @@ nsresult nsEditorController::RegisterEditorCommands(nsIControllerCommandManager * nsIController * ======================================================================= */ -NS_IMETHODIMP nsEditorController::IsCommandEnabled(const nsAReadableString & aCommand, PRBool *aResult) +NS_IMETHODIMP nsEditorController::IsCommandEnabled(const nsAString & aCommand, PRBool *aResult) { NS_ENSURE_ARG_POINTER(aResult); return mCommandManager->IsCommandEnabled(aCommand, mCommandRefCon, aResult); } -NS_IMETHODIMP nsEditorController::SupportsCommand(const nsAReadableString & aCommand, PRBool *aResult) +NS_IMETHODIMP nsEditorController::SupportsCommand(const nsAString & aCommand, PRBool *aResult) { NS_ENSURE_ARG_POINTER(aResult); return mCommandManager->SupportsCommand(aCommand, mCommandRefCon, aResult); } -NS_IMETHODIMP nsEditorController::DoCommand(const nsAReadableString & aCommand) +NS_IMETHODIMP nsEditorController::DoCommand(const nsAString & aCommand) { return mCommandManager->DoCommand(aCommand, mCommandRefCon); } -NS_IMETHODIMP nsEditorController::OnEvent(const nsAReadableString & aEventName) +NS_IMETHODIMP nsEditorController::OnEvent(const nsAString & aEventName) { return NS_OK; } diff --git a/mozilla/editor/libeditor/base/nsStyleSheetTxns.cpp b/mozilla/editor/libeditor/base/nsStyleSheetTxns.cpp index 49e3612d21e..6961b0b758a 100644 --- a/mozilla/editor/libeditor/base/nsStyleSheetTxns.cpp +++ b/mozilla/editor/libeditor/base/nsStyleSheetTxns.cpp @@ -168,7 +168,7 @@ AddStyleSheetTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) } NS_IMETHODIMP -AddStyleSheetTxn::GetTxnDescription(nsAWritableString& aString) +AddStyleSheetTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("AddStyleSheetTxn")); return NS_OK; @@ -295,7 +295,7 @@ RemoveStyleSheetTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMerge) } NS_IMETHODIMP -RemoveStyleSheetTxn::GetTxnDescription(nsAWritableString& aString) +RemoveStyleSheetTxn::GetTxnDescription(nsAString& aString) { aString.Assign(NS_LITERAL_STRING("RemoveStyleSheetTxn")); return NS_OK; diff --git a/mozilla/editor/libeditor/base/nsStyleSheetTxns.h b/mozilla/editor/libeditor/base/nsStyleSheetTxns.h index 3144e5ad0e1..6fe41c11db6 100644 --- a/mozilla/editor/libeditor/base/nsStyleSheetTxns.h +++ b/mozilla/editor/libeditor/base/nsStyleSheetTxns.h @@ -83,7 +83,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: @@ -123,7 +123,7 @@ public: NS_IMETHOD Merge(nsITransaction *aTransaction, PRBool *aDidMerge); - NS_IMETHOD GetTxnDescription(nsAWritableString& aTxnDescription); + NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription); protected: diff --git a/mozilla/editor/public/nsIEditorMailSupport.h b/mozilla/editor/public/nsIEditorMailSupport.h index 50dd858eabb..77f933076aa 100644 --- a/mozilla/editor/public/nsIEditorMailSupport.h +++ b/mozilla/editor/public/nsIEditorMailSupport.h @@ -66,7 +66,7 @@ public: * replacing the selected text (if any). * @param aQuotedText The actual text to be quoted */ - NS_IMETHOD InsertAsQuotation(const nsAReadableString& aQuotedText, + NS_IMETHOD InsertAsQuotation(const nsAString& aQuotedText, nsIDOMNode** aNodeInserted)=0; /** Paste a string as quoted text, @@ -75,7 +75,7 @@ public: * @param aCitation The "mid" URL of the source message * @param aSelectionType Text or html? */ - NS_IMETHOD PasteAsCitedQuotation(const nsAReadableString& aCitation, + NS_IMETHOD PasteAsCitedQuotation(const nsAString& aCitation, PRInt32 aSelectionType)=0; /** Insert a string as quoted text @@ -87,10 +87,10 @@ public: * @param aInsertHTML Insert as html? (vs plaintext) * @param aCharset The charset of the text to be inserted */ - NS_IMETHOD InsertAsCitedQuotation(const nsAReadableString& aQuotedText, - const nsAReadableString& aCitation, + NS_IMETHOD InsertAsCitedQuotation(const nsAString& aQuotedText, + const nsAString& aCitation, PRBool aInsertHTML, - const nsAReadableString& aCharset, + const nsAString& aCharset, nsIDOMNode** aNodeInserted)=0; /** diff --git a/mozilla/editor/public/nsIEditorStyleSheets.h b/mozilla/editor/public/nsIEditorStyleSheets.h index 889b5fb8f4e..08f22c7e211 100644 --- a/mozilla/editor/public/nsIEditorStyleSheets.h +++ b/mozilla/editor/public/nsIEditorStyleSheets.h @@ -62,7 +62,7 @@ public: * @param aURL The style sheet to be loaded and applied. * @param aStyleSheet Optional: if not null, return the style sheet created from aURL */ - NS_IMETHOD ApplyStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet **aStyleSheet)=0; + NS_IMETHOD ApplyStyleSheet(const nsAString& aURL, nsICSSStyleSheet **aStyleSheet)=0; /** load and apply an Override style sheet, specified by aURL, to * the editor's document. @@ -77,7 +77,7 @@ public: * @param aURL The style sheet to be loaded and applied. * @param aStyleSheet Optional: if not null, return the style sheet created from aURL */ - NS_IMETHOD ApplyOverrideStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet **aStyleSheet)=0; + NS_IMETHOD ApplyOverrideStyleSheet(const nsAString& aURL, nsICSSStyleSheet **aStyleSheet)=0; /** Add the given Style Sheet to the editor's document * This is always synchronous