mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
removed warnings and fixed bug 27483; r=rods and akkana (for portions)
This commit is contained in:
parent
8395d3af87
commit
f73e73fc31
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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...
|
||||
|
||||
|
@ -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++)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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...
|
||||
|
||||
|
@ -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++)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user