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