Fixed bad XP_BOOL usage. Submitted by Kazushi Marukawa (jam@pobox.com)

This commit is contained in:
cmanske%netscape.com 1998-07-21 22:57:04 +00:00
Родитель f8d7d4bd95
Коммит 3ccf46e63f
3 изменённых файлов: 20 добавлений и 20 удалений

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

@ -3871,7 +3871,7 @@ public:
void ClearTableIfContainsElement(CEditElement *pElement);
XP_Bool IsTableSelected() {return m_pSelectedEdTable != NULL; }
XP_Bool IsTableOrCellSelected() { return (XP_Bool)(m_pSelectedEdTable ? TRUE : m_SelectedEdCells.Size()); }
XP_Bool IsTableOrCellSelected() { return m_pSelectedEdTable ? TRUE : (m_SelectedEdCells.Size() > 0 ? TRUE : FALSE); }
int GetSelectedCellCount() { return m_SelectedEdCells.Size(); }
// New cell with space management.

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

@ -15056,7 +15056,7 @@ CEditTableCellElement* CEditBuffer::SelectCell(XP_Bool bSelect, LO_CellStruct *p
return NULL;
}
XP_Bool bWasSelected = (XP_Bool)pLoCell->ele_attrmask & LO_ELE_SELECTED;
XP_Bool bWasSelected = (pLoCell->ele_attrmask & LO_ELE_SELECTED) ? TRUE : FALSE;
// Get corresponding Edit cell if not supplied
if( !pEdCell )
@ -15153,7 +15153,7 @@ void CEditBuffer::DisplaySpecialCellSelection( CEditTableCellElement *pFocusCell
LO_CellStruct *pLoCell = m_SelectedLoCells[i];
CEditTableCellElement *pEdCell = m_SelectedEdCells[i];
XP_ASSERT(pEdCell);
XP_Bool bWasSpecial = (XP_Bool)pLoCell->ele_attrmask & LO_ELE_SELECTED_SPECIAL;
XP_Bool bWasSpecial = (pLoCell->ele_attrmask & LO_ELE_SELECTED_SPECIAL) ? TRUE : FALSE;
if( pEdCell == pFocusCell )
{

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

@ -3476,22 +3476,22 @@ void CEditTableElement::GetParentSize(MWContext *pContext, int32 *pWidth, int32
void CEditTableElement::SetSizeMode(MWContext *pContext, int iMode)
{
int32 iParentWidth, iParentHeight;
XP_Bool bCellPercent = (XP_Bool)(iMode & ED_MODE_CELL_PERCENT);
XP_Bool bTablePercent = (XP_Bool)(iMode & ED_MODE_TABLE_PERCENT);
XP_Bool bCellPixels = (XP_Bool)(iMode & ED_MODE_CELL_PIXELS);
XP_Bool bTablePixels = (XP_Bool)(iMode & ED_MODE_TABLE_PIXELS);
XP_Bool bUseCols = (XP_Bool)(iMode & ED_MODE_USE_COLS);
XP_Bool bNoCols = (XP_Bool)(iMode & ED_MODE_NO_COLS);
XP_Bool bCellPercent = (iMode & ED_MODE_CELL_PERCENT) ? TRUE : FALSE;
XP_Bool bTablePercent = (iMode & ED_MODE_TABLE_PERCENT) ? TRUE : FALSE;
XP_Bool bCellPixels = (iMode & ED_MODE_CELL_PIXELS) ? TRUE : FALSE;
XP_Bool bTablePixels = (iMode & ED_MODE_TABLE_PIXELS) ? TRUE : FALSE;
XP_Bool bUseCols = (iMode & ED_MODE_USE_COLS) ? TRUE : FALSE;
XP_Bool bNoCols = (iMode & ED_MODE_NO_COLS) ? TRUE : FALSE;
XP_Bool bChanged = FALSE;
XP_Bool bSetTableWidth = iMode & ED_MODE_USE_TABLE_WIDTH;
XP_Bool bClearTableWidth = iMode & ED_MODE_NO_TABLE_WIDTH;
XP_Bool bSetTableHeight = iMode & ED_MODE_USE_TABLE_HEIGHT;
XP_Bool bClearTableHeight = iMode & ED_MODE_NO_TABLE_HEIGHT;
XP_Bool bSetTableWidth = (iMode & ED_MODE_USE_TABLE_WIDTH) ? TRUE : FALSE;
XP_Bool bClearTableWidth = (iMode & ED_MODE_NO_TABLE_WIDTH) ? TRUE : FALSE;
XP_Bool bSetTableHeight = (iMode & ED_MODE_USE_TABLE_HEIGHT) ? TRUE : FALSE;
XP_Bool bClearTableHeight = (iMode & ED_MODE_NO_TABLE_HEIGHT) ? TRUE : FALSE;
XP_Bool bSetCellWidth = iMode & ED_MODE_USE_CELL_WIDTH;
XP_Bool bClearCellWidth = iMode & ED_MODE_NO_CELL_WIDTH;
XP_Bool bSetCellHeight = iMode & ED_MODE_USE_CELL_HEIGHT;
XP_Bool bClearCellHeight = iMode & ED_MODE_NO_CELL_HEIGHT;
XP_Bool bSetCellWidth = (iMode & ED_MODE_USE_CELL_WIDTH) ? TRUE : FALSE;
XP_Bool bClearCellWidth = (iMode & ED_MODE_NO_CELL_WIDTH) ? TRUE : FALSE;
XP_Bool bSetCellHeight = (iMode & ED_MODE_USE_CELL_HEIGHT) ? TRUE : FALSE;
XP_Bool bClearCellHeight = (iMode & ED_MODE_NO_CELL_HEIGHT) ? TRUE : FALSE;
//XP_TRACE(("SetSizeMode: bPixels=%d, bPercent=%d, bSetCellWidth=%d, bClearCellWidth=%d", bPixels, bPercent, bSetCellWidth, bClearCellWidth));
@ -9237,8 +9237,8 @@ CEditImageElement::CEditImageElement(IStreamIn *pStreamIn, CEditBuffer *pBuffer)
m_href(ED_LINK_ID_NONE),
m_align(ED_ALIGN_DEFAULT) {
m_align = (ED_Alignment) pStreamIn->ReadInt();
m_bSizeWasGiven = (XP_Bool) pStreamIn->ReadInt();
m_bSizeIsBogus = (XP_Bool) pStreamIn->ReadInt();
m_bSizeWasGiven = pStreamIn->ReadInt() ? TRUE : FALSE;
m_bSizeIsBogus = pStreamIn->ReadInt() ? TRUE : FALSE;
m_iHeight = pStreamIn->ReadInt();
m_iWidth = pStreamIn->ReadInt();
m_bWidthPercent = pStreamIn->ReadInt();
@ -9994,7 +9994,7 @@ CEditIconElement::CEditIconElement(IStreamIn *pStreamIn, CEditBuffer *pBuffer):
{
m_originalTagType = (TagType) pStreamIn->ReadInt();
m_iconTag = pStreamIn->ReadInt();
m_bEndTag = (XP_Bool) pStreamIn->ReadInt();
m_bEndTag = pStreamIn->ReadInt() ? TRUE : FALSE;
m_pSpoofData = pStreamIn->ReadZString();
}