Bug 157142: get rid of txAtom typedef

r=Pike rs=peterv
This commit is contained in:
sicking%bigfoot.com 2005-11-02 07:39:29 +00:00
Родитель f2500788d1
Коммит 06dc1cd8e8
44 изменённых файлов: 94 добавлений и 94 удалений

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

@ -39,16 +39,16 @@
#include "txAtoms.h"
#define TX_ATOM(_name, _value) txAtom* txXMLAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txXMLAtoms::_name = 0
XML_ATOMS;
#undef TX_ATOM
#define TX_ATOM(_name, _value) txAtom* txXPathAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txXPathAtoms::_name = 0
#include "txXPathAtomList.h"
#undef TX_ATOM
#define TX_ATOM(_name, _value) txAtom* txXSLTAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txXSLTAtoms::_name = 0
#include "txXSLTAtomList.h"
#undef TX_ATOM
#define TX_ATOM(_name, _value) txAtom* txHTMLAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txHTMLAtoms::_name = 0
#include "txHTMLAtomList.h"
#undef TX_ATOM

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

@ -61,7 +61,7 @@ TX_ATOM(space, "space"); \
TX_ATOM(xml, "xml"); \
TX_ATOM(xmlns, "xmlns")
#define TX_ATOM(_name, _value) static txAtom* _name
#define TX_ATOM(_name, _value) static nsIAtom* _name
class txXMLAtoms
{

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

@ -125,7 +125,7 @@ public:
private:
struct MapItem {
PRInt32 mNamespaceID;
txAtom* mLocalName;
nsIAtom* mLocalName;
TxObject* mValue;
};

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

@ -49,7 +49,7 @@ Attr::Attr(const nsAString& name, Document* owner):
// namespace handling has to be handled late, the attribute must
// be added to the tree to resolve the prefix, unless it's
// xmlns or xml, try to do that here
txAtom* prefixAtom = TX_GET_ATOM(Substring(nodeName, 0, idx));
nsIAtom* prefixAtom = TX_GET_ATOM(Substring(nodeName, 0, idx));
if (prefixAtom == txXMLAtoms::xmlns)
mNamespaceID = kNameSpaceID_XMLNS;
else if (prefixAtom == txXMLAtoms::xml)
@ -104,7 +104,7 @@ Node* Attr::appendChild(Node* newChild)
//
//Return the attributes local (unprefixed) name atom.
//
MBool Attr::getLocalName(txAtom** aLocalName)
MBool Attr::getLocalName(nsIAtom** aLocalName)
{
if (!aLocalName)
return MB_FALSE;
@ -126,7 +126,7 @@ PRInt32 Attr::getNamespaceID()
mNamespaceID = kNameSpaceID_None;
PRInt32 idx = nodeName.FindChar(':');
if (idx != kNotFound) {
nsCOMPtr<txAtom> prefixAtom = TX_GET_ATOM(Substring(nodeName, 0, idx));
nsCOMPtr<nsIAtom> prefixAtom = TX_GET_ATOM(Substring(nodeName, 0, idx));
mNamespaceID = lookupNamespaceID(prefixAtom);
}
return mNamespaceID;

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

@ -115,9 +115,9 @@ class Node : public TxObject
virtual nsresult getNamespaceURI(nsAString& aNSURI) = 0;
//txXPathNode functions
virtual MBool getLocalName(txAtom** aLocalName) = 0;
virtual MBool getLocalName(nsIAtom** aLocalName) = 0;
virtual PRInt32 getNamespaceID() = 0;
virtual PRInt32 lookupNamespaceID(txAtom* aPrefix) = 0;
virtual PRInt32 lookupNamespaceID(nsIAtom* aPrefix) = 0;
virtual Node* getXPathParent() = 0;
virtual PRInt32 compareDocumentPosition(Node* aOther) = 0;
};
@ -249,9 +249,9 @@ class NodeDefinition : public Node, public NodeList
nsresult getNamespaceURI(nsAString& aNSURI);
//txXPathNode functions
virtual MBool getLocalName(txAtom** aLocalName);
virtual MBool getLocalName(nsIAtom** aLocalName);
virtual PRInt32 getNamespaceID();
virtual PRInt32 lookupNamespaceID(txAtom*);
virtual PRInt32 lookupNamespaceID(nsIAtom*);
virtual Node* getXPathParent();
virtual PRInt32 compareDocumentPosition(Node* aOther);
@ -419,10 +419,10 @@ class Element : public NodeDefinition
Node* appendChild(Node* newChild);
//txXPathNode functions override
MBool getLocalName(txAtom** aLocalName);
MBool getLocalName(nsIAtom** aLocalName);
PRInt32 getNamespaceID();
MBool getAttr(txAtom* aLocalName, PRInt32 aNSID, nsAString& aValue);
MBool hasAttr(txAtom* aLocalName, PRInt32 aNSID);
MBool getAttr(nsIAtom* aLocalName, PRInt32 aNSID, nsAString& aValue);
MBool hasAttr(nsIAtom* aLocalName, PRInt32 aNSID);
private:
friend class Document;
@ -431,7 +431,7 @@ class Element : public NodeDefinition
Document* aOwner);
AttrMap mAttributes;
txAtom* mLocalName;
nsIAtom* mLocalName;
PRInt32 mNamespaceID;
};
@ -454,7 +454,7 @@ class Attr : public NodeDefinition
Node* appendChild(Node* newChild);
//txXPathNode functions override
MBool getLocalName(txAtom** aLocalName);
MBool getLocalName(nsIAtom** aLocalName);
PRInt32 getNamespaceID();
Node* getXPathParent();
@ -470,7 +470,7 @@ class Attr : public NodeDefinition
Element* ownerElement;
txAtom* mLocalName;
nsIAtom* mLocalName;
PRInt32 mNamespaceID;
};
@ -488,14 +488,14 @@ class ProcessingInstruction : public NodeDefinition
~ProcessingInstruction();
//txXPathNode functions override
MBool getLocalName(txAtom** aLocalName);
MBool getLocalName(nsIAtom** aLocalName);
private:
friend class Document;
ProcessingInstruction(const nsAString& theTarget, const nsAString& theData,
Document* owner);
txAtom* mLocalName;
nsIAtom* mLocalName;
};
class txNamespaceManager

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

