diff options
authorMiklos Vajna <>2017-06-16 08:35:05 +0200
committerMiklos Vajna <>2017-06-16 12:58:38 +0200
commit6ade80cf142664e78954c7544534e9436ceb90c7 (patch)
parent559b641b3ff3500547bf7c79741e1e5b4414d404 (diff)
tdf#108524 sw: allow move of frame inside section without columns
The intention here is to deny the move of a frame that's inside a table inside a section. But the code also checked if there a column frame in-between, so it allowed the move for a frame in a section with 2 cols, but not without columns (which does not sound intentional, since that's a simpler case). So drop the requirement to have a column frame between the argument and the section frame, just check that there is no table frame in between. This is needed, but not enough to split the section in the bugdoc (but at least now the content of the section is marked as movable). Change-Id: I9155b291a19c692efc30f01f8e206fac5f1ccf81 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Miklos Vajna <>
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 490a95439715..74942256bef4 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1252,17 +1252,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();
@@ -1289,7 +1286,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;