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 ( SwTextFrame pFrame,
const SwTwips  nRst = 0 
)

Member Function Documentation

bool SwTextFrameBreak::IsBreakNow ( SwTextMargin rLine)
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 104 of file widorp.cxx.

References SwFlowFrame::CalcAddLowerSpaceAsLastInTableCell(), SwPageFrame::CheckPageHeightValidForHideWhitespace(), SwFrame::FindPageFrame(), SwRectFnSet::GetBottomMargin(), SwTextFrame::GetFollow(), SwFrame::GetIndNext(), SwTextIter::GetLineHeight(), SwTextIter::GetNext(), SwRectFnSet::GetPrtBottom(), SwFrame::GetUpper(), SwTextFrame::GrowTst(), SwFrame::IsInTab(), SwFrame::IsVertical(), LONG_MAX, m_nOrigin, m_nRstHeight, m_pFrame, swap(), SwTextFrame::SwitchHorizontalToVertical(), SwTextIter::Y(), and SwRectFnSet::YDiff().

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

bool SwTextFrameBreak::IsKeepAlways ( ) const
inline

Definition at line 38 of file widorp.hxx.

References m_bKeep.

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

void SwTextFrameBreak::SetKeep ( const bool  bNew)
inline

Definition at line 40 of file widorp.hxx.

Referenced by SwTextFrame::CalcPreps().

void SwTextFrameBreak::SetRstHeight ( const SwTextMargin rLine)

Member Data Documentation

bool SwTextFrameBreak::m_bBreak
protected

Definition at line 33 of file widorp.hxx.

Referenced by IsBreakNow(), and SwTextFrameBreak().

bool SwTextFrameBreak::m_bKeep
protected
SwTwips SwTextFrameBreak::m_nOrigin
private

Definition at line 30 of file widorp.hxx.

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

SwTwips SwTextFrameBreak::m_nRstHeight
private

Definition at line 29 of file widorp.hxx.

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

SwTextFrame* SwTextFrameBreak::m_pFrame
protected

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