summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentLayoutManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/DocumentLayoutManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index fe7313af3b9a..a20c75f41d9a 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -47,8 +47,8 @@ namespace sw
DocumentLayoutManager::DocumentLayoutManager( SwDoc& i_rSwdoc ) :
m_rDoc( i_rSwdoc ),
- mpCurrentView( 0 ),
- mpLayouter( 0 )
+ mpCurrentView( nullptr ),
+ mpLayouter( nullptr )
{
}
@@ -72,20 +72,20 @@ const SwRootFrm *DocumentLayoutManager::GetCurrentLayout() const
{
if(GetCurrentViewShell())
return GetCurrentViewShell()->GetLayout();
- return 0;
+ return nullptr;
}
SwRootFrm *DocumentLayoutManager::GetCurrentLayout()
{
if(GetCurrentViewShell())
return GetCurrentViewShell()->GetLayout();
- return 0;
+ return nullptr;
}
bool DocumentLayoutManager::HasLayout() const
{
// if there is a view, there is always a layout
- return (mpCurrentView != 0);
+ return (mpCurrentView != nullptr);
}
SwLayouter* DocumentLayoutManager::GetLayouter()
@@ -109,7 +109,7 @@ void DocumentLayoutManager::SetLayouter( SwLayouter* pNew )
If there already is a fitting format, it is returned instead. */
SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, const SfxItemSet* pSet )
{
- SwFrameFormat *pFormat = 0;
+ SwFrameFormat *pFormat = nullptr;
const bool bMod = m_rDoc.getIDocumentState().IsModified();
bool bHeader = false;
@@ -210,7 +210,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
m_rDoc.SetAttr( aChain, *rChain.GetNext() );
}
- const SwNodeIndex* pCntIdx = 0;
+ const SwNodeIndex* pCntIdx = nullptr;
// The draw format doesn't own its content, it just has a pointer to it.
if (pFormat->Which() != RES_DRAWFRMFMT)
pCntIdx = pFormat->GetContent().GetContentIdx();
@@ -254,7 +254,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
if ( nWh == RES_FLYFRMFMT )
{
// determine frame formats of at-frame anchored objects
- const SwNodeIndex* pContentIdx = 0;
+ const SwNodeIndex* pContentIdx = nullptr;
if (pFormat->Which() != RES_DRAWFRMFMT)
pContentIdx = pFormat->GetContent().GetContentIdx();
if (pContentIdx)
@@ -292,7 +292,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
if( pCntIdx )
{
SwNode *pNode = &pCntIdx->GetNode();
- const_cast<SwFormatContent&>(static_cast<const SwFormatContent&>(pFormat->GetFormatAttr( RES_CNTNT ))).SetNewContentIdx( 0 );
+ const_cast<SwFormatContent&>(static_cast<const SwFormatContent&>(pFormat->GetFormatAttr( RES_CNTNT ))).SetNewContentIdx( nullptr );
m_rDoc.getIDocumentContentOperations().DeleteSection( pNode );
}
@@ -358,14 +358,14 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
(FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
rNewAnchor.GetContentAnchor() &&
m_rDoc.IsInHeaderFooter( rNewAnchor.GetContentAnchor()->nNode ) &&
- pDrawContact != NULL &&
- pDrawContact->GetMaster() != NULL &&
+ pDrawContact != nullptr &&
+ pDrawContact->GetMaster() != nullptr &&
CheckControlLayer( pDrawContact->GetMaster() );
}
// just return if we can't copy this
if( bMayNotCopy )
- return NULL;
+ return nullptr;
SwFrameFormat* pDest = m_rDoc.GetDfltFrameFormat();
if( rSource.GetRegisteredIn() != pSrcDoc->GetDfltFrameFormat() )
@@ -444,7 +444,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
//contact object itself. They should be managed by SwUndoInsLayFormat.
const ::sw::DrawUndoGuard drawUndoGuard(m_rDoc.GetIDocumentUndoRedo());
- pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( aRg, 0, aIdx, NULL, false, true, true );
+ pSrcDoc->GetDocumentContentOperationsManager().CopyWithFlyInFly( aRg, 0, aIdx, nullptr, false, true, true );
}
else
{
@@ -530,7 +530,7 @@ void DocumentLayoutManager::ClearSwLayouterEntries()
DocumentLayoutManager::~DocumentLayoutManager()
{
delete mpLayouter;
- mpLayouter = 0L;
+ mpLayouter = nullptr;
}
}