summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/edsect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/edit/edsect.cxx')
-rw-r--r--sw/source/core/edit/edsect.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index f508e1e5dc0d..52b3cfa02511 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -35,21 +35,21 @@ SwSection const*
SwEditShell::InsertSection(
SwSectionData & rNewData, SfxItemSet const*const pAttr)
{
- const SwSection* pRet = 0;
+ const SwSection* pRet = nullptr;
if( !IsTableMode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, nullptr );
for(SwPaM& rPaM : GetCrsr()->GetRingContainer())
{
SwSection const*const pNew =
- GetDoc()->InsertSwSection( rPaM, rNewData, 0, pAttr );
+ GetDoc()->InsertSwSection( rPaM, rNewData, nullptr, pAttr );
if( !pRet )
pRet = pNew;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
EndAllAction();
}
return pRet;
@@ -71,7 +71,7 @@ bool SwEditShell::IsInsRegionAvailable() const
const SwSection* SwEditShell::GetCurrSection() const
{
if( IsTableMode() )
- return 0;
+ return nullptr;
return SwDoc::GetCurrSection( *GetCrsr()->GetPoint() );
}
@@ -107,7 +107,7 @@ SwSection* SwEditShell::GetAnySection( bool bOutOfTab, const Point* pPt )
}
return pSect->GetSection();
}
- return NULL;
+ return nullptr;
}
size_t SwEditShell::GetSectionFormatCount() const
@@ -211,9 +211,9 @@ void SwEditShell::SetSectionAttr( const SfxItemSet& rSet,
while( aSIdx < aEIdx )
{
- if( 0 != (pSttSectNd = aSIdx.GetNode().GetSectionNode())
+ if( nullptr != (pSttSectNd = aSIdx.GetNode().GetSectionNode())
|| ( aSIdx.GetNode().IsEndNode() &&
- 0 != ( pSttSectNd = aSIdx.GetNode().
+ nullptr != ( pSttSectNd = aSIdx.GetNode().
StartOfSectionNode()->GetSectionNode())) )
_SetSectionAttr( *pSttSectNd->GetSection().GetFormat(),
rSet );
@@ -259,7 +259,7 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
const SwContentNode* pCNd;
// check the selection, if Start at Node begin and End at Node end
if( pStt->nContent.GetIndex() ||
- ( 0 == ( pCNd = pEnd->nNode.GetNode().GetContentNode() )) ||
+ ( nullptr == ( pCNd = pEnd->nNode.GetNode().GetContentNode() )) ||
pCNd->Len() != pEnd->nContent.GetIndex() )
{
nRet = 0;
@@ -304,24 +304,24 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
*/
static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
{
- const SwNode* pReturn = NULL;
+ const SwNode* pReturn = nullptr;
// the current position
- OSL_ENSURE( pCurrentPos != NULL, "Strange, we have no position!" );
+ OSL_ENSURE( pCurrentPos != nullptr, "Strange, we have no position!" );
const SwNode& rCurrentNode = pCurrentPos->nNode.GetNode();
// find innermost section or table. At the end of this scope,
// pInntermostNode contain the section/table before/after which we should
// insert our empty paragraph, or it will be NULL if none is found.
- const SwNode* pInnermostNode = NULL;
+ const SwNode* pInnermostNode = nullptr;
{
const SwNode* pTableNode = rCurrentNode.FindTableNode();
const SwNode* pSectionNode = rCurrentNode.FindSectionNode();
// find the table/section which is close
- if( pTableNode == NULL )
+ if( pTableNode == nullptr )
pInnermostNode = pSectionNode;
- else if ( pSectionNode == NULL )
+ else if ( pSectionNode == nullptr )
pInnermostNode = pTableNode;
else
{
@@ -337,7 +337,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
// inside a protected area.
// Now, pInnermostNode is NULL or the innermost section or table node.
- if( (pInnermostNode != NULL) && !pInnermostNode->IsProtect() )
+ if( (pInnermostNode != nullptr) && !pInnermostNode->IsProtect() )
{
OSL_ENSURE( pInnermostNode->IsTableNode() ||
pInnermostNode->IsSectionNode(), "wrong node found" );
@@ -380,7 +380,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
pReturn = pInnermostNode;
}
- OSL_ENSURE( ( pReturn == NULL ) || pReturn->IsStartNode() ||
+ OSL_ENSURE( ( pReturn == nullptr ) || pReturn->IsStartNode() ||
pReturn->IsEndNode(),
"SpecialInsertNode failed" );
return pReturn;
@@ -391,7 +391,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
*/
bool SwEditShell::CanSpecialInsert() const
{
- return NULL != lcl_SpecialInsertNode( GetCrsr()->GetPoint() );
+ return nullptr != lcl_SpecialInsertNode( GetCrsr()->GetPoint() );
}
/** check whether a node can be special-inserted (alt-Enter), and do so. Return
@@ -404,7 +404,7 @@ bool SwEditShell::DoSpecialInsert()
// get current node
SwPosition* pCursorPos = GetCrsr()->GetPoint();
const SwNode* pInsertNode = lcl_SpecialInsertNode( pCursorPos );
- if( pInsertNode != NULL )
+ if( pInsertNode != nullptr )
{
StartAllAction();