summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-02 10:41:35 +0200
committerNoel Grandin <noel@peralex.com>2014-06-03 08:21:39 +0200
commit2537d2dd496c0d05042ca33b99760de79df67682 (patch)
tree80796bedaf348d58b621df99d167308f7651633b
parent418c5f7a4911bb2f1a06858556131b1bc4ad54f6 (diff)
convert some sal_uInt8 fields to bool
Change-Id: Icd5845367157cc0b0c9342c6037b199c49432a76
-rw-r--r--filter/source/msfilter/dffpropset.cxx10
-rw-r--r--include/filter/msfilter/dffpropset.hxx8
-rw-r--r--include/svx/rulritem.hxx4
-rw-r--r--sc/source/filter/excel/impop.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xltools.cxx2
-rw-r--r--sc/source/filter/inc/imp_op.hxx2
-rw-r--r--sc/source/filter/inc/xltools.hxx2
-rw-r--r--svx/source/dialog/rulritem.cxx8
9 files changed, 20 insertions, 20 deletions
diff --git a/filter/source/msfilter/dffpropset.cxx b/filter/source/msfilter/dffpropset.cxx
index 189ff085234a..99b33d563146 100644
--- a/filter/source/msfilter/dffpropset.cxx
+++ b/filter/source/msfilter/dffpropset.cxx
@@ -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;
};
diff --git a/include/filter/msfilter/dffpropset.hxx b/include/filter/msfilter/dffpropset.hxx
index 6489cc4efbe1..19f7749c5ebf 100644
--- a/include/filter/msfilter/dffpropset.hxx
+++ b/include/filter/msfilter/dffpropset.hxx
@@ -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
diff --git a/include/svx/rulritem.hxx b/include/svx/rulritem.hxx
index f1b72681a640..56074eee1e13 100644
--- a/include/svx/rulritem.hxx
+++ b/include/svx/rulritem.hxx
@@ -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;
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index ba281b863a34..4ee35b21637e 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -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 ) );
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index ad2ae652fdea..966abdf2f073 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -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);
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index dc81c9403621..01c3b4890102 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -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 )
diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx
index 39063ff9c6d9..0587fd0dfb53 100644
--- a/sc/source/filter/inc/imp_op.hxx
+++ b/sc/source/filter/inc/imp_op.hxx
@@ -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();
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index df39c3905ba9..0493ca2bd9ba 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -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 );
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
index a6bb6e8c273a..6c914271d75d 100644
--- a/svx/source/dialog/rulritem.cxx
+++ b/svx/source/dialog/rulritem.cxx
@@ -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 ) :