summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode/node.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r--sw/source/core/docnode/node.cxx140
1 files changed, 70 insertions, 70 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 1ecd44b818fe..6b2eac765d70 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -87,7 +87,7 @@ void GetNewAutoStyle( std::shared_ptr<const SfxItemSet>& rpAttrSet,
{
const SwAttrSet* pAttrSet = static_cast<const SwAttrSet*>(rpAttrSet.get());
if( rNode.GetModifyAtAttr() )
- const_cast<SwAttrSet*>(pAttrSet)->SetModifyAtAttr( 0 );
+ const_cast<SwAttrSet*>(pAttrSet)->SetModifyAtAttr( nullptr );
IStyleAccess& rSA = pAttrSet->GetPool()->GetDoc()->GetIStyleAccess();
rpAttrSet = rSA.getAutomaticStyle( rNewAttrSet, rNode.IsTextNode() ?
IStyleAccess::AUTO_STYLE_PARA :
@@ -105,7 +105,7 @@ void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
OSL_ENSURE( pAttrSet, "no SwAttrSet" );
OSL_ENSURE( pParentFormat || !pConditionalFormat, "ConditionalFormat without ParentFormat?" );
- const SwAttrSet* pParentSet = pParentFormat ? &pParentFormat->GetAttrSet() : 0;
+ const SwAttrSet* pParentSet = pParentFormat ? &pParentFormat->GetAttrSet() : nullptr;
if ( pParentSet != pAttrSet->GetParent() )
{
@@ -149,7 +149,7 @@ bool Put( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNo
SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
// #i76273# Robust
- SfxItemSet* pStyleNames = 0;
+ SfxItemSet* pStyleNames = nullptr;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
@@ -197,7 +197,7 @@ bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
// #i76273# Robust
- SfxItemSet* pStyleNames = 0;
+ SfxItemSet* pStyleNames = nullptr;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
@@ -289,14 +289,14 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
#ifdef DBG_UTIL
, m_nSerial( s_nSerial++)
#endif
- , m_pStartOfSection( 0 )
+ , m_pStartOfSection( nullptr )
{
if( rWhere.GetIndex() )
{
SwNodes& rNodes = const_cast<SwNodes&> (rWhere.GetNodes());
SwNode* pNd = rNodes[ rWhere.GetIndex() -1 ];
rNodes.InsertNode( this, rWhere );
- if( 0 == ( m_pStartOfSection = pNd->GetStartNode()) )
+ if( nullptr == ( m_pStartOfSection = pNd->GetStartNode()) )
{
m_pStartOfSection = pNd->m_pStartOfSection;
if( pNd->GetEndNode() ) // Skip EndNode ? Section
@@ -322,13 +322,13 @@ SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
#ifdef DBG_UTIL
, m_nSerial( s_nSerial++)
#endif
- , m_pStartOfSection( 0 )
+ , m_pStartOfSection( nullptr )
{
if( nPos )
{
SwNode* pNd = rNodes[ nPos - 1 ];
rNodes.InsertNode( this, nPos );
- if( 0 == ( m_pStartOfSection = pNd->GetStartNode()) )
+ if( nullptr == ( m_pStartOfSection = pNd->GetStartNode()) )
{
m_pStartOfSection = pNd->m_pStartOfSection;
if( pNd->GetEndNode() ) // Skip EndNode ? Section!
@@ -383,7 +383,7 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const
if( pSh )
{
const SwFrm* pFrm;
- if( pNd && 0 != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), 0, 0, false ) ) )
+ if( pNd && nullptr != ( pFrm = pNd->getLayoutFrm( pSh->GetLayout(), nullptr, nullptr, false ) ) )
{
if ( pFrm->IsInTab() )
@@ -419,10 +419,10 @@ bool SwNode::IsProtect() const
if( pSttNd && static_cast<const SwSectionNode*>(pSttNd)->GetSection().IsProtectFlag() )
return true;
- if( 0 != ( pSttNd = FindTableBoxStartNode() ) )
+ if( nullptr != ( pSttNd = FindTableBoxStartNode() ) )
{
SwContentFrm* pCFrm;
- if( IsContentNode() && 0 != (pCFrm = static_cast<const SwContentNode*>(this)->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ))
+ if( IsContentNode() && nullptr != (pCFrm = static_cast<const SwContentNode*>(this)->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ))
return pCFrm->IsProtected();
const SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().
@@ -441,7 +441,7 @@ bool SwNode::IsProtect() const
return rAnchor.GetContentAnchor() && rAnchor.GetContentAnchor()->nNode.GetNode().IsProtect();
}
- if( 0 != ( pSttNd = FindFootnoteStartNode() ) )
+ if( nullptr != ( pSttNd = FindFootnoteStartNode() ) )
{
const SwTextFootnote* pTFootnote = GetDoc()->GetFootnoteIdxs().SeekEntry(
SwNodeIndex( *pSttNd ) );
@@ -459,10 +459,10 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
{
if ( !GetNodes().IsDocNodes() )
{
- return 0;
+ return nullptr;
}
- const SwPageDesc* pPgDesc = 0;
+ const SwPageDesc* pPgDesc = nullptr;
const SwContentNode* pNode;
if( ND_STARTNODE & m_nNodeType )
@@ -487,8 +487,8 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
{
const SwFrm* pFrm;
const SwPageFrm* pPage;
- if( pNode && 0 != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, bCalcLay ) ) &&
- 0 != ( pPage = pFrm->FindPageFrm() ) )
+ if( pNode && nullptr != ( pFrm = pNode->getLayoutFrm( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr, bCalcLay ) ) &&
+ nullptr != ( pPage = pFrm->FindPageFrm() ) )
{
pPgDesc = pPage->GetPageDesc();
if ( pPgDescNdIdx )
@@ -505,10 +505,10 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
const SwNode* pNd = this;
const SwStartNode* pSttNd;
if( pNd->GetIndex() < GetNodes().GetEndOfExtras().GetIndex() &&
- 0 != ( pSttNd = pNd->FindFlyStartNode() ) )
+ nullptr != ( pSttNd = pNd->FindFlyStartNode() ) )
{
// Find the right Anchor first
- const SwFrameFormat* pFormat = 0;
+ const SwFrameFormat* pFormat = nullptr;
const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
for( size_t n = 0; n < rFormats.size(); ++n )
@@ -545,14 +545,14 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( pFormat == pFrameFormat )
{
pNd = pFlyNd;
- pFlyNd = 0;
+ pFlyNd = nullptr;
break;
}
pAnchor = &pFrameFormat->GetAnchor();
if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetContentAnchor() )
{
- pFlyNd = 0;
+ pFlyNd = nullptr;
break;
}
@@ -564,7 +564,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( n >= rFormats.size() )
{
OSL_ENSURE( false, "FlySection, but no Format found" );
- return 0;
+ return nullptr;
}
}
}
@@ -577,13 +577,13 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( pNd->GetIndex() > GetNodes().GetEndOfAutotext().GetIndex() )
{
pPgDesc = &pDoc->GetPageDesc( 0 );
- pNd = 0;
+ pNd = nullptr;
}
else
{
// Find the Body text node
- if( 0 != ( pSttNd = pNd->FindHeaderStartNode() ) ||
- 0 != ( pSttNd = pNd->FindFooterStartNode() ))
+ if( nullptr != ( pSttNd = pNd->FindHeaderStartNode() ) ||
+ nullptr != ( pSttNd = pNd->FindFooterStartNode() ))
{
// Then find this StartNode in the PageDescs
sal_uInt16 nId;
@@ -629,15 +629,15 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
if( !pPgDesc )
pPgDesc = &pDoc->GetPageDesc( 0 );
- pNd = 0;
+ pNd = nullptr;
}
- else if( 0 != ( pSttNd = pNd->FindFootnoteStartNode() ))
+ else if( nullptr != ( pSttNd = pNd->FindFootnoteStartNode() ))
{
// the Anchor can only be in the Body text
const SwTextFootnote* pTextFootnote;
const SwFootnoteIdxs& rFootnoteArr = pDoc->GetFootnoteIdxs();
for( size_t n = 0; n < rFootnoteArr.size(); ++n )
- if( 0 != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
+ if( nullptr != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
static_cast<SwNode const *>(pSttNd) ==
&pTextFootnote->GetStartNode()->GetNode() )
{
@@ -653,7 +653,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
"Where is this Node?" );
pPgDesc = &pDoc->GetPageDesc( 0 );
- pNd = 0;
+ pNd = nullptr;
}
}
}
@@ -666,7 +666,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
for( i = 0; i < nMaxItems; ++i )
{
const SfxPoolItem* pItem;
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
+ if( nullptr != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
static_cast<const SwFormatPageDesc*>(pItem)->GetDefinedIn() )
{
const SwModify* pMod = static_cast<const SwFormatPageDesc*>(pItem)->GetDefinedIn();
@@ -677,7 +677,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
}
}
- if( 0 != ( pNd = aInfo.GetFoundNode() ))
+ if( nullptr != ( pNd = aInfo.GetFoundNode() ))
{
if( pNd->IsContentNode() )
pPgDesc = static_cast<const SwFormatPageDesc&>(pNd->GetContentNode()->
@@ -703,7 +703,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
/// If the node is located in a Fly, we return it formatted accordingly
SwFrameFormat* SwNode::GetFlyFormat() const
{
- SwFrameFormat* pRet = 0;
+ SwFrameFormat* pRet = nullptr;
const SwNode* pSttNd = FindFlyStartNode();
if( pSttNd )
{
@@ -738,7 +738,7 @@ SwFrameFormat* SwNode::GetFlyFormat() const
SwTableBox* SwNode::GetTableBox() const
{
- SwTableBox* pBox = 0;
+ SwTableBox* pBox = nullptr;
const SwNode* pSttNd = FindTableBoxStartNode();
if( pSttNd )
pBox = const_cast<SwTableBox*>(pSttNd->FindTableNode()->GetTable().GetTableBox(
@@ -752,12 +752,12 @@ SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp )
while( eTyp != pTmp->GetStartNodeType() && pTmp->GetIndex() )
pTmp = pTmp->m_pStartOfSection;
- return eTyp == pTmp->GetStartNodeType() ? pTmp : 0;
+ return eTyp == pTmp->GetStartNodeType() ? pTmp : nullptr;
}
const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
{
- const SwTextNode* pRet = 0;
+ const SwTextNode* pRet = nullptr;
const SwOutlineNodes& rONds = GetNodes().GetOutLineNds();
if( MAXLEVEL > nLvl && !rONds.empty() )
{
@@ -781,14 +781,14 @@ const SwTextNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
const SwContentNode* pCNd = GetContentNode();
Point aPt( 0, 0 );
- const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false ),
- * pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, 0, false ) : 0;
- const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : 0;
+ const SwFrm* pFrm = pRet->getLayoutFrm( pRet->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ),
+ * pMyFrm = pCNd ? pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ) : nullptr;
+ const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : nullptr;
if( pPgFrm && pMyFrm &&
pPgFrm->Frm().Top() > pMyFrm->Frm().Top() )
{
// The one asking precedes the Page, thus its invalid
- pRet = 0;
+ pRet = nullptr;
}
}
else
@@ -910,7 +910,7 @@ void SwStartNode::CheckSectionCondColl() const
sal_uLong nEndIdx = EndOfSectionIndex();
const SwNodes& rNds = GetNodes();
SwContentNode* pCNd;
- while( 0 != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
+ while( nullptr != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
pCNd->ChkCondColl();
//FEATURE::CONDCOLL
}
@@ -995,7 +995,7 @@ SwContentNode::SwContentNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType
SwFormatColl *pColl )
: SwModify( pColl ), // CrsrsShell, FrameFormat,
SwNode( rWhere, nNdType ),
- m_pCondColl( 0 ),
+ m_pCondColl( nullptr ),
mbSetModifyAtAttr( false )
{
}
@@ -1009,7 +1009,7 @@ SwContentNode::~SwContentNode()
delete m_pCondColl;
if ( mpAttrSet.get() && mbSetModifyAtAttr )
- const_cast<SwAttrSet*>(static_cast<const SwAttrSet*>(mpAttrSet.get()))->SetModifyAtAttr( 0 );
+ const_cast<SwAttrSet*>(static_cast<const SwAttrSet*>(mpAttrSet.get()))->SetModifyAtAttr( nullptr );
}
void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
@@ -1039,7 +1039,7 @@ void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNe
// Else register anyways when dying
static_cast<SwModify*>(GetRegisteredIn())->Remove( this );
if ( GetpSwAttrSet() )
- AttrSetHandleHelper::SetParent( mpAttrSet, *this, 0, 0 );
+ AttrSetHandleHelper::SetParent( mpAttrSet, *this, nullptr, nullptr );
}
}
}
@@ -1095,17 +1095,17 @@ void SwContentNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNe
bool SwContentNode::InvalidateNumRule()
{
- SwNumRule* pRule = 0;
+ SwNumRule* pRule = nullptr;
const SfxPoolItem* pItem;
if( GetNodes().IsDocNodes() &&
- 0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, true )) &&
+ nullptr != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, true )) &&
!static_cast<const SwNumRuleItem*>(pItem)->GetValue().isEmpty() &&
- 0 != (pRule = GetDoc()->FindNumRulePtr(
+ nullptr != (pRule = GetDoc()->FindNumRulePtr(
static_cast<const SwNumRuleItem*>(pItem)->GetValue() ) ) )
{
pRule->SetInvalidRule( true );
}
- return 0 != pRule;
+ return nullptr != pRule;
}
SwContentFrm *SwContentNode::getLayoutFrm( const SwRootFrm* _pRoot,
@@ -1119,8 +1119,8 @@ SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
const bool bCalcFrm ) const
{
SwRect aRet;
- SwContentFrm* pFrm = static_cast<SwContentFrm*>( ::GetFrmOfModify( 0, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
- FRM_CNTNT, pPoint, 0, bCalcFrm ) );
+ SwContentFrm* pFrm = static_cast<SwContentFrm*>( ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
+ FRM_CNTNT, pPoint, nullptr, bCalcFrm ) );
if( pFrm )
aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm();
return aRet;
@@ -1130,9 +1130,9 @@ SwRect SwContentNode::FindPageFrmRect( const bool bPrtArea, const Point* pPoint,
const bool bCalcFrm ) const
{
SwRect aRet;
- SwFrm* pFrm = ::GetFrmOfModify( 0, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
- FRM_CNTNT, pPoint, 0, bCalcFrm );
- if( pFrm && 0 != ( pFrm = pFrm->FindPageFrm() ))
+ SwFrm* pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
+ FRM_CNTNT, pPoint, nullptr, bCalcFrm );
+ if( pFrm && nullptr != ( pFrm = pFrm->FindPageFrm() ))
aRet = bPrtArea ? pFrm->Prt() : pFrm->Frm();
return aRet;
}
@@ -1156,7 +1156,7 @@ SwFormatColl *SwContentNode::ChgFormatColl( SwFormatColl *pNewColl )
// TODO: HACK: We need to recheck this condition according to the new template!
if( true /*pNewColl */ )
{
- SetCondFormatColl( 0 );
+ SetCondFormatColl( nullptr );
}
//FEATURE::CONDCOLL
@@ -1288,7 +1288,7 @@ void SwContentNode::MakeFrms( SwContentNode& rNode )
SwNode2Layout aNode2Layout( *this, rNode.GetIndex() );
- while( 0 != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) )
+ while( nullptr != (pUpper = aNode2Layout.UpperFrm( pFrm, rNode )) )
{
SwFrm *pNew = rNode.MakeFrm( pUpper );
pNew->Paste( pUpper, pFrm );
@@ -1347,7 +1347,7 @@ void SwContentNode::DelFrms( bool bIsDisposeAccTable )
SwContentFrm* pMaster = pFrm->FindMaster();
pMaster->SetFollow( pFrm->GetFollow() );
}
- pFrm->SetFollow( 0 );//So it doesn't get funny ideas.
+ pFrm->SetFollow( nullptr );//So it doesn't get funny ideas.
//Otherwise it could be possible that a follow
//gets destroyed before its master. Following
//the now invalid pointer will then lead to an
@@ -1362,7 +1362,7 @@ void SwContentNode::DelFrms( bool bIsDisposeAccTable )
OSL_ENSURE( pFootnote, "You promised a FootnoteFrm?" );
SwContentFrm* pCFrm;
if( !pFootnote->GetFollow() && !pFootnote->GetMaster() &&
- 0 != ( pCFrm = pFootnote->GetRefFromAttr()) && pCFrm->IsFollow() )
+ nullptr != ( pCFrm = pFootnote->GetRefFromAttr()) && pCFrm->IsFollow() )
{
OSL_ENSURE( pCFrm->IsTextFrm(), "NoTextFrm has Footnote?" );
static_cast<SwTextFrm*>(pCFrm->FindMaster())->Prepare( PREP_FTN_GONE );
@@ -1440,7 +1440,7 @@ bool SwContentNode::SetAttr(const SfxPoolItem& rAttr )
if( IsModifyLocked() ||
( !HasWriterListeners() && RES_PARATR_NUMRULE != rAttr.Which() ))
{
- bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rAttr );
+ bRet = nullptr != AttrSetHandleHelper::Put( mpAttrSet, *this, rAttr );
}
else
{
@@ -1466,7 +1466,7 @@ bool SwContentNode::SetAttr( const SfxItemSet& rSet )
SetInCache( false );
}
- const SfxPoolItem* pFnd = 0;
+ const SfxPoolItem* pFnd = nullptr;
if( SfxItemState::SET == rSet.GetItemState( RES_AUTO_STYLE, false, &pFnd ) )
{
OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
@@ -1494,8 +1494,8 @@ bool SwContentNode::SetAttr( const SfxItemSet& rSet )
// fact that nobody else uses the attribute set behind the handle.
// FME 2007-07-10 #i78124# If autostyle does not have a parent,
// the string is empty.
- const SfxPoolItem* pNameItem = 0;
- if ( 0 != GetCondFormatColl() ||
+ const SfxPoolItem* pNameItem = nullptr;
+ if ( nullptr != GetCondFormatColl() ||
SfxItemState::SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, false, &pNameItem ) ||
static_cast<const SfxStringItem*>(pNameItem)->GetValue().isEmpty() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFormatColl(), GetFormatColl() );
@@ -1556,7 +1556,7 @@ bool SwContentNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
nDel = ClearItemsFromAttrSet( aClearWhichIds );
}
else
- nDel = AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, 0, 0 );
+ nDel = AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, nullptr, nullptr );
if( !GetpSwAttrSet()->Count() ) // Empt? Delete
mpAttrSet.reset();
@@ -1697,7 +1697,7 @@ sal_uInt16 SwContentNode::ClearItemsFromAttrSet( const std::vector<sal_uInt16>&
const SfxPoolItem* SwContentNode::GetNoCondAttr( sal_uInt16 nWhich,
bool bInParents ) const
{
- const SfxPoolItem* pFnd = 0;
+ const SfxPoolItem* pFnd = nullptr;
if( m_pCondColl && m_pCondColl->GetRegisteredIn() )
{
if( !GetpSwAttrSet() || ( SfxItemState::SET != GetpSwAttrSet()->GetItemState(
@@ -1790,7 +1790,7 @@ void SwContentNode::SetCondFormatColl( SwFormatColl* pColl )
if( pColl )
m_pCondColl = new SwDepend( this, pColl );
else
- m_pCondColl = 0;
+ m_pCondColl = nullptr;
if( GetpSwAttrSet() )
{
@@ -1832,7 +1832,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const
nCond = PARA_IN_TABLEBODY;
const SwTableNode* pTableNd = pSttNd->FindTableNode();
const SwTableBox* pBox;
- if( pTableNd && 0 != ( pBox = pTableNd->GetTable().
+ if( pTableNd && nullptr != ( pBox = pTableNd->GetTable().
GetTableBox( pSttNd->GetIndex() ) ) && pBox &&
pBox->IsInHeadline( &pTableNd->GetTable() ) )
nCond = PARA_IN_TABLEHEAD;
@@ -1847,7 +1847,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const
const SwNode* pSrchNd = pSttNd;
for( size_t n = 0; n < rFootnoteArr.size(); ++n )
- if( 0 != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
+ if( nullptr != ( pTextFootnote = rFootnoteArr[ n ])->GetStartNode() &&
pSrchNd == &pTextFootnote->GetStartNode()->GetNode() )
{
if( pTextFootnote->GetFootnote().IsEndNote() )
@@ -1869,7 +1869,7 @@ bool SwContentNode::IsAnyCondition( SwCollCondition& rTmp ) const
}
pSttNd = pSttNd->GetIndex()
? pSttNd->StartOfSectionNode()
- : 0;
+ : nullptr;
}
}
@@ -1902,7 +1902,7 @@ void SwContentNode::ChkCondColl()
// Check, just to be sure
if( RES_CONDTXTFMTCOLL == GetFormatColl()->Which() )
{
- SwCollCondition aTmp( 0, 0, 0 );
+ SwCollCondition aTmp( nullptr, 0, 0 );
const SwCollCondition* pCColl;
bool bDone = false;
@@ -1930,12 +1930,12 @@ void SwContentNode::ChkCondColl()
HasCondition( aTmp );
}
else
- pCColl = 0;
+ pCColl = nullptr;
if( pCColl )
SetCondFormatColl( pCColl->GetTextFormatColl() );
else if( m_pCondColl )
- SetCondFormatColl( 0 );
+ SetCondFormatColl( nullptr );
}
}
}
@@ -1976,7 +1976,7 @@ short SwContentNode::GetTextDirection( const SwPosition& rPos,
SwOLENodes* SwContentNode::CreateOLENodesArray( const SwFormatColl& rColl, bool bOnlyWithInvalidSize )
{
- SwOLENodes *pNodes = 0;
+ SwOLENodes *pNodes = nullptr;
SwIterator<SwContentNode,SwFormatColl> aIter( rColl );
for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
{
@@ -2023,7 +2023,7 @@ bool SwNode::IsInRedlines() const
const SwDoc * pDoc = GetDoc();
bool bResult = false;
- if (pDoc != NULL)
+ if (pDoc != nullptr)
bResult = pDoc->getIDocumentRedlineAccess().IsInRedlines(*this);
return bResult;