Kaydet (Commit) 38f46105 authored tarafından Eike Rathke's avatar Eike Rathke

sal_Bool to bool

üst d0aedf87
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
class EditTextObject; class EditTextObject;
namespace editeng { class SvxBorderLine; } namespace editeng { class SvxBorderLine; }
sal_Bool SC_DLLPUBLIC ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther ); bool SC_DLLPUBLIC ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther );
//------------------------------------------------------------------------ //------------------------------------------------------------------------
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
SCsCOL GetColMerge() const {return nColMerge; } SCsCOL GetColMerge() const {return nColMerge; }
SCsROW GetRowMerge() const {return nRowMerge; } SCsROW GetRowMerge() const {return nRowMerge; }
sal_Bool IsMerged() const { return nColMerge>1 || nRowMerge>1; } bool IsMerged() const { return nColMerge>1 || nRowMerge>1; }
inline ScMergeAttr& operator=(const ScMergeAttr& rMerge) inline ScMergeAttr& operator=(const ScMergeAttr& rMerge)
{ {
...@@ -98,31 +98,31 @@ public: ...@@ -98,31 +98,31 @@ public:
ScMergeFlagAttr(sal_Int16 nFlags); ScMergeFlagAttr(sal_Int16 nFlags);
~ScMergeFlagAttr(); ~ScMergeFlagAttr();
sal_Bool IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; } bool IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; }
sal_Bool IsVerOverlapped() const { return ( GetValue() & SC_MF_VER ) != 0; } bool IsVerOverlapped() const { return ( GetValue() & SC_MF_VER ) != 0; }
sal_Bool IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; } bool IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
sal_Bool HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; } bool HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; }
sal_Bool HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; } bool HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; }
bool HasDPTable() const { return ( GetValue() & SC_MF_DP_TABLE ) != 0; } bool HasDPTable() const { return ( GetValue() & SC_MF_DP_TABLE ) != 0; }
sal_Bool IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; } bool IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; }
}; };
//------------------------------------------------------------------------ //------------------------------------------------------------------------
class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem
{ {
sal_Bool bProtection; // protect cell bool bProtection; // protect cell
sal_Bool bHideFormula; // hide formula bool bHideFormula; // hide formula
sal_Bool bHideCell; // hide cell bool bHideCell; // hide cell
sal_Bool bHidePrint; // don't print cell bool bHidePrint; // don't print cell
public: public:
TYPEINFO(); TYPEINFO();
ScProtectionAttr(); ScProtectionAttr();
ScProtectionAttr( sal_Bool bProtect, ScProtectionAttr( bool bProtect,
sal_Bool bHFormula = false, bool bHFormula = false,
sal_Bool bHCell = false, bool bHCell = false,
sal_Bool bHPrint = false); bool bHPrint = false);
ScProtectionAttr( const ScProtectionAttr& ); ScProtectionAttr( const ScProtectionAttr& );
~ScProtectionAttr(); ~ScProtectionAttr();
...@@ -141,14 +141,14 @@ public: ...@@ -141,14 +141,14 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_Bool GetProtection() const { return bProtection; } bool GetProtection() const { return bProtection; }
sal_Bool SetProtection( sal_Bool bProtect); bool SetProtection( bool bProtect);
sal_Bool GetHideFormula() const { return bHideFormula; } bool GetHideFormula() const { return bHideFormula; }
sal_Bool SetHideFormula( sal_Bool bHFormula); bool SetHideFormula( bool bHFormula);
sal_Bool GetHideCell() const { return bHideCell; } bool GetHideCell() const { return bHideCell; }
sal_Bool SetHideCell( sal_Bool bHCell); bool SetHideCell( bool bHCell);
sal_Bool GetHidePrint() const { return bHidePrint; } bool GetHidePrint() const { return bHidePrint; }
sal_Bool SetHidePrint( sal_Bool bHPrint); bool SetHidePrint( bool bHPrint);
inline ScProtectionAttr& operator=(const ScProtectionAttr& rProtection) inline ScProtectionAttr& operator=(const ScProtectionAttr& rProtection)
{ {
bProtection = rProtection.bProtection; bProtection = rProtection.bProtection;
......
...@@ -75,30 +75,30 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem); ...@@ -75,30 +75,30 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem);
// allgemeine Hilfsfunktionen // allgemeine Hilfsfunktionen
// //
sal_Bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther ) bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther )
{ {
if (!pThis) if (!pThis)
return false; return false;
if (!pOther) if (!pOther)
return sal_True; return true;
sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth(); sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth(); sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
if (nThisSize > nOtherSize) if (nThisSize > nOtherSize)
return sal_True; return true;
else if (nThisSize < nOtherSize) else if (nThisSize < nOtherSize)
return false; return false;
else else
{ {
if ( pOther->GetInWidth() && !pThis->GetInWidth() ) if ( pOther->GetInWidth() && !pThis->GetInWidth() )
return sal_True; return true;
else if ( pThis->GetInWidth() && !pOther->GetInWidth() ) else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
return false; return false;
else else
{ {
return sal_True; //! ??? return true; //! ???
} }
} }
} }
...@@ -205,7 +205,7 @@ ScMergeFlagAttr::~ScMergeFlagAttr() ...@@ -205,7 +205,7 @@ ScMergeFlagAttr::~ScMergeFlagAttr()
ScProtectionAttr::ScProtectionAttr(): ScProtectionAttr::ScProtectionAttr():
SfxPoolItem(ATTR_PROTECTION), SfxPoolItem(ATTR_PROTECTION),
bProtection(sal_True), bProtection(true),
bHideFormula(false), bHideFormula(false),
bHideCell(false), bHideCell(false),
bHidePrint(false) bHidePrint(false)
...@@ -214,8 +214,8 @@ ScProtectionAttr::ScProtectionAttr(): ...@@ -214,8 +214,8 @@ ScProtectionAttr::ScProtectionAttr():
//------------------------------------------------------------------------ //------------------------------------------------------------------------
ScProtectionAttr::ScProtectionAttr( sal_Bool bProtect, sal_Bool bHFormula, ScProtectionAttr::ScProtectionAttr( bool bProtect, bool bHFormula,
sal_Bool bHCell, sal_Bool bHPrint): bool bHCell, bool bHPrint):
SfxPoolItem(ATTR_PROTECTION), SfxPoolItem(ATTR_PROTECTION),
bProtection(bProtect), bProtection(bProtect),
bHideFormula(bHFormula), bHideFormula(bHFormula),
...@@ -275,7 +275,7 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const ...@@ -275,7 +275,7 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{ {
bool bRet = false; bool bRet = false;
sal_Bool bVal = sal_Bool(); sal_Bool bVal = sal_False;
nMemberId &= ~CONVERT_TWIPS; nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId ) switch ( nMemberId )
{ {
...@@ -412,34 +412,34 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) c ...@@ -412,34 +412,34 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) c
//------------------------------------------------------------------------ //------------------------------------------------------------------------
sal_Bool ScProtectionAttr::SetProtection( sal_Bool bProtect) bool ScProtectionAttr::SetProtection( bool bProtect)
{ {
bProtection = bProtect; bProtection = bProtect;
return sal_True; return true;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
sal_Bool ScProtectionAttr::SetHideFormula( sal_Bool bHFormula) bool ScProtectionAttr::SetHideFormula( bool bHFormula)
{ {
bHideFormula = bHFormula; bHideFormula = bHFormula;
return sal_True; return true;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
sal_Bool ScProtectionAttr::SetHideCell( sal_Bool bHCell) bool ScProtectionAttr::SetHideCell( bool bHCell)
{ {
bHideCell = bHCell; bHideCell = bHCell;
return sal_True; return true;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
sal_Bool ScProtectionAttr::SetHidePrint( sal_Bool bHPrint) bool ScProtectionAttr::SetHidePrint( bool bHPrint)
{ {
bHidePrint = bHPrint; bHidePrint = bHPrint;
return sal_True; return true;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -552,7 +552,7 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const ...@@ -552,7 +552,7 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const
OSL_ENSURE( SfxPoolItem::operator==(rAttr), "unequal types" ); OSL_ENSURE( SfxPoolItem::operator==(rAttr), "unequal types" );
ScTableListItem& rCmp = (ScTableListItem&)rAttr; ScTableListItem& rCmp = (ScTableListItem&)rAttr;
sal_Bool bEqual = (nCount == rCmp.nCount); bool bEqual = (nCount == rCmp.nCount);
if ( nCount > 0 ) if ( nCount > 0 )
{ {
...@@ -698,7 +698,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ ) ...@@ -698,7 +698,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
if ( !pLeftArea || !pCenterArea || !pRightArea ) if ( !pLeftArea || !pCenterArea || !pRightArea )
{ {
// keine Texte auf NULL stehen lassen // keine Texte auf NULL stehen lassen
ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True ); ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
if (!pLeftArea) if (!pLeftArea)
pLeftArea = aEngine.CreateTextObject(); pLeftArea = aEngine.CreateTextObject();
if (!pCenterArea) if (!pCenterArea)
...@@ -758,9 +758,9 @@ void lcl_SetSpace( String& rStr, const ESelection& rSel ) ...@@ -758,9 +758,9 @@ void lcl_SetSpace( String& rStr, const ESelection& rSel )
rStr.SetChar( rSel.nStartPos, ' ' ); rStr.SetChar( rSel.nStartPos, ' ' );
} }
sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands) bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{ {
sal_Bool bChange = false; bool bChange = false;
sal_uInt16 nParCnt = rEng.GetParagraphCount(); sal_uInt16 nParCnt = rEng.GetParagraphCount();
for (sal_uInt16 nPar = 0; nPar<nParCnt; nPar++) for (sal_uInt16 nPar = 0; nPar<nParCnt; nPar++)
{ {
...@@ -771,37 +771,37 @@ sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands) ...@@ -771,37 +771,37 @@ sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{ {
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() ); ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), aSel ); rEng.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), aSel );
lcl_SetSpace(aStr, aSel ); bChange = sal_True; lcl_SetSpace(aStr, aSel ); bChange = true;
} }
while ((nPos = aStr.Search(pCommands[1])) != STRING_NOTFOUND) while ((nPos = aStr.Search(pCommands[1])) != STRING_NOTFOUND)
{ {
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() ); ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), aSel ); rEng.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), aSel );
lcl_SetSpace(aStr, aSel ); bChange = sal_True; lcl_SetSpace(aStr, aSel ); bChange = true;
} }
while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND) while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND)
{ {
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() ); ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel ); rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel );
lcl_SetSpace(aStr, aSel ); bChange = sal_True; lcl_SetSpace(aStr, aSel ); bChange = true;
} }
while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND) while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND)
{ {
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() ); ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD ), aSel ); rEng.QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD ), aSel );
lcl_SetSpace(aStr, aSel ); bChange = sal_True; lcl_SetSpace(aStr, aSel ); bChange = true;
} }
while ((nPos = aStr.Search(pCommands[4])) != STRING_NOTFOUND) while ((nPos = aStr.Search(pCommands[4])) != STRING_NOTFOUND)
{ {
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() ); ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), aSel ); rEng.QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), aSel );
lcl_SetSpace(aStr, aSel ); bChange = sal_True; lcl_SetSpace(aStr, aSel ); bChange = true;
} }
while ((nPos = aStr.Search(pCommands[5])) != STRING_NOTFOUND) while ((nPos = aStr.Search(pCommands[5])) != STRING_NOTFOUND)
{ {
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() ); ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel ); rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel );
lcl_SetSpace(aStr, aSel ); bChange = sal_True; lcl_SetSpace(aStr, aSel ); bChange = true;
} }
} }
return bChange; return bChange;
...@@ -825,7 +825,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const ...@@ -825,7 +825,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
// Excel import in 5.1 created broken TextObjects (#67442#) that are // Excel import in 5.1 created broken TextObjects (#67442#) that are
// corrected here to avoid saving wrong files again (#90487#). // corrected here to avoid saving wrong files again (#90487#).
ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True ); ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 ) if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 )
{ {
delete pLeft; delete pLeft;
...@@ -859,7 +859,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const ...@@ -859,7 +859,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
for (i=0; i<SC_FIELD_COUNT; i++) for (i=0; i<SC_FIELD_COUNT; i++)
aCommands[i] += rDel; aCommands[i] += rDel;
ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True ); ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
aEngine.SetText(*pLeft); aEngine.SetText(*pLeft);
if (lcl_ConvertFields(aEngine,aCommands)) if (lcl_ConvertFields(aEngine,aCommands))
{ {
...@@ -1216,7 +1216,7 @@ bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const ...@@ -1216,7 +1216,7 @@ bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId ) bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
{ {
sal_Bool bRet = false; bool bRet = false;
switch( nMemberId ) switch( nMemberId )
{ {
case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break; case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment