diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-24 13:02:36 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-24 15:59:42 +0100 |
commit | b8d5647180db0f6c7e23d7ca9e14ab95fa4aa557 (patch) | |
tree | cfc2b115b7368ebefce5572ef8831872224cf7ba /sw/source | |
parent | 4da56c0cea4da68a0707b24ad286765400cce0be (diff) |
rename GetDepends->HasWriterListener and make it a bool
Change-Id: Idc090c9e105f24ef91ef123db03db6d6e67ed1d4
Diffstat (limited to 'sw/source')
34 files changed, 73 insertions, 73 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index ee786939ea87..bd82655c75c3 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -28,8 +28,8 @@ TYPEINIT0( SwClient ); SwClient::~SwClient() { - OSL_ENSURE( !pRegisteredIn || pRegisteredIn->GetDepends(), "SwModify still known, but Client already disconnected!" ); - if( pRegisteredIn && pRegisteredIn->GetDepends() ) + OSL_ENSURE( !pRegisteredIn || pRegisteredIn->HasWriterListeners(), "SwModify still known, but Client already disconnected!" ); + if( pRegisteredIn && pRegisteredIn->HasWriterListeners() ) pRegisteredIn->Remove( this ); } diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 0cca34ca5a8c..a71c9828ed86 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -223,7 +223,7 @@ SwFmt::~SwFmt() { // This happens at a ObjectDying message. Thus put all dependent // ones on DerivedFrom. - if( GetDepends() ) + if( HasWriterListeners() ) { OSL_ENSURE( DerivedFrom(), "SwFmt::~SwFmt: Def dependents!" ); @@ -532,7 +532,7 @@ bool SwFmt::SetFmtAttr( const SfxPoolItem& rAttr ) // but call Modify always for FrmFmts const sal_uInt16 nFmtWhich = Which(); if( IsModifyLocked() || - ( !GetDepends() && + ( !HasWriterListeners() && (RES_GRFFMTCOLL == nFmtWhich || RES_TXTFMTCOLL == nFmtWhich ) ) ) { @@ -637,7 +637,7 @@ bool SwFmt::SetFmtAttr( const SfxItemSet& rSet ) // but call Modify always for FrmFmts const sal_uInt16 nFmtWhich = Which(); if ( IsModifyLocked() || - ( !GetDepends() && + ( !HasWriterListeners() && ( RES_GRFFMTCOLL == nFmtWhich || RES_TXTFMTCOLL == nFmtWhich ) ) ) { diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index bc863531f51b..239faa823c4d 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -651,7 +651,7 @@ bool SwCrsrShell::MoveFldType( if ( pFldType ) { - if( RES_INPUTFLD != pFldType->Which() && !pFldType->GetDepends() ) + if( RES_INPUTFLD != pFldType->Which() && !pFldType->HasWriterListeners() ) { return false; } diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 8cb43080e5f5..0dbe47ac7944 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -310,7 +310,7 @@ void DocumentFieldsManager::RemoveFldType(sal_uInt16 nFld) mpUpdtFlds->RemoveFldType( *pTmp ); // no break; case RES_DDEFLD: - if( pTmp->GetDepends() && !m_rDoc.IsUsed( *pTmp ) ) + if( pTmp->HasWriterListeners() && !m_rDoc.IsUsed( *pTmp ) ) { if( RES_SETEXPFLD == nWhich ) static_cast<SwSetExpFieldType*>(pTmp)->SetDeleted( true ); @@ -325,7 +325,7 @@ void DocumentFieldsManager::RemoveFldType(sal_uInt16 nFld) if( nWhich ) { - OSL_ENSURE( !pTmp->GetDepends(), "Dependent fields present!" ); + OSL_ENSURE( !pTmp->HasWriterListeners(), "Dependent fields present!" ); // delete field type delete pTmp; } @@ -1567,7 +1567,7 @@ bool DocumentFieldsManager::containsUpdatableFields() void DocumentFieldsManager::GCFieldTypes() { for( sal_uInt16 n = mpFldTypes->size(); n > INIT_FLDTYPES; ) - if( !(*mpFldTypes)[ --n ]->GetDepends() ) + if( !(*mpFldTypes)[ --n ]->HasWriterListeners() ) RemoveFldType( n ); } diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index f9cb786184bb..8d9c8e7a5e9c 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -2104,7 +2104,7 @@ bool DocumentStylePoolManager::IsPoolTxtCollUsed( sal_uInt16 nId ) const bFnd = true; } - if( !bFnd || !pNewColl->GetDepends() ) + if( !bFnd || !pNewColl->HasWriterListeners() ) return false; SwAutoFmtGetDocNode aGetHt( &m_rDoc.GetNodes() ); @@ -2148,7 +2148,7 @@ bool DocumentStylePoolManager::IsPoolFmtUsed( sal_uInt16 nId ) const } // Not found or no dependencies? - if( bFnd && pNewFmt->GetDepends() ) + if( bFnd && pNewFmt->HasWriterListeners() ) { // Check if we have dependent ContentNodes in the Nodes array // (also indirect ones for derived Formats) @@ -2176,7 +2176,7 @@ bool DocumentStylePoolManager::IsPoolPageDescUsed( sal_uInt16 nId ) const } // Not found or no dependencies? - if( !bFnd || !pNewPgDsc->GetDepends() ) // ?????? + if( !bFnd || !pNewPgDsc->HasWriterListeners() ) // ?????? return false; // Check if we have dependent ContentNodes in the Nodes array diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index e6f5d925acf1..bff85d071105 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -553,7 +553,7 @@ bool sw_GetPostIts( SwFieldType* pFldType = pIDFA->GetSysFldType( RES_POSTITFLD ); OSL_ENSURE( pFldType, "no PostItType ? "); - if( pFldType->GetDepends() ) + if( pFldType->HasWriterListeners() ) { // Found modify object; insert all fields into the array SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType ); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index fd633bedc305..0abbacbe23fe 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -608,7 +608,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) pItem = aIter.NextItem(); } - if( aNew.Count() && aCallMod.GetDepends() ) + if( aNew.Count() && aCallMod.HasWriterListeners() ) { if (GetIDocumentUndoRedo().DoesUndo()) { @@ -645,7 +645,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) } } - if( aNew.Count() && aCallMod.GetDepends() ) + if( aNew.Count() && aCallMod.HasWriterListeners() ) { SwAttrSetChg aChgOld( aOld, aOld ); SwAttrSetChg aChgNew( aNew, aNew ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 9654b26510dd..150c9f216232 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -760,7 +760,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, const bool _bNewTOX ) { const SwSectionNode* pSectNd; - if( !SwTOXBase::GetRegisteredIn()->GetDepends() || + if( !SwTOXBase::GetRegisteredIn()->HasWriterListeners() || !GetFmt() || 0 == (pSectNd = GetFmt()->GetSectionNode() ) || !pSectNd->GetNodes().IsDocNodes() || IsHiddenFlag() ) @@ -1141,7 +1141,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl, const SwTxtNode* pOwnChapterNode ) { const SwTOXType* pType = static_cast<SwTOXType*>( SwTOXBase::GetRegisteredIn() ); - if( !pType->GetDepends() ) + if( !pType->HasWriterListeners() ) return; SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc(); @@ -1163,7 +1163,7 @@ void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl, // If selected use marks from the same chapter only if( pTOXSrc->GetNodes().IsDocNodes() && - pTOXSrc->GetTxt().getLength() && pTOXSrc->GetDepends() && + pTOXSrc->GetTxt().getLength() && pTOXSrc->HasWriterListeners() && pTOXSrc->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && (!IsFromChapter() || ::lcl_FindChapterNode( *pTOXSrc, 0 ) == pOwnChapterNode ) && !pTOXSrc->HasHiddenParaField() && @@ -1220,7 +1220,7 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode ) { ::SetProgressState( 0, pDoc->GetDocShell() ); SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode(); - if( pTxtNd && pTxtNd->Len() && pTxtNd->GetDepends() && + if( pTxtNd && pTxtNd->Len() && pTxtNd->HasWriterListeners() && sal_uInt16( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() && pTxtNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) && !pTxtNd->HasHiddenParaField() && diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index d4d650af3d45..972001fb5227 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -523,7 +523,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, nWidth = (*pColArr)[ i + 1 ] - (*pColArr)[ i ]; if( pBoxF->GetFrmSize().GetWidth() != nWidth ) { - if( pBoxF->GetDepends() ) // Create new Format + if( pBoxF->HasWriterListeners() ) // Create new Format { SwTableBoxFmt *pNewFmt = MakeTableBoxFmt(); *pNewFmt = *pBoxF; @@ -732,7 +732,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, rNdTbl.SetRowsToRepeat(nRowsToRepeat); bool bUseBoxFmt = false; - if( !pBoxFmt->GetDepends() ) + if( !pBoxFmt->HasWriterListeners() ) { // The Box's Formats already have the right size, we must only set // the right Border/AutoFmt. @@ -976,7 +976,7 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes, } // propagate size upwards from format, so the table gets the right size - SAL_WARN_IF(rBoxFmt.GetDepends(), "sw.core", + SAL_WARN_IF(rBoxFmt.HasWriterListeners(), "sw.core", "who is still registered in the format?"); rBoxFmt.SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nLastPos )); } @@ -1214,7 +1214,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > SwTable& rNdTbl = pTblNd->GetTable(); - if( !pBoxFmt->GetDepends() ) + if( !pBoxFmt->HasWriterListeners() ) { // The Box's Formats already have the right size, we must only set // the right Border/AutoFmt. @@ -2330,7 +2330,7 @@ SwTabFrm *SwTableNode::MakeFrm( SwFrm* pSib ) */ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx ) { - if( !GetTable().GetFrmFmt()->GetDepends()) // Do we actually have Frame? + if( !GetTable().GetFrmFmt()->HasWriterListeners()) // Do we actually have Frame? return; SwFrm *pFrm; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 578e268c310a..25e6a9f13f66 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1277,7 +1277,7 @@ void SwCntntNode::MakeFrms( SwCntntNode& rNode ) OSL_ENSURE( &rNode != this, "No ContentNode or CopyNode and new Node identical." ); - if( !GetDepends() || &rNode == this ) // Do we actually have Frames? + if( !HasWriterListeners() || &rNode == this ) // Do we actually have Frames? return; SwFrm *pFrm; @@ -1318,7 +1318,7 @@ void SwCntntNode::MakeFrms( SwCntntNode& rNode ) */ void SwCntntNode::DelFrms( bool bIsDisposeAccTable ) { - if( !GetDepends() ) + if( !HasWriterListeners() ) return; SwIterator<SwCntntFrm,SwCntntNode> aIter( *this ); @@ -1437,7 +1437,7 @@ bool SwCntntNode::SetAttr(const SfxPoolItem& rAttr ) bool bRet = false; // If Modify is locked, we do not send any Modifys if( IsModifyLocked() || - ( !GetDepends() && RES_PARATR_NUMRULE != rAttr.Which() )) + ( !HasWriterListeners() && RES_PARATR_NUMRULE != rAttr.Which() )) { bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rAttr ); } @@ -1511,7 +1511,7 @@ bool SwCntntNode::SetAttr( const SfxItemSet& rSet ) bool bRet = false; // If Modify is locked, do not send any Modifys if ( IsModifyLocked() || - ( !GetDepends() && + ( !HasWriterListeners() && SfxItemState::SET != rSet.GetItemState( RES_PARATR_NUMRULE, false ) ) ) { // Some special treatment for Attributes diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index de051b9dfcf7..587e748185f2 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -365,7 +365,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, OSL_ENSURE( false, "here, something wrong happened" ); aFrmNdIdx = rNds.GetEndOfContent(); pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, true, false ); - if( pFrmNd && !static_cast<SwCntntNode*>(pFrmNd)->GetDepends() ) + if( pFrmNd && !static_cast<SwCntntNode*>(pFrmNd)->HasWriterListeners() ) pFrmNd = 0; OSL_ENSURE( pFrmNd, "ChgNode() - no FrameNode found" ); } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index f9d708c5da10..0ba5f72140b2 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -257,7 +257,7 @@ SwSection::~SwSection() // If the Section is the last Client in the Format we can delete it SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, pFmt ); pFmt->ModifyNotification( &aMsgHint, &aMsgHint ); - if( !pFmt->GetDepends() ) + if( !pFmt->HasWriterListeners() ) { // Do not add to the Undo. This should've happened earlier. ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); @@ -744,7 +744,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) switch( nWhich ) { case RES_ATTRSET_CHG: - if (GetDepends() && pOld && pNew) + if (HasWriterListeners() && pOld && pNew) { SfxItemSet* pNewSet = const_cast<SwAttrSetChg*>(static_cast<const SwAttrSetChg*>(pNew))->GetChgSet(); SfxItemSet* pOldSet = const_cast<SwAttrSetChg*>(static_cast<const SwAttrSetChg*>(pOld))->GetChgSet(); @@ -804,7 +804,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) case RES_PROTECT: case RES_EDIT_IN_READONLY: // edit in readonly sections // Pass through these Messages until the End of the tree! - if( GetDepends() ) + if( HasWriterListeners() ) { ModifyBroadcast( pOld, pNew ); } @@ -902,7 +902,7 @@ sal_uInt16 SwSectionFmt::GetChildSections( SwSections& rArr, { rArr.clear(); - if( GetDepends() ) + if( HasWriterListeners() ) { SwIterator<SwSectionFmt,SwSectionFmt> aIter(*this); const SwNodeIndex* pIdx; @@ -942,7 +942,7 @@ bool SwSectionFmt::IsInNodesArr() const // Parent was changed void SwSectionFmt::UpdateParent() { - if( !GetDepends() ) + if( !HasWriterListeners() ) return; SwSection* pSection = 0; diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 0d973e1c219e..3cb493acc1ee 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -171,7 +171,7 @@ void SwEditShell::RemoveFldType(sal_uInt16 nResId, const OUString& rStr) void SwEditShell::FieldToText( SwFieldType* pType ) { - if( !pType->GetDepends() ) + if( !pType->HasWriterListeners() ) return; SET_CURR_SHELL( this ); diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 9a2e0b315618..dd89ca6da4af 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -96,7 +96,7 @@ public: OSL_ENSURE( rFldType.GetDoc(), "no pDoc" ); // no dependencies left? - if( rFldType.GetDepends() && !rFldType.IsModifyLocked() && !ChkNoDataFlag() ) + if( rFldType.HasWriterListeners() && !rFldType.IsModifyLocked() && !ChkNoDataFlag() ) { SwViewShell* pSh = rFldType.GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); SwEditShell* pESh = rFldType.GetDoc()->GetEditShell(); diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 7da9b37322e6..2da0ac342cf1 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -2057,7 +2057,7 @@ SwFieldType* SwRefPageGetFieldType::Copy() const void SwRefPageGetFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { // update all GetReference fields - if( !pNew && !pOld && GetDepends() ) + if( !pNew && !pOld && HasWriterListeners() ) { // first collect all SetPageRefFields _SetGetExpFlds aTmpLst; diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 80b9acecc5fe..c799c8176738 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -525,7 +525,7 @@ void SwSetExpFieldType::SetSeqFormat(sal_uLong nFmt) sal_uLong SwSetExpFieldType::GetSeqFormat() { - if( !GetDepends() ) + if( !HasWriterListeners() ) return SVX_NUM_ARABIC; const SwField *pFld = SwIterator<SwFmtFld,SwSetExpFieldType>(*this).First()->GetField(); @@ -534,7 +534,7 @@ sal_uLong SwSetExpFieldType::GetSeqFormat() sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld ) { - if( !GetDepends() || !(nsSwGetSetExpType::GSE_SEQ & nType) ) + if( !HasWriterListeners() || !(nsSwGetSetExpType::GSE_SEQ & nType) ) return USHRT_MAX; std::vector<sal_uInt16> aArr; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 18bcf2ae76b1..b4c40f19aca7 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -837,7 +837,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark, case REF_SEQUENCEFLD: { SwFieldType* pFldType = pDoc->getIDocumentFieldsAccess().GetFldType( RES_SETEXPFLD, rRefMark, false ); - if( pFldType && pFldType->GetDepends() && + if( pFldType && pFldType->HasWriterListeners() && nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(pFldType)->GetType() ) { SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType ); @@ -1092,7 +1092,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc ) { // when copying _to_ clipboard, expectation is that no fields exist // so no re-mapping is required to avoid collisions - assert(!rDestDoc.getIDocumentFieldsAccess().GetSysFldType(RES_GETREFFLD)->GetDepends()); + assert(!rDestDoc.getIDocumentFieldsAccess().GetSysFldType(RES_GETREFFLD)->HasWriterListeners()); return; // don't modify the fields in the source doc } diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx index 738152bd0f27..07e5fa352de2 100644 --- a/sw/source/core/fields/tblcalc.cxx +++ b/sw/source/core/fields/tblcalc.cxx @@ -78,7 +78,7 @@ OUString SwTblField::GetFieldName() const /// search TextNode containing this field const SwNode* SwTblField::GetNodeOfFormula() const { - if( !GetTyp()->GetDepends() ) + if( !GetTyp()->HasWriterListeners() ) return 0; SwIterator<SwFmtFld,SwFieldType> aIter( *GetTyp() ); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 38513d477fe5..bf37b0806991 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -643,7 +643,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, mpDoc->SetCopyIsMove( bCopyIsMove ); // have new table formules been inserted? - if( pTblFldTyp->GetDepends() ) + if( pTblFldTyp->HasWriterListeners() ) { // finish old actions: the table frames are created and // a selection can be made @@ -1104,7 +1104,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL ); // have new table formulas been inserted? - if( pTblFldTyp->GetDepends() ) + if( pTblFldTyp->HasWriterListeners() ) { // finish old action: table-frames have been created // a selection can be made now diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 1693add78fc7..339476704c78 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -317,7 +317,7 @@ SwGrfNode::~SwGrfNode() // inside one document has to be implemented. } //#39289# delete frames already here since the Frms' dtor needs the graphic for its StopAnimation - if( GetDepends() ) + if( HasWriterListeners() ) DelFrms(); } diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index c9aa05207bc7..7efebc117838 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -145,7 +145,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt ) while ( aIdx < nEnd ) { if ( pNode->IsCntntNode() && - static_cast<SwCntntNode*>(pNode)->GetDepends() ) + static_cast<SwCntntNode*>(pNode)->HasWriterListeners() ) { SwCrsrShell *pShell = SwIterator<SwCrsrShell,SwCntntNode>( *static_cast<SwCntntNode*>(pNode) ).First(); if( pShell ) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index e5b89cbb367c..a319c556e785 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3523,7 +3523,7 @@ SwRowFrm::~SwRowFrm() if( pMod ) { pMod->Remove( this ); // remove, - if( !pMod->GetDepends() ) + if( !pMod->HasWriterListeners() ) delete pMod; // and delete } } @@ -4422,7 +4422,7 @@ SwCellFrm::~SwCellFrm() } pMod->Remove( this ); // remove, - if( !pMod->GetDepends() ) + if( !pMod->HasWriterListeners() ) delete pMod; // and delete } } diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx index 9459002439da..9fa844661079 100644 --- a/sw/source/core/para/paratr.cxx +++ b/sw/source/core/para/paratr.cxx @@ -92,7 +92,7 @@ void SwFmtDrop::Modify( const SfxPoolItem*, const SfxPoolItem * ) { if( !pDefinedIn->ISA( SwFmt )) pDefinedIn->ModifyNotification( this, this ); - else if( pDefinedIn->GetDepends() && + else if( pDefinedIn->HasWriterListeners() && !pDefinedIn->IsModifyLocked() ) { // Notify those who are dependent on the format on our own. diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 100745ddefd3..77e003586590 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -291,7 +291,7 @@ SwTable::~SwTable() SwTableFmt* pFmt = static_cast<SwTableFmt*>(GetFrmFmt()); pFmt->Remove( this ); // remove - if( !pFmt->GetDepends() ) + if( !pFmt->HasWriterListeners() ) pFmt->GetDoc()->DelTblFrmFmt( pFmt ); // and delete // Delete the pointers from the SortArray of the boxes. The objects @@ -1523,7 +1523,7 @@ SwTableLine::~SwTableLine() // the TabelleLine can be deleted if it's the last client of the FrameFormat SwModify* pMod = GetFrmFmt(); pMod->Remove( this ); // remove, - if( !pMod->GetDepends() ) + if( !pMod->HasWriterListeners() ) delete pMod; // and delete } @@ -1600,7 +1600,7 @@ void SwTableLine::ChgFrmFmt( SwTableLineFmt *pNewFmt ) // Now, re-register self. pNewFmt->Add( this ); - if ( !pOld->GetDepends() ) + if ( !pOld->HasWriterListeners() ) delete pOld; } @@ -1717,7 +1717,7 @@ SwTableBox::~SwTableBox() // the TabelleBox can be deleted if it's the last client of the FrameFormat SwModify* pMod = GetFrmFmt(); pMod->Remove( this ); // remove, - if( !pMod->GetDepends() ) + if( !pMod->HasWriterListeners() ) delete pMod; // and delete delete pImpl; @@ -1817,7 +1817,7 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt ) // Now, re-register self. pNewFmt->Add( this ); - if( !pOld->GetDepends() ) + if( !pOld->HasWriterListeners() ) delete pOld; } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 17b399244f30..7af5ef14c1ff 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -266,7 +266,7 @@ SwTxtNode::~SwTxtNode() InitSwParaStatistics( false ); - if (GetDepends()) + if (HasWriterListeners()) { DelFrms_TxtNodePart(); } @@ -400,7 +400,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) ResetAttr( RES_PARATR_LIST_LEVEL ); } - if ( GetDepends() && !m_Text.isEmpty() && (nTxtLen / 2) < nSplitPos ) + if ( HasWriterListeners() && !m_Text.isEmpty() && (nTxtLen / 2) < nSplitPos ) { // optimization for SplitNode: If a split is at the end of a node then // move the frames from the current to the new one and create new ones @@ -578,7 +578,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) SetSmartTags( pList2, false ); } - if ( GetDepends() ) + if ( HasWriterListeners() ) { MakeFrms( *pNode ); // neue Frames anlegen. } @@ -591,7 +591,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos ) //zu weiteren Folgefehlern, die mit Laufzeitkosten geloest werden //muesten. #56977# #55001# #56135# const SfxPoolItem *pItem; - if( GetDepends() && SfxItemState::SET == pNode->GetSwAttrSet(). + if( HasWriterListeners() && SfxItemState::SET == pNode->GetSwAttrSet(). GetItemState( RES_PAGEDESC, true, &pItem ) ) { pNode->ModifyNotification( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem ); @@ -2009,7 +2009,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx, TryDeleteSwpHints(); } - if ( GetDepends() ) + if ( HasWriterListeners() ) { SwInsTxt aHint( aPos, nLen ); NotifyClients( 0, &aHint ); @@ -2779,7 +2779,7 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos ) AddToList(); } - if( GetDepends() ) + if( HasWriterListeners() ) MakeFrms( *pNew ); return pNew; } diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index bdba213d0899..6d4f283053ef 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -3187,7 +3187,7 @@ bool SwpHints::TryInsertHint( CHECK; #endif // ... und die Abhaengigen benachrichtigen - if(rNode.GetDepends()) + if(rNode.HasWriterListeners()) { SwUpdateAttr aHint( nHtStart, @@ -3271,7 +3271,7 @@ bool SwpHints::TryInsertHint( } // ... und die Abhaengigen benachrichtigen - if ( rNode.GetDepends() ) + if ( rNode.HasWriterListeners() ) { SwUpdateAttr aHint( nHtStart, diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 9bcf55ee4de7..fd07513c3454 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1126,7 +1126,7 @@ void _SaveTable::NewFrmFmt( const SwTableLine* pTblLn, const SwTableBox* pTblBx, pFmt->ModifyNotification( (SfxPoolItem*)&rOld, (SfxPoolItem*)&rNew ); } - if( !pOldFmt->GetDepends() ) + if( !pOldFmt->HasWriterListeners() ) delete pOldFmt; } @@ -1345,7 +1345,7 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl { SwFrmFmt* pOld = pBox->GetFrmFmt(); pBox->RegisterToFormat( *pFmt ); - if( !pOld->GetDepends() ) + if( !pOld->HasWriterListeners() ) delete pOld; pBox->setRowSpan( nRowSpan ); diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 0c501d59c3ca..8f34f15ffc39 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2462,7 +2462,7 @@ void SAL_CALL SwChartDataSequence::dispose( ) //SwChartDataSequence::Dispose(), release the relationship //here... SwModify* pLclRegisteredIn = GetRegisteredInNonConst(); - if (pLclRegisteredIn && pLclRegisteredIn->GetDepends()) + if (pLclRegisteredIn && pLclRegisteredIn->HasWriterListeners()) { pLclRegisteredIn->Remove(this); pTblCrsr = NULL; diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index cf37dbe0ae2b..4fdf00b7d796 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2019,7 +2019,7 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt ) { SwHiddenParaFieldType* pFldType = static_cast<SwHiddenParaFieldType*>(GetDoc()-> getIDocumentFieldsAccess().GetSysFldType(RES_HIDDENPARAFLD)); - if( pFldType && pFldType->GetDepends() ) + if( pFldType && pFldType->HasWriterListeners() ) { SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT ); pFldType->ModifyNotification( &aHnt, 0); diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index f174d2d623e0..d7fa97ac5e0c 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -270,7 +270,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) pDoc->GetIDocumentUndoRedo().DoUndo(false); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); } - if( pFrmFmt->GetDepends() ) + if( pFrmFmt->HasWriterListeners() ) { // Draw-Objects create a Frame when being inserted; thus delete them pFrmFmt->DelFrms(); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 09464e69fc99..247dda169e18 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -192,7 +192,7 @@ void SwFldRefPage::Reset(const SfxItemSet* ) { SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFldType(n, RES_SETEXPFLD)); - if ((nsSwGetSetExpType::GSE_SEQ & pType->GetType()) && pType->GetDepends() && pSh->IsUsed(*pType)) + if ((nsSwGetSetExpType::GSE_SEQ & pType->GetType()) && pType->HasWriterListeners() && pSh->IsUsed(*pType)) { nPos = m_pTypeLB->InsertEntry(pType->GetName()); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>((sal_uIntPtr)(REFFLDFLAG | n))); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 9fd73cc9ef39..90e7a99ab9ca 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1360,7 +1360,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwCondCollCondChg aMsg( pColl ); pColl->ModifyNotification( &aMsg, &aMsg ); } - else if( pCondItem && !pColl->GetDepends() ) + else if( pCondItem && !pColl->HasWriterListeners() ) { // no conditional template, then first create and adopt // all important values diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index fa79923229bf..1f00241779c7 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -261,7 +261,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, else pFmt = rSh.GetCharFmtFromPool( nCharPoolId ); - if( !pFmt->GetDepends() ) // set attributes + if( !pFmt->HasWriterListeners() ) // set attributes for( sal_uInt16 n = aItems.size(); n; ) pFmt->SetFmtAttr( aItems[ --n ] ); } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 36eeeabc2a78..d9d01b7cb068 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4078,11 +4078,11 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions) // below should only change if necessary, that is if respective content is present const bool bContainsHiddenChars = m_pShell->GetDoc()->ContainsHiddenChars(); const SwFieldType* pFldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFldType( RES_HIDDENTXTFLD ); - const bool bContainsHiddenFields = pFldType && pFldType->GetDepends(); + const bool bContainsHiddenFields = pFldType && pFldType->HasWriterListeners(); pFldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFldType( RES_HIDDENPARAFLD ); - const bool bContainsHiddenParagraphs = pFldType && pFldType->GetDepends(); + const bool bContainsHiddenParagraphs = pFldType && pFldType->HasWriterListeners(); pFldType = m_pShell->GetDoc()->getIDocumentFieldsAccess().GetSysFldType( RES_JUMPEDITFLD ); - const bool bContainsPlaceHolders = pFldType && pFldType->GetDepends(); + const bool bContainsPlaceHolders = pFldType && pFldType->HasWriterListeners(); const bool bContainsFields = m_pShell->IsAnyFieldInDoc(); SwViewOption aRenderViewOptions( m_aOldViewOptions ); |