sal_Bool->bool in svl::SfxStyleSheetBase
Change-Id: Id506fa56d07be56d63715703e354625715275933
This commit is contained in:
parent
055b6f1271
commit
c29633988b
8 changed files with 125 additions and 125 deletions
|
@ -51,17 +51,17 @@ public:
|
|||
|
||||
ScStyleSheet( const ScStyleSheet& rStyle );
|
||||
|
||||
virtual sal_Bool SetParent ( const String& rParentName );
|
||||
virtual bool SetParent ( const String& rParentName );
|
||||
virtual SfxItemSet& GetItemSet ();
|
||||
virtual sal_Bool IsUsed () const;
|
||||
virtual sal_Bool HasFollowSupport () const;
|
||||
virtual sal_Bool HasParentSupport () const;
|
||||
virtual bool IsUsed () const;
|
||||
virtual bool HasFollowSupport () const;
|
||||
virtual bool HasParentSupport () const;
|
||||
|
||||
virtual const String& GetName() const;
|
||||
virtual const String& GetParent() const;
|
||||
virtual const String& GetFollow() const;
|
||||
|
||||
virtual sal_Bool SetName( const String& );
|
||||
virtual bool SetName( const String& );
|
||||
|
||||
void SetUsage( ScStyleSheet::Usage eUse ) const
|
||||
{ eUsage = eUse; }
|
||||
|
|
|
@ -85,20 +85,20 @@ ScStyleSheet::~ScStyleSheet()
|
|||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
sal_Bool ScStyleSheet::HasFollowSupport() const
|
||||
bool ScStyleSheet::HasFollowSupport() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
sal_Bool ScStyleSheet::HasParentSupport () const
|
||||
bool ScStyleSheet::HasParentSupport () const
|
||||
{
|
||||
sal_Bool bHasParentSupport = false;
|
||||
bool bHasParentSupport = false;
|
||||
|
||||
switch ( GetFamily() )
|
||||
{
|
||||
case SFX_STYLE_FAMILY_PARA: bHasParentSupport = sal_True; break;
|
||||
case SFX_STYLE_FAMILY_PARA: bHasParentSupport = true; break;
|
||||
case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = false; break;
|
||||
default:
|
||||
{
|
||||
|
@ -111,9 +111,9 @@ sal_Bool ScStyleSheet::HasParentSupport () const
|
|||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
sal_Bool ScStyleSheet::SetParent( const String& rParentName )
|
||||
bool ScStyleSheet::SetParent( const String& rParentName )
|
||||
{
|
||||
sal_Bool bResult = false;
|
||||
bool bResult = false;
|
||||
String aEffName = rParentName;
|
||||
SfxStyleSheetBase* pStyle = pPool->Find( aEffName, nFamily );
|
||||
if (!pStyle)
|
||||
|
@ -263,7 +263,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
|
|||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
sal_Bool ScStyleSheet::IsUsed() const
|
||||
bool ScStyleSheet::IsUsed() const
|
||||
{
|
||||
if ( GetFamily() == SFX_STYLE_FAMILY_PARA )
|
||||
{
|
||||
|
@ -277,7 +277,7 @@ sal_Bool ScStyleSheet::IsUsed() const
|
|||
return eUsage == USED;
|
||||
}
|
||||
else
|
||||
return sal_True;
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
@ -332,7 +332,7 @@ const String& ScStyleSheet::GetFollow() const
|
|||
//! Flag gesetzt und abgefragt werden.
|
||||
//! Die ganze Abfrage muss raus, wenn fuer eine neue Datei-Version die Namens-Umsetzung wegfaellt.
|
||||
|
||||
sal_Bool ScStyleSheet::SetName( const String& rNew )
|
||||
bool ScStyleSheet::SetName( const String& rNew )
|
||||
{
|
||||
String aFileStdName = rtl::OUString(STRING_STANDARD);
|
||||
if ( rNew == aFileStdName && aFileStdName != ScGlobal::GetRscString(STR_STYLENAME_STANDARD) )
|
||||
|
|
|
@ -54,13 +54,13 @@ public:
|
|||
SdStyleSheet( const rtl::OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, sal_uInt16 nMask );
|
||||
SdStyleSheet( const SdStyleSheet& );
|
||||
|
||||
virtual sal_Bool SetParent (const String& rParentName);
|
||||
virtual bool SetParent (const String& rParentName);
|
||||
virtual SfxItemSet& GetItemSet();
|
||||
virtual sal_Bool IsUsed() const;
|
||||
virtual sal_Bool HasFollowSupport() const;
|
||||
virtual sal_Bool HasParentSupport() const;
|
||||
virtual sal_Bool HasClearParentSupport() const;
|
||||
virtual sal_Bool SetName( const UniString& );
|
||||
virtual bool IsUsed() const;
|
||||
virtual bool HasFollowSupport() const;
|
||||
virtual bool HasParentSupport() const;
|
||||
virtual bool HasClearParentSupport() const;
|
||||
virtual bool SetName( const UniString& );
|
||||
virtual void SetHelpId( const String& r, sal_uLong nId );
|
||||
|
||||
void AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingItems = sal_True);
|
||||
|
|
|
@ -197,9 +197,9 @@ void SdStyleSheet::Store(SvStream& rOut)
|
|||
|*
|
||||
\************************************************************************/
|
||||
|
||||
sal_Bool SdStyleSheet::SetParent(const String& rParentName)
|
||||
bool SdStyleSheet::SetParent(const String& rParentName)
|
||||
{
|
||||
sal_Bool bResult = sal_False;
|
||||
bool bResult = sal_False;
|
||||
|
||||
if (SfxStyleSheet::SetParent(rParentName))
|
||||
{
|
||||
|
@ -211,7 +211,7 @@ sal_Bool SdStyleSheet::SetParent(const String& rParentName)
|
|||
SfxStyleSheetBase* pStyle = pPool->Find(rParentName, nFamily);
|
||||
if (pStyle)
|
||||
{
|
||||
bResult = sal_True;
|
||||
bResult = true;
|
||||
SfxItemSet& rParentSet = pStyle->GetItemSet();
|
||||
GetItemSet().SetParent(&rParentSet);
|
||||
Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
|
||||
|
@ -219,14 +219,14 @@ sal_Bool SdStyleSheet::SetParent(const String& rParentName)
|
|||
}
|
||||
else
|
||||
{
|
||||
bResult = sal_True;
|
||||
bResult = true;
|
||||
GetItemSet().SetParent(NULL);
|
||||
Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bResult = sal_True;
|
||||
bResult = true;
|
||||
}
|
||||
}
|
||||
return bResult;
|
||||
|
@ -342,9 +342,9 @@ SfxItemSet& SdStyleSheet::GetItemSet()
|
|||
|*
|
||||
\************************************************************************/
|
||||
|
||||
sal_Bool SdStyleSheet::IsUsed() const
|
||||
bool SdStyleSheet::IsUsed() const
|
||||
{
|
||||
sal_Bool bResult = sal_False;
|
||||
bool bResult = false;
|
||||
|
||||
sal_uInt16 nListenerCount = GetListenerCount();
|
||||
if (nListenerCount > 0)
|
||||
|
@ -636,28 +636,28 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingIte
|
|||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
sal_Bool SdStyleSheet::HasFollowSupport() const
|
||||
bool SdStyleSheet::HasFollowSupport() const
|
||||
{
|
||||
return sal_False;
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
sal_Bool SdStyleSheet::HasParentSupport() const
|
||||
bool SdStyleSheet::HasParentSupport() const
|
||||
{
|
||||
return sal_True;
|
||||
return true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
sal_Bool SdStyleSheet::HasClearParentSupport() const
|
||||
bool SdStyleSheet::HasClearParentSupport() const
|
||||
{
|
||||
return sal_True;
|
||||
return true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
sal_Bool SdStyleSheet::SetName( const UniString& rName )
|
||||
bool SdStyleSheet::SetName( const UniString& rName )
|
||||
{
|
||||
return SfxStyleSheet::SetName( rName );
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -130,13 +130,13 @@ public:
|
|||
void PresetParent(const String& rName){ aParent = rName; }
|
||||
void PresetFollow(const String& rName){ aFollow = rName; }
|
||||
|
||||
virtual sal_Bool SetName( const String& rStr);
|
||||
virtual sal_Bool SetParent( const String& rStr);
|
||||
virtual sal_Bool SetFollow( const String& rStr);
|
||||
virtual bool SetName( const String& rStr);
|
||||
virtual bool SetParent( const String& rStr);
|
||||
virtual bool SetFollow( const String& rStr);
|
||||
|
||||
virtual sal_Bool HasFollowSupport() const;
|
||||
virtual sal_Bool HasParentSupport() const;
|
||||
virtual sal_Bool HasClearParentSupport() const;
|
||||
virtual bool HasFollowSupport() const;
|
||||
virtual bool HasParentSupport() const;
|
||||
virtual bool HasClearParentSupport() const;
|
||||
virtual String GetDescription();
|
||||
virtual String GetDescription(SfxMapUnit eUnit);
|
||||
|
||||
|
@ -147,7 +147,7 @@ public:
|
|||
const SwNumRule* GetNumRule();
|
||||
void SetNumRule(const SwNumRule& rRule);
|
||||
|
||||
virtual sal_Bool IsUsed() const;
|
||||
virtual bool IsUsed() const;
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -204,7 +204,7 @@ public:
|
|||
virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
|
||||
sal_uInt16 n=0xFFFF );
|
||||
|
||||
virtual sal_Bool SetParent( SfxStyleFamily eFam, const String &rStyle,
|
||||
virtual bool SetParent( SfxStyleFamily eFam, const String &rStyle,
|
||||
const String &rParent );
|
||||
|
||||
virtual void Remove( SfxStyleSheetBase* pStyle);
|
||||
|
|
|
@ -530,19 +530,19 @@ const String& SwDocStyleSheet::GetFollow() const
|
|||
--------------------------------------------------------------------*/
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheet::HasFollowSupport() const
|
||||
bool SwDocStyleSheet::HasFollowSupport() const
|
||||
{
|
||||
switch(nFamily)
|
||||
{
|
||||
case SFX_STYLE_FAMILY_PARA :
|
||||
case SFX_STYLE_FAMILY_PAGE : return sal_True;
|
||||
case SFX_STYLE_FAMILY_PAGE : return true;
|
||||
case SFX_STYLE_FAMILY_FRAME:
|
||||
case SFX_STYLE_FAMILY_CHAR :
|
||||
case SFX_STYLE_FAMILY_PSEUDO: return sal_False;
|
||||
case SFX_STYLE_FAMILY_PSEUDO: return false;
|
||||
default:
|
||||
OSL_ENSURE(!this, "unknown style family");
|
||||
}
|
||||
return sal_False;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -550,28 +550,28 @@ sal_Bool SwDocStyleSheet::HasFollowSupport() const
|
|||
--------------------------------------------------------------------*/
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheet::HasParentSupport() const
|
||||
bool SwDocStyleSheet::HasParentSupport() const
|
||||
{
|
||||
sal_Bool bRet = sal_False;
|
||||
bool bRet = false;
|
||||
switch(nFamily)
|
||||
{
|
||||
case SFX_STYLE_FAMILY_CHAR :
|
||||
case SFX_STYLE_FAMILY_PARA :
|
||||
case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
|
||||
case SFX_STYLE_FAMILY_FRAME: bRet = true;
|
||||
default:; //prevent warning
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheet::HasClearParentSupport() const
|
||||
bool SwDocStyleSheet::HasClearParentSupport() const
|
||||
{
|
||||
sal_Bool bRet = sal_False;
|
||||
bool bRet = false;
|
||||
switch(nFamily)
|
||||
{
|
||||
case SFX_STYLE_FAMILY_PARA :
|
||||
case SFX_STYLE_FAMILY_CHAR :
|
||||
case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
|
||||
case SFX_STYLE_FAMILY_FRAME: bRet = true;
|
||||
default:; //prevent warning
|
||||
}
|
||||
return bRet;
|
||||
|
@ -758,20 +758,20 @@ String SwDocStyleSheet::GetDescription()
|
|||
--------------------------------------------------------------------*/
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
||||
bool SwDocStyleSheet::SetName( const String& rStr)
|
||||
{
|
||||
if( !rStr.Len() )
|
||||
return sal_False;
|
||||
return false;
|
||||
|
||||
if( aName != rStr )
|
||||
{
|
||||
if( !SfxStyleSheetBase::SetName( rStr ))
|
||||
return sal_False;
|
||||
return false;
|
||||
}
|
||||
else if(!bPhysical)
|
||||
FillStyleSheet( FillPhysical );
|
||||
|
||||
int bChg = sal_False;
|
||||
int bChg = false;
|
||||
switch(nFamily)
|
||||
{
|
||||
case SFX_STYLE_FAMILY_CHAR :
|
||||
|
@ -780,7 +780,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
if( pCharFmt && pCharFmt->GetName() != rStr )
|
||||
{
|
||||
pCharFmt->SetName( rStr );
|
||||
bChg = sal_True;
|
||||
bChg = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -794,7 +794,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
else
|
||||
pColl->SetName(rStr);
|
||||
|
||||
bChg = sal_True;
|
||||
bChg = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -808,7 +808,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
else
|
||||
pFrmFmt->SetName( rStr );
|
||||
|
||||
bChg = sal_True;
|
||||
bChg = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -830,7 +830,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
rDoc.GetIDocumentUndoRedo().DoUndo(bDoesUndo);
|
||||
|
||||
rDoc.SetModified();
|
||||
bChg = sal_True;
|
||||
bChg = true;
|
||||
}
|
||||
break;
|
||||
case SFX_STYLE_FAMILY_PSEUDO:
|
||||
|
@ -848,7 +848,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
pNumRule = rDoc.FindNumRulePtr(rStr);
|
||||
rDoc.SetModified();
|
||||
|
||||
bChg = sal_True;
|
||||
bChg = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -857,7 +857,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
((SwNumRule*)pNumRule)->SetName( rStr, rDoc );
|
||||
rDoc.SetModified();
|
||||
|
||||
bChg = sal_True;
|
||||
bChg = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -875,7 +875,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
if( pSh )
|
||||
pSh->CallChgLnk();
|
||||
}
|
||||
return sal_True;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -883,7 +883,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr)
|
|||
--------------------------------------------------------------------*/
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
|
||||
bool SwDocStyleSheet::SetParent( const String& rStr)
|
||||
{
|
||||
SwFmt* pFmt = 0, *pParent = 0;
|
||||
switch(nFamily)
|
||||
|
@ -913,7 +913,7 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
|
|||
OSL_ENSURE(!this, "unknown style family");
|
||||
}
|
||||
|
||||
sal_Bool bRet = sal_False;
|
||||
bool bRet = false;
|
||||
if( pFmt && pFmt->DerivedFrom() &&
|
||||
pFmt->DerivedFrom()->GetName() != rStr )
|
||||
{
|
||||
|
@ -938,10 +938,10 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
|
|||
--------------------------------------------------------------------*/
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
|
||||
bool SwDocStyleSheet::SetFollow( const String& rStr)
|
||||
{
|
||||
if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr ))
|
||||
return sal_False;
|
||||
return false;
|
||||
|
||||
SwImplShellAction aTmpSh( rDoc );
|
||||
switch(nFamily)
|
||||
|
@ -987,7 +987,7 @@ sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
|
|||
OSL_ENSURE(!this, "unknwown style family");
|
||||
}
|
||||
|
||||
return sal_True;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -1843,7 +1843,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
|
|||
return pFrmFmt;
|
||||
}
|
||||
|
||||
sal_Bool SwDocStyleSheet::IsUsed() const
|
||||
bool SwDocStyleSheet::IsUsed() const
|
||||
{
|
||||
if( !bPhysical )
|
||||
{
|
||||
|
@ -1852,7 +1852,7 @@ sal_Bool SwDocStyleSheet::IsUsed() const
|
|||
}
|
||||
|
||||
if( !bPhysical )
|
||||
return sal_False;
|
||||
return false;
|
||||
|
||||
const SwModify* pMod;
|
||||
switch( nFamily )
|
||||
|
@ -1863,11 +1863,11 @@ sal_Bool SwDocStyleSheet::IsUsed() const
|
|||
case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break;
|
||||
|
||||
case SFX_STYLE_FAMILY_PSEUDO:
|
||||
return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False;
|
||||
return pNumRule ? rDoc.IsUsed( *pNumRule ) : false;
|
||||
|
||||
default:
|
||||
OSL_ENSURE(!this, "unknown style family");
|
||||
return sal_False;
|
||||
return false;
|
||||
}
|
||||
return rDoc.IsUsed( *pMod );
|
||||
}
|
||||
|
@ -2230,7 +2230,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
|
|||
|
||||
|
||||
|
||||
sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
|
||||
bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
|
||||
const String &rStyle, const String &rParent )
|
||||
{
|
||||
SwFmt* pFmt = 0, *pParent = 0;
|
||||
|
@ -2259,7 +2259,7 @@ sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
|
|||
OSL_ENSURE(!this, "unknown style family");
|
||||
}
|
||||
|
||||
sal_Bool bRet = sal_False;
|
||||
bool bRet = false;
|
||||
if( pFmt && pFmt->DerivedFrom() &&
|
||||
pFmt->DerivedFrom()->GetName() != rParent )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue