a=leaf r=ftang. I will be more carefull with ime when doing selection.. I will be more carefull with ime...

This commit is contained in:
mjudge%netscape.com 2000-04-08 00:17:14 +00:00
Родитель 13a68a9723
Коммит e6906ce661
2 изменённых файлов: 26 добавлений и 0 удалений

Просмотреть файл

@ -773,6 +773,7 @@ class DrawSelectionIterator
enum {SELECTION_TYPES_WE_CARE_ABOUT=SELECTION_NONE+SELECTION_NORMAL};
public:
DrawSelectionIterator(const SelectionDetails *aSelDetails, PRUnichar *aText,PRUint32 aTextLength, nsTextFrame::TextStyle &aTextStyle);
~DrawSelectionIterator();
PRBool First();
PRBool Next();
PRBool IsDone();
@ -843,6 +844,12 @@ DrawSelectionIterator::DrawSelectionIterator(const SelectionDetails *aSelDetails
mTypes[i]|=details->mType;//add this bit
}
}
if (!mInit && mTypes) //we have details but none that we
{
delete mTypes;
mTypes = nsnull;
mDone = true;
}
details= details->mNext;
}
}
@ -854,6 +861,12 @@ DrawSelectionIterator::DrawSelectionIterator(const SelectionDetails *aSelDetails
mInit = PR_TRUE;
}
DrawSelectionIterator::~DrawSelectionIterator()
{
if (mTypes)
delete mTypes;
}
void
DrawSelectionIterator::FillCurrentData()
{

Просмотреть файл

@ -773,6 +773,7 @@ class DrawSelectionIterator
enum {SELECTION_TYPES_WE_CARE_ABOUT=SELECTION_NONE+SELECTION_NORMAL};
public:
DrawSelectionIterator(const SelectionDetails *aSelDetails, PRUnichar *aText,PRUint32 aTextLength, nsTextFrame::TextStyle &aTextStyle);
~DrawSelectionIterator();
PRBool First();
PRBool Next();
PRBool IsDone();
@ -843,6 +844,12 @@ DrawSelectionIterator::DrawSelectionIterator(const SelectionDetails *aSelDetails
mTypes[i]|=details->mType;//add this bit
}
}
if (!mInit && mTypes) //we have details but none that we
{
delete mTypes;
mTypes = nsnull;
mDone = true;
}
details= details->mNext;
}
}
@ -854,6 +861,12 @@ DrawSelectionIterator::DrawSelectionIterator(const SelectionDetails *aSelDetails
mInit = PR_TRUE;
}
DrawSelectionIterator::~DrawSelectionIterator()
{
if (mTypes)
delete mTypes;
}
void
DrawSelectionIterator::FillCurrentData()
{