convert some sal_uInt8 fields to bool
Change-Id: Icd5845367157cc0b0c9342c6037b199c49432a76
This commit is contained in:
parent
418c5f7a49
commit
2537d2dd49
9 changed files with 20 additions and 20 deletions
|
@ -1146,11 +1146,11 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
|
|||
{
|
||||
bool bSetProperty = !bSetUninitializedOnly || ( !IsProperty( nRecType ) || !IsHardAttribute( nRecType ) );
|
||||
|
||||
DffPropFlags aPropFlag = { 1, 0, 0, 0 };
|
||||
DffPropFlags aPropFlag = { true, false, false, false };
|
||||
if ( nTmp & 0x4000 )
|
||||
aPropFlag.bBlip = sal_True;
|
||||
aPropFlag.bBlip = true;
|
||||
if ( nTmp & 0x8000 )
|
||||
aPropFlag.bComplex = sal_True;
|
||||
aPropFlag.bComplex = true;
|
||||
if ( aPropFlag.bComplex && nContent && ( nComplexDataFilePos < aHd.GetRecEndFilePos() ) )
|
||||
{
|
||||
// normally nContent is the complete size of the complex property,
|
||||
|
@ -1201,7 +1201,7 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
|
|||
nComplexDataFilePos += nContent; // store filepos, that is used for the next complex property
|
||||
}
|
||||
else // a complex property needs content
|
||||
aPropFlag.bSet = sal_False; // otherwise something is wrong
|
||||
aPropFlag.bSet = false; // otherwise something is wrong
|
||||
}
|
||||
if ( bSetProperty )
|
||||
{
|
||||
|
@ -1272,7 +1272,7 @@ bool DffPropSet::IsHardAttribute( sal_uInt32 nId ) const
|
|||
bRetValue = (mpPropSetEntries[nId | 0x3f].nComplexIndexOrFlagsHAttr
|
||||
& (1 << (0xf - (nId & 0xf)))) != 0;
|
||||
else
|
||||
bRetValue = ( mpPropSetEntries[ nId ].aFlags.bSoftAttr == 0 );
|
||||
bRetValue = ( mpPropSetEntries[ nId ].aFlags.bSoftAttr == false );
|
||||
return bRetValue;
|
||||
};
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
|
||||
struct DffPropFlags
|
||||
{
|
||||
sal_uInt8 bSet : 1;
|
||||
sal_uInt8 bComplex : 1;
|
||||
sal_uInt8 bBlip : 1;
|
||||
sal_uInt8 bSoftAttr : 1;
|
||||
bool bSet : 1;
|
||||
bool bComplex : 1;
|
||||
bool bBlip : 1;
|
||||
bool bSoftAttr : 1;
|
||||
};
|
||||
|
||||
struct DffPropSetEntry
|
||||
|
|
|
@ -155,8 +155,8 @@ class SVX_DLLPUBLIC SvxColumnItem : public SfxPoolItem
|
|||
long nRight; // Right edge for the table; for columns always
|
||||
// equal to the surrounding frame
|
||||
sal_uInt16 nActColumn; // the current column
|
||||
sal_uInt8 bTable; // table?
|
||||
sal_uInt8 bOrtho; // evenly spread columns
|
||||
bool bTable; // table?
|
||||
bool bOrtho; // evenly spread columns
|
||||
|
||||
protected:
|
||||
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
|
||||
|
|
|
@ -1239,7 +1239,7 @@ void ImportExcel::NewTable( void )
|
|||
}
|
||||
|
||||
|
||||
const ScTokenArray* ImportExcel::ErrorToFormula( sal_uInt8 bErrOrVal, sal_uInt8 nError, double& rVal )
|
||||
const ScTokenArray* ImportExcel::ErrorToFormula( bool bErrOrVal, sal_uInt8 nError, double& rVal )
|
||||
{
|
||||
return pFormConv->GetBoolErr( XclTools::ErrorToEnum( rVal, bErrOrVal, nError ) );
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ void XclImpPCItem::WriteToSource( XclImpRoot& rRoot, const ScAddress& rScPos ) c
|
|||
double fValue;
|
||||
sal_uInt8 nErrCode = static_cast< sal_uInt8 >( *pnError );
|
||||
const ScTokenArray* pScTokArr = rRoot.GetOldFmlaConverter().GetBoolErr(
|
||||
XclTools::ErrorToEnum( fValue, EXC_BOOLERR_ERROR, nErrCode ) );
|
||||
XclTools::ErrorToEnum( fValue, true, nErrCode ) );
|
||||
ScFormulaCell* pCell = pScTokArr ? new ScFormulaCell(&rDoc.getDoc(), rScPos, *pScTokArr) : new ScFormulaCell(&rDoc.getDoc(), rScPos);
|
||||
pCell->SetHybridDouble( fValue );
|
||||
rDoc.setFormulaCell(rScPos, pCell);
|
||||
|
|
|
@ -258,7 +258,7 @@ double XclTools::ErrorToDouble( sal_uInt8 nXclError )
|
|||
return fVal;
|
||||
}
|
||||
|
||||
XclBoolError XclTools::ErrorToEnum( double& rfDblValue, sal_uInt8 bErrOrBool, sal_uInt8 nValue )
|
||||
XclBoolError XclTools::ErrorToEnum( double& rfDblValue, bool bErrOrBool, sal_uInt8 nValue )
|
||||
{
|
||||
XclBoolError eType;
|
||||
if( bErrOrBool )
|
||||
|
|
|
@ -197,7 +197,7 @@ protected:
|
|||
|
||||
virtual void EndSheet( void );
|
||||
void NewTable( void );
|
||||
const ScTokenArray* ErrorToFormula( sal_uInt8 bErrOrVal, sal_uInt8 nError,
|
||||
const ScTokenArray* ErrorToFormula( bool bErrOrVal, sal_uInt8 nError,
|
||||
double& rVal );
|
||||
|
||||
virtual void AdjustRowHeight();
|
||||
|
|
|
@ -119,7 +119,7 @@ public:
|
|||
@param rfDblValue Returns 0.0 for error codes or the value of a Boolean (0.0 or 1.0).
|
||||
@param bErrorOrBool false = nError is a Boolean value; true = is an error value.
|
||||
@param nValue The error code or Boolean value. */
|
||||
static XclBoolError ErrorToEnum( double& rfDblValue, sal_uInt8 bErrOrBool, sal_uInt8 nValue );
|
||||
static XclBoolError ErrorToEnum( double& rfDblValue, bool bErrOrBool, sal_uInt8 nValue );
|
||||
|
||||
/** Returns the length in twips calculated from a length in inches. */
|
||||
static sal_uInt16 GetTwipsFromInch( double fInches );
|
||||
|
|
|
@ -457,8 +457,8 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nAct ) :
|
|||
nLeft (0),
|
||||
nRight (0),
|
||||
nActColumn (nAct),
|
||||
bTable (sal_False),
|
||||
bOrtho (sal_True)
|
||||
bTable (false),
|
||||
bOrtho (true)
|
||||
|
||||
{}
|
||||
|
||||
|
@ -467,8 +467,8 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, sal_uInt16 left, sal_uInt16 ri
|
|||
nLeft (left),
|
||||
nRight (right),
|
||||
nActColumn (nActCol),
|
||||
bTable (sal_True),
|
||||
bOrtho (sal_True)
|
||||
bTable (true),
|
||||
bOrtho (true)
|
||||
{}
|
||||
|
||||
SvxColumnItem::SvxColumnItem( const SvxColumnItem& rCopy ) :
|
||||
|
|
Loading…
Reference in a new issue