Convert users of nsAReadable[C]String and nsAWritable[C]String typedefs to [const] nsA[C]String. b=131899 r=scc sr=jag a=asa

This commit is contained in:
dbaron%fas.harvard.edu 2002-03-23 22:08:20 +00:00
Родитель 72a3975289
Коммит b96098046d
30 изменённых файлов: 397 добавлений и 500 удалений

Просмотреть файл

@ -57,7 +57,7 @@
static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
static
void ProcessBValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessBValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -75,7 +75,7 @@ void ProcessBValue(nsAReadableString * aInputString, nsAWritableString & aOutput
}
static
void ProcessDefaultValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessDefaultValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -86,7 +86,7 @@ void ProcessDefaultValue(nsAReadableString * aInputString, nsAWritableString & a
}
static
void ProcessSameValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessSameValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -97,7 +97,7 @@ void ProcessSameValue(nsAReadableString * aInputString, nsAWritableString & aOut
}
static
void ProcessExtendedValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessExtendedValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -114,7 +114,7 @@ void ProcessExtendedValue(nsAReadableString * aInputString, nsAWritableString &
}
static
void ProcessLengthValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessLengthValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -128,7 +128,7 @@ void ProcessLengthValue(nsAReadableString * aInputString, nsAWritableString & aO
}
static
void ProcessListStyleTypeValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessListStyleTypeValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -158,7 +158,7 @@ void ProcessListStyleTypeValue(nsAReadableString * aInputString, nsAWritableStri
}
static
void ProcessMarginLeftValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessMarginLeftValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -179,7 +179,7 @@ void ProcessMarginLeftValue(nsAReadableString * aInputString, nsAWritableString
}
static
void ProcessMarginRightValue(nsAReadableString * aInputString, nsAWritableString & aOutputString,
void ProcessMarginRightValue(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString)
{
@ -327,7 +327,7 @@ nsHTMLCSSUtils::Init(nsHTMLEditor *aEditor)
PRBool
nsHTMLCSSUtils::IsCSSEditableProperty(nsIDOMNode * aNode,
nsIAtom * aProperty,
const nsAReadableString * aAttribute)
const nsAString * aAttribute)
{
nsCOMPtr<nsIDOMNode> node = aNode;
// we need an element node here
@ -443,7 +443,7 @@ nsHTMLCSSUtils::IsCSSEditableProperty(nsIDOMNode * aNode,
// the lowest level above the transaction; adds the css declaration "aProperty : aValue" to
// the inline styles carried by aElement
nsresult
nsHTMLCSSUtils::SetCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, const nsAReadableString & aValue)
nsHTMLCSSUtils::SetCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, const nsAString & aValue)
{
ChangeCSSInlineStyleTxn *txn;
nsresult result = CreateCSSPropertyTxn(aElement, aProperty, aValue, &txn, PR_FALSE);
@ -459,7 +459,7 @@ nsHTMLCSSUtils::SetCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, con
// specified for the CSS property aProperty, or totally remove the declaration if this
// property accepts only one value
nsresult
nsHTMLCSSUtils::RemoveCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, const nsAReadableString & aValue)
nsHTMLCSSUtils::RemoveCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, const nsAString & aValue)
{
ChangeCSSInlineStyleTxn *txn;
nsresult result = CreateCSSPropertyTxn(aElement, aProperty, aValue, &txn, PR_TRUE);
@ -475,7 +475,7 @@ nsHTMLCSSUtils::RemoveCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty,
nsresult
nsHTMLCSSUtils::CreateCSSPropertyTxn(nsIDOMElement *aElement,
nsIAtom * aAttribute,
const nsAReadableString& aValue,
const nsAString& aValue,
ChangeCSSInlineStyleTxn ** aTxn,
PRBool aRemoveProperty)
{
@ -492,14 +492,14 @@ nsHTMLCSSUtils::CreateCSSPropertyTxn(nsIDOMElement *aElement,
nsresult
nsHTMLCSSUtils::GetSpecifiedProperty(nsIDOMNode *aNode, nsIAtom *aProperty,
nsAWritableString & aValue)
nsAString & aValue)
{
return GetCSSInlinePropertyBase(aNode, aProperty, aValue, nsnull, SPECIFIED_STYLE_TYPE);
}
nsresult
nsHTMLCSSUtils::GetComputedProperty(nsIDOMNode *aNode, nsIAtom *aProperty,
nsAWritableString & aValue)
nsAString & aValue)
{
nsCOMPtr<nsIDOMViewCSS> viewCSS = nsnull;
nsresult res = GetDefaultViewCSS(aNode, getter_AddRefs(viewCSS));
@ -510,7 +510,7 @@ nsHTMLCSSUtils::GetComputedProperty(nsIDOMNode *aNode, nsIAtom *aProperty,
nsresult
nsHTMLCSSUtils::GetCSSInlinePropertyBase(nsIDOMNode *aNode, nsIAtom *aProperty,
nsAWritableString &aValue,
nsAString &aValue,
nsIDOMViewCSS *aViewCSS,
PRUint8 aStyleType)
{
@ -600,7 +600,7 @@ NS_NewHTMLCSSUtils(nsHTMLCSSUtils** aInstancePtrResult)
// remove the CSS style "aProperty : aPropertyValue" and possibly remove the whole node
// if it is a span and if its only attribute is _moz_dirty
nsresult
nsHTMLCSSUtils::RemoveCSSInlineStyle(nsIDOMNode *aNode, nsIAtom *aProperty, nsAReadableString & aPropertyValue)
nsHTMLCSSUtils::RemoveCSSInlineStyle(nsIDOMNode *aNode, nsIAtom *aProperty, const nsAString & aPropertyValue)
{
nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(aNode);
@ -639,14 +639,14 @@ nsHTMLCSSUtils::RemoveCSSInlineStyle(nsIDOMNode *aNode, nsIAtom *aProperty, nsAR
// Answers true is the property can be removed by setting a "none" CSS value
// on a node
PRBool
nsHTMLCSSUtils::IsCSSInvertable(nsIAtom *aProperty, const nsAReadableString *aAttribute)
nsHTMLCSSUtils::IsCSSInvertable(nsIAtom *aProperty, const nsAString *aAttribute)
{
return PRBool(nsIEditProperty::b == aProperty);
}
// Get the default browser background color if we need it for GetCSSBackgroundColorState
nsresult
nsHTMLCSSUtils::GetDefaultBackgroundColor(nsAWritableString & aColor)
nsHTMLCSSUtils::GetDefaultBackgroundColor(nsAString & aColor)
{
nsresult result;
nsCOMPtr<nsIPref> prefService = do_GetService(kPrefServiceCID, &result);
@ -681,7 +681,7 @@ nsHTMLCSSUtils::GetDefaultBackgroundColor(nsAWritableString & aColor)
// Get the default length unit used for CSS Indent/Outdent
nsresult
nsHTMLCSSUtils::GetDefaultLengthUnit(nsAWritableString & aLengthUnit)
nsHTMLCSSUtils::GetDefaultLengthUnit(nsAString & aLengthUnit)
{
nsresult result;
nsCOMPtr<nsIPref> prefService = do_GetService(kPrefServiceCID, &result);
@ -703,7 +703,7 @@ nsHTMLCSSUtils::GetDefaultLengthUnit(nsAWritableString & aLengthUnit)
// We need then a way to determine the number part and the unit from aString, aString
// being the result of a GetPropertyValue query...
void
nsHTMLCSSUtils::ParseLength(nsAReadableString & aString, float * aValue, nsIAtom ** aUnit)
nsHTMLCSSUtils::ParseLength(const nsAString & aString, float * aValue, nsIAtom ** aUnit)
{
nsAString::const_iterator iter;
aString.BeginReading(iter);
@ -818,7 +818,7 @@ void
nsHTMLCSSUtils::BuildCSSDeclarations(nsVoidArray & aPropertyArray,
nsStringArray & aValueArray,
const CSSEquivTable * aEquivTable,
const nsAReadableString * aValue,
const nsAString * aValue,
PRBool aGetOrRemoveRequest)
{
// clear arrays
@ -858,8 +858,8 @@ nsHTMLCSSUtils::BuildCSSDeclarations(nsVoidArray & aPropertyArray,
void
nsHTMLCSSUtils::GenerateCSSDeclarationsFromHTMLStyle(nsIDOMNode * aNode,
nsIAtom *aHTMLProperty,
const nsAReadableString * aAttribute,
const nsAReadableString * aValue,
const nsAString * aAttribute,
const nsAString * aValue,
nsVoidArray & cssPropertyArray,
nsStringArray & cssValueArray,
PRBool aGetOrRemoveRequest)
@ -952,8 +952,8 @@ nsHTMLCSSUtils::GenerateCSSDeclarationsFromHTMLStyle(nsIDOMNode * aNode,
nsresult
nsHTMLCSSUtils::SetCSSEquivalentToHTMLStyle(nsIDOMNode * aNode,
nsIAtom *aHTMLProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue,
const nsAString *aAttribute,
const nsAString *aValue,
PRInt32 * aCount)
{
nsCOMPtr<nsIDOMElement> theElement = do_QueryInterface(aNode);
@ -988,8 +988,8 @@ nsHTMLCSSUtils::SetCSSEquivalentToHTMLStyle(nsIDOMNode * aNode,
nsresult
nsHTMLCSSUtils::RemoveCSSEquivalentToHTMLStyle(nsIDOMNode * aNode,
nsIAtom *aHTMLProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue)
const nsAString *aAttribute,
const nsAString *aValue)
{
nsCOMPtr<nsIDOMElement> theElement = do_QueryInterface(aNode);
nsresult res = NS_OK;
@ -1045,8 +1045,8 @@ nsHTMLCSSUtils::HasClassOrID(nsIDOMElement * aElement, PRBool & aReturn)
nsresult
nsHTMLCSSUtils::GetCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode,
nsIAtom *aHTMLProperty,
const nsAReadableString *aAttribute,
nsAWritableString & aValueString,
const nsAString *aAttribute,
nsAString & aValueString,
PRUint8 aStyleType)
{
nsCOMPtr<nsIDOMElement> theElement;
@ -1092,9 +1092,9 @@ nsHTMLCSSUtils::GetCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode,
nsresult
nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode,
nsIAtom *aHTMLProperty,
const nsAReadableString * aHTMLAttribute,
const nsAString * aHTMLAttribute,
PRBool & aIsSet,
nsAWritableString & valueString,
nsAString & valueString,
PRUint8 aStyleType)
{
NS_ENSURE_TRUE(aNode, NS_ERROR_NULL_POINTER);

Просмотреть файл

@ -55,7 +55,7 @@
class nsHTMLEditor;
typedef void (*nsProcessValueFunc)(nsAReadableString * aInputString, nsAWritableString & aOutputString,
typedef void (*nsProcessValueFunc)(const nsAString * aInputString, nsAString & aOutputString,
const char * aDefaultValueString,
const char * aPrependString, const char* aAppendString);
@ -109,7 +109,7 @@ public:
* @param aProperty [IN] an atom containing a HTML tag name
* @param aAttribute [IN] a string containing the name of a HTML attribute carried by the element above
*/
PRBool IsCSSEditableProperty(nsIDOMNode * aNode, nsIAtom * aProperty, const nsAReadableString * aAttribute);
PRBool IsCSSEditableProperty(nsIDOMNode * aNode, nsIAtom * aProperty, const nsAString * aAttribute);
/** adds/remove a CSS declaration to the STYLE atrribute carried by a given element
*
@ -118,9 +118,9 @@ public:
* @param aValue [IN] a string containing the value of the CSS property
*/
nsresult SetCSSProperty(nsIDOMElement * aElement, nsIAtom * aProperty,
const nsAReadableString & aValue);
const nsAString & aValue);
nsresult RemoveCSSProperty(nsIDOMElement * aElement, nsIAtom * aProperty,
const nsAReadableString & aPropertyValue);
const nsAString & aPropertyValue);
/** gets the specified/computed style value of a CSS property for a given node (or its element
* ancestor if it is not an element)
@ -130,9 +130,9 @@ public:
* @param aPropertyValue [OUT] the retrieved value of the property
*/
nsresult GetSpecifiedProperty(nsIDOMNode *aNode, nsIAtom *aProperty,
nsAWritableString & aValue);
nsAString & aValue);
nsresult GetComputedProperty(nsIDOMNode *aNode, nsIAtom *aProperty,
nsAWritableString & aValue);
nsAString & aValue);
/** Removes a CSS property from the specified declarations in STYLE attribute
** and removes the node if it is an useless span
@ -142,7 +142,7 @@ public:
* @param aPropertyValue [IN] the value of the property we have to rremove if the property
* accepts more than one value
*/
nsresult RemoveCSSInlineStyle(nsIDOMNode * aNode, nsIAtom * aProperty, nsAReadableString & aPropertyValue);
nsresult RemoveCSSInlineStyle(nsIDOMNode * aNode, nsIAtom * aProperty, const nsAString & aPropertyValue);
/** Answers true is the property can be removed by setting a "none" CSS value
* on a node
@ -151,19 +151,19 @@ public:
* @param aProperty [IN] an atom containing a CSS property
* @param aAttribute [IN] pointer to an attribute name or null if this information is irrelevant
*/
PRBool IsCSSInvertable(nsIAtom * aProperty, const nsAReadableString * aAttribute);
PRBool IsCSSInvertable(nsIAtom * aProperty, const nsAString * aAttribute);
/** Get the default browser background color if we need it for GetCSSBackgroundColorState
*
* @param aColor [OUT] the default color as it is defined in prefs
*/
nsresult GetDefaultBackgroundColor(nsAWritableString & aColor);
nsresult GetDefaultBackgroundColor(nsAString & aColor);
/** Get the default length unit used for CSS Indent/Outdent
*
* @param aLengthUnit [OUT] the default length unit as it is defined in prefs
*/
nsresult GetDefaultLengthUnit(nsAWritableString & aLengthUnit);
nsresult GetDefaultLengthUnit(nsAString & aLengthUnit);
/** asnwers true if the element aElement carries an ID or a class
*
@ -184,8 +184,8 @@ public:
*/
nsresult GetCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode,
nsIAtom * aHTMLProperty,
const nsAReadableString * aAttribute,
nsAWritableString & aValueString,
const nsAString * aAttribute,
nsAString & aValueString,
PRUint8 aStyleType);
/** Does the node aNode (or his parent if it is not an element node) carries
@ -201,9 +201,9 @@ public:
*/
nsresult IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode * aNode,
nsIAtom * aHTMLProperty,
const nsAReadableString * aAttribute,
const nsAString * aAttribute,
PRBool & aIsSet,
nsAWritableString & aValueString,
nsAString & aValueString,
PRUint8 aStyleType);
/** Adds to the node the CSS inline styles equivalent to the HTML style
@ -217,8 +217,8 @@ public:
*/
nsresult SetCSSEquivalentToHTMLStyle(nsIDOMNode * aNode,
nsIAtom * aHTMLProperty,
const nsAReadableString * aAttribute,
const nsAReadableString * aValue,
const nsAString * aAttribute,
const nsAString * aValue,
PRInt32 * aCount);
/** removes from the node the CSS inline styles equivalent to the HTML style
@ -230,8 +230,8 @@ public:
*/
nsresult RemoveCSSEquivalentToHTMLStyle(nsIDOMNode * aNode,
nsIAtom *aHTMLProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue);
const nsAString *aAttribute,
const nsAString *aValue);
/** parses a "xxxx.xxxxxuuu" string where x is a digit and u an alpha char
* we need such a parser because nsIDOMCSSStyleDeclaration::GetPropertyCSSValue() is not
@ -241,7 +241,7 @@ public:
* @param aValue [OUT] numeric part
* @param aUnit [OUT] unit part
*/
void ParseLength(nsAReadableString & aString, float * aValue, nsIAtom ** aUnit);
void ParseLength(const nsAString & aString, float * aValue, nsIAtom ** aUnit);
/** sets the mIsCSSPrefChecked private member ; used as callback from observer when
* the css pref state is changed
@ -308,7 +308,7 @@ private:
void BuildCSSDeclarations(nsVoidArray & aPropertyArray,
nsStringArray & cssValueArray,
const CSSEquivTable * aEquivTable,
const nsAReadableString * aValue,
const nsAString * aValue,
PRBool aGetOrRemoveRequest);
/** retrieves the CSS declarations equivalent to the given HTML property/attribute/value
@ -326,8 +326,8 @@ private:
*/
void GenerateCSSDeclarationsFromHTMLStyle(nsIDOMNode * aNode,
nsIAtom * aHTMLProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue,
const nsAString *aAttribute,
const nsAString *aValue,
nsVoidArray & aPropertyArray,
nsStringArray & aValueArray,
PRBool aGetOrRemoveRequest);
@ -349,7 +349,7 @@ private:
*/
nsresult CreateCSSPropertyTxn(nsIDOMElement * aElement,
nsIAtom * aProperty,
const nsAReadableString & aValue,
const nsAString & aValue,
ChangeCSSInlineStyleTxn ** aTxn,
PRBool aRemoveProperty);
@ -363,7 +363,7 @@ private:
COMPUTED_STYLE_TYPE to query the computed style values
*/
nsresult GetCSSInlinePropertyBase(nsIDOMNode * aNode, nsIAtom * aProperty,
nsAWritableString & aValue,
nsAString & aValue,
nsIDOMViewCSS * aViewCSS,
PRUint8 aStyleType);

Просмотреть файл

@ -164,13 +164,13 @@ static nsCOMPtr<nsIDOMNode> GetTableParent(nsIDOMNode* aNode)
}
NS_IMETHODIMP nsHTMLEditor::LoadHTML(const nsAReadableString & aInString)
NS_IMETHODIMP nsHTMLEditor::LoadHTML(const nsAString & aInString)
{
nsAutoString charset;
return LoadHTMLWithCharset(aInString, charset);
}
NS_IMETHODIMP nsHTMLEditor::LoadHTMLWithCharset(const nsAReadableString & aInputString, const nsAReadableString & aCharset)
NS_IMETHODIMP nsHTMLEditor::LoadHTMLWithCharset(const nsAString & aInputString, const nsAString & aCharset)
{
nsresult res = NS_OK;
if (!mRules) return NS_ERROR_NOT_INITIALIZED;
@ -662,8 +662,8 @@ NS_IMETHODIMP nsHTMLEditor::PrepareTransferable(nsITransferable **transferable)
}
NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable,
const nsAReadableString & aContextStr,
const nsAReadableString & aInfoStr)
const nsAString & aContextStr,
const nsAString & aInfoStr)
{
nsresult rv = NS_OK;
char* bestFlavor = nsnull;
@ -1659,9 +1659,9 @@ nsHTMLEditor::InsertAsCitedQuotation(const nsAString & aQuotedText,
}
nsresult nsHTMLEditor::CreateDOMFragmentFromPaste(nsIDOMNSRange *aNSRange,
const nsAReadableString & aInputString,
const nsAReadableString & aContextStr,
const nsAReadableString & aInfoStr,
const nsAString & aInputString,
const nsAString & aContextStr,
const nsAString & aInfoStr,
nsCOMPtr<nsIDOMNode> *outFragNode,
PRInt32 *outRangeStartHint,
PRInt32 *outRangeEndHint)

Просмотреть файл

@ -915,7 +915,7 @@ nsHTMLEditRules::GetIndentState(PRBool *aCanIndent, PRBool *aCanOutdent)
NS_IMETHODIMP
nsHTMLEditRules::GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat)
nsHTMLEditRules::GetParagraphState(PRBool *aMixed, nsAString &outFormat)
{
// This routine is *heavily* tied to our ui choices in the paragraph
// style popup. I cant see a way around that.
@ -1096,8 +1096,8 @@ nsHTMLEditRules::WillInsertText(PRInt32 aAction,
nsISelection *aSelection,
PRBool *aCancel,
PRBool *aHandled,
const nsAReadableString *inString,
nsAWritableString *outString,
const nsAString *inString,
nsAString *outString,
PRInt32 aMaxLength)
{
if (!aSelection || !aCancel || !aHandled) { return NS_ERROR_NULL_POINTER; }
@ -2487,12 +2487,12 @@ nsHTMLEditRules::DeleteNonTableElements(nsIDOMNode *aNode)
nsresult
nsHTMLEditRules::WillMakeList(nsISelection *aSelection,
const nsAReadableString *aListType,
const nsAString *aListType,
PRBool aEntireList,
const nsAReadableString *aBulletType,
const nsAString *aBulletType,
PRBool *aCancel,
PRBool *aHandled,
const nsAReadableString *aItemType)
const nsAString *aItemType)
{
if (!aSelection || !aListType || !aCancel || !aHandled) { return NS_ERROR_NULL_POINTER; }
@ -2858,7 +2858,7 @@ nsHTMLEditRules::WillRemoveList(nsISelection *aSelection,
nsresult
nsHTMLEditRules::WillMakeDefListItem(nsISelection *aSelection,
const nsAReadableString *aItemType,
const nsAString *aItemType,
PRBool aEntireList,
PRBool *aCancel,
PRBool *aHandled)
@ -2870,7 +2870,7 @@ nsHTMLEditRules::WillMakeDefListItem(nsISelection *aSelection,
nsresult
nsHTMLEditRules::WillMakeBasicBlock(nsISelection *aSelection,
const nsAReadableString *aBlockType,
const nsAString *aBlockType,
PRBool *aCancel,
PRBool *aHandled)
{
@ -3682,8 +3682,8 @@ nsHTMLEditRules::RemovePartOfBlock(nsIDOMNode *aBlock,
nsresult
nsHTMLEditRules::ConvertListType(nsIDOMNode *aList,
nsCOMPtr<nsIDOMNode> *outList,
const nsAReadableString& aListType,
const nsAReadableString& aItemType)
const nsAString& aListType,
const nsAString& aItemType)
{
if (!aList || !outList) return NS_ERROR_NULL_POINTER;
*outList = aList; // we might not need to change the list
@ -3892,7 +3892,7 @@ nsHTMLEditRules::IsEmptyBlock(nsIDOMNode *aNode,
nsresult
nsHTMLEditRules::WillAlign(nsISelection *aSelection,
const nsAReadableString *alignType,
const nsAString *alignType,
PRBool *aCancel,
PRBool *aHandled)
{
@ -4114,7 +4114,7 @@ nsHTMLEditRules::WillAlign(nsISelection *aSelection,
// AlignInnerBlocks: align inside table cells or list items
//
nsresult
nsHTMLEditRules::AlignInnerBlocks(nsIDOMNode *aNode, const nsAReadableString *alignType)
nsHTMLEditRules::AlignInnerBlocks(nsIDOMNode *aNode, const nsAString *alignType)
{
if (!aNode || !alignType) return NS_ERROR_NULL_POINTER;
nsresult res;
@ -4152,7 +4152,7 @@ nsHTMLEditRules::AlignInnerBlocks(nsIDOMNode *aNode, const nsAReadableString *al
// AlignBlockContents: align contents of a block element
//
nsresult
nsHTMLEditRules::AlignBlockContents(nsIDOMNode *aNode, const nsAReadableString *alignType)
nsHTMLEditRules::AlignBlockContents(nsIDOMNode *aNode, const nsAString *alignType)
{
if (!aNode || !alignType) return NS_ERROR_NULL_POINTER;
nsresult res;
@ -6254,7 +6254,7 @@ nsHTMLEditRules::RemoveBlockStyle(nsISupportsArray *arrayOfNodes)
// one or more blocks of type blockTag.
//
nsresult
nsHTMLEditRules::ApplyBlockStyle(nsISupportsArray *arrayOfNodes, const nsAReadableString *aBlockTag)
nsHTMLEditRules::ApplyBlockStyle(nsISupportsArray *arrayOfNodes, const nsAString *aBlockTag)
{
// intent of this routine is to be used for converting to/from
// headers, paragraphs, pre, and address. Those blocks
@ -6413,7 +6413,7 @@ nsHTMLEditRules::ApplyBlockStyle(nsISupportsArray *arrayOfNodes, const nsAReadab
// where we can insert the tag. Adjust inOutParent and
// inOutOffset to pint to new location for tag.
nsresult
nsHTMLEditRules::SplitAsNeeded(const nsAReadableString *aTag,
nsHTMLEditRules::SplitAsNeeded(const nsAString *aTag,
nsCOMPtr<nsIDOMNode> *inOutParent,
PRInt32 *inOutOffset)
{
@ -7530,13 +7530,13 @@ nsHTMLEditRules::InsertMozBRIfNeeded(nsIDOMNode *aNode)
#endif
NS_IMETHODIMP
nsHTMLEditRules::WillCreateNode(const nsAReadableString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
nsHTMLEditRules::WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
{
return NS_OK;
}
NS_IMETHODIMP
nsHTMLEditRules::DidCreateNode(const nsAReadableString& aTag,
nsHTMLEditRules::DidCreateNode(const nsAString& aTag,
nsIDOMNode *aNode,
nsIDOMNode *aParent,
PRInt32 aPosition,
@ -7641,7 +7641,7 @@ nsHTMLEditRules::DidJoinNodes(nsIDOMNode *aLeftNode,
NS_IMETHODIMP
nsHTMLEditRules::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString)
nsHTMLEditRules::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString)
{
return NS_OK;
}
@ -7650,7 +7650,7 @@ nsHTMLEditRules::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset,
NS_IMETHODIMP
nsHTMLEditRules::DidInsertText(nsIDOMCharacterData *aTextNode,
PRInt32 aOffset,
const nsAReadableString &aString,
const nsAString &aString,
nsresult aResult)
{
if (!mListenerEnabled) return NS_OK;
@ -7733,7 +7733,7 @@ nsHTMLEditRules::DidDeleteSelection(nsISelection *aSelection)
// element (here we have to remove the container and keep its
// children). We break on tables and don't look at their children.
nsresult
nsHTMLEditRules::RemoveAlignment(nsIDOMNode * aNode, nsAReadableString & aAlignType, PRBool aChildrenOnly)
nsHTMLEditRules::RemoveAlignment(nsIDOMNode * aNode, const nsAString & aAlignType, PRBool aChildrenOnly)
{
if (!aNode) return NS_ERROR_NULL_POINTER;
@ -7924,7 +7924,7 @@ nsHTMLEditRules::MakeSureElemStartsOrEndsOnCR(nsIDOMNode *aNode)
}
nsresult
nsHTMLEditRules::AlignBlock(nsIDOMElement * aElement, const nsAReadableString * aAlignType, PRBool aContentsOnly)
nsHTMLEditRules::AlignBlock(nsIDOMElement * aElement, const nsAString * aAlignType, PRBool aContentsOnly)
{
if (!aElement) return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -76,12 +76,12 @@ public:
NS_IMETHOD GetListItemState(PRBool *aMixed, PRBool *aLI, PRBool *aDT, PRBool *aDD);
NS_IMETHOD GetIndentState(PRBool *aCanIndent, PRBool *aCanOutdent);
NS_IMETHOD GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign);
NS_IMETHOD GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat);
NS_IMETHOD GetParagraphState(PRBool *aMixed, nsAString &outFormat);
// nsIEditActionListener methods
NS_IMETHOD WillCreateNode(const nsAReadableString& aTag, nsIDOMNode *aParent, PRInt32 aPosition);
NS_IMETHOD DidCreateNode(const nsAReadableString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult);
NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition);
NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult);
NS_IMETHOD WillInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition);
NS_IMETHOD DidInsertNode(nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult);
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild);
@ -90,8 +90,8 @@ public:
NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode, PRInt32 aOffset, nsIDOMNode *aNewLeftNode, nsresult aResult);
NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent);
NS_IMETHOD DidJoinNodes(nsIDOMNode *aLeftNode, nsIDOMNode *aRightNode, nsIDOMNode *aParent, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString, nsresult aResult);
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength);
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength, nsresult aResult);
NS_IMETHOD WillDeleteRange(nsIDOMRange *aRange);
@ -124,8 +124,8 @@ protected:
nsISelection *aSelection,
PRBool *aCancel,
PRBool *aHandled,
const nsAReadableString *inString,
nsAWritableString *outString,
const nsAString *inString,
nsAString *outString,
PRInt32 aMaxLength);
nsresult WillLoadHTML(nsISelection *aSelection, PRBool *aCancel);
nsresult WillInsertBreak(nsISelection *aSelection, PRBool *aCancel, PRBool *aHandled);
@ -138,18 +138,18 @@ protected:
nsresult MoveNodeSmart(nsIDOMNode *aSource, nsIDOMNode *aDest, PRInt32 *aOffset);
nsresult MoveContents(nsIDOMNode *aSource, nsIDOMNode *aDest, PRInt32 *aOffset);
nsresult DeleteNonTableElements(nsIDOMNode *aNode);
nsresult WillMakeList(nsISelection *aSelection, const nsAReadableString *aListType, PRBool aEntireList, const nsAReadableString *aBulletType, PRBool *aCancel, PRBool *aHandled, const nsAReadableString *aItemType=nsnull);
nsresult WillMakeList(nsISelection *aSelection, const nsAString *aListType, PRBool aEntireList, const nsAString *aBulletType, PRBool *aCancel, PRBool *aHandled, const nsAString *aItemType=nsnull);
nsresult WillRemoveList(nsISelection *aSelection, PRBool aOrderd, PRBool *aCancel, PRBool *aHandled);
nsresult WillIndent(nsISelection *aSelection, PRBool *aCancel, PRBool *aHandled);
nsresult WillCSSIndent(nsISelection *aSelection, PRBool *aCancel, PRBool *aHandled);
nsresult WillHTMLIndent(nsISelection *aSelection, PRBool *aCancel, PRBool *aHandled);
nsresult WillOutdent(nsISelection *aSelection, PRBool *aCancel, PRBool *aHandled);
nsresult WillAlign(nsISelection *aSelection, const nsAReadableString *alignType, PRBool *aCancel, PRBool *aHandled);
nsresult WillMakeDefListItem(nsISelection *aSelection, const nsAReadableString *aBlockType, PRBool aEntireList, PRBool *aCancel, PRBool *aHandled);
nsresult WillMakeBasicBlock(nsISelection *aSelection, const nsAReadableString *aBlockType, PRBool *aCancel, PRBool *aHandled);
nsresult WillAlign(nsISelection *aSelection, const nsAString *alignType, PRBool *aCancel, PRBool *aHandled);
nsresult WillMakeDefListItem(nsISelection *aSelection, const nsAString *aBlockType, PRBool aEntireList, PRBool *aCancel, PRBool *aHandled);
nsresult WillMakeBasicBlock(nsISelection *aSelection, const nsAString *aBlockType, PRBool *aCancel, PRBool *aHandled);
nsresult DidMakeBasicBlock(nsISelection *aSelection, nsRulesInfo *aInfo, nsresult aResult);
nsresult AlignInnerBlocks(nsIDOMNode *aNode, const nsAReadableString *alignType);
nsresult AlignBlockContents(nsIDOMNode *aNode, const nsAReadableString *alignType);
nsresult AlignInnerBlocks(nsIDOMNode *aNode, const nsAString *alignType);
nsresult AlignBlockContents(nsIDOMNode *aNode, const nsAString *alignType);
nsresult GetInnerContent(nsIDOMNode *aNode, nsISupportsArray *outArrayOfNodes, PRInt32 *aIndex, PRBool aList = PR_TRUE, PRBool aTble = PR_TRUE);
nsCOMPtr<nsIDOMNode> IsInListItem(nsIDOMNode *aNode);
nsresult ReturnInHeader(nsISelection *aSelection, nsIDOMNode *aHeader, nsIDOMNode *aTextNode, PRInt32 aOffset);
@ -166,7 +166,7 @@ protected:
nsIDOMNode *aEndChild,
nsCOMPtr<nsIDOMNode> *aLeftNode = 0,
nsCOMPtr<nsIDOMNode> *aRightNode = 0);
nsresult ConvertListType(nsIDOMNode *aList, nsCOMPtr<nsIDOMNode> *outList, const nsAReadableString& aListType, const nsAReadableString& aItemType);
nsresult ConvertListType(nsIDOMNode *aList, nsCOMPtr<nsIDOMNode> *outList, const nsAString& aListType, const nsAString& aItemType);
nsresult CreateStyleForInsertText(nsISelection *aSelection, nsIDOMDocument *aDoc);
nsresult IsEmptyBlock(nsIDOMNode *aNode,
PRBool *outIsEmptyBlock,
@ -216,9 +216,9 @@ protected:
nsresult MakeTransitionList(nsISupportsArray *inArrayOfNodes,
nsVoidArray *inTransitionArray);
nsresult RemoveBlockStyle(nsISupportsArray *arrayOfNodes);
nsresult ApplyBlockStyle(nsISupportsArray *arrayOfNodes, const nsAReadableString *aBlockTag);
nsresult ApplyBlockStyle(nsISupportsArray *arrayOfNodes, const nsAString *aBlockTag);
nsresult MakeBlockquote(nsISupportsArray *arrayOfNodes);
nsresult SplitAsNeeded(const nsAReadableString *aTag, nsCOMPtr<nsIDOMNode> *inOutParent, PRInt32 *inOutOffset);
nsresult SplitAsNeeded(const nsAString *aTag, nsCOMPtr<nsIDOMNode> *inOutParent, PRInt32 *inOutOffset);
nsresult AddTerminatingBR(nsIDOMNode *aBlock);
nsresult JoinNodesSmart( nsIDOMNode *aNodeLeft,
nsIDOMNode *aNodeRight,
@ -245,10 +245,10 @@ protected:
PRBool IsVisBreak(nsIDOMNode *aNode);
PRBool IsEmptyInline(nsIDOMNode *aNode);
PRBool ListIsEmptyLine(nsISupportsArray *arrayOfNodes);
nsresult RemoveAlignment(nsIDOMNode * aNode, nsAReadableString & aAlignType, PRBool aChildrenOnly);
nsresult RemoveAlignment(nsIDOMNode * aNode, const nsAString & aAlignType, PRBool aChildrenOnly);
nsresult MakeSureElemStartsOrEndsOnCR(nsIDOMNode *aNode, PRBool aStarts);
nsresult MakeSureElemStartsOrEndsOnCR(nsIDOMNode *aNode);
nsresult AlignBlock(nsIDOMElement * aElement, const nsAReadableString * aAlignType, PRBool aContentsOnly);
nsresult AlignBlock(nsIDOMElement * aElement, const nsAString * aAlignType, PRBool aContentsOnly);
nsresult RelativeChangeIndentation(nsIDOMNode *aNode, PRInt8 aRelativeChange);
// data members

Просмотреть файл

@ -652,7 +652,7 @@ nsHTMLEditor::IsBlockNode(nsIDOMNode *aNode)
// Non-static version for the nsIEditor interface and JavaScript
NS_IMETHODIMP
nsHTMLEditor::SetDocumentTitle(const nsAReadableString &aTitle)
nsHTMLEditor::SetDocumentTitle(const nsAString &aTitle)
{
SetDocTitleTxn *txn;
nsresult result = TransactionFactory::GetNewTransaction(SetDocTitleTxn::GetCID(), (EditTxn **)&txn);
@ -1201,7 +1201,7 @@ NS_IMETHODIMP nsHTMLEditor::HandleKeyPress(nsIDOMKeyEvent* aKeyEvent)
to TypedText() to determine what action to take, but without passing
an event.
*/
NS_IMETHODIMP nsHTMLEditor::TypedText(const nsAReadableString& aString,
NS_IMETHODIMP nsHTMLEditor::TypedText(const nsAString& aString,
PRInt32 aAction)
{
nsAutoPlaceHolderBatch batch(this, gTypingTxnName);
@ -1543,7 +1543,7 @@ nsHTMLEditor::CollapseSelectionToDeepestNonTableFirstChild(nsISelection *aSelect
// but we can't use that because it is selection-based and
// the rules code won't let us edit under the <head> node
NS_IMETHODIMP
nsHTMLEditor::ReplaceHeadContentsWithHTML(const nsAReadableString& aSourceToInsert)
nsHTMLEditor::ReplaceHeadContentsWithHTML(const nsAString& aSourceToInsert)
{
nsAutoRules beginRulesSniffing(this, kOpIgnore, nsIEditor::eNone); // dont do any post processing, rules get confused
nsCOMPtr<nsISelection> selection;
@ -1648,7 +1648,7 @@ nsHTMLEditor::ReplaceHeadContentsWithHTML(const nsAReadableString& aSourceToInse
}
NS_IMETHODIMP
nsHTMLEditor::RebuildDocumentFromSource(const nsAReadableString& aSourceString)
nsHTMLEditor::RebuildDocumentFromSource(const nsAString& aSourceString)
{
ForceCompositionEnd();
@ -1977,7 +1977,7 @@ nsHTMLEditor::SetCaretAfterElement(nsIDOMElement* aElement)
}
NS_IMETHODIMP
nsHTMLEditor::SetParagraphFormat(const nsAReadableString& aParagraphFormat)
nsHTMLEditor::SetParagraphFormat(const nsAString& aParagraphFormat)
{
nsAutoString tag; tag.Assign(aParagraphFormat);
ToLowerCase(tag);
@ -2105,7 +2105,7 @@ nsHTMLEditor::GetParentBlockTags(nsStringArray *aTagList, PRBool aGetLists)
NS_IMETHODIMP
nsHTMLEditor::GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat)
nsHTMLEditor::GetParagraphState(PRBool *aMixed, nsAString &outFormat)
{
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
if (!aMixed) return NS_ERROR_NULL_POINTER;
@ -2116,7 +2116,7 @@ nsHTMLEditor::GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat)
}
NS_IMETHODIMP
nsHTMLEditor::GetBackgroundColorState(PRBool *aMixed, nsAWritableString &aOutColor)
nsHTMLEditor::GetBackgroundColorState(PRBool *aMixed, nsAString &aOutColor)
{
nsresult res;
PRBool useCSS;
@ -2134,7 +2134,7 @@ nsHTMLEditor::GetBackgroundColorState(PRBool *aMixed, nsAWritableString &aOutCol
}
NS_IMETHODIMP
nsHTMLEditor::GetHighlightColorState(PRBool *aMixed, nsAWritableString &aOutColor)
nsHTMLEditor::GetHighlightColorState(PRBool *aMixed, nsAString &aOutColor)
{
nsresult res = NS_OK;
PRBool useCSS;
@ -2165,7 +2165,7 @@ nsHTMLEditor::GetHighlightColor(PRBool *aMixed, PRUnichar **_retval)
nsresult
nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAWritableString &aOutColor, PRBool aBlockLevel)
nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, PRBool aBlockLevel)
{
if (!aMixed) return NS_ERROR_NULL_POINTER;
*aMixed = PR_FALSE;
@ -2271,7 +2271,7 @@ nsHTMLEditor::GetCSSBackgroundColorState(PRBool *aMixed, nsAWritableString &aOut
}
NS_IMETHODIMP
nsHTMLEditor::GetHTMLBackgroundColorState(PRBool *aMixed, nsAWritableString &aOutColor)
nsHTMLEditor::GetHTMLBackgroundColorState(PRBool *aMixed, nsAString &aOutColor)
{
//TODO: We don't handle "mixed" correctly!
if (!aMixed) return NS_ERROR_NULL_POINTER;
@ -2365,7 +2365,7 @@ nsHTMLEditor::GetIndentState(PRBool *aCanIndent, PRBool *aCanOutdent)
}
NS_IMETHODIMP
nsHTMLEditor::MakeOrChangeList(const nsAReadableString& aListType, PRBool entireList, const nsAReadableString& aBulletType)
nsHTMLEditor::MakeOrChangeList(const nsAString& aListType, PRBool entireList, const nsAString& aBulletType)
{
nsresult res;
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -2443,7 +2443,7 @@ nsHTMLEditor::MakeOrChangeList(const nsAReadableString& aListType, PRBool entire
NS_IMETHODIMP
nsHTMLEditor::RemoveList(const nsAReadableString& aListType)
nsHTMLEditor::RemoveList(const nsAString& aListType)
{
nsresult res;
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -2473,7 +2473,7 @@ nsHTMLEditor::RemoveList(const nsAReadableString& aListType)
}
nsresult
nsHTMLEditor::MakeDefinitionItem(const nsAReadableString& aItemType)
nsHTMLEditor::MakeDefinitionItem(const nsAString& aItemType)
{
nsresult res;
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -2503,7 +2503,7 @@ nsHTMLEditor::MakeDefinitionItem(const nsAReadableString& aItemType)
}
nsresult
nsHTMLEditor::InsertBasicBlock(const nsAReadableString& aBlockType)
nsHTMLEditor::InsertBasicBlock(const nsAString& aBlockType)
{
nsresult res;
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -2575,7 +2575,7 @@ nsHTMLEditor::InsertBasicBlock(const nsAReadableString& aBlockType)
}
NS_IMETHODIMP
nsHTMLEditor::Indent(const nsAReadableString& aIndent)
nsHTMLEditor::Indent(const nsAString& aIndent)
{
nsresult res;
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -2662,7 +2662,7 @@ nsHTMLEditor::Indent(const nsAReadableString& aIndent)
//TODO: IMPLEMENT ALIGNMENT!
NS_IMETHODIMP
nsHTMLEditor::Align(const nsAReadableString& aAlignType)
nsHTMLEditor::Align(const nsAString& aAlignType)
{
nsAutoEditBatch beginBatching(this);
nsAutoRules beginRulesSniffing(this, kOpAlign, nsIEditor::eNext);
@ -2686,7 +2686,7 @@ nsHTMLEditor::Align(const nsAReadableString& aAlignType)
}
NS_IMETHODIMP
nsHTMLEditor::GetElementOrParentByTagName(const nsAReadableString& aTagName, nsIDOMNode *aNode, nsIDOMElement** aReturn)
nsHTMLEditor::GetElementOrParentByTagName(const nsAString& aTagName, nsIDOMNode *aNode, nsIDOMElement** aReturn)
{
if (aTagName.Length() == 0 || !aReturn )
return NS_ERROR_NULL_POINTER;
@ -2808,7 +2808,7 @@ NODE_FOUND:
}
NS_IMETHODIMP
nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElement** aReturn)
nsHTMLEditor::GetSelectedElement(const nsAString& aTagName, nsIDOMElement** aReturn)
{
if (!aReturn )
return NS_ERROR_NULL_POINTER;
@ -3053,7 +3053,7 @@ nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElemen
}
NS_IMETHODIMP
nsHTMLEditor::CreateElementWithDefaults(const nsAReadableString& aTagName, nsIDOMElement** aReturn)
nsHTMLEditor::CreateElementWithDefaults(const nsAString& aTagName, nsIDOMElement** aReturn)
{
nsresult res=NS_ERROR_NOT_INITIALIZED;
if (aReturn)
@ -3200,7 +3200,7 @@ nsHTMLEditor::InsertLinkAroundSelection(nsIDOMElement* aAnchorElement)
}
NS_IMETHODIMP
nsHTMLEditor::SetHTMLBackgroundColor(const nsAReadableString& aColor)
nsHTMLEditor::SetHTMLBackgroundColor(const nsAString& aColor)
{
NS_PRECONDITION(mDocWeak, "Missing Editor DOM Document");
@ -3253,7 +3253,7 @@ nsHTMLEditor::SetHTMLBackgroundColor(const nsAReadableString& aColor)
return res;
}
NS_IMETHODIMP nsHTMLEditor::SetBodyAttribute(const nsAReadableString& aAttribute, const nsAReadableString& aValue)
NS_IMETHODIMP nsHTMLEditor::SetBodyAttribute(const nsAString& aAttribute, const nsAString& aValue)
{
nsresult res;
// TODO: Check selection for Cell, Row, Column or table and do color on appropriate level
@ -3413,20 +3413,20 @@ nsHTMLEditor::RemoveOverrideStyleSheet(nsICSSStyleSheet* aSheet)
}
NS_IMETHODIMP
nsHTMLEditor::ApplyOverrideStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet **aStyleSheet)
nsHTMLEditor::ApplyOverrideStyleSheet(const nsAString& aURL, nsICSSStyleSheet **aStyleSheet)
{
return ApplyDocumentOrOverrideStyleSheet(aURL, PR_TRUE, aStyleSheet);
}
NS_IMETHODIMP
nsHTMLEditor::ApplyStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet **aStyleSheet)
nsHTMLEditor::ApplyStyleSheet(const nsAString& aURL, nsICSSStyleSheet **aStyleSheet)
{
return ApplyDocumentOrOverrideStyleSheet(aURL, PR_FALSE, aStyleSheet);
}
//Note: Loading a document style sheet is undoable, loading an override sheet is not
nsresult
nsHTMLEditor::ApplyDocumentOrOverrideStyleSheet(const nsAReadableString& aURL, PRBool aOverride, nsICSSStyleSheet **aStyleSheet)
nsHTMLEditor::ApplyDocumentOrOverrideStyleSheet(const nsAString& aURL, PRBool aOverride, nsICSSStyleSheet **aStyleSheet)
{
nsresult rv = NS_OK;
nsCOMPtr<nsIURI> uaURL;
@ -3641,7 +3641,7 @@ static nsresult SetSelectionAroundHeadChildren(nsCOMPtr<nsISelection> aSelection
}
NS_IMETHODIMP
nsHTMLEditor::GetHeadContentsAsHTML(nsAWritableString& aOutputString)
nsHTMLEditor::GetHeadContentsAsHTML(nsAString& aOutputString)
{
nsCOMPtr<nsISelection> selection;
nsresult res = GetSelection(getter_AddRefs(selection));
@ -3712,7 +3712,7 @@ nsHTMLEditor::DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed)
#endif
NS_IMETHODIMP
nsHTMLEditor::SetCompositionString(const nsAReadableString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply)
nsHTMLEditor::SetCompositionString(const nsAString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply)
{
NS_ASSERTION(aTextRangeList, "null ptr");
if(nsnull == aTextRangeList)
@ -3882,7 +3882,7 @@ nsHTMLEditor::EndOperation()
}
PRBool
nsHTMLEditor::TagCanContainTag(const nsAReadableString& aParentTag, const nsAReadableString& aChildTag)
nsHTMLEditor::TagCanContainTag(const nsAString& aParentTag, const nsAString& aChildTag)
{
// COtherDTD gives some unwanted results. We override them here.
if (aParentTag.Equals(NS_LITERAL_STRING("ol"),nsCaseInsensitiveStringComparator()) ||
@ -3992,11 +3992,11 @@ NS_IMETHODIMP nsHTMLEditor::GetLayoutObject(nsIDOMNode *aNode, nsISupports **aLa
// so singleton attributes like <Table border> will not be matched!
void nsHTMLEditor::IsTextPropertySetByContent(nsIDOMNode *aNode,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue,
const nsAString *aAttribute,
const nsAString *aValue,
PRBool &aIsSet,
nsIDOMNode **aStyleNode,
nsAWritableString *outValue) const
nsAString *outValue) const
{
nsresult result;
aIsSet = PR_FALSE; // must be initialized to false for code below to work
@ -4059,7 +4059,7 @@ void nsHTMLEditor::IsTextPropertySetByContent(nsIDOMNode *aNode,
void nsHTMLEditor::IsTextStyleSet(nsIStyleContext *aSC,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAString *aAttribute,
PRBool &aIsSet) const
{
aIsSet = PR_FALSE;
@ -4348,7 +4348,7 @@ nsHTMLEditor::CollapseAdjacentTextNodes(nsIDOMRange *aInRange)
NS_IMETHODIMP
nsHTMLEditor::GetNextElementByTagName(nsIDOMElement *aCurrentElement,
const nsAReadableString *aTagName,
const nsAString *aTagName,
nsIDOMElement **aReturn)
{
nsresult res = NS_OK;
@ -5005,8 +5005,8 @@ nsHTMLEditor::IsEmptyNode( nsIDOMNode *aNode,
// aAttribute with its value aValue
nsresult
nsHTMLEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue)
const nsAString & aAttribute,
const nsAString & aValue)
{
PRBool useCSS;
nsresult res = NS_OK;
@ -5056,7 +5056,7 @@ nsHTMLEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
nsresult
nsHTMLEditor::RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute)
const nsAString & aAttribute)
{
PRBool useCSS;
nsresult res = NS_OK;
@ -5089,7 +5089,7 @@ nsHTMLEditor::SetIsCSSEnabled(PRBool aIsCSSPrefChecked)
// Set the block background color
NS_IMETHODIMP
nsHTMLEditor::SetCSSBackgroundColor(const nsAReadableString& aColor)
nsHTMLEditor::SetCSSBackgroundColor(const nsAString& aColor)
{
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
ForceCompositionEnd();
@ -5316,7 +5316,7 @@ nsHTMLEditor::SetCSSBackgroundColor(const nsAReadableString& aColor)
}
NS_IMETHODIMP
nsHTMLEditor::SetBackgroundColor(const nsAReadableString& aColor)
nsHTMLEditor::SetBackgroundColor(const nsAString& aColor)
{
nsresult res;
PRBool useCSS;

Просмотреть файл

@ -126,69 +126,69 @@ public:
nsIDOMCSSStyleRule **_retval);
NS_IMETHOD SetCSSInlineProperty(nsIAtom *aProperty,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue);
const nsAString & aAttribute,
const nsAString & aValue);
NS_IMETHOD SetInlineProperty(nsIAtom *aProperty,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue);
const nsAString & aAttribute,
const nsAString & aValue);
NS_IMETHOD GetInlineProperty(nsIAtom *aProperty,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue,
const nsAString & aAttribute,
const nsAString & aValue,
PRBool *aFirst,
PRBool *aAny,
PRBool *aAll);
NS_IMETHOD GetInlinePropertyWithAttrValue(nsIAtom *aProperty,
const nsAReadableString &aAttribute,
const nsAReadableString &aValue,
const nsAString &aAttribute,
const nsAString &aValue,
PRBool *aFirst,
PRBool *aAny,
PRBool *aAll,
nsAWritableString &outValue);
nsAString &outValue);
NS_IMETHOD RemoveAllInlineProperties();
NS_IMETHOD RemoveInlineProperty(nsIAtom *aProperty, const nsAReadableString & aAttribute);
NS_IMETHOD RemoveInlineProperty(nsIAtom *aProperty, const nsAString & aAttribute);
NS_IMETHOD IncreaseFontSize();
NS_IMETHOD DecreaseFontSize();
NS_IMETHOD InsertHTML(const nsAReadableString &aInputString);
NS_IMETHOD InsertHTMLWithCharset(const nsAReadableString& aInputString,
const nsAReadableString& aCharset);
NS_IMETHOD LoadHTML(const nsAReadableString &aInputString);
NS_IMETHOD LoadHTMLWithCharset(const nsAReadableString& aInputString,
const nsAReadableString& aCharset);
NS_IMETHOD RebuildDocumentFromSource(const nsAReadableString& aSourceString);
NS_IMETHOD InsertHTML(const nsAString &aInputString);
NS_IMETHOD InsertHTMLWithCharset(const nsAString& aInputString,
const nsAString& aCharset);
NS_IMETHOD LoadHTML(const nsAString &aInputString);
NS_IMETHOD LoadHTMLWithCharset(const nsAString& aInputString,
const nsAString& aCharset);
NS_IMETHOD RebuildDocumentFromSource(const nsAString& aSourceString);
NS_IMETHOD InsertElementAtSelection(nsIDOMElement* aElement, PRBool aDeleteSelection);
NS_IMETHOD SelectElement(nsIDOMElement* aElement);
NS_IMETHOD SetCaretAfterElement(nsIDOMElement* aElement);
NS_IMETHOD SetParagraphFormat(const nsAReadableString& aParagraphFormat);
NS_IMETHOD SetParagraphFormat(const nsAString& aParagraphFormat);
NS_IMETHOD GetParentBlockTags(nsStringArray *aTagList, PRBool aGetLists);
NS_IMETHOD GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat);
NS_IMETHOD GetFontFaceState(PRBool *aMixed, nsAWritableString &outFace);
NS_IMETHOD GetFontColorState(PRBool *aMixed, nsAWritableString &outColor);
NS_IMETHOD GetCSSBackgroundColorState(PRBool *aMixed, nsAWritableString &aOutColor, PRBool aBlockLevel);
NS_IMETHOD GetHTMLBackgroundColorState(PRBool *aMixed, nsAWritableString &outColor);
NS_IMETHOD GetBackgroundColorState(PRBool *aMixed, nsAWritableString &outColor);
NS_IMETHOD GetHighlightColorState(PRBool *aMixed, nsAWritableString &outColor);
NS_IMETHOD GetParagraphState(PRBool *aMixed, nsAString &outFormat);
NS_IMETHOD GetFontFaceState(PRBool *aMixed, nsAString &outFace);
NS_IMETHOD GetFontColorState(PRBool *aMixed, nsAString &outColor);
NS_IMETHOD GetCSSBackgroundColorState(PRBool *aMixed, nsAString &aOutColor, PRBool aBlockLevel);
NS_IMETHOD GetHTMLBackgroundColorState(PRBool *aMixed, nsAString &outColor);
NS_IMETHOD GetBackgroundColorState(PRBool *aMixed, nsAString &outColor);
NS_IMETHOD GetHighlightColorState(PRBool *aMixed, nsAString &outColor);
NS_IMETHOD GetHighlightColor(PRBool *mixed, PRUnichar **_retval);
NS_IMETHOD GetListState(PRBool *aMixed, PRBool *aOL, PRBool *aUL, PRBool *aDL);
NS_IMETHOD GetListItemState(PRBool *aMixed, PRBool *aLI, PRBool *aDT, PRBool *aDD);
NS_IMETHOD GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign);
NS_IMETHOD GetIndentState(PRBool *aCanIndent, PRBool *aCanOutdent);
NS_IMETHOD MakeOrChangeList(const nsAReadableString& aListType, PRBool entireList, const nsAReadableString& aBulletType);
NS_IMETHOD RemoveList(const nsAReadableString& aListType);
NS_IMETHOD Indent(const nsAReadableString& aIndent);
NS_IMETHOD Align(const nsAReadableString& aAlign);
NS_IMETHOD MakeOrChangeList(const nsAString& aListType, PRBool entireList, const nsAString& aBulletType);
NS_IMETHOD RemoveList(const nsAString& aListType);
NS_IMETHOD Indent(const nsAString& aIndent);
NS_IMETHOD Align(const nsAString& aAlign);
NS_IMETHOD GetElementOrParentByTagName(const nsAReadableString& aTagName, nsIDOMNode *aNode, nsIDOMElement** aReturn);
NS_IMETHOD GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElement** aReturn);
NS_IMETHOD CreateElementWithDefaults(const nsAReadableString& aTagName, nsIDOMElement** aReturn);
NS_IMETHOD GetNextElementByTagName(nsIDOMElement *aCurrentElement, const nsAReadableString *aTagName, nsIDOMElement **aReturn);
NS_IMETHOD GetElementOrParentByTagName(const nsAString& aTagName, nsIDOMNode *aNode, nsIDOMElement** aReturn);
NS_IMETHOD GetSelectedElement(const nsAString& aTagName, nsIDOMElement** aReturn);
NS_IMETHOD CreateElementWithDefaults(const nsAString& aTagName, nsIDOMElement** aReturn);
NS_IMETHOD GetNextElementByTagName(nsIDOMElement *aCurrentElement, const nsAString *aTagName, nsIDOMElement **aReturn);
NS_IMETHOD InsertLinkAroundSelection(nsIDOMElement* aAnchorElement);
@ -200,17 +200,17 @@ public:
/* ------------ nsIEditorIMESupport overrides -------------- */
NS_IMETHOD SetCompositionString(const nsAReadableString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply);
NS_IMETHOD SetCompositionString(const nsAString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply);
NS_IMETHOD GetReconversionString(nsReconversionEventReply* aReply);
/* ------------ nsIEditorStyleSheets methods -------------- */
NS_IMETHOD ApplyStyleSheet(const nsAReadableString & aURL, nsICSSStyleSheet **aStyleSheet);
NS_IMETHOD ApplyOverrideStyleSheet(const nsAReadableString & aURL, nsICSSStyleSheet **aStyleSheet);
NS_IMETHOD ApplyStyleSheet(const nsAString & aURL, nsICSSStyleSheet **aStyleSheet);
NS_IMETHOD ApplyOverrideStyleSheet(const nsAString & aURL, nsICSSStyleSheet **aStyleSheet);
/* Above 2 methods call this with appropriate aOverride value
* Not exposed to IDL interface
*/
nsresult ApplyDocumentOrOverrideStyleSheet(const nsAReadableString & aURL, PRBool aOverride, nsICSSStyleSheet **aStyleSheet);
nsresult ApplyDocumentOrOverrideStyleSheet(const nsAString & aURL, PRBool aOverride, nsICSSStyleSheet **aStyleSheet);
NS_IMETHOD AddStyleSheet(nsICSSStyleSheet* aSheet);
NS_IMETHOD RemoveStyleSheet(nsICSSStyleSheet* aSheet);
NS_IMETHOD RemoveOverrideStyleSheet(nsICSSStyleSheet* aSheet);
@ -218,13 +218,13 @@ public:
/* ------------ nsIEditorMailSupport methods -------------- */
NS_IMETHOD PasteAsQuotation(PRInt32 aSelectionType);
NS_IMETHOD InsertAsQuotation(const nsAReadableString & aQuotedText, nsIDOMNode **aNodeInserted);
NS_IMETHOD PasteAsCitedQuotation(const nsAReadableString & aCitation,
NS_IMETHOD InsertAsQuotation(const nsAString & aQuotedText, nsIDOMNode **aNodeInserted);
NS_IMETHOD PasteAsCitedQuotation(const nsAString & aCitation,
PRInt32 aSelectionType);
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);
NS_IMETHOD GetEmbeddedObjects(nsISupportsArray** aNodeList);
@ -291,13 +291,13 @@ public:
/* miscellaneous */
// This sets background on the appropriate container element (table, cell,)
// or calls into nsTextEditor to set the page background
NS_IMETHOD SetCSSBackgroundColor(const nsAReadableString& aColor);
NS_IMETHOD SetHTMLBackgroundColor(const nsAReadableString& aColor);
NS_IMETHOD SetBackgroundColor(const nsAReadableString& aColor);
NS_IMETHOD SetBodyAttribute(const nsAReadableString& aAttr, const nsAReadableString& aValue);
NS_IMETHOD SetCSSBackgroundColor(const nsAString& aColor);
NS_IMETHOD SetHTMLBackgroundColor(const nsAString& aColor);
NS_IMETHOD SetBackgroundColor(const nsAString& aColor);
NS_IMETHOD SetBodyAttribute(const nsAString& aAttr, const nsAString& aValue);
// aTitle may be null or empty string to remove child contents of <title>
NS_IMETHOD SetDocumentTitle(const nsAReadableString &aTitle);
NS_IMETHOD SetDocumentTitle(const nsAString &aTitle);
/* ------------ Block methods moved from nsEditor -------------- */
static nsCOMPtr<nsIDOMNode> GetBlockNodeParent(nsIDOMNode *aNode);
@ -373,8 +373,8 @@ public:
NS_IMETHOD DoDrag(nsIDOMEvent *aDragEvent);
NS_IMETHOD InsertFromDrop(nsIDOMEvent* aDropEvent);
NS_IMETHOD GetHeadContentsAsHTML(nsAWritableString& aOutputString);
NS_IMETHOD ReplaceHeadContentsWithHTML(const nsAReadableString &aSourceToInsert);
NS_IMETHOD GetHeadContentsAsHTML(nsAString& aOutputString);
NS_IMETHOD ReplaceHeadContentsWithHTML(const nsAString &aSourceToInsert);
NS_IMETHOD DebugUnitTests(PRInt32 *outNumTests, PRInt32 *outNumTestsFailed);
@ -387,16 +387,16 @@ public:
NS_IMETHOD EndOperation();
/** returns PR_TRUE if aParentTag can contain a child of type aChildTag */
virtual PRBool TagCanContainTag(const nsAReadableString& aParentTag, const nsAReadableString& aChildTag);
virtual PRBool TagCanContainTag(const nsAString& aParentTag, const nsAString& aChildTag);
/** make the given selection span the entire document */
NS_IMETHOD SelectEntireDocument(nsISelection *aSelection);
NS_IMETHOD SetAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue);
const nsAString & aAttribute,
const nsAString & aValue);
NS_IMETHOD RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute);
const nsAString & aAttribute);
/** join together any afjacent editable text nodes in the range */
NS_IMETHOD CollapseAdjacentTextNodes(nsIDOMRange *aInRange);
@ -407,7 +407,7 @@ public:
NS_IMETHOD StyleSheetLoaded(nsICSSStyleSheet*aSheet, PRBool aNotify);
/* ------------ Utility Routines, not part of public API -------------- */
NS_IMETHOD TypedText(const nsAReadableString& aString, PRInt32 aAction);
NS_IMETHOD TypedText(const nsAString& aString, PRInt32 aAction);
nsresult InsertNodeAtPoint( nsIDOMNode *aNode,
nsCOMPtr<nsIDOMNode> *ioParent,
PRInt32 *ioOffset,
@ -575,18 +575,18 @@ protected:
*/
virtual void IsTextPropertySetByContent(nsIDOMNode *aNode,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue,
const nsAString *aAttribute,
const nsAString *aValue,
PRBool &aIsSet,
nsIDOMNode **aStyleNode,
nsAWritableString *outValue = nsnull) const;
nsAString *outValue = nsnull) const;
/** style-based query returns PR_TRUE if (aProperty, aAttribute) is set in aSC.
* WARNING: not well tested yet since we don't do style-based queries anywhere.
*/
virtual void IsTextStyleSet(nsIStyleContext *aSC,
nsIAtom *aProperty,
const nsAReadableString *aAttributes,
const nsAString *aAttributes,
PRBool &aIsSet) const;
@ -597,26 +597,26 @@ protected:
// Methods for handling plaintext quotations
NS_IMETHOD PasteAsPlaintextQuotation(PRInt32 aSelectionType);
NS_IMETHOD InsertAsPlaintextQuotation(const nsAReadableString & aQuotedText,
NS_IMETHOD InsertAsPlaintextQuotation(const nsAString & aQuotedText,
nsIDOMNode **aNodeInserted);
// factored methods for handling insertion of data from transferables (drag&drop or clipboard)
NS_IMETHOD PrepareTransferable(nsITransferable **transferable);
NS_IMETHOD InsertFromTransferable(nsITransferable *transferable,
const nsAReadableString & aContextStr,
const nsAReadableString & aInfoStr);
nsresult InsertHTMLWithContext(const nsAReadableString & aInputString,
const nsAReadableString & aContextStr,
const nsAReadableString & aInfoStr);
nsresult InsertHTMLWithCharsetAndContext(const nsAReadableString & aInputString,
const nsAReadableString & aCharset,
const nsAReadableString & aContextStr,
const nsAReadableString & aInfoStr);
const nsAString & aContextStr,
const nsAString & aInfoStr);
nsresult InsertHTMLWithContext(const nsAString & aInputString,
const nsAString & aContextStr,
const nsAString & aInfoStr);
nsresult InsertHTMLWithCharsetAndContext(const nsAString & aInputString,
const nsAString & aCharset,
const nsAString & aContextStr,
const nsAString & aInfoStr);
nsresult StripFormattingNodes(nsIDOMNode *aNode, PRBool aOnlyList = PR_FALSE);
nsresult CreateDOMFragmentFromPaste(nsIDOMNSRange *aNSRange,
const nsAReadableString & aInputString,
const nsAReadableString & aContextStr,
const nsAReadableString & aInfoStr,
const nsAString & aInputString,
const nsAString & aContextStr,
const nsAString & aInfoStr,
nsCOMPtr<nsIDOMNode> *outFragNode,
PRInt32 *outRangeStartHint,
PRInt32 *outRangeEndHint);
@ -647,8 +647,8 @@ protected:
PRBool IsModifiable();
/* helpers for block transformations */
nsresult MakeDefinitionItem(const nsAReadableString & aItemType);
nsresult InsertBasicBlock(const nsAReadableString & aBlockType);
nsresult MakeDefinitionItem(const nsAString & aItemType);
nsresult InsertBasicBlock(const nsAString & aBlockType);
/* increase/decrease the font size of selection */
nsresult RelativeFontChange( PRInt32 aSizeChange);
@ -668,35 +668,35 @@ protected:
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue);
const nsAString *aAttribute,
const nsAString *aValue);
nsresult SetInlinePropertyOnNode( nsIDOMNode *aNode,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue);
const nsAString *aAttribute,
const nsAString *aValue);
nsresult PromoteInlineRange(nsIDOMRange *inRange);
nsresult SplitStyleAboveRange(nsIDOMRange *aRange,
nsIAtom *aProperty,
const nsAReadableString *aAttribute);
const nsAString *aAttribute);
nsresult SplitStyleAbovePoint(nsCOMPtr<nsIDOMNode> *aNode,
PRInt32 *aOffset,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAString *aAttribute,
nsCOMPtr<nsIDOMNode> *outLeftNode = nsnull,
nsCOMPtr<nsIDOMNode> *outRightNode = nsnull);
nsresult RemoveStyleInside(nsIDOMNode *aNode,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAString *aAttribute,
PRBool aChildrenOnly = PR_FALSE);
nsresult RemoveInlinePropertyImpl(nsIAtom *aProperty, const nsAReadableString *aAttribute);
nsresult RemoveInlinePropertyImpl(nsIAtom *aProperty, const nsAString *aAttribute);
PRBool NodeIsProperty(nsIDOMNode *aNode);
PRBool HasAttr(nsIDOMNode *aNode, const nsAReadableString *aAttribute);
PRBool HasAttrVal(nsIDOMNode *aNode, const nsAReadableString *aAttribute, const nsAReadableString *aValue);
PRBool HasAttr(nsIDOMNode *aNode, const nsAString *aAttribute);
PRBool HasAttrVal(nsIDOMNode *aNode, const nsAString *aAttribute, const nsAString *aValue);
PRBool IsAtFrontOfNode(nsIDOMNode *aNode, PRInt32 aOffset);
PRBool IsAtEndOfNode(nsIDOMNode *aNode, PRInt32 aOffset);
PRBool IsOnlyAttribute(nsIDOMNode *aElement, const nsAReadableString *aAttribute);
PRBool IsOnlyAttribute(nsIDOMNode *aElement, const nsAString *aAttribute);
nsresult RemoveBlockContainer(nsIDOMNode *inNode);
nsresult GetPriorHTMLSibling(nsIDOMNode *inNode, nsCOMPtr<nsIDOMNode> *outNode);
@ -726,12 +726,12 @@ protected:
NS_IMETHOD IgnoreSpuriousDragEvent(PRBool aIgnoreSpuriousDragEvent) {mIgnoreSpuriousDragEvent = aIgnoreSpuriousDragEvent; return NS_OK;}
nsresult GetInlinePropertyBase(nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue,
const nsAString *aAttribute,
const nsAString *aValue,
PRBool *aFirst,
PRBool *aAny,
PRBool *aAll,
nsAWritableString *outValue);
nsAString *outValue);
nsresult HasStyleOrIdOrClass(nsIDOMElement * aElement, PRBool *aHasStyleOrIdOrClass);
nsresult RemoveElementIfNoStyleOrIdOrClass(nsIDOMElement * aElement, nsIAtom * aTag);

Просмотреть файл

@ -70,7 +70,7 @@ nsHTMLEditorLog::~nsHTMLEditorLog()
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLEditorLog, nsHTMLEditor, nsIEditorLogging)
NS_IMETHODIMP
nsHTMLEditorLog::SetInlineProperty(nsIAtom *aProperty, const nsAReadableString &aAttribute, const nsAReadableString &aValue)
nsHTMLEditorLog::SetInlineProperty(nsIAtom *aProperty, const nsAString &aAttribute, const nsAString &aValue)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -116,7 +116,7 @@ nsHTMLEditorLog::SetParagraphFormat(const nsAString& aParagraphFormat)
}
NS_IMETHODIMP
nsHTMLEditorLog::RemoveInlineProperty(nsIAtom *aProperty, const nsAReadableString &aAttribute)
nsHTMLEditorLog::RemoveInlineProperty(nsIAtom *aProperty, const nsAString &aAttribute)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -159,7 +159,7 @@ nsHTMLEditorLog::DeleteSelection(nsIEditor::EDirection aAction)
}
NS_IMETHODIMP
nsHTMLEditorLog::InsertText(const nsAReadableString& aStringToInsert)
nsHTMLEditorLog::InsertText(const nsAString& aStringToInsert)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -367,7 +367,7 @@ nsHTMLEditorLog::PasteAsPlaintextQuotation(PRInt32 aSelectionType)
}
NS_IMETHODIMP
nsHTMLEditorLog::PasteAsCitedQuotation(const nsAReadableString& aCitation,
nsHTMLEditorLog::PasteAsCitedQuotation(const nsAString& aCitation,
PRInt32 aSelectionType)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -385,7 +385,7 @@ nsHTMLEditorLog::PasteAsCitedQuotation(const nsAReadableString& aCitation,
}
NS_IMETHODIMP
nsHTMLEditorLog::InsertAsQuotation(const nsAReadableString& aQuotedText,
nsHTMLEditorLog::InsertAsQuotation(const nsAString& aQuotedText,
nsIDOMNode **aNodeInserted)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -403,7 +403,7 @@ nsHTMLEditorLog::InsertAsQuotation(const nsAReadableString& aQuotedText,
}
NS_IMETHODIMP
nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsAReadableString& aQuotedText,
nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsAString& aQuotedText,
nsIDOMNode **aNodeInserted)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -421,10 +421,10 @@ nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsAReadableString& aQuotedText
}
NS_IMETHODIMP
nsHTMLEditorLog::InsertAsCitedQuotation(const nsAReadableString& aQuotedText,
const nsAReadableString& aCitation,
nsHTMLEditorLog::InsertAsCitedQuotation(const nsAString& aQuotedText,
const nsAString& aCitation,
PRBool aInsertHTML,
const nsAReadableString& aCharset,
const nsAString& aCharset,
nsIDOMNode **aNodeInserted)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -445,7 +445,7 @@ nsHTMLEditorLog::InsertAsCitedQuotation(const nsAReadableString& aQuotedText,
}
NS_IMETHODIMP
nsHTMLEditorLog::SetBackgroundColor(const nsAReadableString& aColor)
nsHTMLEditorLog::SetBackgroundColor(const nsAString& aColor)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -461,7 +461,7 @@ nsHTMLEditorLog::SetBackgroundColor(const nsAReadableString& aColor)
}
NS_IMETHODIMP
nsHTMLEditorLog::SetBodyAttribute(const nsAReadableString& aAttr, const nsAReadableString& aValue)
nsHTMLEditorLog::SetBodyAttribute(const nsAString& aAttr, const nsAString& aValue)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -660,7 +660,7 @@ nsHTMLEditorLog::SwitchTableCellHeaderType(nsIDOMElement *aSourceCell, nsIDOMEle
}
NS_IMETHODIMP
nsHTMLEditorLog::MakeOrChangeList(const nsAReadableString& aListType, PRBool entireList, const nsAReadableString& aBulletType)
nsHTMLEditorLog::MakeOrChangeList(const nsAString& aListType, PRBool entireList, const nsAString& aBulletType)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -678,7 +678,7 @@ nsHTMLEditorLog::MakeOrChangeList(const nsAReadableString& aListType, PRBool ent
}
NS_IMETHODIMP
nsHTMLEditorLog::Indent(const nsAReadableString& aIndent)
nsHTMLEditorLog::Indent(const nsAString& aIndent)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -696,7 +696,7 @@ nsHTMLEditorLog::Indent(const nsAReadableString& aIndent)
}
NS_IMETHODIMP
nsHTMLEditorLog::Align(const nsAReadableString& aAlign)
nsHTMLEditorLog::Align(const nsAString& aAlign)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -764,7 +764,7 @@ nsHTMLEditorLog::InsertLinkAroundSelection(nsIDOMElement* aAnchorElement)
}
NS_IMETHODIMP
nsHTMLEditorLog::ApplyStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet **aStyleSheet)
nsHTMLEditorLog::ApplyStyleSheet(const nsAString& aURL, nsICSSStyleSheet **aStyleSheet)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -785,7 +785,7 @@ nsHTMLEditorLog::ApplyStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet
}
NS_IMETHODIMP
nsHTMLEditorLog::SetDocumentTitle(const nsAReadableString& aTitle)
nsHTMLEditorLog::SetDocumentTitle(const nsAString& aTitle)
{
nsAutoHTMLEditorLogLock logLock(this);
@ -928,7 +928,7 @@ nsHTMLEditorLog::Flush()
}
nsresult
nsHTMLEditorLog::PrintUnicode(const nsAReadableString &aString)
nsHTMLEditorLog::PrintUnicode(const nsAString &aString)
{
//const PRUnichar *uc = aString.get();
char buf[10];

Просмотреть файл

@ -70,12 +70,12 @@ public:
/* nsIHTMLEditor method implementations. */
NS_IMETHOD SetInlineProperty(nsIAtom *aProperty,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue);
const nsAString & aAttribute,
const nsAString & aValue);
NS_IMETHOD SetParagraphFormat(const nsAString& aParagraphFormat);
NS_IMETHOD RemoveInlineProperty(nsIAtom *aProperty, const nsAReadableString& aAttribute);
NS_IMETHOD RemoveInlineProperty(nsIAtom *aProperty, const nsAString& aAttribute);
NS_IMETHOD DeleteSelection(nsIEditor::EDirection aAction);
NS_IMETHOD InsertText(const nsAReadableString& aStringToInsert);
NS_IMETHOD InsertText(const nsAString& aStringToInsert);
NS_IMETHOD InsertLineBreak();
NS_IMETHOD Undo(PRUint32 aCount);
NS_IMETHOD Redo(PRUint32 aCount);
@ -90,22 +90,22 @@ public:
NS_IMETHOD Paste(PRInt32 aSelectionType);
NS_IMETHOD PasteAsQuotation(PRInt32 aSelectionType);
NS_IMETHOD PasteAsPlaintextQuotation(PRInt32 aSelectionType);
NS_IMETHOD PasteAsCitedQuotation(const nsAReadableString& aCitation,
NS_IMETHOD PasteAsCitedQuotation(const nsAString& aCitation,
PRInt32 aSelectionType);
NS_IMETHOD InsertAsQuotation(const nsAReadableString& aQuotedText, nsIDOMNode** aNodeInserted);
NS_IMETHOD InsertAsPlaintextQuotation(const nsAReadableString& aQuotedText, nsIDOMNode** aNodeInserted);
NS_IMETHOD InsertAsCitedQuotation(const nsAReadableString& aQuotedText, const nsAReadableString& aCitation,
PRBool aInsertHTML, const nsAReadableString& aCharset,
NS_IMETHOD InsertAsQuotation(const nsAString& aQuotedText, nsIDOMNode** aNodeInserted);
NS_IMETHOD InsertAsPlaintextQuotation(const nsAString& aQuotedText, nsIDOMNode** aNodeInserted);
NS_IMETHOD InsertAsCitedQuotation(const nsAString& aQuotedText, const nsAString& aCitation,
PRBool aInsertHTML, const nsAString& aCharset,
nsIDOMNode** aNodeInserted);
NS_IMETHOD ApplyStyleSheet(const nsAReadableString& aURL, nsICSSStyleSheet **aStyleSheet);
NS_IMETHOD SetDocumentTitle(const nsAReadableString& aTitle);
NS_IMETHOD ApplyStyleSheet(const nsAString& aURL, nsICSSStyleSheet **aStyleSheet);
NS_IMETHOD SetDocumentTitle(const nsAString& aTitle);
NS_IMETHOD SetBackgroundColor(const nsAReadableString& aColor);
NS_IMETHOD SetBodyAttribute(const nsAReadableString& aAttr, const nsAReadableString& aValue);
NS_IMETHOD MakeOrChangeList(const nsAReadableString& aListType, PRBool entireList, const nsAReadableString& aBulletType);
NS_IMETHOD Indent(const nsAReadableString& aIndent);
NS_IMETHOD Align(const nsAReadableString& aAlign);
NS_IMETHOD SetBackgroundColor(const nsAString& aColor);
NS_IMETHOD SetBodyAttribute(const nsAString& aAttr, const nsAString& aValue);
NS_IMETHOD MakeOrChangeList(const nsAString& aListType, PRBool entireList, const nsAString& aBulletType);
NS_IMETHOD Indent(const nsAString& aIndent);
NS_IMETHOD Align(const nsAString& aAlign);
NS_IMETHOD InsertElementAtSelection(nsIDOMElement* aElement, PRBool aDeleteSelection);
NS_IMETHOD InsertLinkAroundSelection(nsIDOMElement* aAnchorElement);
@ -130,7 +130,7 @@ public:
nsresult Write(const char *aBuffer);
nsresult WriteInt(const char *aFormat, PRInt32 aInt);
nsresult Flush();
nsresult PrintUnicode(const nsAReadableString &aString);
nsresult PrintUnicode(const nsAString &aString);
nsresult PrintSelection();
nsresult PrintNode(nsIDOMNode *aNode, PRInt32 aDepth=0);
nsresult PrintElementNode(nsIDOMNode *aNode, PRInt32 aDepth);

Просмотреть файл

@ -119,8 +119,8 @@ static const PRBool gNoisy = PR_FALSE;
// Add the CSS style corresponding to the HTML inline style defined
// by aProperty aAttribute and aValue to the selection
NS_IMETHODIMP nsHTMLEditor::SetCSSInlineProperty(nsIAtom *aProperty,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue)
const nsAString & aAttribute,
const nsAString & aValue)
{
nsresult res = NS_OK;
PRBool useCSS;
@ -133,8 +133,8 @@ NS_IMETHODIMP nsHTMLEditor::SetCSSInlineProperty(nsIAtom *aProperty,
}
NS_IMETHODIMP nsHTMLEditor::SetInlineProperty(nsIAtom *aProperty,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue)
const nsAString & aAttribute,
const nsAString & aValue)
{
if (!aProperty) { return NS_ERROR_NULL_POINTER; }
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -313,8 +313,8 @@ nsHTMLEditor::SetInlinePropertyOnTextNode( nsIDOMCharacterData *aTextNode,
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue)
const nsAString *aAttribute,
const nsAString *aValue)
{
if (!aTextNode) return NS_ERROR_NULL_POINTER;
nsresult res = NS_OK;
@ -385,8 +385,8 @@ nsHTMLEditor::SetInlinePropertyOnTextNode( nsIDOMCharacterData *aTextNode,
nsresult
nsHTMLEditor::SetInlinePropertyOnNode( nsIDOMNode *aNode,
nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue)
const nsAString *aAttribute,
const nsAString *aValue)
{
if (!aNode || !aProperty) return NS_ERROR_NULL_POINTER;
@ -524,7 +524,7 @@ nsHTMLEditor::SetInlinePropertyOnNode( nsIDOMNode *aNode,
nsresult nsHTMLEditor::SplitStyleAboveRange(nsIDOMRange *inRange,
nsIAtom *aProperty,
const nsAReadableString *aAttribute)
const nsAString *aAttribute)
{
if (!inRange) return NS_ERROR_NULL_POINTER;
nsresult res;
@ -568,7 +568,7 @@ nsresult nsHTMLEditor::SplitStyleAboveRange(nsIDOMRange *inRange,
nsresult nsHTMLEditor::SplitStyleAbovePoint(nsCOMPtr<nsIDOMNode> *aNode,
PRInt32 *aOffset,
nsIAtom *aProperty, // null here means we split all properties
const nsAReadableString *aAttribute,
const nsAString *aAttribute,
nsCOMPtr<nsIDOMNode> *outLeftNode,
nsCOMPtr<nsIDOMNode> *outRightNode)
{
@ -624,7 +624,7 @@ PRBool nsHTMLEditor::NodeIsProperty(nsIDOMNode *aNode)
nsresult nsHTMLEditor::RemoveStyleInside(nsIDOMNode *aNode,
nsIAtom *aProperty, // null here means remove all properties
const nsAReadableString *aAttribute,
const nsAString *aAttribute,
PRBool aChildrenOnly)
{
if (!aNode) return NS_ERROR_NULL_POINTER;
@ -712,7 +712,7 @@ nsresult nsHTMLEditor::RemoveStyleInside(nsIDOMNode *aNode,
}
PRBool nsHTMLEditor::IsOnlyAttribute(nsIDOMNode *aNode,
const nsAReadableString *aAttribute)
const nsAString *aAttribute)
{
if (!aNode || !aAttribute) return PR_FALSE; // ooops
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
@ -743,7 +743,7 @@ PRBool nsHTMLEditor::IsOnlyAttribute(nsIDOMNode *aNode,
}
PRBool nsHTMLEditor::HasAttr(nsIDOMNode *aNode,
const nsAReadableString *aAttribute)
const nsAString *aAttribute)
{
if (!aNode) return PR_FALSE;
if (!aAttribute || aAttribute->IsEmpty()) return PR_TRUE; // everybody has the 'null' attribute
@ -761,8 +761,8 @@ PRBool nsHTMLEditor::HasAttr(nsIDOMNode *aNode,
PRBool nsHTMLEditor::HasAttrVal(nsIDOMNode *aNode,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue)
const nsAString *aAttribute,
const nsAString *aValue)
{
if (!aNode) return PR_FALSE;
if (!aAttribute || aAttribute->IsEmpty()) return PR_TRUE; // everybody has the 'null' attribute
@ -882,12 +882,12 @@ PRBool nsHTMLEditor::IsAtEndOfNode(nsIDOMNode *aNode, PRInt32 aOffset)
nsresult
nsHTMLEditor::GetInlinePropertyBase(nsIAtom *aProperty,
const nsAReadableString *aAttribute,
const nsAReadableString *aValue,
const nsAString *aAttribute,
const nsAString *aValue,
PRBool *aFirst,
PRBool *aAny,
PRBool *aAll,
nsAWritableString *outValue)
nsAString *outValue)
{
if (!aProperty)
return NS_ERROR_NULL_POINTER;
@ -1090,18 +1090,18 @@ nsHTMLEditor::GetInlinePropertyBase(nsIAtom *aProperty,
NS_IMETHODIMP nsHTMLEditor::GetInlineProperty(nsIAtom *aProperty,
const nsAReadableString &aAttribute,
const nsAReadableString &aValue,
const nsAString &aAttribute,
const nsAString &aValue,
PRBool *aFirst,
PRBool *aAny,
PRBool *aAll)
{
if (!aProperty || !aFirst || !aAny || !aAll)
return NS_ERROR_NULL_POINTER;
const nsAReadableString *att = nsnull;
const nsAString *att = nsnull;
if (aAttribute.Length())
att = &aAttribute;
const nsAReadableString *val = nsnull;
const nsAString *val = nsnull;
if (aValue.Length())
val = &aValue;
return GetInlinePropertyBase( aProperty, att, val, aFirst, aAny, aAll, nsnull);
@ -1109,19 +1109,19 @@ NS_IMETHODIMP nsHTMLEditor::GetInlineProperty(nsIAtom *aProperty,
NS_IMETHODIMP nsHTMLEditor::GetInlinePropertyWithAttrValue(nsIAtom *aProperty,
const nsAReadableString &aAttribute,
const nsAReadableString &aValue,
const nsAString &aAttribute,
const nsAString &aValue,
PRBool *aFirst,
PRBool *aAny,
PRBool *aAll,
nsAWritableString &outValue)
nsAString &outValue)
{
if (!aProperty || !aFirst || !aAny || !aAll)
return NS_ERROR_NULL_POINTER;
const nsAReadableString *att = nsnull;
const nsAString *att = nsnull;
if (aAttribute.Length())
att = &aAttribute;
const nsAReadableString *val = nsnull;
const nsAString *val = nsnull;
if (aValue.Length())
val = &aValue;
return GetInlinePropertyBase( aProperty, att, val, aFirst, aAny, aAll, &outValue);
@ -1133,12 +1133,12 @@ NS_IMETHODIMP nsHTMLEditor::RemoveAllInlineProperties()
return RemoveInlinePropertyImpl(nsnull, nsnull);
}
NS_IMETHODIMP nsHTMLEditor::RemoveInlineProperty(nsIAtom *aProperty, const nsAReadableString &aAttribute)
NS_IMETHODIMP nsHTMLEditor::RemoveInlineProperty(nsIAtom *aProperty, const nsAString &aAttribute)
{
return RemoveInlinePropertyImpl(aProperty, &aAttribute);
}
nsresult nsHTMLEditor::RemoveInlinePropertyImpl(nsIAtom *aProperty, const nsAReadableString *aAttribute)
nsresult nsHTMLEditor::RemoveInlinePropertyImpl(nsIAtom *aProperty, const nsAString *aAttribute)
{
if (!mRules) return NS_ERROR_NOT_INITIALIZED;
ForceCompositionEnd();
@ -1727,7 +1727,7 @@ nsHTMLEditor::RelativeFontChangeOnNode( PRInt32 aSizeChange,
}
NS_IMETHODIMP
nsHTMLEditor::GetFontFaceState(PRBool *aMixed, nsAWritableString &outFace)
nsHTMLEditor::GetFontFaceState(PRBool *aMixed, nsAString &outFace)
{
if (!aMixed)
return NS_ERROR_FAILURE;
@ -1766,7 +1766,7 @@ nsHTMLEditor::GetFontFaceState(PRBool *aMixed, nsAWritableString &outFace)
}
NS_IMETHODIMP
nsHTMLEditor::GetFontColorState(PRBool *aMixed, nsAWritableString &aOutColor)
nsHTMLEditor::GetFontColorState(PRBool *aMixed, nsAString &aOutColor)
{
if (!aMixed)
return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -100,7 +100,7 @@
#include "nsHTMLURIRefObject.h"
#include "nsAWritableString.h"
#include "nsAString.h"
#include "nsString.h"
#include "nsIDOMAttr.h"
#include "nsIDOMElement.h"
@ -130,7 +130,7 @@ nsHTMLURIRefObject::Reset()
}
NS_IMETHODIMP
nsHTMLURIRefObject::GetNextURI(nsAWritableString & aURI)
nsHTMLURIRefObject::GetNextURI(nsAString & aURI)
{
if (!mNode)
return NS_ERROR_NOT_INITIALIZED;
@ -279,8 +279,8 @@ nsHTMLURIRefObject::GetNextURI(nsAWritableString & aURI)
}
NS_IMETHODIMP
nsHTMLURIRefObject::RewriteAllURIs(const nsAReadableString & aOldPat,
const nsAReadableString & aNewPat,
nsHTMLURIRefObject::RewriteAllURIs(const nsAString & aOldPat,
const nsAString & aNewPat,
PRBool aMakeRel)
{
#ifdef DEBUG_akkana

Просмотреть файл

@ -55,7 +55,7 @@ public:
NS_IMETHOD GetListItemState(PRBool *aMixed, PRBool *aLI, PRBool *aDT, PRBool *aDD)=0;
NS_IMETHOD GetIndentState(PRBool *aCanIndent, PRBool *aCanOutdent)=0;
NS_IMETHOD GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign)=0;
NS_IMETHOD GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat)=0;
NS_IMETHOD GetParagraphState(PRBool *aMixed, nsAString &outFormat)=0;
};

Просмотреть файл

@ -285,7 +285,7 @@ nsWSRunObject::InsertBreak(nsCOMPtr<nsIDOMNode> *aInOutParent,
}
nsresult
nsWSRunObject::InsertText(const nsAReadableString& aStringToInsert,
nsWSRunObject::InsertText(const nsAString& aStringToInsert,
nsCOMPtr<nsIDOMNode> *aInOutParent,
PRInt32 *aInOutOffset,
nsIDOMDocument *aDoc)

Просмотреть файл

@ -143,7 +143,7 @@ class nsWSRunObject
// and makes any needed adjustments to ws around that point.
// example of fixup: trailingws before {aInOutParent,aInOutOffset}
// needs to be removed.
nsresult InsertText(const nsAReadableString& aStringToInsert,
nsresult InsertText(const nsAString& aStringToInsert,
nsCOMPtr<nsIDOMNode> *aInOutNode,
PRInt32 *aInOutOffset,
nsIDOMDocument *aDoc);

Просмотреть файл

@ -79,7 +79,7 @@ nsAOLCiter::QueryInterface(REFNSIID aIID, void** aInstancePtr)
}
NS_IMETHODIMP
nsAOLCiter::GetCiteString(const nsAReadableString& aInString, nsAWritableString& aOutString)
nsAOLCiter::GetCiteString(const nsAString& aInString, nsAString& aOutString)
{
aOutString = NS_LITERAL_STRING("\n\n>> ");
aOutString += aInString;
@ -100,7 +100,7 @@ nsAOLCiter::GetCiteString(const nsAReadableString& aInString, nsAWritableString&
}
NS_IMETHODIMP
nsAOLCiter::StripCites(const nsAReadableString& aInString, nsAWritableString& aOutString)
nsAOLCiter::StripCites(const nsAString& aInString, nsAString& aOutString)
{
// Remove the beginning cites, if any:
nsAutoString tOutputString;
@ -124,10 +124,10 @@ nsAOLCiter::StripCites(const nsAReadableString& aInString, nsAWritableString& aO
}
NS_IMETHODIMP
nsAOLCiter::Rewrap(const nsAReadableString& aInString,
nsAOLCiter::Rewrap(const nsAString& aInString,
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
PRBool aRespectNewlines,
nsAWritableString& aOutString)
nsAString& aOutString)
{
nsString citeString;
return nsWrapUtils::Rewrap(aInString, aWrapCol, aFirstLineOffset,

Просмотреть файл

@ -54,14 +54,14 @@ public:
//NOTE: Use NS_DECL_ISUPPORTS_INHERITED in any class inherited from nsEditor
NS_DECL_ISUPPORTS
NS_IMETHOD GetCiteString(const nsAReadableString & aInString, nsAWritableString & aOutString);
NS_IMETHOD GetCiteString(const nsAString & aInString, nsAString & aOutString);
NS_IMETHOD StripCites(const nsAReadableString & aInString, nsAWritableString & aOutString);
NS_IMETHOD StripCites(const nsAString & aInString, nsAString & aOutString);
NS_IMETHOD Rewrap(const nsAReadableString & aInString,
NS_IMETHOD Rewrap(const nsAString & aInString,
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
PRBool aRespectNewlines,
nsAWritableString & aOutString);
nsAString & aOutString);
};
#endif //nsAOLCiter_h__

Просмотреть файл

@ -94,7 +94,7 @@ nsInternetCiter::QueryInterface(REFNSIID aIID, void** aInstancePtr)
}
NS_IMETHODIMP
nsInternetCiter::GetCiteString(const nsAReadableString& aInString, nsAWritableString& aOutString)
nsInternetCiter::GetCiteString(const nsAString& aInString, nsAString& aOutString)
{
aOutString.SetLength(0);
PRUnichar uch = nl;
@ -136,8 +136,8 @@ nsInternetCiter::GetCiteString(const nsAReadableString& aInString, nsAWritableSt
}
nsresult
nsInternetCiter::StripCitesAndLinebreaks(const nsAReadableString& aInString,
nsAWritableString& aOutString,
nsInternetCiter::StripCitesAndLinebreaks(const nsAString& aInString,
nsAString& aOutString,
PRBool aLinebreaksToo,
PRInt32* aCiteLevel)
{
@ -180,12 +180,12 @@ nsInternetCiter::StripCitesAndLinebreaks(const nsAReadableString& aInString,
}
NS_IMETHODIMP
nsInternetCiter::StripCites(const nsAReadableString& aInString, nsAWritableString& aOutString)
nsInternetCiter::StripCites(const nsAString& aInString, nsAString& aOutString)
{
return StripCitesAndLinebreaks(aInString, aOutString, PR_FALSE, 0);
}
static void AddCite(nsAWritableString& aOutString, PRInt32 citeLevel)
static void AddCite(nsAString& aOutString, PRInt32 citeLevel)
{
for (PRInt32 i = 0; i < citeLevel; ++i)
aOutString.Append(PRUnichar(gt));
@ -194,7 +194,7 @@ static void AddCite(nsAWritableString& aOutString, PRInt32 citeLevel)
}
static inline void
BreakLine(nsAWritableString& aOutString, PRUint32& outStringCol,
BreakLine(nsAString& aOutString, PRUint32& outStringCol,
PRUint32 citeLevel)
{
aOutString.Append(nl);
@ -203,10 +203,10 @@ BreakLine(nsAWritableString& aOutString, PRUint32& outStringCol,
}
NS_IMETHODIMP
nsInternetCiter::Rewrap(const nsAReadableString& aInString,
nsInternetCiter::Rewrap(const nsAString& aInString,
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
PRBool aRespectNewlines,
nsAWritableString& aOutString)
nsAString& aOutString)
{
// There shouldn't be returns in this string, only dom newlines.
// Check to make sure:

Просмотреть файл

@ -54,17 +54,17 @@ public:
//NOTE: Use NS_DECL_ISUPPORTS_INHERITED in any class inherited from nsEditor
NS_DECL_ISUPPORTS
NS_IMETHOD GetCiteString(const nsAReadableString & aInString, nsAWritableString & aOutString);
NS_IMETHOD GetCiteString(const nsAString & aInString, nsAString & aOutString);
NS_IMETHOD StripCites(const nsAReadableString & aInString, nsAWritableString & aOutString);
NS_IMETHOD StripCites(const nsAString & aInString, nsAString & aOutString);
NS_IMETHOD Rewrap(const nsAReadableString & aInString,
NS_IMETHOD Rewrap(const nsAString & aInString,
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
PRBool aRespectNewlines,
nsAWritableString & aOutString);
nsAString & aOutString);
protected:
nsresult StripCitesAndLinebreaks(const nsAReadableString& aInString, nsAWritableString& aOutString,
nsresult StripCitesAndLinebreaks(const nsAString& aInString, nsAString& aOutString,
PRBool aLinebreaksToo, PRInt32* aCiteLevel);
};

Просмотреть файл

@ -252,7 +252,7 @@ nsPlaintextEditor::EndEditorInit()
}
NS_IMETHODIMP
nsPlaintextEditor::SetDocumentCharacterSet(const nsAReadableString & characterSet)
nsPlaintextEditor::SetDocumentCharacterSet(const nsAString & characterSet)
{
nsresult result;
@ -538,7 +538,7 @@ NS_IMETHODIMP nsPlaintextEditor::HandleKeyPress(nsIDOMKeyEvent* aKeyEvent)
to TypedText() to determine what action to take, but without passing
an event.
*/
NS_IMETHODIMP nsPlaintextEditor::TypedText(const nsAReadableString& aString,
NS_IMETHODIMP nsPlaintextEditor::TypedText(const nsAString& aString,
PRInt32 aAction)
{
nsAutoPlaceHolderBatch batch(this, gTypingTxnName);
@ -949,7 +949,7 @@ NS_IMETHODIMP nsPlaintextEditor::DeleteSelection(nsIEditor::EDirection aAction)
return result;
}
NS_IMETHODIMP nsPlaintextEditor::InsertText(const nsAReadableString &aStringToInsert)
NS_IMETHODIMP nsPlaintextEditor::InsertText(const nsAString &aStringToInsert)
{
if (!mRules) { return NS_ERROR_NOT_INITIALIZED; }
@ -1427,9 +1427,9 @@ NS_IMETHODIMP nsPlaintextEditor::CanCopy(PRBool *aCanCopy)
// Shared between OutputToString and OutputToStream
NS_IMETHODIMP
nsPlaintextEditor::GetAndInitDocEncoder(const nsAReadableString& aFormatType,
nsPlaintextEditor::GetAndInitDocEncoder(const nsAString& aFormatType,
PRUint32 aFlags,
const nsAReadableString& aCharset,
const nsAString& aCharset,
nsIDocumentEncoder** encoder)
{
nsCOMPtr<nsIPresShell> presShell;
@ -1515,8 +1515,8 @@ nsPlaintextEditor::GetAndInitDocEncoder(const nsAReadableString& aFormatType,
NS_IMETHODIMP
nsPlaintextEditor::OutputToString(nsAWritableString& aOutputString,
const nsAReadableString& aFormatType,
nsPlaintextEditor::OutputToString(nsAString& aOutputString,
const nsAString& aFormatType,
PRUint32 aFlags)
{
PRBool cancel, handled;
@ -1550,8 +1550,8 @@ nsPlaintextEditor::OutputToString(nsAWritableString& aOutputString,
NS_IMETHODIMP
nsPlaintextEditor::OutputToStream(nsIOutputStream* aOutputStream,
const nsAReadableString& aFormatType,
const nsAReadableString& aCharset,
const nsAString& aFormatType,
const nsAString& aCharset,
PRUint32 aFlags)
{
nsresult rv;
@ -1676,7 +1676,7 @@ static nsICiter* MakeACiter()
}
NS_IMETHODIMP
nsPlaintextEditor::InsertAsQuotation(const nsAReadableString& aQuotedText,
nsPlaintextEditor::InsertAsQuotation(const nsAString& aQuotedText,
nsIDOMNode **aNodeInserted)
{
// We have the text. Cite it appropriately:
@ -1723,17 +1723,17 @@ nsPlaintextEditor::InsertAsQuotation(const nsAReadableString& aQuotedText,
}
NS_IMETHODIMP
nsPlaintextEditor::PasteAsCitedQuotation(const nsAReadableString& aCitation,
nsPlaintextEditor::PasteAsCitedQuotation(const nsAString& aCitation,
PRInt32 aSelectionType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsPlaintextEditor::InsertAsCitedQuotation(const nsAReadableString& aQuotedText,
const nsAReadableString& aCitation,
nsPlaintextEditor::InsertAsCitedQuotation(const nsAString& aQuotedText,
const nsAString& aCitation,
PRBool aInsertHTML,
const nsAReadableString& aCharset,
const nsAString& aCharset,
nsIDOMNode **aNodeInserted)
{
return InsertAsQuotation(aQuotedText, aNodeInserted);
@ -1885,7 +1885,7 @@ nsPlaintextEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList)
#endif
NS_IMETHODIMP
nsPlaintextEditor::SetCompositionString(const nsAReadableString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply)
nsPlaintextEditor::SetCompositionString(const nsAString& aCompositionString, nsIPrivateTextRangeList* aTextRangeList,nsTextEventReply* aReply)
{
NS_ASSERTION(aTextRangeList, "null ptr");
if(nsnull == aTextRangeList)
@ -2116,15 +2116,15 @@ void nsPlaintextEditor::HandleEventListenerError()
nsresult
nsPlaintextEditor::SetAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue)
const nsAString & aAttribute,
const nsAString & aValue)
{
return nsEditor::SetAttribute(aElement, aAttribute, aValue);
}
nsresult
nsPlaintextEditor::RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute)
const nsAString & aAttribute)
{
return nsEditor::RemoveAttribute(aElement, aAttribute);
}

Просмотреть файл

@ -87,14 +87,14 @@ public:
/* ------------ nsIEditorMailSupport overrides -------------- */
NS_IMETHOD PasteAsQuotation(PRInt32 aSelectionType);
NS_IMETHOD InsertAsQuotation(const nsAReadableString& aQuotedText,
NS_IMETHOD InsertAsQuotation(const nsAString& aQuotedText,
nsIDOMNode** aNodeInserted);
NS_IMETHOD PasteAsCitedQuotation(const nsAReadableString& aCitation,
NS_IMETHOD PasteAsCitedQuotation(const nsAString& aCitation,
PRInt32 aSelectionType);
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);
NS_IMETHOD Rewrap(PRBool aRespectNewlines);
NS_IMETHOD StripCites();
@ -102,16 +102,16 @@ public:
/* ------------ nsIEditorIMESupport overrides -------------- */
NS_IMETHOD SetCompositionString(const nsAReadableString & aCompositionString, nsIPrivateTextRangeList * aTextRange, nsTextEventReply * aReply);
NS_IMETHOD SetCompositionString(const nsAString & aCompositionString, nsIPrivateTextRangeList * aTextRange, nsTextEventReply * aReply);
NS_IMETHOD GetReconversionString(nsReconversionEventReply* aReply);
/* ------------ Overrides of nsEditor interface methods -------------- */
NS_IMETHOD BeginComposition(nsTextEventReply* aReply);
NS_IMETHOD SetAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute,
const nsAReadableString & aValue);
const nsAString & aAttribute,
const nsAString & aValue);
NS_IMETHOD RemoveAttributeOrEquivalent(nsIDOMElement * aElement,
const nsAReadableString & aAttribute);
const nsAString & aAttribute);
/** prepare the editor for use */
NS_IMETHOD Init(nsIDOMDocument *aDoc, nsIPresShell *aPresShell, nsIContent *aRoot, nsISelectionController *aSelCon, PRUint32 aFlags);
@ -120,7 +120,7 @@ public:
NS_IMETHOD DeleteSelection(EDirection aAction);
NS_IMETHOD SetDocumentCharacterSet(const nsAReadableString & characterSet);
NS_IMETHOD SetDocumentCharacterSet(const nsAString & characterSet);
/** we override this here to install event listeners */
NS_IMETHOD PostCreate();
@ -142,13 +142,13 @@ public:
NS_IMETHOD DoDrag(nsIDOMEvent *aDragEvent);
NS_IMETHOD InsertFromDrop(nsIDOMEvent* aDropEvent);
NS_IMETHOD OutputToString(nsAWritableString& aOutputString,
const nsAReadableString& aFormatType,
NS_IMETHOD OutputToString(nsAString& aOutputString,
const nsAString& aFormatType,
PRUint32 aFlags);
NS_IMETHOD OutputToStream(nsIOutputStream* aOutputStream,
const nsAReadableString& aFormatType,
const nsAReadableString& aCharsetOverride,
const nsAString& aFormatType,
const nsAString& aCharsetOverride,
PRUint32 aFlags);
@ -164,7 +164,7 @@ public:
NS_IMETHOD SelectEntireDocument(nsISelection *aSelection);
/* ------------ Utility Routines, not part of public API -------------- */
NS_IMETHOD TypedText(const nsAReadableString& aString, PRInt32 aAction);
NS_IMETHOD TypedText(const nsAString& aString, PRInt32 aAction);
/** returns the absolute position of the end points of aSelection
* in the document as a text stream.
@ -204,9 +204,9 @@ protected:
NS_IMETHOD GetBodyStyleContext(nsIStyleContext** aStyleContext);
// Helpers for output routines
NS_IMETHOD GetAndInitDocEncoder(const nsAReadableString& aFormatType,
NS_IMETHOD GetAndInitDocEncoder(const nsAString& aFormatType,
PRUint32 aFlags,
const nsAReadableString& aCharset,
const nsAString& aCharset,
nsIDocumentEncoder** encoder);
// key event helpers

Просмотреть файл

@ -464,8 +464,8 @@ nsTextEditRules::WillInsertText(PRInt32 aAction,
nsISelection *aSelection,
PRBool *aCancel,
PRBool *aHandled,
const nsAReadableString *inString,
nsAWritableString *outString,
const nsAString *inString,
nsAString *outString,
PRInt32 aMaxLength)
{
if (!aSelection || !aCancel || !aHandled) { return NS_ERROR_NULL_POINTER; }
@ -555,7 +555,7 @@ nsTextEditRules::WillInsertText(PRInt32 aAction,
if (singleLineNewlineBehavior == eReplaceWithSpaces)
{
//nsAWritableString destString;
//nsAString destString;
//NormalizeCRLF(outString,destString);
tString.ReplaceChar(CRLF, ' ');
@ -1056,8 +1056,8 @@ nsTextEditRules::DidRedo(nsISelection *aSelection, nsresult aResult)
nsresult
nsTextEditRules::WillOutputText(nsISelection *aSelection,
const nsAReadableString *aOutputFormat,
nsAWritableString *aOutString,
const nsAString *aOutputFormat,
nsAString *aOutString,
PRBool *aCancel,
PRBool *aHandled)
{
@ -1253,8 +1253,8 @@ nsTextEditRules::CreateBogusNodeIfNeeded(nsISelection *aSelection)
nsresult
nsTextEditRules::TruncateInsertionIfNeeded(nsISelection *aSelection,
const nsAReadableString *aInString,
nsAWritableString *aOutString,
const nsAString *aInString,
nsAString *aOutString,
PRInt32 aMaxLength)
{
if (!aSelection || !aInString || !aOutString) {return NS_ERROR_NULL_POINTER;}
@ -1308,7 +1308,7 @@ nsTextEditRules::ResetIMETextPWBuf()
}
nsresult
nsTextEditRules::RemoveIMETextFromPWBuf(PRInt32 &aStart, nsAWritableString *aIMEString)
nsTextEditRules::RemoveIMETextFromPWBuf(PRInt32 &aStart, nsAString *aIMEString)
{
if (!aIMEString) {
return NS_ERROR_NULL_POINTER;
@ -1330,7 +1330,7 @@ nsTextEditRules::RemoveIMETextFromPWBuf(PRInt32 &aStart, nsAWritableString *aIME
}
nsresult
nsTextEditRules::EchoInsertionToPWBuff(PRInt32 aStart, PRInt32 aEnd, nsAWritableString *aOutString)
nsTextEditRules::EchoInsertionToPWBuff(PRInt32 aStart, PRInt32 aEnd, nsAString *aOutString)
{
if (!aOutString) {return NS_ERROR_NULL_POINTER;}

Просмотреть файл

@ -112,8 +112,8 @@ protected:
nsISelection *aSelection,
PRBool *aCancel,
PRBool *aHandled,
const nsAReadableString *inString,
nsAWritableString *outString,
const nsAString *inString,
nsAString *outString,
PRInt32 aMaxLength);
nsresult DidInsertText(nsISelection *aSelection, nsresult aResult);
nsresult GetTopEnclosingPre(nsIDOMNode *aNode, nsIDOMNode** aOutPreNode);
@ -152,8 +152,8 @@ protected:
* and use aOutText as the result.
*/
nsresult WillOutputText(nsISelection *aSelection,
const nsAReadableString *aInFormat,
nsAWritableString *aOutText,
const nsAString *aInFormat,
nsAString *aOutText,
PRBool *aOutCancel,
PRBool *aHandled);
@ -171,16 +171,16 @@ protected:
/** returns a truncated insertion string if insertion would place us
over aMaxLength */
nsresult TruncateInsertionIfNeeded(nsISelection *aSelection,
const nsAReadableString *aInString,
nsAWritableString *aOutString,
const nsAString *aInString,
nsAString *aOutString,
PRInt32 aMaxLength);
/** Echo's the insertion text into the password buffer, and converts
insertion text to '*'s */
nsresult EchoInsertionToPWBuff(PRInt32 aStart, PRInt32 aEnd, nsAWritableString *aOutString);
nsresult EchoInsertionToPWBuff(PRInt32 aStart, PRInt32 aEnd, nsAString *aOutString);
/** Remove IME composition text from password buffer */
nsresult RemoveIMETextFromPWBuf(PRInt32 &aStart, nsAWritableString *aIMEString);
nsresult RemoveIMETextFromPWBuf(PRInt32 &aStart, nsAString *aIMEString);
nsresult CreateMozBR(nsIDOMNode *inParent, PRInt32 inOffset, nsCOMPtr<nsIDOMNode> *outBRNode);
@ -231,9 +231,9 @@ class nsTextRulesInfo : public nsRulesInfo
virtual ~nsTextRulesInfo() {};
// kInsertText
const nsAReadableString *inString;
nsAWritableString *outString;
const nsAReadableString *outputFormat;
const nsAString *inString;
nsAString *outString;
const nsAString *outputFormat;
PRInt32 maxLength;
// kDeleteSelection
@ -242,13 +242,13 @@ class nsTextRulesInfo : public nsRulesInfo
// kMakeList
PRBool bOrdered;
PRBool entireList;
const nsAReadableString *bulletType;
const nsAString *bulletType;
// kAlign
const nsAReadableString *alignType;
const nsAString *alignType;
// kMakeBasicBlock
const nsAReadableString *blockType;
const nsAString *blockType;
// kInsertElement
const nsIDOMElement* insertElement;

Просмотреть файл

@ -49,7 +49,7 @@
********************************************************/
PRBool
nsTextEditUtils::NodeIsType(nsIDOMNode *aNode, const nsAReadableString& aTag)
nsTextEditUtils::NodeIsType(nsIDOMNode *aNode, const nsAString& aTag)
{
NS_PRECONDITION(aNode, "null node passed to nsHTMLEditUtils::NodeIsType");
if (aNode)

Просмотреть файл

@ -41,7 +41,7 @@
#include "prtypes.h" // for PRBool
#include "nsError.h" // for nsresult
#include "nsString.h" // for nsAReadableString
#include "nsString.h" // for nsAString
class nsIDOMNode;
class nsIEditor;
class nsPlaintextEditor;
@ -49,7 +49,7 @@ class nsPlaintextEditor;
class nsTextEditUtils
{
public:
static PRBool NodeIsType(nsIDOMNode *aNode, const nsAReadableString& aTag);
static PRBool NodeIsType(nsIDOMNode *aNode, const nsAString& aTag);
// from nsTextEditRules:
static PRBool IsBody(nsIDOMNode *aNode);

Просмотреть файл

@ -51,11 +51,11 @@ static NS_DEFINE_CID(kLWBrkCID, NS_LWBRK_CID);
* Rewrap the given section of string, putting the result in aOutString.
*/
nsresult
nsWrapUtils::Rewrap(const nsAReadableString& aInString,
nsWrapUtils::Rewrap(const nsAString& aInString,
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
PRBool aRespectNewlines,
const nsAReadableString &aLineStartStr,
nsAWritableString& aOutString)
const nsAString &aLineStartStr,
nsAString& aOutString)
{
PRInt32 i;

Просмотреть файл

@ -46,11 +46,11 @@
class nsWrapUtils
{
public:
static nsresult Rewrap(const nsAReadableString& aInString,
static nsresult Rewrap(const nsAString& aInString,
PRUint32 aWrapCol, PRUint32 aFirstLineOffset,
PRBool aRespectNewlines,
const nsAReadableString &aLineStartStr,
nsAWritableString& aOutString);
const nsAString &aLineStartStr,
nsAString& aOutString);
};
#endif //nsWrapUtils_h__

Просмотреть файл

@ -189,25 +189,25 @@ nsTSDNotifier::DidJoinNodes(nsIDOMNode *aLeftNode,
// -------------------------------
NS_IMETHODIMP
nsTSDNotifier::WillCreateNode(const nsAReadableString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
nsTSDNotifier::WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
{
return NS_OK;
}
NS_IMETHODIMP
nsTSDNotifier::DidCreateNode(const nsAReadableString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult)
nsTSDNotifier::DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult)
{
return NS_OK;
}
NS_IMETHODIMP
nsTSDNotifier::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString)
nsTSDNotifier::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString)
{
return NS_OK;
}
NS_IMETHODIMP
nsTSDNotifier::DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString, nsresult aResult)
nsTSDNotifier::DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString, nsresult aResult)
{
return NS_OK;
}

Просмотреть файл

@ -1,103 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsTSDNotifier_h__
#define nsTSDNotifier_h__
#include "nsCOMPtr.h"
#include "nsIEditActionListener.h"
class nsTextServicesDocument;
class nsTSDNotifier : public nsIEditActionListener
{
private:
nsTextServicesDocument *mDoc;
public:
/** The default constructor.
*/
nsTSDNotifier(nsTextServicesDocument *aDoc);
/** The default destructor.
*/
virtual ~nsTSDNotifier();
/* Macro for AddRef(), Release(), and QueryInterface() */
NS_DECL_ISUPPORTS
/* nsIEditActionListener method implementations. */
NS_IMETHOD WillInsertNode(nsIDOMNode *aNode,
nsIDOMNode *aParent,
PRInt32 aPosition);
NS_IMETHOD DidInsertNode(nsIDOMNode *aNode,
nsIDOMNode *aParent,
PRInt32 aPosition,
nsresult aResult);
NS_IMETHOD WillDeleteNode(nsIDOMNode *aChild);
NS_IMETHOD DidDeleteNode(nsIDOMNode *aChild, nsresult aResult);
NS_IMETHOD WillSplitNode(nsIDOMNode * aExistingRightNode,
PRInt32 aOffset);
NS_IMETHOD DidSplitNode(nsIDOMNode *aExistingRightNode,
PRInt32 aOffset,
nsIDOMNode *aNewLeftNode,
nsresult aResult);
NS_IMETHOD WillJoinNodes(nsIDOMNode *aLeftNode,
nsIDOMNode *aRightNode,
nsIDOMNode *aParent);
NS_IMETHOD DidJoinNodes(nsIDOMNode *aLeftNode,
nsIDOMNode *aRightNode,
nsIDOMNode *aParent,
nsresult aResult);
// these listen methods are unused:
NS_IMETHOD WillCreateNode(const nsAReadableString& aTag, nsIDOMNode *aParent, PRInt32 aPosition);
NS_IMETHOD DidCreateNode(const nsAReadableString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString, nsresult aResult);
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength);
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength, nsresult aResult);
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection);
NS_IMETHOD DidDeleteSelection(nsISelection *aSelection);
};
#endif // nsTSDNotifier_h__

Просмотреть файл

@ -189,25 +189,25 @@ nsTSDNotifier::DidJoinNodes(nsIDOMNode *aLeftNode,
// -------------------------------
NS_IMETHODIMP
nsTSDNotifier::WillCreateNode(const nsAReadableString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
nsTSDNotifier::WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition)
{
return NS_OK;
}
NS_IMETHODIMP
nsTSDNotifier::DidCreateNode(const nsAReadableString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult)
nsTSDNotifier::DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult)
{
return NS_OK;
}
NS_IMETHODIMP
nsTSDNotifier::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString)
nsTSDNotifier::WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString)
{
return NS_OK;
}
NS_IMETHODIMP
nsTSDNotifier::DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString, nsresult aResult)
nsTSDNotifier::DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString, nsresult aResult)
{
return NS_OK;
}

Просмотреть файл

@ -90,10 +90,10 @@ public:
nsIDOMNode *aParent,
nsresult aResult);
// these listen methods are unused:
NS_IMETHOD WillCreateNode(const nsAReadableString& aTag, nsIDOMNode *aParent, PRInt32 aPosition);
NS_IMETHOD DidCreateNode(const nsAReadableString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAReadableString &aString, nsresult aResult);
NS_IMETHOD WillCreateNode(const nsAString& aTag, nsIDOMNode *aParent, PRInt32 aPosition);
NS_IMETHOD DidCreateNode(const nsAString& aTag, nsIDOMNode *aNode, nsIDOMNode *aParent, PRInt32 aPosition, nsresult aResult);
NS_IMETHOD WillInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString);
NS_IMETHOD DidInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, const nsAString &aString, nsresult aResult);
NS_IMETHOD WillDeleteText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength);
NS_IMETHOD DidDeleteText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset, PRInt32 aLength, nsresult aResult);
NS_IMETHOD WillDeleteSelection(nsISelection *aSelection);