if you want a pointer to the characters, your going to have to |.get()| it

This commit is contained in:
scc%mozilla.org 2000-09-13 04:47:36 +00:00
parent 8e6302d6d0
commit cfbee28623
13 changed files with 16 additions and 14 deletions

View File

@ -1083,7 +1083,7 @@ NS_IMETHODIMP nsDocument::SetDocumentCharacterSet(const nsAReadableString& aChar
for (PRInt32 i = 0; i < n; i++) {
nsIObserver* observer = (nsIObserver*) mCharSetObservers.ElementAt(i);
observer->Observe((nsIDocument*) this, NS_LITERAL_STRING("charset").get(),
nsPromiseFlatString(aCharSetID));
nsPromiseFlatString(aCharSetID).get());
}
}
return NS_OK;

View File

@ -347,7 +347,8 @@ nsNodeInfo::NamespaceEquals(const nsAReadableString& aNamespaceURI)
NS_IMETHODIMP_(PRBool)
nsNodeInfo::QualifiedNameEquals(const nsAReadableString& aQualifiedName)
{
const PRUnichar *qname = nsPromiseFlatString(aQualifiedName);
nsPromiseFlatString flatName(aQualifiedName);
const PRUnichar *qname = flatName.get();
PRUint32 i = 0;
if (mInner.mPrefix) {

View File

@ -345,7 +345,7 @@ nsHTMLAnchorElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::suppress) {
if (nsCRT::strcasecmp(nsPromiseFlatString(aValue), NS_LITERAL_STRING("true").get())) {
if (nsCRT::strcasecmp(nsPromiseFlatString(aValue).get(), NS_LITERAL_STRING("true").get())) {
aResult.SetEmptyValue(); // XXX? shouldn't just leave "true"
return NS_CONTENT_ATTR_HAS_VALUE;
}

View File

@ -419,7 +419,7 @@ nsBindingManager::LoadBindingDocument(nsIDocument* aBoundDoc, const nsAReadableS
return rv;
// Load the binding doc.
nsCString url; url.AssignWithConversion((const PRUnichar*)nsPromiseFlatString(aURL));
nsCString url; url.AssignWithConversion((const PRUnichar*)nsPromiseFlatString(aURL).get());
nsCOMPtr<nsIXBLDocumentInfo> info;
xblService->LoadBindingDocumentInfo(nsnull, aBoundDoc, url, nsCAutoString(), PR_TRUE, getter_AddRefs(info));
if (!info)

View File

@ -618,7 +618,7 @@ nsXBLService::LoadBindings(nsIContent* aContent, const nsAReadableString& aURL,
// See if the URIs match.
nsCAutoString uri;
styleBinding->GetBindingURI(uri);
if (uri.EqualsWithConversion((const PRUnichar *) nsPromiseFlatString(aURL)))
if (uri.EqualsWithConversion((const PRUnichar *) nsPromiseFlatString(aURL).get()))
return NS_OK;
else {
FlushStyleBindings(aContent);

View File

@ -91,7 +91,7 @@ nsPresState::SetStateProperty(const nsAReadableString& aName, const nsAReadableS
nsresult rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_PROGID, nsnull,
NS_GET_IID(nsISupportsWString), getter_AddRefs(supportsStr));
supportsStr->SetData(nsPromiseFlatString(aValue));
supportsStr->SetData(nsPromiseFlatString(aValue).get());
mPropertyTable->Put(&key, supportsStr);
return NS_OK;

View File

@ -1083,7 +1083,7 @@ NS_IMETHODIMP nsDocument::SetDocumentCharacterSet(const nsAReadableString& aChar
for (PRInt32 i = 0; i < n; i++) {
nsIObserver* observer = (nsIObserver*) mCharSetObservers.ElementAt(i);
observer->Observe((nsIDocument*) this, NS_LITERAL_STRING("charset").get(),
nsPromiseFlatString(aCharSetID));
nsPromiseFlatString(aCharSetID).get());
}
}
return NS_OK;

View File

@ -347,7 +347,8 @@ nsNodeInfo::NamespaceEquals(const nsAReadableString& aNamespaceURI)
NS_IMETHODIMP_(PRBool)
nsNodeInfo::QualifiedNameEquals(const nsAReadableString& aQualifiedName)
{
const PRUnichar *qname = nsPromiseFlatString(aQualifiedName);
nsPromiseFlatString flatName(aQualifiedName);
const PRUnichar *qname = flatName.get();
PRUint32 i = 0;
if (mInner.mPrefix) {

View File

@ -91,7 +91,7 @@ nsPresState::SetStateProperty(const nsAReadableString& aName, const nsAReadableS
nsresult rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_PROGID, nsnull,
NS_GET_IID(nsISupportsWString), getter_AddRefs(supportsStr));
supportsStr->SetData(nsPromiseFlatString(aValue));
supportsStr->SetData(nsPromiseFlatString(aValue).get());
mPropertyTable->Put(&key, supportsStr);
return NS_OK;

View File

@ -539,7 +539,7 @@ nsXIFConverter::BeginLeaf(const nsAReadableString& aTag)
// XXX: Complete hack to prevent the style leaf
// From being created until the style sheet work
// is redone. -- gpk 1/27/99
if (nsCRT::strcasecmp(nsPromiseFlatString(aTag), NS_LITERAL_STRING("STYLE").get()) == 0)
if (nsCRT::strcasecmp(nsPromiseFlatString(aTag).get(), NS_LITERAL_STRING("STYLE").get()) == 0)
return NS_OK;
@ -556,7 +556,7 @@ nsXIFConverter::EndLeaf(const nsAReadableString& aTag)
// XXX: Complete hack to prevent the style leaf
// From being created until the style sheet work
// is redone. -- gpk 1/27/99
if (nsCRT::strcasecmp(nsPromiseFlatString(aTag), NS_LITERAL_STRING("STYLE").get()) == 0)
if (nsCRT::strcasecmp(nsPromiseFlatString(aTag).get(), NS_LITERAL_STRING("STYLE").get()) == 0)
return NS_OK;

View File

@ -345,7 +345,7 @@ nsHTMLAnchorElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::suppress) {
if (nsCRT::strcasecmp(nsPromiseFlatString(aValue), NS_LITERAL_STRING("true").get())) {
if (nsCRT::strcasecmp(nsPromiseFlatString(aValue).get(), NS_LITERAL_STRING("true").get())) {
aResult.SetEmptyValue(); // XXX? shouldn't just leave "true"
return NS_CONTENT_ATTR_HAS_VALUE;
}

View File

@ -419,7 +419,7 @@ nsBindingManager::LoadBindingDocument(nsIDocument* aBoundDoc, const nsAReadableS
return rv;
// Load the binding doc.
nsCString url; url.AssignWithConversion((const PRUnichar*)nsPromiseFlatString(aURL));
nsCString url; url.AssignWithConversion((const PRUnichar*)nsPromiseFlatString(aURL).get());
nsCOMPtr<nsIXBLDocumentInfo> info;
xblService->LoadBindingDocumentInfo(nsnull, aBoundDoc, url, nsCAutoString(), PR_TRUE, getter_AddRefs(info));
if (!info)

View File

@ -618,7 +618,7 @@ nsXBLService::LoadBindings(nsIContent* aContent, const nsAReadableString& aURL,
// See if the URIs match.
nsCAutoString uri;
styleBinding->GetBindingURI(uri);
if (uri.EqualsWithConversion((const PRUnichar *) nsPromiseFlatString(aURL)))
if (uri.EqualsWithConversion((const PRUnichar *) nsPromiseFlatString(aURL).get()))
return NS_OK;
else {
FlushStyleBindings(aContent);