summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-10 15:38:15 +0100
committerEike Rathke <erack@redhat.com>2011-11-10 15:54:49 +0100
commit38f46105e9fd8062850637d112ad85f11779716c (patch)
tree3e0d2a370e73dedf584dbf5bc44cd789d0067533 /sc
parentd0aedf87a6ee76bb7ba55f115b284835e1a15d79 (diff)
sal_Bool to bool
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/attrib.hxx48
-rw-r--r--sc/source/core/data/attrib.cxx60
2 files changed, 54 insertions, 54 deletions
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 398a3178b509..1df6d5cd0081 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -55,7 +55,7 @@
class EditTextObject;
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:
SCsCOL GetColMerge() const {return nColMerge; }
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)
{
@@ -98,31 +98,31 @@ public:
ScMergeFlagAttr(sal_Int16 nFlags);
~ScMergeFlagAttr();
- sal_Bool IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; }
- sal_Bool IsVerOverlapped() const { return ( GetValue() & SC_MF_VER ) != 0; }
- sal_Bool IsOverlapped() const { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
+ bool IsHorOverlapped() const { return ( GetValue() & SC_MF_HOR ) != 0; }
+ bool IsVerOverlapped() const { return ( GetValue() & 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; }
- sal_Bool HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; }
+ bool HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; }
+ bool HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 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
{
- sal_Bool bProtection; // protect cell
- sal_Bool bHideFormula; // hide formula
- sal_Bool bHideCell; // hide cell
- sal_Bool bHidePrint; // don't print cell
+ bool bProtection; // protect cell
+ bool bHideFormula; // hide formula
+ bool bHideCell; // hide cell
+ bool bHidePrint; // don't print cell
public:
TYPEINFO();
ScProtectionAttr();
- ScProtectionAttr( sal_Bool bProtect,
- sal_Bool bHFormula = false,
- sal_Bool bHCell = false,
- sal_Bool bHPrint = false);
+ ScProtectionAttr( bool bProtect,
+ bool bHFormula = false,
+ bool bHCell = false,
+ bool bHPrint = false);
ScProtectionAttr( const ScProtectionAttr& );
~ScProtectionAttr();
@@ -141,14 +141,14 @@ public:
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 );
- sal_Bool GetProtection() const { return bProtection; }
- sal_Bool SetProtection( sal_Bool bProtect);
- sal_Bool GetHideFormula() const { return bHideFormula; }
- sal_Bool SetHideFormula( sal_Bool bHFormula);
- sal_Bool GetHideCell() const { return bHideCell; }
- sal_Bool SetHideCell( sal_Bool bHCell);
- sal_Bool GetHidePrint() const { return bHidePrint; }
- sal_Bool SetHidePrint( sal_Bool bHPrint);
+ bool GetProtection() const { return bProtection; }
+ bool SetProtection( bool bProtect);
+ bool GetHideFormula() const { return bHideFormula; }
+ bool SetHideFormula( bool bHFormula);
+ bool GetHideCell() const { return bHideCell; }
+ bool SetHideCell( bool bHCell);
+ bool GetHidePrint() const { return bHidePrint; }
+ bool SetHidePrint( bool bHPrint);
inline ScProtectionAttr& operator=(const ScProtectionAttr& rProtection)
{
bProtection = rProtection.bProtection;
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index ccc78bb74434..d5b2d7be786d 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -75,30 +75,30 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem);
// 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)
return false;
if (!pOther)
- return sal_True;
+ return true;
sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
if (nThisSize > nOtherSize)
- return sal_True;
+ return true;
else if (nThisSize < nOtherSize)
return false;
else
{
if ( pOther->GetInWidth() && !pThis->GetInWidth() )
- return sal_True;
+ return true;
else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
return false;
else
{
- return sal_True; //! ???
+ return true; //! ???
}
}
}
@@ -205,7 +205,7 @@ ScMergeFlagAttr::~ScMergeFlagAttr()
ScProtectionAttr::ScProtectionAttr():
SfxPoolItem(ATTR_PROTECTION),
- bProtection(sal_True),
+ bProtection(true),
bHideFormula(false),
bHideCell(false),
bHidePrint(false)
@@ -214,8 +214,8 @@ ScProtectionAttr::ScProtectionAttr():
//------------------------------------------------------------------------
-ScProtectionAttr::ScProtectionAttr( sal_Bool bProtect, sal_Bool bHFormula,
- sal_Bool bHCell, sal_Bool bHPrint):
+ScProtectionAttr::ScProtectionAttr( bool bProtect, bool bHFormula,
+ bool bHCell, bool bHPrint):
SfxPoolItem(ATTR_PROTECTION),
bProtection(bProtect),
bHideFormula(bHFormula),
@@ -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 bRet = false;
- sal_Bool bVal = sal_Bool();
+ sal_Bool bVal = sal_False;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
@@ -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;
- return sal_True;
+ return true;
}
//------------------------------------------------------------------------
-sal_Bool ScProtectionAttr::SetHideFormula( sal_Bool bHFormula)
+bool ScProtectionAttr::SetHideFormula( bool bHFormula)
{
bHideFormula = bHFormula;
- return sal_True;
+ return true;
}
//------------------------------------------------------------------------
-sal_Bool ScProtectionAttr::SetHideCell( sal_Bool bHCell)
+bool ScProtectionAttr::SetHideCell( bool bHCell)
{
bHideCell = bHCell;
- return sal_True;
+ return true;
}
//------------------------------------------------------------------------
-sal_Bool ScProtectionAttr::SetHidePrint( sal_Bool bHPrint)
+bool ScProtectionAttr::SetHidePrint( bool bHPrint)
{
bHidePrint = bHPrint;
- return sal_True;
+ return true;
}
// -----------------------------------------------------------------------
@@ -552,7 +552,7 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const
OSL_ENSURE( SfxPoolItem::operator==(rAttr), "unequal types" );
ScTableListItem& rCmp = (ScTableListItem&)rAttr;
- sal_Bool bEqual = (nCount == rCmp.nCount);
+ bool bEqual = (nCount == rCmp.nCount);
if ( nCount > 0 )
{
@@ -698,7 +698,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
if ( !pLeftArea || !pCenterArea || !pRightArea )
{
// keine Texte auf NULL stehen lassen
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
if (!pLeftArea)
pLeftArea = aEngine.CreateTextObject();
if (!pCenterArea)
@@ -758,9 +758,9 @@ void lcl_SetSpace( String& rStr, const ESelection& rSel )
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();
for (sal_uInt16 nPar = 0; nPar<nParCnt; nPar++)
{
@@ -771,37 +771,37 @@ sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() );
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)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() );
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)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() );
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)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() );
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)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() );
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)
{
ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() );
rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel );
- lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+ lcl_SetSpace(aStr, aSel ); bChange = true;
}
}
return bChange;
@@ -825,7 +825,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
// Excel import in 5.1 created broken TextObjects (#67442#) that are
// 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 )
{
delete pLeft;
@@ -859,7 +859,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
for (i=0; i<SC_FIELD_COUNT; i++)
aCommands[i] += rDel;
- ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
+ ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
aEngine.SetText(*pLeft);
if (lcl_ConvertFields(aEngine,aCommands))
{
@@ -1216,7 +1216,7 @@ bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
{
- sal_Bool bRet = false;
+ bool bRet = false;
switch( nMemberId )
{
case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;