editeng: sal_Bool->bool

Change-Id: Ic3d9fe45d3242d3da147067d3c388e9d7305ee61
This commit is contained in:
Noel Grandin 2014-02-25 11:55:22 +02:00
parent fd1a348915
commit ef16d954c2
13 changed files with 54 additions and 54 deletions

View File

@ -101,7 +101,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
// Paragraph attributes:
SvxNumRule aDefaultNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE,
SVX_MAX_NUM, sal_False );
SVX_MAX_NUM, false );
ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );

View File

@ -80,7 +80,7 @@ static void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text
SvxNumberType::SvxNumberType(sal_Int16 nType) :
nNumType(nType),
bShowSymbol(sal_True)
bShowSymbol(true)
{
nRefCount++;
}
@ -349,7 +349,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
return *this;
}
sal_Bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
{
if( GetNumberingType() != rFormat.GetNumberingType() ||
eNumAdjust != rFormat.eNumAdjust ||
@ -374,14 +374,14 @@ sal_Bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
IsShowSymbol() != rFormat.IsShowSymbol() ||
sCharStyleName != rFormat.sCharStyleName
)
return sal_False;
return false;
if (
(pGraphicBrush && !rFormat.pGraphicBrush) ||
(!pGraphicBrush && rFormat.pGraphicBrush) ||
(pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush)
)
{
return sal_False;
return false;
}
if (
(pBulletFont && !rFormat.pBulletFont) ||
@ -389,9 +389,9 @@ sal_Bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
(pBulletFont && *pBulletFont != *rFormat.pBulletFont)
)
{
return sal_False;
return false;
}
return sal_True;
return true;
}
void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
@ -547,7 +547,7 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic)
return aRetSize;
}
OUString SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper )
OUString SvxNumberFormat::CreateRomanString( sal_uLong nNo, bool bUpper )
{
nNo %= 4000; // more can not be displayed
// i, ii, iii, iv, v, vi, vii, vii, viii, ix
@ -603,7 +603,7 @@ static SvxNumberFormat* pStdNumFmt = 0;
static SvxNumberFormat* pStdOutlineNumFmt = 0;
SvxNumRule::SvxNumRule( sal_uLong nFeatures,
sal_uInt16 nLevels,
sal_Bool bCont,
bool bCont,
SvxNumRuleType eType,
SvxNumberFormat::SvxNumPositionAndSpaceMode
eDefaultNumberFormatPositionAndSpaceMode )
@ -652,7 +652,7 @@ SvxNumRule::SvxNumRule( sal_uLong nFeatures,
}
else
aFmts[i] = 0;
aFmtsSet[i] = sal_False;
aFmtsSet[i] = false;
}
}
@ -697,7 +697,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream )
else
{
aFmts[i] = 0;
aFmtsSet[i] = sal_False; // actually only false is valid
aFmtsSet[i] = false; // actually only false is valid
}
}
//second nFeatureFlags for new versions
@ -820,7 +820,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(sal_uInt16 nLevel)const
*pStdNumFmt : *pStdOutlineNumFmt;
}
void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, sal_Bool bIsValid )
void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, bool bIsValid )
{
DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" );
@ -849,7 +849,7 @@ void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt)
}
}
OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const
OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, bool bInclStrings ) const
{
OUString aStr;
if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) )
@ -904,7 +904,7 @@ OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclString
}
// changes linked to embedded bitmaps
sal_Bool SvxNumRule::UnLinkGraphics()
bool SvxNumRule::UnLinkGraphics()
{
sal_Bool bRet = sal_False;
for(sal_uInt16 i = 0; i < GetLevelCount(); i++)

View File

@ -486,7 +486,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
}
else
{
SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , sal_False);
SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
return new SvxUnoNumberingRules( aDefaultRule );
}
}

View File

