summaryrefslogtreecommitdiffstats
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/layact.cxx12
-rw-r--r--sw/source/core/layout/paintfrm.cxx3
-rw-r--r--sw/source/core/layout/tabfrm.cxx15
3 files changed, 26 insertions, 4 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index a705ef2511..1a0a1260a1 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -809,6 +809,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
unlockPositionOfObjects( pPg );
pPg = static_cast<SwPageFrame*>(pPg->GetNext());
}
+ if (m_pRoot->IsSuperfluous()) // could be newly set now!
+ {
+ bool bOld = IsAgain();
+ m_pRoot->RemoveSuperfluous();
+ SetAgain(bOld);
+ }
// reset flag for special interrupt content formatting.
mbFormatContentOnInterrupt = false;
}
@@ -1433,7 +1439,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
PopFormatLayout();
}
}
- // else: don't calc content frames any more
+ else if (pLay->IsSctFrame() && pLow->IsTextFrame() && pLow == pLay->GetLastLower())
+ {
+ // else: only calc the last text lower of sections
+ pLow->OptCalc();
+ }
if ( IsAgain() )
return false;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 0f048c4e80..5472695e97 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7012,7 +7012,8 @@ void SwPageFrame::RefreshSubsidiary( const SwRect &rRect ) const
void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage,
const SwRect &rRect ) const
{
- const bool bSubsOpt = isSubsidiaryLinesEnabled() || isSubsidiaryLinesForSectionsEnabled();
+ const bool bSubsOpt
+ = isSubsidiaryLinesEnabled() || (IsSctFrame() && isSubsidiaryLinesForSectionsEnabled());
if ( bSubsOpt )
PaintSubsidiaryLines( pPage, rRect );
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c4a742c037..adffbba177 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1165,7 +1165,13 @@ bool SwTabFrame::Split(const SwTwips nCutPos, bool bTryToSplit,
OSL_ENSURE( !GetIndPrev(), "Table is supposed to be at beginning" );
if ( !IsInSct() )
{
- m_pTable->SetRowsToRepeat(0);
+ // This would mean the layout modifies the doc model, so RowsToRepeat drops to 0 while
+ // there are existing row frames with RepeatedHeadline == true. Avoid this at least
+ // inside split flys, it would lead to a crash in SwTabFrame::MakeAll().
+ if (!pFly || !pFly->IsFlySplitAllowed())
+ {
+ m_pTable->SetRowsToRepeat(0);
+ }
return false;
}
else
@@ -1517,7 +1523,8 @@ namespace
}
}
}
- if (rTab.IsCollapsingBorders() && !rCell.Lower()->IsRowFrame())
+ assert(rCell.Lower());
+ if (rTab.IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrame())
{
if (rRow.GetTopMarginForLowers() != 0
|| rRow.GetBottomMarginForLowers() != 0)
@@ -6371,6 +6378,10 @@ void SwTabFrame::dumpAsXml(xmlTextWriterPtr writer) const
{
(void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("tab"));
SwFrame::dumpAsXmlAttributes( writer );
+
+ (void)xmlTextWriterWriteAttribute(writer, BAD_CAST("has-follow-flow-line"),
+ BAD_CAST(OString::boolean(m_bHasFollowFlowLine).getStr()));
+
if ( HasFollow() )
(void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() );