Fixing someone's RDF breakage.

This commit is contained in:
warren%netscape.com 1999-03-06 04:12:56 +00:00
parent 8f7b62e778
commit 061e28870c
4 changed files with 8 additions and 7 deletions

View File

@ -495,7 +495,7 @@ XULSortServiceImpl::SortTreeChildren(nsIContent *container, PRInt32 colIndex, PR
unsigned long numElements = childArray->Count();
if (numElements > 1)
{
nsIContent ** flatArray = (nsIContent **)malloc(numElements * sizeof(void *));
nsIContent ** flatArray = new nsIContent*[numElements];
if (flatArray)
{
_sortStruct sortInfo;
@ -554,7 +554,7 @@ XULSortServiceImpl::PrintTreeChildren(nsIContent *container, PRInt32 colIndex, P
PRInt32 attribIndex, numAttribs;
child->GetAttributeCount(numAttribs);
for (PRInt32 attribIndex = 0; attribIndex < numAttribs; attribIndex++)
for (attribIndex = 0; attribIndex < numAttribs; attribIndex++)
{
PRInt32 attribNameSpaceID;
nsCOMPtr<nsIAtom> attribAtom;
@ -613,7 +613,7 @@ XULSortServiceImpl::DoSort(nsIDOMNode* node, const nsString& sortResource)
nsIContent *child, *contentNode, *treeNode, *treeBody, *treeParent;
nsresult rv;
if (NS_FAILED(rv = node->QueryInterface(kIContentIID, &contentNode))) return(rv);
if (NS_FAILED(rv = node->QueryInterface(kIContentIID, (void**)&contentNode))) return(rv);
printf("Success converting dom node to content node.\n");
if (NS_FAILED(rv = FindTreeElement(contentNode, &treeNode))) return(rv);

View File

@ -39,7 +39,7 @@ CPPSRCS = \
nsRDFTreeBuilder.cpp \
nsRDFXULBuilder.cpp \
nsXULDocument.cpp \
nsXULSortService.cpp \
nsXULSortService.cpp \
$(NULL)
EXPORTS = \

View File

@ -39,6 +39,7 @@ CPP_OBJS=\
.\$(OBJDIR)\nsRDFTreeBuilder.obj \
.\$(OBJDIR)\nsRDFXULBuilder.obj \
.\$(OBJDIR)\nsXULDocument.obj \
.\$(OBJDIR)\nsXULSortService.obj \
$(NULL)
# XXX we are including layout\html\base\src to get HTML elements

View File

@ -495,7 +495,7 @@ XULSortServiceImpl::SortTreeChildren(nsIContent *container, PRInt32 colIndex, PR
unsigned long numElements = childArray->Count();
if (numElements > 1)
{
nsIContent ** flatArray = (nsIContent **)malloc(numElements * sizeof(void *));
nsIContent ** flatArray = new nsIContent*[numElements];
if (flatArray)
{
_sortStruct sortInfo;
@ -554,7 +554,7 @@ XULSortServiceImpl::PrintTreeChildren(nsIContent *container, PRInt32 colIndex, P
PRInt32 attribIndex, numAttribs;
child->GetAttributeCount(numAttribs);
for (PRInt32 attribIndex = 0; attribIndex < numAttribs; attribIndex++)
for (attribIndex = 0; attribIndex < numAttribs; attribIndex++)
{
PRInt32 attribNameSpaceID;
nsCOMPtr<nsIAtom> attribAtom;
@ -613,7 +613,7 @@ XULSortServiceImpl::DoSort(nsIDOMNode* node, const nsString& sortResource)
nsIContent *child, *contentNode, *treeNode, *treeBody, *treeParent;
nsresult rv;
if (NS_FAILED(rv = node->QueryInterface(kIContentIID, &contentNode))) return(rv);
if (NS_FAILED(rv = node->QueryInterface(kIContentIID, (void**)&contentNode))) return(rv);
printf("Success converting dom node to content node.\n");
if (NS_FAILED(rv = FindTreeElement(contentNode, &treeNode))) return(rv);