summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-26 16:05:01 +0200
committerMichael Stahl <mstahl@redhat.com>2012-10-04 21:29:35 +0200
commitc29633988bc1877c5f6e2a89be4840c70afde418 (patch)
tree6efa539f0a7498627bc4be3fea6aba98b003b9d0 /svl
parent055b6f1271cf90240caa3ab0f22f3e760fcefd51 (diff)
sal_Bool->bool in svl::SfxStyleSheetBase
Change-Id: Id506fa56d07be56d63715703e354625715275933
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/style.hxx45
-rw-r--r--svl/source/items/style.cxx57
2 files changed, 51 insertions, 51 deletions
diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx
index e8eb492aae2e..f0878c46967a 100644
--- a/svl/inc/svl/style.hxx
+++ b/svl/inc/svl/style.hxx
@@ -85,11 +85,11 @@ protected:
rtl::OUString maDisplayName;
String aHelpFile; // Name der Hilfedatei
SfxItemSet* pSet; // ItemSet
- sal_uInt16 nMask; // Flags
+ sal_uInt16 nMask; // Flags
- sal_uLong nHelpId; // Hilfe-ID
+ sal_uLong nHelpId; // Hilfe-ID
- sal_Bool bMySet; // sal_True: Set loeschen im dtor
+ bool bMySet; // sal_True: Set loeschen im dtor
SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool*, SfxStyleFamily eFam, sal_uInt16 mask );
SfxStyleSheetBase( const SfxStyleSheetBase& );
@@ -104,7 +104,7 @@ public:
virtual const UniString& GetName() const;
// sets the internal name of this style
- virtual sal_Bool SetName( const UniString& );
+ virtual bool SetName( const UniString& );
/** returns the display name of this style, it is used at the user interface.
If the display name is empty, this method returns the internal name. */
@@ -114,13 +114,13 @@ public:
virtual void SetDisplayName( const rtl::OUString& );
virtual const UniString& GetParent() const;
- virtual sal_Bool SetParent( const UniString& );
+ virtual bool SetParent( const UniString& );
virtual const UniString& GetFollow() const;
- virtual sal_Bool SetFollow( const UniString& );
- virtual sal_Bool HasFollowSupport() const; // Default sal_True
- virtual sal_Bool HasParentSupport() const; // Default sal_True
- virtual sal_Bool HasClearParentSupport() const; // Default sal_False
- virtual sal_Bool IsUsed() const; // Default sal_True
+ virtual bool SetFollow( const UniString& );
+ virtual bool HasFollowSupport() const; // Default true
+ virtual bool HasParentSupport() const; // Default true
+ virtual bool HasClearParentSupport() const; // Default false
+ virtual bool IsUsed() const; // Default true
// Default aus dem Itemset; entweder dem uebergebenen
// oder aus dem per GetItemSet() zurueckgelieferten Set
virtual UniString GetDescription();
@@ -130,8 +130,8 @@ public:
SfxStyleFamily GetFamily() const { return nFamily; }
sal_uInt16 GetMask() const { return nMask; }
void SetMask( sal_uInt16 mask) { nMask = mask; }
- sal_Bool IsUserDefined() const
- { return sal_Bool( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
+ bool IsUserDefined() const
+ { return ( nMask & SFXSTYLEBIT_USERDEF) != 0; }
virtual sal_uLong GetHelpId( String& rFile );
virtual void SetHelpId( const String& r, sal_uLong nId );
@@ -171,17 +171,18 @@ protected:
SfxStyleSheetBasePool* pBasePool;
SfxStyleFamily nSearchFamily;
- sal_uInt16 nMask;
- sal_Bool SearchUsed() const { return bSearchUsed; }
+ sal_uInt16 nMask;
+
+ bool SearchUsed() const { return bSearchUsed; }
private:
- sal_uInt16 GetPos(){return nAktPosition;}
- SVL_DLLPRIVATE sal_Bool IsTrivialSearch();
- SVL_DLLPRIVATE sal_Bool DoesStyleMatch(SfxStyleSheetBase *pStyle);
+ sal_uInt16 GetPos() { return nAktPosition; }
+ SVL_DLLPRIVATE bool IsTrivialSearch();
+ SVL_DLLPRIVATE bool DoesStyleMatch(SfxStyleSheetBase *pStyle);
SfxStyleSheetBase* pAktStyle;
- sal_uInt16 nAktPosition;
- sal_Bool bSearchUsed;
+ sal_uInt16 nAktPosition;
+ bool bSearchUsed;
friend class SfxStyleSheetBasePool;
};
@@ -207,7 +208,7 @@ protected:
sal_uInt16 nMask;
SfxStyleSheetBase& Add( SfxStyleSheetBase& );
- void ChangeParent( const UniString&, const UniString&, sal_Bool bVirtual = sal_True );
+ void ChangeParent( const UniString&, const UniString&, bool bVirtual = true );
virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, sal_uInt16 );
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
@@ -247,7 +248,7 @@ public:
virtual SfxStyleSheetBase* Next();
virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
- virtual sal_Bool SetParent(SfxStyleFamily eFam,
+ virtual bool SetParent(SfxStyleFamily eFam,
const UniString &rStyle,
const UniString &rParent);
@@ -271,7 +272,7 @@ public:
SfxStyleSheet( const SfxStyleSheet& );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual sal_Bool SetParent( const UniString& );
+ virtual bool SetParent( const UniString& );
protected:
SfxStyleSheet() // do not use! needed by MSVC at compile time to satisfy ImplInheritanceHelper2
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 2a434b857a1b..1c8a7c858bbf 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -162,7 +162,7 @@ const XubString& SfxStyleSheetBase::GetName() const
return aName;
}
-sal_Bool SfxStyleSheetBase::SetName( const XubString& rName )
+bool SfxStyleSheetBase::SetName( const XubString& rName )
{
if(rName.Len() == 0)
return sal_False;
@@ -214,10 +214,10 @@ const XubString& SfxStyleSheetBase::GetParent() const
return aParent;
}
-sal_Bool SfxStyleSheetBase::SetParent( const XubString& rName )
+bool SfxStyleSheetBase::SetParent( const XubString& rName )
{
if ( rName == aName )
- return sal_False;
+ return false;
if( aParent != rName )
{
@@ -225,20 +225,20 @@ sal_Bool SfxStyleSheetBase::SetParent( const XubString& rName )
if( rName.Len() && !pIter )
{
OSL_FAIL( "StyleSheet-Parent nicht gefunden" );
- return sal_False;
+ return false;
}
// rekursive Verknuepfungen verhindern
if( aName.Len() )
while(pIter)
{
if(pIter->GetName() == aName)
- return sal_False;
+ return false;
pIter = pPool->Find(pIter->GetParent(), nFamily);
}
aParent = rName;
}
pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
- return sal_True;
+ return true;
}
// Follow aendern
@@ -248,19 +248,19 @@ const XubString& SfxStyleSheetBase::GetFollow() const
return aFollow;
}
-sal_Bool SfxStyleSheetBase::SetFollow( const XubString& rName )
+bool SfxStyleSheetBase::SetFollow( const XubString& rName )
{
if( aFollow != rName )
{
if( !pPool->Find( rName, nFamily ) )
{
OSL_FAIL( "StyleSheet-Follow nicht gefunden" );
- return sal_False;
+ return false;
}
aFollow = rName;
}
pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
- return sal_True;
+ return true;
}
// Itemset setzen. Die Dflt-Implementation legt ein neues Set an.
@@ -291,30 +291,30 @@ void SfxStyleSheetBase::SetHelpId( const String& rFile, sal_uLong nId )
// Folgevorlage m"oglich? Default: Ja
-sal_Bool SfxStyleSheetBase::HasFollowSupport() const
+bool SfxStyleSheetBase::HasFollowSupport() const
{
- return sal_True;
+ return true;
}
// Basisvorlage m"oglich? Default: Ja
-sal_Bool SfxStyleSheetBase::HasParentSupport() const
+bool SfxStyleSheetBase::HasParentSupport() const
{
- return sal_True;
+ return true;
}
// Basisvorlage uf NULL setzen m"oglich? Default: Nein
-sal_Bool SfxStyleSheetBase::HasClearParentSupport() const
+bool SfxStyleSheetBase::HasClearParentSupport() const
{
- return sal_False;
+ return false;
}
// Defaultmaessig sind alle StyleSheets Used
-sal_Bool SfxStyleSheetBase::IsUsed() const
+bool SfxStyleSheetBase::IsUsed() const
{
- return sal_True;
+ return true;
}
// eingestellte Attribute ausgeben
@@ -361,17 +361,17 @@ SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const
return nSearchFamily;
}
-inline sal_Bool SfxStyleSheetIterator::IsTrivialSearch()
+inline bool SfxStyleSheetIterator::IsTrivialSearch()
{
return nMask == 0xFFFF && GetSearchFamily() == SFX_STYLE_FAMILY_ALL;
}
-sal_Bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
+bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
{
return ((GetSearchFamily() == SFX_STYLE_FAMILY_ALL) ||
( pStyle->GetFamily() == GetSearchFamily() ))
&& (( pStyle->GetMask() & ( GetSearchMask() & ~SFXSTYLEBIT_USED )) ||
- ( bSearchUsed ? pStyle->IsUsed() : sal_False ) ||
+ ( bSearchUsed ? pStyle->IsUsed() : false ) ||
GetSearchMask() == SFXSTYLEBIT_ALL );
}
@@ -581,16 +581,15 @@ SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
delete pImp;
}
-sal_Bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
+bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
{
SfxStyleSheetIterator aIter(this,eFam,SFXSTYLEBIT_ALL);
- SfxStyleSheetBase *pStyle =
- aIter.Find(rStyle);
+ SfxStyleSheetBase *pStyle = aIter.Find(rStyle);
OSL_ENSURE(pStyle, "Vorlage nicht gefunden. Writer mit Solar <2541??");
if(pStyle)
return pStyle->SetParent(rParent);
else
- return sal_False;
+ return false;
}
@@ -807,7 +806,7 @@ void SfxStyleSheetBasePool::Clear()
void SfxStyleSheetBasePool::ChangeParent(const XubString& rOld,
const XubString& rNew,
- sal_Bool bVirtual)
+ bool bVirtual)
{
const sal_uInt16 nTmpMask = GetSearchMask();
SetSearchMask(GetSearchFamily(), 0xffff);
@@ -865,10 +864,10 @@ SfxStyleSheet::~SfxStyleSheet()
}
-sal_Bool SfxStyleSheet::SetParent( const XubString& rName )
+bool SfxStyleSheet::SetParent( const XubString& rName )
{
if(aParent == rName)
- return sal_True;
+ return true;
const XubString aOldParent(aParent);
if(SfxStyleSheetBase::SetParent(rName)) {
// aus der Benachrichtigungskette des alten
@@ -885,9 +884,9 @@ sal_Bool SfxStyleSheet::SetParent( const XubString& rName )
if(pParent)
StartListening(*pParent);
}
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
// alle Zuhoerer benachtichtigen