Kaydet (Commit) abb863a3 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

rename IsLastDepend HasOnlyOneListener

Change-Id: Ibb2a3ee596402661f2c593754061deb8c54a2f76
üst b4531de9
......@@ -208,7 +208,7 @@ public:
bool IsInSwFntCache() const { return m_bInSwFntCache; }
void CheckCaching( const sal_uInt16 nWhich );
bool IsLastDepend() { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
bool HasOnlyOneListener() { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
};
// SwDepend
......
......@@ -4449,7 +4449,7 @@ void SwShareBoxFmts::ChangeFrmFmt( SwTableBox* pBox, SwTableLine* pLn,
pOld->Add( &aCl );
pLn->ChgFrmFmt( static_cast<SwTableLineFmt*>(&rFmt) );
}
if( pOld && pOld->IsLastDepend() )
if( pOld && pOld->HasOnlyOneListener() )
{
RemoveFormat( *pOld );
delete pOld;
......
......@@ -378,7 +378,7 @@ SwDDEField::SwDDEField( SwDDEFieldType* pInitType )
SwDDEField::~SwDDEField()
{
if( GetTyp()->IsLastDepend() )
if( GetTyp()->HasOnlyOneListener() )
static_cast<SwDDEFieldType*>(GetTyp())->Disconnect();
}
......
......@@ -71,7 +71,7 @@ SwDDETable::~SwDDETable()
pFldTyp->DecRefCnt();
// If it is the last dependent of the "deleted field" than delete it finally
if( pFldTyp->IsDeleted() && pFldTyp->IsLastDepend() )
if( pFldTyp->IsDeleted() && pFldTyp->HasOnlyOneListener() )
{
pFldTyp->Remove( &aDepend );
delete pFldTyp;
......
......@@ -45,7 +45,7 @@ SwColumnFrm::~SwColumnFrm()
{
SwFrmFmt *pFmt = GetFmt();
SwDoc *pDoc;
if ( !(pDoc = pFmt->GetDoc())->IsInDtor() && pFmt->IsLastDepend() )
if ( !(pDoc = pFmt->GetDoc())->IsInDtor() && pFmt->HasOnlyOneListener() )
{
//I'm the only one, delete the format.
//Get default format before, so the base class can cope with it.
......
......@@ -123,7 +123,7 @@ SwFmtFld::~SwFmtFld()
delete mpField;
// bei einige FeldTypen muessen wir den FeldTypen noch loeschen
if( pType && pType->IsLastDepend() )
if( pType && pType->HasOnlyOneListener() )
{
bool bDel = false;
switch( pType->Which() )
......
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