@ -4314,7 +4314,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
}
SvxNumRule aRule( NUM_BULLET_REL_SIZE | NUM_BULLET_COLOR |
NUM_CHAR_TEXT_DISTANCE | NUM_SYMBOL_ALIGNMENT,
nLevels, sal_False, eNumRuleType );
nLevels, false, eNumRuleType );
for ( sal_uInt16 nCount = 0; nDepth < nLevels; nCount++ )
{
const PPTParaLevel& rParaLevel = mpParaSheet[ i ]->maParaLevel[ nCount ];

View File

@ -65,7 +65,7 @@ class EDITENG_DLLPUBLIC SvxNumberType
static com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter;
sal_Int16 nNumType;
sal_Bool bShowSymbol; // Also show Symbol ?
bool bShowSymbol; // Also show Symbol ?
public:
explicit SvxNumberType(sal_Int16 nType = com::sun::star::style::NumberingType::ARABIC);
@ -78,10 +78,10 @@ public:
void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
sal_Int16 GetNumberingType() const {return nNumType;}
void SetShowSymbol(sal_Bool bSet) {bShowSymbol = bSet;}
sal_Bool IsShowSymbol()const{return bShowSymbol;}
void SetShowSymbol(bool bSet) {bShowSymbol = bSet;}
bool IsShowSymbol()const{return bShowSymbol;}
sal_Bool IsTxtFmt() const
bool IsTxtFmt() const
{
return com::sun::star::style::NumberingType::NUMBER_NONE != nNumType &&
com::sun::star::style::NumberingType::CHAR_SPECIAL != nNumType &&
@ -165,8 +165,8 @@ public:
SvxNumberFormat* Create(SvStream& rStream );
SvxNumberFormat& operator=( const SvxNumberFormat& );
sal_Bool operator==( const SvxNumberFormat& ) const;
sal_Bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);}
bool operator==( const SvxNumberFormat& ) const;
bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);}
void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;}
SvxAdjust GetNumAdjust() const {return eNumAdjust;}
@ -222,7 +222,7 @@ public:
long GetIndentAt() const;
static Size GetGraphicSizeMM100(const Graphic* pGraphic);
static OUString CreateRomanString( sal_uLong nNo, sal_Bool bUpper );
static OUString CreateRomanString( sal_uLong nNo, bool bUpper );
};
enum SvxNumRuleType
@ -238,17 +238,17 @@ class EDITENG_DLLPUBLIC SvxNumRule
sal_uInt16 nLevelCount; // Number of supported levels
sal_uInt32 nFeatureFlags; // What is supported?
SvxNumRuleType eNumberingType; // Type of numbering
sal_Bool bContinuousNumbering; // sequential numbering
bool bContinuousNumbering; // sequential numbering
SvxNumberFormat* aFmts[SVX_MAX_NUM];
sal_Bool aFmtsSet[SVX_MAX_NUM]; // Flags indicating valid levels
bool aFmtsSet[SVX_MAX_NUM]; // Flags indicating valid levels
static sal_Int32 nRefCount;
com::sun::star::lang::Locale aLocale;
public:
SvxNumRule( sal_uLong nFeatures,
sal_uInt16 nLevels,
sal_Bool bCont,
bool bCont,
SvxNumRuleType eType = SVX_RULETYPE_NUMBERING,
SvxNumberFormat::SvxNumPositionAndSpaceMode
eDefaultNumberFormatPositionAndSpaceMode
@ -266,26 +266,26 @@ public:
SvxNumRule* Create(SvStream &rStream);
const SvxNumberFormat* Get(sal_uInt16 nLevel)const;
const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const;
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True);
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, bool bIsValid = true);
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt);
sal_Bool IsContinuousNumbering()const
bool IsContinuousNumbering()const
{return bContinuousNumbering;}
void SetContinuousNumbering(sal_Bool bSet)
void SetContinuousNumbering(bool bSet)
{bContinuousNumbering = bSet;}
sal_uInt16 GetLevelCount() const {return nLevelCount;}
sal_Bool IsFeatureSupported(sal_uInt32 nFeature) const
bool IsFeatureSupported(sal_uInt32 nFeature) const
{return 0 != (nFeatureFlags & nFeature);}
sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;}
void SetFeatureFlag( sal_uInt32 nFlag, sal_Bool bSet = sal_True ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
void SetFeatureFlag( sal_uInt32 nFlag, bool bSet = true ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
OUString MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const;
OUString MakeNumString( const SvxNodeNum&, bool bInclStrings = true ) const;
SvxNumRuleType GetNumRuleType() const { return eNumberingType; }
void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; }
sal_Bool UnLinkGraphics();
bool UnLinkGraphics();
};
class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem
@ -313,8 +313,8 @@ class SvxNodeNum
{
sal_uInt16 nLevelVal[ SVX_MAX_NUM ]; // Numbers of all levels
sal_uInt16 nSetValue; // predetermined number
sal_uInt8 nMyLevel; // Current Level
sal_Bool bStartNum; // Restart numbering
sal_uInt8 nMyLevel; // Current Level
bool bStartNum; // Restart numbering
public:
explicit inline SvxNodeNum( sal_uInt8 nLevel = SVX_NO_NUM, sal_uInt16 nSetVal = USHRT_MAX );
@ -323,8 +323,8 @@ public:
sal_uInt8 GetLevel() const { return nMyLevel; }
void SetLevel( sal_uInt8 nVal ) { nMyLevel = nVal; }
sal_Bool IsStart() const { return bStartNum; }
void SetStart( sal_Bool bFlag = sal_True ) { bStartNum = bFlag; }
bool IsStart() const { return bStartNum; }
void SetStart( bool bFlag = true ) { bStartNum = bFlag; }
sal_uInt16 GetSetValue() const { return nSetValue; }
void SetSetValue( sal_uInt16 nVal ) { nSetValue = nVal; }
@ -334,7 +334,7 @@ public:
};
SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal )
: nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( sal_False )
: nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( false )
{
memset( nLevelVal, 0, sizeof( nLevelVal ) );
}

