summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/layout/findfrm.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 89cf31663e2c..fb5854a80c9c 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1253,17 +1253,14 @@ void SwFrame::InvalidateNextPrtArea()
}
}
-/// @returns true if the frame _directly_ sits in a section with columns
-/// but not if it sits in a table which itself sits in a section with columns.
-static bool lcl_IsInColSct( const SwFrame *pUp )
+/// @returns true if the frame _directly_ sits in a section
+/// but not if it sits in a table which itself sits in a section.
+static bool lcl_IsInSectionDirectly( const SwFrame *pUp )
{
- bool bRet = false;
while( pUp )
{
- if( pUp->IsColumnFrame() )
- bRet = true;
- else if( pUp->IsSctFrame() )
- return bRet;
+ if( pUp->IsSctFrame() )
+ return true;
else if( pUp->IsTabFrame() )
return false;
pUp = pUp->GetUpper();
@@ -1290,7 +1287,7 @@ bool SwFrame::IsMoveable( const SwLayoutFrame* _pLayoutFrame ) const
if ( _pLayoutFrame && IsFlowFrame() )
{
- if ( _pLayoutFrame->IsInSct() && lcl_IsInColSct( _pLayoutFrame ) )
+ if ( _pLayoutFrame->IsInSct() && lcl_IsInSectionDirectly( _pLayoutFrame ) )
{
bRetVal = true;
}