bool improvements

Change-Id: I7b149b16a362473179a383ff1bb16f428f755f31
This commit is contained in:
Stephan Bergmann
2014-01-28 20:01:20 +01:00
parent ad930bddba
commit 4d9d22e9cd
7 changed files with 26 additions and 26 deletions

View File

@@ -153,7 +153,7 @@ Decompression::Decompression(SvStream * pInStream, SvStream * pOutStream)
{ {
if (!m_pInStream || !m_pOutStream ) if (!m_pInStream || !m_pOutStream )
{ {
assert(sal_False); assert(false);
} }
ConstructTree1(); ConstructTree1();
ConstructTree2(); ConstructTree2();

View File

@@ -193,7 +193,7 @@ void LwpCellLayout::ApplyBorders(XFCellStyle *pCellStyle)
case enumWholeBorder: case enumWholeBorder:
break; break;
default: default:
assert(sal_False); assert(false);
} }
pCellStyle->SetBorders(pBorders); pCellStyle->SetBorders(pBorders);
} }
@@ -314,7 +314,7 @@ XFCell* LwpCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uI
LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj()); LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj());
if (!pTable) if (!pTable)
{ {
assert(sal_False); assert(false);
return NULL; return NULL;
} }
XFCell * pXFCell = new XFCell(); XFCell * pXFCell = new XFCell();
@@ -363,7 +363,7 @@ LwpObjectID * LwpCellLayout::GetPreviousCellStory()
LwpTable *pTable = GetTable(); LwpTable *pTable = GetTable();
if (!pTable) if (!pTable)
{ {
assert(sal_False); assert(false);
return NULL; return NULL;
} }
sal_uInt16 nRow = crowid; sal_uInt16 nRow = crowid;
@@ -403,7 +403,7 @@ LwpObjectID * LwpCellLayout::GetPreviousCellStory()
LwpTableLayout * pTableLayout = GetTableLayout(); LwpTableLayout * pTableLayout = GetTableLayout();
if (!pTableLayout) if (!pTableLayout)
{ {
assert(sal_False); assert(false);
return NULL; return NULL;
} }
return pTableLayout->SearchCellStoryMap(nRow, nCol); return pTableLayout->SearchCellStoryMap(nRow, nCol);
@@ -420,7 +420,7 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
{ {
if (!pTableLayout) if (!pTableLayout)
{ {
assert(sal_False); assert(false);
return enumWholeBorder; return enumWholeBorder;
} }
@@ -552,7 +552,7 @@ void LwpCellLayout::RegisterDefaultCell()
pBorders->SetWidth(enumXFBorderLeft, 0); pBorders->SetWidth(enumXFBorderLeft, 0);
break; break;
default: default:
assert(sal_False); assert(false);
} }
pCellStyle->SetBorders(pBorders); pCellStyle->SetBorders(pBorders);
} }
@@ -616,7 +616,7 @@ void LwpCellLayout::Read()
// before the layout hierarchy rework // before the layout hierarchy rework
if (LwpFileHeader::m_nFileRevision < 0x000b) if (LwpFileHeader::m_nFileRevision < 0x000b)
{ {
assert(sal_False); assert(false);
} }
else else
{ {
@@ -711,7 +711,7 @@ LwpCellBorderType LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow, sal
{ {
if (!pTableLayout) if (!pTableLayout)
{ {
assert(sal_False); assert(false);
return enumWholeBorder; return enumWholeBorder;
} }
@@ -895,7 +895,7 @@ XFCell* LwpHiddenCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow,
} }
else else
{ {
assert(sal_False); assert(false);
} }
return pXFCell; return pXFCell;
} }

View File