View File

@ -1153,7 +1153,7 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
{
SvxNumRule aRule( 0, 0, sal_True ); // nothing supported
SvxNumRule aRule( 0, 0, true ); // nothing supported
return SvxCreateNumRule( &aRule );
}

View File

@ -1223,7 +1223,7 @@ void SdDrawDocument::SetTextDefaults() const
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, sal_False);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
//aNumberFormat.SetLSpace( 0 );
//aNumberFormat.SetAbsLSpace( 0 );

View File

@ -1024,7 +1024,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , sal_False);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
@ -1050,7 +1050,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
if(pDefaultRule)
{
SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, sal_False);
SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, false);
for(sal_uInt16 i=0; i < aNumRule.GetLevelCount(); i++)
{
SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) );
@ -1080,7 +1080,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,
SVX_MAX_NUM, sal_False );
SVX_MAX_NUM, false );
for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34

View File

@ -116,7 +116,7 @@ OutlineBulletDlg::OutlineBulletDlg(
if(pRule)
{
SvxNumRule aNewRule( *pRule );
aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, sal_True );
aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, true );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aInputSet.Put(aNewItem);
@ -184,7 +184,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)pOutputSet->GetItem(EE_PARA_NUMBULLET,true);
SvxNumRule* pRule = pBulletItem->GetNumRule();
if(pRule)
pRule->SetFeatureFlag( NUM_NO_NUMBERS, sal_False );
pRule->SetFeatureFlag( NUM_NO_NUMBERS, false );
}
return pOutputSet;

View File

@ -369,7 +369,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
if(pLclRule)
{
SvxNumRule aNewRule( *pLclRule );
aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, sal_True );
aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, true );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);

View File

@ -814,7 +814,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
if(pRule)
{
SvxNumRule aNewRule( *pRule );
aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, sal_True );
aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, true );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);

View File

@ -228,7 +228,7 @@ void NBOTypeMgrBase::ImplStore(OUString filename)
pOStm->WriteUInt32( nVersion );
for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ ) {
if (IsCustomized(nItem)) {
SvxNumRule aDefNumRule( NUM_BULLET_REL_SIZE|NUM_CONTINUOUS|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,10, sal_False ,
SvxNumRule aDefNumRule( NUM_BULLET_REL_SIZE|NUM_CONTINUOUS|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,10, false,
SVX_RULETYPE_NUMBERING,SvxNumberFormat::LABEL_ALIGNMENT);
sal_uInt16 mLevel = 0x1;
pOStm->WriteInt32( nItem );
@ -1588,7 +1588,7 @@ void OutlineTypeMgr::Init()
{
aOutlineAccess = xDefNum->getDefaultOutlineNumberings( aLocale );
SvxNumRule aDefNumRule( NUM_BULLET_REL_SIZE|NUM_CONTINUOUS|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,10, sal_False ,
SvxNumRule aDefNumRule( NUM_BULLET_REL_SIZE|NUM_CONTINUOUS|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT, 10, false,
SVX_RULETYPE_NUMBERING,SvxNumberFormat::LABEL_ALIGNMENT);
for(sal_Int32 nItem = 0;

View File

@ -132,7 +132,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
}
if(bHtml)
aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, false);
aSet.Put(SvxNumBulletItem(aRule));
OSL_ENSURE( GetShell().GetNumLevel() < MAXLEVEL,
@ -169,9 +169,9 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
{
aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
}
aSvxRule.SetLevel( n, aFmt, sal_False );
aSvxRule.SetLevel( n, aFmt, false );
}
aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, false);
}
aSet.Put(SvxNumBulletItem(aSvxRule));
}
@ -262,9 +262,9 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
{
aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
}
aSvxRule.SetLevel( n, aFmt, sal_False );
aSvxRule.SetLevel( n, aFmt, false );
}
aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, false);
}
const SwNumRule* pCurRule = GetShell().GetCurNumRule();