LibreOffice Module sw (master) 1
Public Member Functions | Protected Attributes | Private Attributes | List of all members
SwTextFrameBreak Class Reference

#include <widorp.hxx>

Inheritance diagram for SwTextFrameBreak:
[legend]
Collaboration diagram for SwTextFrameBreak:
[legend]

Public Member Functions

 SwTextFrameBreak (SwTextFrame *pFrame, const SwTwips nRst=0)
 
bool IsBreakNow (SwTextMargin &rLine)
 
bool IsKeepAlways () const
 
void SetKeep (const bool bNew)
 
bool IsInside (SwTextMargin const &rLine) const
 BP 18.6.93: Widows. More...
 
void SetRstHeight (const SwTextMargin &rLine)
 

Protected Attributes

SwTextFramem_pFrame
 
bool m_bBreak
 
bool m_bKeep
 

Private Attributes

SwTwips m_nRstHeight
 
SwTwips m_nOrigin
 

Detailed Description

Definition at line 26 of file widorp.hxx.

Constructor & Destructor Documentation

◆ SwTextFrameBreak()

SwTextFrameBreak::SwTextFrameBreak ( SwTextFrame pFrame,
const SwTwips  nRst = 0 
)

Member Function Documentation

◆ IsBreakNow()

bool SwTextFrameBreak::IsBreakNow ( SwTextMargin rLine)

◆ IsInside()

bool SwTextFrameBreak::IsInside ( SwTextMargin const &  rLine) const

BP 18.6.93: Widows.

In contrast to the first implementation the Widows are not calculated in advance but detected when formatting the split Follow. In Master the Widows-calculation is dropped completely (nWidows is manipulated). If the Follow detects that the Widows rule applies it sends a Prepare to its predecessor. A special problem is when the Widow rule applies but in Master there are some lines available.

BP(22.07.92): Calculation of Widows and Orphans. The method returns true if one of the rules matches.

One difficulty with Widows and different formats between Master- and Follow-Frame: Example: If the first column is 3cm and the second is 4cm and Widows is set to 3, the decision if the Widows rule matches can not be done until the Follow is formatted. Unfortunately this is crucial to decide if the whole paragraph goes to the next page or not.

Definition at line 106 of file widorp.cxx.

References SwPageFrame::CheckPageHeightValidForHideWhitespace(), SwFrame::FindFootnoteBossFrame(), SwFrame::FindPageFrame(), SwRectFnSet::GetBottomMargin(), SwTextIter::GetEnd(), SwTextFrame::GetFollow(), SwContentFrame::GetFollow(), SwRectFnSet::GetHeight(), SwFrame::GetIndNext(), SwTextIter::GetLineHeight(), SwTextIter::GetNext(), SwContentFrame::GetNextContentFrame(), SwRectFnSet::GetPrtBottom(), SwFrame::GetUpper(), SwTextFrame::GrowTst(), SwFrame::IsInTab(), SwFrame::IsVertical(), LONG_MAX, m_nOrigin, m_nRstHeight, m_pFrame, SwAttrIter::MaybeHasHints(), SwTextFrame::RemoveFootnote(), SAL_INFO_IF, swap(), SwTextFrame::SwitchHorizontalToVertical(), SwTextIter::Y(), and SwRectFnSet::YDiff().

Referenced by SwTextFrame::FormatAdjust(), IsBreakNow(), WidowsAndOrphans::WouldFit(), and SwTextFrame::WouldFit().

◆ IsKeepAlways()

bool SwTextFrameBreak::IsKeepAlways ( ) const
inline

Definition at line 38 of file widorp.hxx.

References m_bKeep.

Referenced by SwTextFrame::CalcPreps(), and SwTextFrame::WouldFit().

◆ SetKeep()

void SwTextFrameBreak::SetKeep ( const bool  bNew)
inline

Definition at line 40 of file widorp.hxx.

References m_bKeep.

Referenced by SwTextFrame::CalcPreps(), and SwTextFrame::Format_().

◆ SetRstHeight()

void SwTextFrameBreak::SetRstHeight ( const SwTextMargin rLine)

Member Data Documentation

◆ m_bBreak

bool SwTextFrameBreak::m_bBreak
protected

Definition at line 33 of file widorp.hxx.

Referenced by IsBreakNow(), and SwTextFrameBreak().

◆ m_bKeep

bool SwTextFrameBreak::m_bKeep
protected

◆ m_nOrigin

SwTwips SwTextFrameBreak::m_nOrigin
private

Definition at line 30 of file widorp.hxx.

Referenced by IsInside(), SetRstHeight(), and SwTextFrameBreak().

◆ m_nRstHeight

SwTwips SwTextFrameBreak::m_nRstHeight
private

Definition at line 29 of file widorp.hxx.

Referenced by IsInside(), SetRstHeight(), and SwTextFrameBreak().

◆ m_pFrame

SwTextFrame* SwTextFrameBreak::m_pFrame
protected

The documentation for this class was generated from the following files: