second phase of deprecated method removal.
git-svn-id: svn://10.0.0.236/trunk@62710 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -147,7 +147,7 @@ nsHTMLEntities::ReleaseTable(void)
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsHTMLEntities::EntityToUnicode(const nsString& aEntity)
|
||||
nsHTMLEntities::EntityToUnicode(const nsCString& aEntity)
|
||||
{
|
||||
NS_ASSERTION(gEntityToCodeTree, "no lookup table, needs addref");
|
||||
if (gEntityToCodeTree) {
|
||||
@@ -173,31 +173,12 @@ nsHTMLEntities::EntityToUnicode(const nsString& aEntity)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
PRInt32
|
||||
nsHTMLEntities::EntityToUnicode(const nsCString& aEntity)
|
||||
{
|
||||
NS_ASSERTION(gEntityToCodeTree, "no lookup table, needs addref");
|
||||
if (gEntityToCodeTree) {
|
||||
|
||||
//this little piece of code exists because entities may or may not have the terminating ';'.
|
||||
//if we see it, strip if off for this test...
|
||||
|
||||
PRUnichar theLastChar=GetCharAt(aEntity,aEntity.mLength-1);
|
||||
if(';'==theLastChar) {
|
||||
nsCAutoString temp(aEntity);
|
||||
temp.Truncate(aEntity.mLength-1);
|
||||
return EntityToUnicode(temp);
|
||||
}
|
||||
|
||||
|
||||
EntityNode node(aEntity);
|
||||
EntityNode* found = (EntityNode*)gEntityToCodeTree->FindItem(&node);
|
||||
if (found) {
|
||||
NS_ASSERTION(found->mStr.Equals(aEntity.mUStr,PR_FALSE,aEntity.mLength), "bad tree");
|
||||
return found->mUnicode;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
nsHTMLEntities::EntityToUnicode(const nsString& aEntity) {
|
||||
nsCAutoString theEntity(aEntity);
|
||||
PRInt32 result=EntityToUnicode(theEntity);
|
||||
return result;
|
||||
}
|
||||
|
||||
const nsCString&
|
||||
|
||||
Reference in New Issue
Block a user