diff options
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b973507a21ea..3145da01039a 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2960,10 +2960,16 @@ void SwTabFramePainter::Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxIte { // build 4 line entries for the 4 borders: SwRect aBorderRect = rFrame.Frame(); - if ( rFrame.IsTabFrame() ) - { - aBorderRect = rFrame.Prt(); - aBorderRect.Pos() += rFrame.Frame().Pos(); + // Frame area of a table might be larger than the containing frame + // so we have to intersect the border rect with upper frames til + // the first frame that is not part of a table. + const SwLayoutFrame *pUpper = rFrame.GetUpper(); + while(pUpper) + { + aBorderRect.Intersection(pUpper->Frame()); + if (!pUpper->IsInTab()) + break; + pUpper = pUpper->GetUpper(); } bool const bBottomAsTop(lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines( |