return NS_OK;
  void Add(PRInt32 aIndex) {    if (aIndex < mMin) {      // We have found a spot to insert.      if (aIndex + 1 == mMin)        mMin = aIndex;      else if (mPrev && mPrev->mMax+1 == aIndex)        mPrev->mMax = aIndex;      else {        // We have to create a new range.        nsTreeRange* newRange = new nsTreeRange(mSelection, aIndex);        newRange->Connect(mPrev, this);      }    }    else if (mNext)      mNext->Add(aIndex);    else {      // Insert on to the end.      if (mMax+1 == aIndex)        mMax = aIndex;      else {        // We have to create a new range.        nsTreeRange* newRange = new nsTreeRange(mSelection, aIndex);        newRange->Connect(this, nsnull);      }    }  };