convert DEFINE to anonymous function
Change-Id: I9b62f02ac0013d1da13c176155c5742972a43fe3
This commit is contained in:
@@ -579,9 +579,15 @@ static SwContentFrame* lcl_GetNextContentFrame( const SwLayoutFrame* pLay, bool
|
|||||||
return pContentFrame;
|
return pContentFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FIRSTLEAF( pLayFrame ) ( ( pLayFrame->Lower() && pLayFrame->Lower()->IsColumnFrame() )\
|
namespace
|
||||||
? pLayFrame->GetNextLayoutLeaf() \
|
{
|
||||||
: pLayFrame )
|
SwLayoutFrame* FirstLeaf(SwSectionFrame* pLayFrame)
|
||||||
|
{
|
||||||
|
if (pLayFrame->Lower() && pLayFrame->Lower()->IsColumnFrame())
|
||||||
|
return pLayFrame->GetNextLayoutLeaf();
|
||||||
|
return pLayFrame;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* pDel, bool bSave )
|
void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* pDel, bool bSave )
|
||||||
{
|
{
|
||||||
@@ -633,7 +639,7 @@ void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* pDel, bool bSave )
|
|||||||
{ // Search for the appropriate insert position
|
{ // Search for the appropriate insert position
|
||||||
if( pNxtSct && pNxtSct->GetFormat() == pParent )
|
if( pNxtSct && pNxtSct->GetFormat() == pParent )
|
||||||
{ // Here we can insert outselves at the beginning
|
{ // Here we can insert outselves at the beginning
|
||||||
pUp = FIRSTLEAF( pNxtSct );
|
pUp = FirstLeaf( pNxtSct );
|
||||||
pPrv = nullptr;
|
pPrv = nullptr;
|
||||||
if( pPrvSct && !( pPrvSct->GetFormat() == pParent ) )
|
if( pPrvSct && !( pPrvSct->GetFormat() == pParent ) )
|
||||||
pPrvSct = nullptr; // In order that nothing is merged
|
pPrvSct = nullptr; // In order that nothing is merged
|
||||||
@@ -665,7 +671,7 @@ void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* pDel, bool bSave )
|
|||||||
pPrvSct->Init();
|
pPrvSct->Init();
|
||||||
SWRECTFN( pUp )
|
SWRECTFN( pUp )
|
||||||
(pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, true );
|
(pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, true );
|
||||||
pUp = FIRSTLEAF( pPrvSct );
|
pUp = FirstLeaf( pPrvSct );
|
||||||
pPrv = nullptr;
|
pPrv = nullptr;
|
||||||
}
|
}
|
||||||
pPrvSct = nullptr; // Such that nothing will be merged
|
pPrvSct = nullptr; // Such that nothing will be merged
|
||||||
@@ -1460,7 +1466,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
|
|||||||
if( WrongPageDesc( pPg ) )
|
if( WrongPageDesc( pPg ) )
|
||||||
bWrongPage = true;
|
bWrongPage = true;
|
||||||
else
|
else
|
||||||
return FIRSTLEAF( pSect->GetFollow() );
|
return FirstLeaf( pSect->GetFollow() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1488,7 +1494,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
|
|||||||
if( WrongPageDesc( pNxtPg ) )
|
if( WrongPageDesc( pNxtPg ) )
|
||||||
bWrongPage = true;
|
bWrongPage = true;
|
||||||
else
|
else
|
||||||
return FIRSTLEAF( pSect->GetFollow() );
|
return FirstLeaf( pSect->GetFollow() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1641,7 +1647,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
|
|||||||
pNew->SimpleFormat();
|
pNew->SimpleFormat();
|
||||||
}
|
}
|
||||||
// The wanted layout sheet is now the first of the determined SctFrames:
|
// The wanted layout sheet is now the first of the determined SctFrames:
|
||||||
pLayLeaf = FIRSTLEAF( pNew );
|
pLayLeaf = FirstLeaf( pNew );
|
||||||
}
|
}
|
||||||
return pLayLeaf;
|
return pLayLeaf;
|
||||||
}
|
}
|
||||||
@@ -1802,7 +1808,7 @@ SwLayoutFrame *SwFrame::GetPrevSctLeaf( MakePageType )
|
|||||||
SWRECTFN( pNew )
|
SWRECTFN( pNew )
|
||||||
(pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), true );
|
(pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), true );
|
||||||
|
|
||||||
pLayLeaf = FIRSTLEAF( pNew );
|
pLayLeaf = FirstLeaf( pNew );
|
||||||
if( !pNew->Lower() ) // Format single column sections
|
if( !pNew->Lower() ) // Format single column sections
|
||||||
{
|
{
|
||||||
pNew->MakePos();
|
pNew->MakePos();
|
||||||
@@ -1813,7 +1819,7 @@ SwLayoutFrame *SwFrame::GetPrevSctLeaf( MakePageType )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pLayLeaf = FIRSTLEAF( pNew );
|
pLayLeaf = FirstLeaf( pNew );
|
||||||
if( pLayLeaf->IsColBodyFrame() )
|
if( pLayLeaf->IsColBodyFrame() )
|
||||||
{
|
{
|
||||||
// In existent section columns we're looking for the last not empty
|
// In existent section columns we're looking for the last not empty
|
||||||
|
Reference in New Issue
Block a user