@ -99,7 +99,7 @@ Node* Element::appendChild(Node* newChild)
//
//Return the elements local (unprefixed) name.
//
MBool Element::getLocalName(txAtom** aLocalName)
MBool Element::getLocalName(nsIAtom** aLocalName)
{
if (!aLocalName)
return MB_FALSE;
@ -182,7 +182,7 @@ void Element::setAttributeNS(const nsAString& aNamespaceURI,
AttrMap::ListItem* item = mAttributes.firstItem;
while (item) {
foundNode = (Attr*)item->node;
txAtom* attrName;
nsIAtom* attrName;
if (foundNode->getLocalName(&attrName) &&
namespaceID == foundNode->getNamespaceID() &&
localName == attrName) {
@ -219,14 +219,14 @@ Attr* Element::getAttributeNode(const nsAString& name)
// exists, and sets aValue to the value of the attribute.
// Return false, if the attribute does not exist.
//
MBool Element::getAttr(txAtom* aLocalName, PRInt32 aNSID,
MBool Element::getAttr(nsIAtom* aLocalName, PRInt32 aNSID,
nsAString& aValue)
{
aValue.Truncate();
AttrMap::ListItem* item = mAttributes.firstItem;
while (item) {
Attr* attrNode = (Attr*)item->node;
txAtom* localName;
nsIAtom* localName;
if (attrNode->getLocalName(&localName) &&
aNSID == attrNode->getNamespaceID() &&
aLocalName == localName) {
@ -244,12 +244,12 @@ MBool Element::getAttr(txAtom* aLocalName, PRInt32 aNSID,
// Return true if the attribute specified by localname and nsID
// exists. Return false otherwise.
//
MBool Element::hasAttr(txAtom* aLocalName, PRInt32 aNSID)
MBool Element::hasAttr(nsIAtom* aLocalName, PRInt32 aNSID)
{
AttrMap::ListItem* item = mAttributes.firstItem;
while (item) {
Attr* attrNode = (Attr*)item->node;
txAtom* localName;
nsIAtom* localName;
if (attrNode->getLocalName(&localName) &&
aNSID == attrNode->getNamespaceID() &&
aLocalName == localName) {

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

@ -266,7 +266,7 @@ MBool NodeDefinition::hasChildNodes() const
return MB_FALSE;
}
MBool NodeDefinition::getLocalName(txAtom** aLocalName)
MBool NodeDefinition::getLocalName(nsIAtom** aLocalName)
{
if (!aLocalName)
return MB_FALSE;
@ -290,7 +290,7 @@ PRInt32 NodeDefinition::getNamespaceID()
//
// @return namespace associated with prefix
//
PRInt32 NodeDefinition::lookupNamespaceID(txAtom* aPrefix)
PRInt32 NodeDefinition::lookupNamespaceID(nsIAtom* aPrefix)
{
// this is http://www.w3.org/2000/xmlns/,
// ID = kNameSpaceID_XMLNS, see txNamespaceManager::Init

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

@ -57,7 +57,7 @@ ProcessingInstruction::~ProcessingInstruction()
//from all child manipulation functions.
//
MBool ProcessingInstruction::getLocalName(txAtom** aLocalName)
MBool ProcessingInstruction::getLocalName(nsIAtom** aLocalName)
{
if (!aLocalName)
return MB_FALSE;

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

@ -210,7 +210,7 @@ MBool XMLUtils::getXMLSpacePreserve(Node* aNode)
if (parent->getNodeType() == Node::ELEMENT_NODE) {
Element* elem = (Element*)parent;
if (elem->getAttr(txXMLAtoms::space, kNameSpaceID_XML, value)) {
txAtom* val = TX_GET_ATOM(value);
nsIAtom* val = TX_GET_ATOM(value);
if (val == txXMLAtoms::preserve) {
TX_IF_RELEASE_ATOM(val);
return MB_TRUE;

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

@ -43,7 +43,7 @@ public:
}
txExpandedName(PRInt32 aNsID,
txAtom* aLocalName) : mNamespaceID(aNsID),
nsIAtom* aLocalName) : mNamespaceID(aNsID),
mLocalName(aLocalName)
{
}
@ -87,9 +87,9 @@ class XMLUtils {
public:
static void getPrefix(const nsAString& src, txAtom** dest);
static void getPrefix(const nsAString& src, nsIAtom** dest);
static const nsDependentSubstring getLocalPart(const nsAString& src);
static void getLocalPart(const nsAString& src, txAtom** dest);
static void getLocalPart(const nsAString& src, nsIAtom** dest);
/**
* Returns true if the given string is a valid XML QName

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

@ -129,7 +129,7 @@ nsXPathEvaluator::Evaluate(const nsAString & aExpression,
*/
nsresult nsXPathEvaluator::ParseContextImpl::resolveNamespacePrefix
(txAtom* aPrefix, PRInt32& aID)
(nsIAtom* aPrefix, PRInt32& aID)
{
nsAutoString prefix;
if (aPrefix) {
@ -155,7 +155,7 @@ nsresult nsXPathEvaluator::ParseContextImpl::resolveNamespacePrefix
return gTxNameSpaceManager->RegisterNameSpace(ns, aID);
}
nsresult nsXPathEvaluator::ParseContextImpl::resolveFunctionCall(txAtom* aName,
nsresult nsXPathEvaluator::ParseContextImpl::resolveFunctionCall(nsIAtom* aName,
PRInt32 aID,
FunctionCall*& aFn)
{

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

@ -77,8 +77,8 @@ private:
return mLastError;
}
nsresult resolveNamespacePrefix(txAtom* aPrefix, PRInt32& aID);
nsresult resolveFunctionCall(txAtom* aName, PRInt32 aID,
nsresult resolveNamespacePrefix(nsIAtom* aPrefix, PRInt32& aID);
nsresult resolveFunctionCall(nsIAtom* aName, PRInt32 aID,
FunctionCall*& aFunction);
void receiveError(const nsAString& aMsg, nsresult aRes);

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

@ -166,7 +166,7 @@ nsXPathExpression::Evaluate(nsIDOMNode *aContextNode,
*/
nsresult nsXPathExpression::EvalContextImpl::getVariable(PRInt32 aNamespace,
txAtom* aLName,
nsIAtom* aLName,
ExprResult*& aResult)
{
aResult = 0;

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

@ -120,7 +120,7 @@ ExprResult* BooleanFunctionCall::evaluate(txIEvalContext* aContext)
return new StringResult(NS_LITERAL_STRING("error"));
}
nsresult BooleanFunctionCall::getNameAtom(txAtom** aAtom)
nsresult BooleanFunctionCall::getNameAtom(nsIAtom** aAtom)
{
switch (mType) {
case TX_BOOLEAN:

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

@ -97,7 +97,7 @@ public:
#define TX_DECL_FUNCTION \
TX_DECL_EVALUATE; \
nsresult getNameAtom(txAtom** aAtom)
nsresult getNameAtom(nsIAtom** aAtom)
/**
* This class represents a FunctionCall as defined by the XPath 1.0
@ -164,7 +164,7 @@ protected:
/*
* Returns the name of the function as an atom.
*/
virtual nsresult getNameAtom(txAtom** aAtom) = 0;
virtual nsresult getNameAtom(nsIAtom** aAtom) = 0;
}; //-- FunctionCall
@ -224,7 +224,7 @@ public:
* Creates a new txNameTest with the given type and the given
* principal node type
*/
txNameTest(txAtom* aPrefix, txAtom* aLocalName, PRInt32 aNSID,
txNameTest(nsIAtom* aPrefix, nsIAtom* aLocalName, PRInt32 aNSID,
Node::NodeType aNodeType);
~txNameTest();
@ -232,8 +232,8 @@ public:
TX_DECL_NODE_TEST;
private:
txAtom* mPrefix;
txAtom* mLocalName;
nsIAtom* mPrefix;
nsIAtom* mLocalName;
PRInt32 mNamespace;
Node::NodeType mNodeType;
};
@ -267,7 +267,7 @@ public:
private:
NodeType mNodeType;
txAtom* mNodeName;
nsIAtom* mNodeName;
};
/**
@ -554,14 +554,14 @@ class VariableRefExpr : public Expr {
public:
VariableRefExpr(txAtom* aPrefix, txAtom* aLocalName, PRInt32 aNSID);
VariableRefExpr(nsIAtom* aPrefix, nsIAtom* aLocalName, PRInt32 aNSID);
~VariableRefExpr();
TX_DECL_EXPR;
private:
txAtom* mPrefix;
txAtom* mLocalName;
nsIAtom* mPrefix;
nsIAtom* mLocalName;
PRInt32 mNamespace;
};

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

@ -326,7 +326,7 @@ Expr* ExprParser::createFilterExpr(ExprLexer& lexer, txIParseContext* aContext)
break;
case Token::VAR_REFERENCE :
{
txAtom *prefix, *lName;
nsIAtom *prefix, *lName;
PRInt32 nspace;
nsresult rv = resolveQName(tok->value, prefix, aContext,
lName, nspace);
@ -490,7 +490,7 @@ Expr* ExprParser::createFunctionCall(ExprLexer& lexer,
fnCall = new NumberFunctionCall(NumberFunctionCall::FLOOR);
}
else {
txAtom *prefix, *lName;
nsIAtom *prefix, *lName;
PRInt32 namespaceID;
rv = resolveQName(tok->value, prefix, aContext, lName, namespaceID);
if (NS_FAILED(rv)) {
@ -640,7 +640,7 @@ LocationStep* ExprParser::createLocationStep(ExprLexer& lexer,
case Token::CNAME :
{
// resolve QName
txAtom *prefix, *lName;
nsIAtom *prefix, *lName;
PRInt32 nspace;
nsresult rv = resolveQName(tok->value, prefix, aContext,
lName, nspace);
@ -1013,8 +1013,8 @@ short ExprParser::precedenceLevel(short tokenType) {
}
nsresult ExprParser::resolveQName(const nsAString& aQName,
txAtom*& aPrefix, txIParseContext* aContext,
txAtom*& aLocalName, PRInt32& aNamespace)
nsIAtom*& aPrefix, txIParseContext* aContext,
nsIAtom*& aLocalName, PRInt32& aNamespace)
{
aNamespace = kNameSpaceID_None;
PRInt32 idx = aQName.FindChar(':');

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

@ -82,9 +82,9 @@ protected:
* Resolve a QName, given the mContext parse context.
* Returns prefix and localName as well as namespace ID
**/
static nsresult resolveQName(const nsAString& aQName, txAtom*& aPrefix,
static nsresult resolveQName(const nsAString& aQName, nsIAtom*& aPrefix,
txIParseContext* aContext,
txAtom*& aLocalName, PRInt32& aNamespace);
nsIAtom*& aLocalName, PRInt32& aNamespace);
/**
* Using the given lexer, parses the tokens if they represent a

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

@ -56,7 +56,7 @@ PRUint32 txForwardContext::position()
return (PRUint32)(pos+1);
}
nsresult txForwardContext::getVariable(PRInt32 aNamespace, txAtom* aLName,
nsresult txForwardContext::getVariable(PRInt32 aNamespace, nsIAtom* aLName,
ExprResult*& aResult)
{
NS_ASSERTION(mInner, "mInner is null!!!");

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

@ -176,7 +176,7 @@ MBool FunctionCall::requireParams(int paramCountMin, txIEvalContext* aContext)
**/
void FunctionCall::toString(nsAString& aDest)
{
txAtom* functionNameAtom = 0;
nsIAtom* functionNameAtom = 0;
nsAutoString functionName;
if (!NS_SUCCEEDED(getNameAtom(&functionNameAtom)) ||
!TX_GET_ATOM_STRING(functionNameAtom, functionName)) {

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

@ -66,13 +66,13 @@ public:
/*
* Return a namespaceID for a given prefix.
*/
virtual nsresult resolveNamespacePrefix(txAtom* aPrefix, PRInt32& aID) = 0;
virtual nsresult resolveNamespacePrefix(nsIAtom* aPrefix, PRInt32& aID) = 0;
/*
* Create a FunctionCall, needed for extension function calls and
* XSLT. XPath function calls are resolved by the Parser.
*/
virtual nsresult resolveFunctionCall(txAtom* aName, PRInt32 aID,
virtual nsresult resolveFunctionCall(nsIAtom* aName, PRInt32 aID,
FunctionCall*& aFunction) = 0;
/*
@ -101,7 +101,7 @@ public:
* Return the ExprResult associated with the variable with the
* given namespace and local name.
*/
virtual nsresult getVariable(PRInt32 aNamespace, txAtom* aLName,
virtual nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName,
ExprResult*& aResult) = 0;
/*
@ -117,7 +117,7 @@ public:
};
#define TX_DECL_MATCH_CONTEXT \
nsresult getVariable(PRInt32 aNamespace, txAtom* aLName, \
nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName, \
ExprResult*& aResult); \
MBool isStripSpaceAllowed(Node* aNode); \
void receiveError(const nsAString& aMsg, nsresult aRes)

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

@ -27,7 +27,7 @@
#include "txAtoms.h"
#include "txIXPathContext.h"
txNameTest::txNameTest(txAtom* aPrefix, txAtom* aLocalName, PRInt32 aNSID,
txNameTest::txNameTest(nsIAtom* aPrefix, nsIAtom* aLocalName, PRInt32 aNSID,
Node::NodeType aNodeType)
:mPrefix(aPrefix), mLocalName(aLocalName), mNamespace(aNSID),
mNodeType(aNodeType)
@ -66,7 +66,7 @@ MBool txNameTest::matches(Node* aNode, txIMatchContext* aContext)
return MB_TRUE;
// Compare local-names
txAtom* localName;
nsIAtom* localName;
aNode->getLocalName(&localName);
MBool result = localName == mLocalName;
TX_IF_RELEASE_ATOM(localName);

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

@ -55,7 +55,7 @@ PRUint32 txNodeSetContext::position()
return mPosition;
}
nsresult txNodeSetContext::getVariable(PRInt32 aNamespace, txAtom* aLName,
nsresult txNodeSetContext::getVariable(PRInt32 aNamespace, nsIAtom* aLName,
ExprResult*& aResult)
{
NS_ASSERTION(mInner, "mInner is null!!!");

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

@ -161,7 +161,7 @@ ExprResult* NodeSetFunctionCall::evaluate(txIEvalContext* aContext) {
case LOCAL_NAME:
{
nsAutoString localName;
txAtom* localNameAtom;
nsIAtom* localNameAtom;
node->getLocalName(&localNameAtom);
if (localNameAtom) {
// Node has a localName
@ -220,7 +220,7 @@ ExprResult* NodeSetFunctionCall::evaluate(txIEvalContext* aContext) {
return new StringResult(NS_LITERAL_STRING("error"));
}
nsresult NodeSetFunctionCall::getNameAtom(txAtom** aAtom)
nsresult NodeSetFunctionCall::getNameAtom(nsIAtom** aAtom)
{
switch (mType) {
case COUNT:

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

@ -64,7 +64,7 @@ MBool txNodeTypeTest::matches(Node* aNode, txIMatchContext* aContext)
!aContext->isStripSpaceAllowed(aNode);
case PI_TYPE:
if (type == Node::PROCESSING_INSTRUCTION_NODE) {
txAtom* localName = 0;
nsIAtom* localName = 0;
MBool result;
result = !mNodeName ||
(aNode->getLocalName(&localName) &&

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

@ -138,7 +138,7 @@ ExprResult* NumberFunctionCall::evaluate(txIEvalContext* aContext)
return new StringResult(NS_LITERAL_STRING("error"));
}
nsresult NumberFunctionCall::getNameAtom(txAtom** aAtom)
nsresult NumberFunctionCall::getNameAtom(nsIAtom** aAtom)
{
switch (mType) {
case NUMBER:

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

@ -53,7 +53,7 @@ public:
~txSingleNodeContext()
{}
nsresult getVariable(PRInt32 aNamespace, txAtom* aLName,
nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName,
ExprResult*& aResult)
{
NS_ASSERTION(mInner, "mInner is null!!!");

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

@ -251,7 +251,7 @@ ExprResult* StringFunctionCall::evaluate(txIEvalContext* aContext)
return new StringResult(NS_LITERAL_STRING("error"));
}
nsresult StringFunctionCall::getNameAtom(txAtom** aAtom)
nsresult StringFunctionCall::getNameAtom(nsIAtom** aAtom)
{
switch (mType) {
case CONCAT:

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

@ -35,7 +35,7 @@
/**
* Creates a VariableRefExpr with the given variable name
**/
VariableRefExpr::VariableRefExpr(txAtom* aPrefix, txAtom* aLocalName,
VariableRefExpr::VariableRefExpr(nsIAtom* aPrefix, nsIAtom* aLocalName,
PRInt32 aNSID)
: mPrefix(aPrefix), mLocalName(aLocalName), mNamespace(aNSID)
{

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

@ -25,7 +25,7 @@ ExprResult* CurrentFunctionCall::evaluate(txIEvalContext* aContext)
return new NodeSet(mPs->getEvalContext()->getContextNode());
}
nsresult CurrentFunctionCall::getNameAtom(txAtom** aAtom)
nsresult CurrentFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::current;
TX_ADDREF_ATOM(*aAtom);

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

@ -128,7 +128,7 @@ ExprResult* DocumentFunctionCall::evaluate(txIEvalContext* aContext)
return nodeSet;
}
nsresult DocumentFunctionCall::getNameAtom(txAtom** aAtom)
nsresult DocumentFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::document;
TX_ADDREF_ATOM(*aAtom);

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

@ -133,7 +133,7 @@ ExprResult* ElementAvailableFunctionCall::evaluate(txIEvalContext* aContext)
return result;
}
nsresult ElementAvailableFunctionCall::getNameAtom(txAtom** aAtom)
nsresult ElementAvailableFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::elementAvailable;
TX_ADDREF_ATOM(*aAtom);

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

@ -476,7 +476,7 @@ ExprResult* txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext)
return new StringResult(res);
} //-- evaluate
nsresult txFormatNumberFunctionCall::getNameAtom(txAtom** aAtom)
nsresult txFormatNumberFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::formatNumber;
TX_ADDREF_ATOM(*aAtom);

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

@ -132,7 +132,7 @@ ExprResult* FunctionAvailableFunctionCall::evaluate(txIEvalContext* aContext)
return result;
}
nsresult FunctionAvailableFunctionCall::getNameAtom(txAtom** aAtom)
nsresult FunctionAvailableFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::functionAvailable;
TX_ADDREF_ATOM(*aAtom);

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

@ -101,7 +101,7 @@ ExprResult* GenerateIdFunctionCall::evaluate(txIEvalContext* aContext)
return new StringResult(NS_ConvertASCIItoUCS2(buf));
}
nsresult GenerateIdFunctionCall::getNameAtom(txAtom** aAtom)
nsresult GenerateIdFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::generateId;
TX_ADDREF_ATOM(*aAtom);

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

@ -216,7 +216,7 @@ void txHTMLOutput::attribute(const nsAString& aName,
localPart.Equals(aValue, txCaseInsensitiveStringComparator())) {
txListIterator iter(&mAttributes);
txAttribute* setAtt = 0;
txAtom* localName = TX_GET_ATOM(localPart);
nsIAtom* localName = TX_GET_ATOM(localPart);
txExpandedName att(aNsID, localName);
while ((setAtt = (txAttribute*)iter.next())) {
if (setAtt->mName == att) {
@ -304,7 +304,7 @@ void txHTMLOutput::startElement(const nsAString& aName,
{
txXMLOutput::startElement(aName, aNsID);
txAtom* localAtom;
nsIAtom* localAtom;
if (aNsID == kNameSpaceID_None) {
nsAutoString localName;
TX_ToLowerCase(aName, localName);

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

@ -106,7 +106,7 @@ ExprResult* txKeyFunctionCall::evaluate(txIEvalContext* aContext)
} // evaluate
nsresult txKeyFunctionCall::getNameAtom(txAtom** aAtom)
nsresult txKeyFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::key;
TX_ADDREF_ATOM(*aAtom);

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

@ -264,7 +264,7 @@ int txNodeSorter::compareNodes(SortableNode* aSNode1,
}
MBool txNodeSorter::getAttrAsAVT(Element* aSortElement,
txAtom* aAttrName,
nsIAtom* aAttrName,
nsAString& aResult)
{
aResult.Truncate();

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

@ -85,7 +85,7 @@ private:
NodeSet* aNodes);
MBool getAttrAsAVT(Element* aSortElement,
txAtom* aAttrName,
nsIAtom* aAttrName,
nsAString& aResult);
txList mSortKeys;

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

@ -262,7 +262,7 @@ nsresult txPatternParser::createKeyPattern(ExprLexer& aLexer,
if (!XMLUtils::isValidQName(key))
return NS_ERROR_XPATH_PARSE_FAILED;
txAtom *prefix = 0, *localName = 0;
nsIAtom *prefix = 0, *localName = 0;
PRInt32 namespaceID;
nsresult rv = resolveQName(key, prefix, aContext, localName, namespaceID);
if (NS_FAILED(rv))
@ -302,7 +302,7 @@ nsresult txPatternParser::createStepPattern(ExprLexer& aLexer,
txNodeTest* nodeTest = 0;
if (tok->type == Token::CNAME) {
// resolve QName
txAtom *prefix, *lName;
nsIAtom *prefix, *lName;
PRInt32 nspace;
rv = resolveQName(tok->value, prefix, aContext, lName, nspace);
if (NS_FAILED(rv)) {

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

@ -64,7 +64,7 @@ ExprResult* SystemPropertyFunctionCall::evaluate(txIEvalContext* aContext)
return result;
}
nsresult SystemPropertyFunctionCall::getNameAtom(txAtom** aAtom)
nsresult SystemPropertyFunctionCall::getNameAtom(nsIAtom** aAtom)
{
*aAtom = txXSLTAtoms::systemProperty;
TX_ADDREF_ATOM(*aAtom);

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

@ -40,7 +40,7 @@
const int txXMLOutput::DEFAULT_INDENT = 2;
txAttribute::txAttribute(PRInt32 aNsID, txAtom* aLocalName,
txAttribute::txAttribute(PRInt32 aNsID, nsIAtom* aLocalName,
const nsAString& aValue) :
mName(aNsID, aLocalName),
mValue(aValue),
@ -246,7 +246,7 @@ void txXMLOutput::startElement(const nsAString& aName,
mCDATASections.push((void*)mInCDATASection);
mInCDATASection = MB_FALSE;
txAtom* localName = TX_GET_ATOM(aName);
nsIAtom* localName = TX_GET_ATOM(aName);
txExpandedName currentElement(aNsID, localName);
TX_IF_RELEASE_ATOM(localName);
txListIterator iter(&(mOutputFormat.mCDATASectionElements));

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

@ -85,7 +85,7 @@
class txAttribute {
public:
txAttribute(PRInt32 aNsID, txAtom* aLocalName, const nsAString& aValue);
txAttribute(PRInt32 aNsID, nsIAtom* aLocalName, const nsAString& aValue);
txExpandedName mName;
nsString mValue;
MBool mShorthand;

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

@ -150,7 +150,7 @@ nsresult txXSLTNumber::getValueList(Element* aNumberElement,
switch (currNode->getNodeType()) {
case Node::ELEMENT_NODE:
{
txAtom* localName = 0;
nsIAtom* localName = 0;
currNode->getLocalName(&localName);
nodeTest = new txNameTest(0, localName,
currNode->getNamespaceID(),
@ -218,7 +218,7 @@ nsresult txXSLTNumber::getValueList(Element* aNumberElement,
// Generate list of values depending on the value of the level-attribute
nsAutoString levelStr;
txAtom* level = 0;
nsIAtom* level = 0;
if (aNumberElement->getAttr(txXSLTAtoms::level, kNameSpaceID_None, levelStr)) {
level = TX_GET_ATOM(levelStr);
}

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

@ -172,7 +172,7 @@ private:
class txKeyPattern : public txPattern
{
public:
txKeyPattern(ProcessorState* aPs, txAtom* aPrefix, txAtom* aLocalName,
txKeyPattern(ProcessorState* aPs, nsIAtom* aPrefix, nsIAtom* aLocalName,
PRInt32 aNSID, const nsAString& aValue)
: mProcessorState(aPs), mName(aNSID, aLocalName), mPrefix(aPrefix),
mValue(aValue)
@ -186,7 +186,7 @@ public:
private:
ProcessorState* mProcessorState;
txExpandedName mName;
txAtom* mPrefix;
nsIAtom* mPrefix;
nsString mValue;
};