removed warnings and fixed bug 27483; r=rods and akkana (for portions)

This commit is contained in:
rickg%netscape.com 2000-02-12 01:47:56 +00:00
parent 8395d3af87
commit f73e73fc31
12 changed files with 24 additions and 18 deletions

View File

@ -480,8 +480,8 @@ nsresult CNavDTD::BuildModel(nsIParser* aParser,nsITokenizer* aTokenizer,nsIToke
if(mIsText) {
//we do this little trick for text files, in both normal and viewsource mode...
CStartToken *theToken=(CStartToken*)mTokenRecycler->CreateTokenOfType(eToken_start,eHTMLTag_pre);
HandleStartToken(theToken);
CStartToken *theToken2=(CStartToken*)mTokenRecycler->CreateTokenOfType(eToken_start,eHTMLTag_pre);
HandleStartToken(theToken2);
}
}

View File

@ -182,6 +182,7 @@ static RTFEntry gRTFTable[] = {
* @param
* @return
*/
#if 0
static const char* GetTagName(eRTFTags aTag) {
PRInt32 cnt=sizeof(gRTFTable)/sizeof(RTFEntry);
PRInt32 low=0;
@ -198,6 +199,7 @@ static const char* GetTagName(eRTFTags aTag) {
}
return "";
}
#endif
/**
*
@ -674,7 +676,6 @@ nsresult CRtfDTD::EmitStyleContainer(CToken* aToken,eRTFTags aTag,PRBool aState)
nsresult result=NS_OK;
CRTFControlWord* theToken=(CRTFControlWord*)aToken;
PRUnichar theChar=theToken->mArgument.CharAt(0);
const char* theTag=0;
eHTMLTags theID=eHTMLTag_unknown;
@ -752,8 +753,8 @@ nsresult CRtfDTD::HandleControlWord(CToken* aToken){
break;
case eRTFCtrl_tab:
{
CTextToken theToken(" ");
result=HandleContent(&theToken);
CTextToken theToken2(" ");
result=HandleContent(&theToken2);
}
break;
case eRTFCtrl_bold:
@ -888,7 +889,7 @@ nsresult CRTFControlWord::Consume(PRUnichar aChar,nsScanner& aScanner,PRInt32 aM
if(NS_SUCCEEDED(result)) {
if(('a'<=theChar) && (theChar<='z')) {
PRInt32 result=aScanner.ReadWhile(mTextValue,gAlphaChars,PR_TRUE,PR_FALSE);
result=aScanner.ReadWhile(mTextValue,gAlphaChars,PR_TRUE,PR_FALSE);
if(NS_OK==result) {
//ok, now look for an option parameter...

View File

@ -1111,7 +1111,7 @@ NS_IMETHODIMP
nsHTMLContentSinkStream::OpenContainer(const nsIParserNode& aNode){
const nsString& name = aNode.GetText();
if (name.Equals("XIF_DOC_INFO"))
if (name.Equals("document_info"))
{
PRInt32 count=aNode.GetAttributeCount();
for(PRInt32 i=0;i<count;i++)

View File

@ -251,7 +251,7 @@ nsresult CStartToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode
}
else {
mTextValue=aChar;
nsresult result=aScanner.ReadIdentifier(mTextValue);
result=aScanner.ReadIdentifier(mTextValue);
mTypeID = nsHTMLTags::LookupTag(mTextValue);
}

View File

@ -673,6 +673,8 @@ nsresult nsScanner::GetIdentifier(nsSubsumeStr& aString) {
found=PR_TRUE;
else if(('0'<=theChar) && (theChar<='9'))
found=PR_TRUE;
else if('_'==theChar)
found=PR_TRUE;
if(!found) {
mOffset-=1;

View File

@ -1444,7 +1444,7 @@ void nsXIFDTD::ProcessDocumentInfoTag(const nsIParserNode& aNode)
if (GetAttribute(aNode,key,value))
{
nsString tmpString("XIF_DOC_INFO");
nsString tmpString("document_info");
PushNodeAndToken(tmpString);
nsIParserNode* top = PeekNode();
if (top != nsnull)

View File

@ -480,8 +480,8 @@ nsresult CNavDTD::BuildModel(nsIParser* aParser,nsITokenizer* aTokenizer,nsIToke
if(mIsText) {
//we do this little trick for text files, in both normal and viewsource mode...
CStartToken *theToken=(CStartToken*)mTokenRecycler->CreateTokenOfType(eToken_start,eHTMLTag_pre);
HandleStartToken(theToken);
CStartToken *theToken2=(CStartToken*)mTokenRecycler->CreateTokenOfType(eToken_start,eHTMLTag_pre);
HandleStartToken(theToken2);
}
}

View File

@ -182,6 +182,7 @@ static RTFEntry gRTFTable[] = {
* @param
* @return
*/
#if 0
static const char* GetTagName(eRTFTags aTag) {
PRInt32 cnt=sizeof(gRTFTable)/sizeof(RTFEntry);
PRInt32 low=0;
@ -198,6 +199,7 @@ static const char* GetTagName(eRTFTags aTag) {
}
return "";
}
#endif
/**
*
@ -674,7 +676,6 @@ nsresult CRtfDTD::EmitStyleContainer(CToken* aToken,eRTFTags aTag,PRBool aState)
nsresult result=NS_OK;
CRTFControlWord* theToken=(CRTFControlWord*)aToken;
PRUnichar theChar=theToken->mArgument.CharAt(0);
const char* theTag=0;
eHTMLTags theID=eHTMLTag_unknown;
@ -752,8 +753,8 @@ nsresult CRtfDTD::HandleControlWord(CToken* aToken){
break;
case eRTFCtrl_tab:
{
CTextToken theToken(" ");
result=HandleContent(&theToken);
CTextToken theToken2(" ");
result=HandleContent(&theToken2);
}
break;
case eRTFCtrl_bold:
@ -888,7 +889,7 @@ nsresult CRTFControlWord::Consume(PRUnichar aChar,nsScanner& aScanner,PRInt32 aM
if(NS_SUCCEEDED(result)) {
if(('a'<=theChar) && (theChar<='z')) {
PRInt32 result=aScanner.ReadWhile(mTextValue,gAlphaChars,PR_TRUE,PR_FALSE);
result=aScanner.ReadWhile(mTextValue,gAlphaChars,PR_TRUE,PR_FALSE);
if(NS_OK==result) {
//ok, now look for an option parameter...

View File

@ -1111,7 +1111,7 @@ NS_IMETHODIMP
nsHTMLContentSinkStream::OpenContainer(const nsIParserNode& aNode){
const nsString& name = aNode.GetText();
if (name.Equals("XIF_DOC_INFO"))
if (name.Equals("document_info"))
{
PRInt32 count=aNode.GetAttributeCount();
for(PRInt32 i=0;i<count;i++)

View File

@ -251,7 +251,7 @@ nsresult CStartToken::Consume(PRUnichar aChar, nsScanner& aScanner,PRInt32 aMode
}
else {
mTextValue=aChar;
nsresult result=aScanner.ReadIdentifier(mTextValue);
result=aScanner.ReadIdentifier(mTextValue);
mTypeID = nsHTMLTags::LookupTag(mTextValue);
}

View File

@ -673,6 +673,8 @@ nsresult nsScanner::GetIdentifier(nsSubsumeStr& aString) {
found=PR_TRUE;
else if(('0'<=theChar) && (theChar<='9'))
found=PR_TRUE;
else if('_'==theChar)
found=PR_TRUE;
if(!found) {
mOffset-=1;

View File

@ -1444,7 +1444,7 @@ void nsXIFDTD::ProcessDocumentInfoTag(const nsIParserNode& aNode)
if (GetAttribute(aNode,key,value))
{
nsString tmpString("XIF_DOC_INFO");
nsString tmpString("document_info");
PushNodeAndToken(tmpString);
nsIParserNode* top = PeekNode();
if (top != nsnull)