Convert users of nsC?String(), nsC?AutoString(), and NS_LITERAL_C?STRING("") to

using EmptyC?String instead.  Bug 232691, patch by Charles Fenwick
<clf03f@garnet.acns.fsu.edu>, r+sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2005-11-02 07:42:25 +00:00
Родитель f7932dc015
Коммит 248ac96fe6
10 изменённых файлов: 15 добавлений и 15 удалений

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

@ -49,7 +49,7 @@
//Construct an Attribute object using the specified name and document owner
//
Attr::Attr(const nsAString& name, Document* owner):
NodeDefinition(Node::ATTRIBUTE_NODE, name, nsString(), owner)
NodeDefinition(Node::ATTRIBUTE_NODE, name, EmptyString(), owner)
{
int idx = nodeName.FindChar(':');
if (idx == kNotFound) {
@ -78,7 +78,7 @@ Attr::Attr(const nsAString& name, Document* owner):
Attr::Attr(const nsAString& aNamespaceURI,
const nsAString& aName,
Document* aOwner) :
NodeDefinition(Node::ATTRIBUTE_NODE, aName, nsString(), aOwner)
NodeDefinition(Node::ATTRIBUTE_NODE, aName, EmptyString(), aOwner)
{
if (aNamespaceURI.IsEmpty())
mNamespaceID = kNameSpaceID_None;

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

@ -372,7 +372,7 @@ class DocumentFragment : public NodeDefinition
private:
friend class Document;
DocumentFragment(Document* aOwner) :
NodeDefinition(Node::DOCUMENT_FRAGMENT_NODE, nsString(), aOwner)
NodeDefinition(Node::DOCUMENT_FRAGMENT_NODE, EmptyString(), aOwner)
{
};
};

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

@ -54,7 +54,7 @@
//Construct a Document. Currently no parameters are required, but the the
//node constructor is called to identify the node type.
//
Document::Document() : NodeDefinition(Node::DOCUMENT_NODE, nsString(), NULL)
Document::Document() : NodeDefinition(Node::DOCUMENT_NODE, EmptyString(), NULL)
{
mIDMap.Init(0);
documentElement = nsnull;

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

@ -51,7 +51,7 @@
//type.
//
Element::Element(const nsAString& tagName, Document* owner) :
NodeDefinition(Node::ELEMENT_NODE, tagName, nsString(), owner)
NodeDefinition(Node::ELEMENT_NODE, tagName, EmptyString(), owner)
{
mAttributes.ownerElement = this;
mNamespaceID = kNameSpaceID_Unknown;
@ -69,7 +69,7 @@ Element::Element(const nsAString& tagName, Document* owner) :
Element::Element(const nsAString& aNamespaceURI,
const nsAString& aTagName,
Document* aOwner) :
NodeDefinition(Node::ELEMENT_NODE, aTagName, nsString(), aOwner)
NodeDefinition(Node::ELEMENT_NODE, aTagName, EmptyString(), aOwner)
{
Element(aTagName, aOwner);
if (aNamespaceURI.IsEmpty())

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

@ -225,7 +225,7 @@ void txHTMLOutput::attribute(const nsAString& aName,
}
}
if (!setAtt) {
setAtt = new txOutAttr(aNsID, localName, nsString());
setAtt = new txOutAttr(aNsID, localName, EmptyString());
setAtt->mShorthand = MB_TRUE;
mAttributes.add(setAtt);
}

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

@ -958,7 +958,7 @@ txStartElement::execute(txExecutionState& aEs)
else {
// we call characters with an empty string to "close" any element to
// make sure that no attributes are added
aEs.mResultHandler->characters(nsString(), PR_FALSE);
aEs.mResultHandler->characters(EmptyString(), PR_FALSE);
}
rv = aEs.pushString(name);

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

@ -66,7 +66,7 @@ txMozillaTextOutput::txMozillaTextOutput(nsIDOMDocumentFragment* aDest)
aDest->GetOwnerDocument(getter_AddRefs(doc));
NS_ASSERTION(doc, "unable to get ownerdocument");
nsCOMPtr<nsIDOMText> textNode;
nsresult rv = doc->CreateTextNode(nsString(),
nsresult rv = doc->CreateTextNode(EmptyString(),
getter_AddRefs(textNode));
if (NS_FAILED(rv)) {
return;
@ -165,7 +165,7 @@ void txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument,
nsCOMPtr<nsIDOMNSDocument> nsDoc = do_QueryInterface(mDocument);
if (nsDoc) {
nsDoc->SetTitle(nsString());
nsDoc->SetTitle(EmptyString());
}
// Reset and set up document
@ -293,7 +293,7 @@ void txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument,
}
nsCOMPtr<nsIDOMText> textNode;
mDocument->CreateTextNode(nsString(),
mDocument->CreateTextNode(EmptyString(),
getter_AddRefs(textNode));
NS_ASSERTION(textNode, "Failed to create the text node");
if (!textNode) {

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

@ -155,7 +155,7 @@ void txMozillaXMLOutput::attribute(const nsAString& aName,
// Outputting HTML as XHTML, lowercase attribute names
nsAutoString lowerName;
TX_ToLowerCase(aName, lowerName);
element->SetAttributeNS(nsString(), lowerName,
element->SetAttributeNS(EmptyString(), lowerName,
aValue);
}
else {
@ -202,7 +202,7 @@ void txMozillaXMLOutput::endDocument()
if (mCreatingNewDocument && !mHaveTitleElement) {
nsCOMPtr<nsIDOMNSDocument> domDoc = do_QueryInterface(mDocument);
if (domDoc) {
domDoc->SetTitle(nsString());
domDoc->SetTitle(EmptyString());
}
}

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

@ -688,7 +688,7 @@ txMozillaXSLTProcessor::reportError(nsresult aResult,
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
if (sbs) {
nsXPIDLString errorText;
sbs->FormatStatusMessage(aResult, nsString().get(),
sbs->FormatStatusMessage(aResult, EmptyString().get(),
getter_Copies(errorText));
nsXPIDLString errorMessage;

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

@ -65,7 +65,7 @@ void txUnknownHandler::endDocument()
// didn't create a document element. Switching to XML output mode
// anyway.
nsresult rv = createHandlerAndFlush(eXMLOutput, nsString(),
nsresult rv = createHandlerAndFlush(eXMLOutput, EmptyString(),
kNameSpaceID_None);
if (NS_FAILED(rv))
return;