summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/paintfrm.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 1d1cf069385c..cd76c222b040 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2729,10 +2729,16 @@ void SwTabFramePainter::Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxIte
{
// build 4 line entries for the 4 borders:
SwRect aBorderRect = rFrame.getFrameArea();
- if ( rFrame.IsTabFrame() )
- {
- aBorderRect = rFrame.getFramePrintArea();
- aBorderRect.Pos() += rFrame.getFrameArea().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->getFrameArea());
+ if (!pUpper->IsInTab())
+ break;
+ pUpper = pUpper->GetUpper();
}
bool const bBottomAsTop(lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(