@@ -1020,11 +1020,11 @@ sal_Int32 LwpMiddleLayout::DetermineWidth()
{ {
if (IsSizeRightToContent()) if (IsSizeRightToContent())
{ {
assert(sal_False); assert(false);
} }
else if (IsSizeRightToContainer()) else if (IsSizeRightToContainer())
{ {
assert(sal_False); assert(false);
} }
else else
{ {

View File

@@ -218,13 +218,13 @@ double LwpSuperTableLayout::GetTableWidth()
LwpTableLayout* pTableLayout = GetTableLayout(); LwpTableLayout* pTableLayout = GetTableLayout();
if(!pTableLayout) if(!pTableLayout)
{ {
assert(sal_False); assert(false);
return 0; return 0;
} }
LwpTable *pTable = pTableLayout->GetTable(); LwpTable *pTable = pTableLayout->GetTable();
if(!pTable) if(!pTable)
{ {
assert(sal_False); assert(false);
return 0; return 0;
} }
double dDefaultWidth = pTable->GetWidth(); double dDefaultWidth = pTable->GetWidth();
@@ -533,7 +533,7 @@ OUString LwpTableLayout::GetColumnWidth(sal_uInt16 nCol)
{ {
if (nCol >= m_nCols) if (nCol >= m_nCols)
{ {
assert(sal_False); assert(false);
return m_DefaultColumnStyleName; return m_DefaultColumnStyleName;
} }
@@ -601,7 +601,7 @@ void LwpTableLayout::RegisterColumns()
{ {
// this can't happen // this can't happen
dTableWidth = dDefaultColumn; dTableWidth = dDefaultColumn;
assert(sal_False); assert(false);
} }
} }
@@ -645,7 +645,7 @@ void LwpTableLayout::RegisterRows()
LwpTable * pTable = GetTable(); LwpTable * pTable = GetTable();
if (pTable == NULL) if (pTable == NULL)
{ {
assert(sal_False); assert(false);
return; return;
} }
@@ -684,7 +684,7 @@ void LwpTableLayout::RegisterStyle()
LwpSuperTableLayout * pSuper = GetSuperTableLayout(); LwpSuperTableLayout * pSuper = GetSuperTableLayout();
if(!pSuper) if(!pSuper)
{ {
assert(sal_False); assert(false);
return; return;
} }
@@ -692,7 +692,7 @@ void LwpTableLayout::RegisterStyle()
LwpTable * pTable = GetTable(); LwpTable * pTable = GetTable();
if (pTable == NULL) if (pTable == NULL)
{ {
assert(sal_False); assert(false);
return; return;
} }
@@ -767,7 +767,7 @@ void LwpTableLayout::ParseTable()
LwpSuperTableLayout * pSuper = GetSuperTableLayout(); LwpSuperTableLayout * pSuper = GetSuperTableLayout();
if(!pSuper) if(!pSuper)
{ {
assert(sal_False); assert(false);
return; return;
} }
@@ -812,7 +812,7 @@ void LwpTableLayout::Read()
// before layout hierarchy rework! // before layout hierarchy rework!
if(LwpFileHeader::m_nFileRevision < 0x000b) if(LwpFileHeader::m_nFileRevision < 0x000b)
{ {
assert(sal_False); assert(false);
} }
m_ColumnLayout.ReadIndexed(m_pObjStrm); m_ColumnLayout.ReadIndexed(m_pObjStrm);
@@ -1241,7 +1241,7 @@ void LwpTableLayout::ConvertColumn(XFTable *pXFTable,sal_uInt8 nStartCol,sal_uIn
LwpTable * pTable = GetTable(); LwpTable * pTable = GetTable();
if (!pTable) if (!pTable)
{ {
assert(sal_False); assert(false);
return; return;
} }

View File

@@ -137,7 +137,7 @@ bool operator==(XFBGImage& img1, XFBGImage& img2)
else else
{ {
//I'll not compare the content of the two buffer,it's time comsuming. //I'll not compare the content of the two buffer,it's time comsuming.
return sal_False; return false;
} }
if( img1.m_bPosition != img2.m_bPosition ) if( img1.m_bPosition != img2.m_bPosition )
return false; return false;

View File

@@ -176,7 +176,7 @@ bool operator==(XFBorder& b1, XFBorder& b2)
return false; return false;
} }
if( b1.m_aColor != b2.m_aColor ) if( b1.m_aColor != b2.m_aColor )
return sal_False; return false;
return true; return true;
} }

View File

@@ -64,8 +64,8 @@ XFIndex::XFIndex()
{ {
m_pTitle = NULL; m_pTitle = NULL;
m_eType = enumXFIndexTOC; m_eType = enumXFIndexTOC;
m_bProtect = sal_True; m_bProtect = true;
m_bSeparator = sal_False; m_bSeparator = false;
m_nMaxLevel = 0; m_nMaxLevel = 0;
for(sal_uInt16 i=1;i<MAX_TOC_LEVEL+1;i++) for(sal_uInt16 i=1;i<MAX_TOC_LEVEL+1;i++)