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

Collection of SwLinePortion instances, representing one line of text. More...

#include <porlay.hxx>

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

Public Member Functions

virtual SwLinePortionInsert (SwLinePortion *pPortion) override
 
virtual SwLinePortionAppend (SwLinePortion *pPortion) override
 
SwLinePortionGetFirstPortion () const
 
void ResetFlags ()
 
void SetFormatAdj (const bool bNew)
 
bool IsFormatAdj () const
 
void SetEndHyph (const bool bNew)
 
bool IsEndHyph () const
 
void SetMidHyph (const bool bNew)
 
bool IsMidHyph () const
 
void SetFly (const bool bNew)
 
bool IsFly () const
 
void SetRest (const bool bNew)
 
bool IsRest () const
 
void SetBlinking (const bool bNew)
 
bool IsBlinking () const
 
void SetContent (const bool bNew)
 
bool HasContent () const
 
void SetRedline (const bool bNew)
 
bool HasRedline () const
 
void SetForcedLeftMargin ()
 
bool HasForcedLeftMargin () const
 
void SetHanging (const bool bNew)
 
bool IsHanging () const
 
void SetUnderscore (const bool bNew)
 
bool HasUnderscore () const
 
void SetDummy (const bool bNew)
 
bool IsDummy () const
 
void SetClipping (const bool bNew)
 
bool IsClipping () const
 
 SwLineLayout ()
 
virtual ~SwLineLayout () override
 
SwLineLayoutGetNext ()
 
const SwLineLayoutGetNext () const
 
void SetNext (SwLineLayout *pNew)
 
void Init (SwLinePortion *pNextPortion=nullptr)
 
void CalcLine (SwTextFormatter &rLine, SwTextFormatInfo &rInf)
 
void SetRealHeight (sal_uInt16 nNew)
 
sal_uInt16 GetRealHeight () const
 
SwMarginPortionCalcLeftMargin ()
 
SwTwips GetHangingMargin () const
 
virtual bool Format (SwTextFormatInfo &rInf) override
 
bool IsSpaceAdd ()
 
void InitSpaceAdd ()
 
void CreateSpaceAdd (const long nInit=0)
 
void FinishSpaceAdd ()
 
sal_uInt16 GetLLSpaceAddCount () const
 
void SetLLSpaceAdd (long nNew, sal_uInt16 nIdx)
 
long GetLLSpaceAdd (sal_uInt16 nIdx)
 
void RemoveFirstLLSpaceAdd ()
 
std::vector< long > * GetpLLSpaceAdd () const
 
void SetKanaComp (std::unique_ptr< std::deque< sal_uInt16 >> pNew)
 
void FinishKanaComp ()
 
std::deque< sal_uInt16 > * GetpKanaComp () const
 
std::deque< sal_uInt16 > & GetKanaComp ()
 
void MaxAscentDescent (SwTwips &_orAscent, SwTwips &_orDescent, SwTwips &_orObjAscent, SwTwips &_orObjDescent, const SwLinePortion *_pDontConsiderPortion=nullptr, const bool _bNoFlyCntPorAndLinePor=false) const
 determine ascent and descent for positioning of as-character anchored object More...
 
- Public Member Functions inherited from SwTextPortion
 SwTextPortion ()
 
virtual void Paint (const SwTextPaintInfo &rInf) const override
 
virtual void FormatEOL (SwTextFormatInfo &rInf) override
 
virtual TextFrameIndex GetCursorOfst (sal_uInt16 nOfst) const override
 the parameter is actually SwTwips apparently? More...
 
virtual SwPosSize GetTextSize (const SwTextSizeInfo &rInfo) const override
 
virtual bool GetExpText (const SwTextSizeInfo &rInf, OUString &rText) const override
 
virtual long CalcSpacing (long nSpaceAdd, const SwTextSizeInfo &rInf) const override
 
TextFrameIndex GetSpaceCnt (const SwTextSizeInfo &rInf, TextFrameIndex &rCnt) const
 
bool CreateHyphen (SwTextFormatInfo &rInf, SwTextGuess const &rGuess)
 
virtual void HandlePortion (SwPortionHandler &rPH) const override
 
- Public Member Functions inherited from SwLinePortion
 SwLinePortion (const SwLinePortion &rPortion)
 
virtual ~SwLinePortion ()
 
SwLinePortionGetNextPortion () const
 
SwLinePortionoperator= (const SwLinePortion &rPortion)
 
TextFrameIndex GetLen () const
 
void SetLen (TextFrameIndex const nLen)
 
void SetNextPortion (SwLinePortion *pNew)
 
sal_uInt16 & GetAscent ()
 
sal_uInt16 GetAscent () const
 
void SetAscent (const sal_uInt16 nNewAsc)
 
void PrtWidth (sal_uInt16 nNewWidth)
 
sal_uInt16 PrtWidth () const
 
void AddPrtWidth (const sal_uInt16 nNew)
 
void SubPrtWidth (const sal_uInt16 nNew)
 
SwLinePortionCut (SwLinePortion *pVictim)
 
void Truncate ()
 
virtual SwLinePortionCompress ()
 
void SetWhichPor (const PortionType nNew)
 
PortionType GetWhichPor () const
 
bool InTextGrp () const
 
bool InGlueGrp () const
 
bool InTabGrp () const
 
bool InHyphGrp () const
 
bool InNumberGrp () const
 
bool InFixGrp () const
 
bool InFieldGrp () const
 
bool InToxRefGrp () const
 
bool InToxRefOrFieldGrp () const
 
bool InExpGrp () const
 
bool InFixMargGrp () const
 
bool InSpaceGrp () const
 
bool IsGrfNumPortion () const
 
bool IsFlyCntPortion () const
 
bool IsBlankPortion () const
 
bool IsBreakPortion () const
 
bool IsErgoSumPortion () const
 
bool IsQuoVadisPortion () const
 
bool IsTabLeftPortion () const
 
bool IsTabRightPortion () const
 
bool IsFootnoteNumPortion () const
 
bool IsFootnotePortion () const
 
bool IsDropPortion () const
 
bool IsLayPortion () const
 
bool IsParaPortion () const
 
bool IsMarginPortion () const
 
bool IsFlyPortion () const
 
bool IsHolePortion () const
 
bool IsSoftHyphPortion () const
 
bool IsPostItsPortion () const
 
bool IsCombinedPortion () const
 
bool IsTextPortion () const
 
bool IsHangingPortion () const
 
bool IsKernPortion () const
 
bool IsArrowPortion () const
 
bool IsMultiPortion () const
 
bool IsNumberPortion () const
 
bool IsControlCharPortion () const
 
SwLinePortionFindPrevPortion (const SwLinePortion *pRoot)
 
SwLinePortionFindLastPortion ()
 
void CalcTextSize (const SwTextSizeInfo &rInfo)
 
void PrePaint (const SwTextPaintInfo &rInf, const SwLinePortion *pLast) const
 
void Move (SwTextPaintInfo &rInf)
 
virtual sal_uInt16 GetViewWidth (const SwTextSizeInfo &rInf) const
 
bool GetJoinBorderWithPrev () const
 
bool GetJoinBorderWithNext () const
 
void SetJoinBorderWithPrev (const bool bJoinPrev)
 
void SetJoinBorderWithNext (const bool bJoinNext)
 
- Public Member Functions inherited from SwPosSize
 SwPosSize (const sal_uInt16 nW=0, const sal_uInt16 nH=0)
 
 SwPosSize (const Size &rSize)
 
sal_uInt16 Height () const
 
void Height (const sal_uInt16 nNew)
 
sal_uInt16 Width () const
 
void Width (const sal_uInt16 nNew)
 
Size SvLSize () const
 
void SvLSize (const Size &rSize)
 
void SvXSize (const Size &rSize)
 
SwPosSizeoperator= (const Size &rSize)
 

Private Member Functions

SwTwips GetHangingMargin_ () const
 
void DeleteNext ()
 

Private Attributes

SwLineLayoutm_pNext
 
std::unique_ptr< std::vector< long > > m_pLLSpaceAdd
 
std::unique_ptr< std::deque< sal_uInt16 > > m_pKanaComp
 
sal_uInt16 m_nRealHeight
 
bool m_bFormatAdj: 1
 
bool m_bDummy: 1
 
bool m_bEndHyph: 1
 
bool m_bMidHyph: 1
 
bool m_bFly: 1
 
bool m_bRest: 1
 
bool m_bBlinking: 1
 
bool m_bClipping: 1
 
bool m_bContent: 1
 
bool m_bRedline: 1
 
bool m_bForcedLeftMargin: 1
 
bool m_bHanging: 1
 
bool m_bUnderscore: 1
 

Additional Inherited Members

- Static Public Member Functions inherited from SwTextPortion
static SwTextPortionCopyLinePortion (const SwLinePortion &rPortion)
 
- Protected Member Functions inherited from SwLinePortion
 SwLinePortion ()
 
- Protected Attributes inherited from SwLinePortion
SwLinePortionmpNextPortion
 
TextFrameIndex nLineLength
 
sal_uInt16 nAscent
 

Detailed Description

Collection of SwLinePortion instances, representing one line of text.

Typically owned by an SwParaPortion.

Definition at line 80 of file porlay.hxx.

Constructor & Destructor Documentation

SwLineLayout::SwLineLayout ( )

Definition at line 664 of file porlay.cxx.

References Lay, ResetFlags(), and SwLinePortion::SetWhichPor().

SwLineLayout::~SwLineLayout ( )
overridevirtual

Definition at line 203 of file porlay.cxx.

References SwBlink::Delete(), and pBlink.

Member Function Documentation

SwLinePortion * SwLineLayout::Append ( SwLinePortion pPortion)
overridevirtual

Reimplemented from SwLinePortion.

Definition at line 238 of file porlay.cxx.

References SwTextPortion::CopyLinePortion().

SwMarginPortion * SwLineLayout::CalcLeftMargin ( )
void SwLineLayout::CalcLine ( SwTextFormatter rLine,
SwTextFormatInfo rInf 
)

Definition at line 331 of file porlay.cxx.

References sw::BOTTOM, sw::CENTER, SwRedlineItr::CheckLine(), SwLinePortion::Compress(), SwLinePortion::Cut(), end, FlyCnt, IDocumentSettingAccess::get(), SwFlyCntPortion::GetAlign(), SwLinePortion::GetAscent(), SwFont::GetAscent(), SwAttrIter::GetAttrHandler(), SwAttrHandler::GetDefaultAscentAndHeight(), SwTextFrame::GetDoc(), SwTextIter::GetEnd(), SwLinePortion::GetExpText(), SwTextSizeInfo::GetFont(), SwFont::GetHeight(), SwDoc::getIDocumentSettingAccess(), GetLen(), SwLinePortion::GetLen(), SwTextFormatInfo::GetLineStart(), SwLinePortion::GetNextPortion(), SwTextSizeInfo::GetOut(), SwTextInfo::GetParaPortion(), SwAttrIter::GetRedln(), SwTextIter::GetStart(), SwTextSizeInfo::GetText(), SwTextSizeInfo::GetTextFrame(), SwTextSizeInfo::GetVsh(), SwLinePortion::GetWhichPor(), Height, SwPosSize::Height(), IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, SwLinePortion::InExpGrp(), Init(), SwLinePortion::InNumberGrp(), SwLinePortion::InTabGrp(), SwLinePortion::InTextGrp(), SwLinePortion::IsBreakPortion(), SwLinePortion::IsDropPortion(), SwLinePortion::IsFlyCntPortion(), SwLinePortion::IsFlyPortion(), SwLinePortion::IsHangingPortion(), SwLinePortion::IsHolePortion(), SwLinePortion::IsMultiPortion(), SwLinePortion::IsPostItsPortion(), SwLinePortion::IsTextPortion(), lcl_HasOnlyBlanks(), SwTextFrame::MapViewToModel(), NONE, sw::NONE, SwTextFormatInfo::RealWidth(), SAL_WARN_IF, SwLinePortion::SetAscent(), SwTextFormatter::SetFlyInCntBase(), SwParaPortion::SetMargin(), SwFlyCntPortion::SetMax(), Width, and SwPosSize::Width().

Referenced by SwTextFormatter::CalcFitToContent_(), SwMultiPortion::CalcSize(), and SwTextFormatter::FormatLine().

void SwLineLayout::CreateSpaceAdd ( const long  nInit = 0)
void SwLineLayout::DeleteNext ( )
private

Definition at line 181 of file porlay.cxx.

References GetNext(), and SetNext().

void SwLineLayout::FinishKanaComp ( )
inline

Definition at line 185 of file porlay.hxx.

Referenced by SwTextFrame::Format_(), and SwTextFormatter::FormatReset().

void SwLineLayout::FinishSpaceAdd ( )
inline
bool SwLineLayout::Format ( SwTextFormatInfo rInf)
overridevirtual

Reimplemented from SwTextPortion.

Definition at line 250 of file porlay.cxx.

References SwTextPortion::Format(), GetLen(), SwTextSizeInfo::GetTextHeight(), and Height.

SwLinePortion * SwLineLayout::GetFirstPortion ( ) const
SwTwips SwLineLayout::GetHangingMargin ( ) const
inline
SwTwips SwLineLayout::GetHangingMargin_ ( ) const
private
std::deque<sal_uInt16>& SwLineLayout::GetKanaComp ( )
inline

Definition at line 187 of file porlay.hxx.

References m_pKanaComp.

Referenced by SwTextAdjuster::CalcKanaAdj().

long SwLineLayout::GetLLSpaceAdd ( sal_uInt16  nIdx)
inline
sal_uInt16 SwLineLayout::GetLLSpaceAddCount ( ) const
inline
SwLineLayout* SwLineLayout::GetNext ( )
inline
const SwLineLayout* SwLineLayout::GetNext ( ) const
inline

Definition at line 146 of file porlay.hxx.

References m_pNext.

std::deque<sal_uInt16>* SwLineLayout::GetpKanaComp ( ) const
inline
std::vector<long>* SwLineLayout::GetpLLSpaceAdd ( ) const
inline
sal_uInt16 SwLineLayout::GetRealHeight ( ) const
inline
bool SwLineLayout::HasContent ( ) const
inline

Definition at line 125 of file porlay.hxx.

References m_bContent.

Referenced by SwTextFrame::ChgThisLines(), and SwTextFrame::PaintExtraData().

bool SwLineLayout::HasForcedLeftMargin ( ) const
inline

Definition at line 129 of file porlay.hxx.

References m_bForcedLeftMargin.

Referenced by SwTextFormatter::NewTabPortion().

bool SwLineLayout::HasRedline ( ) const
inline
bool SwLineLayout::HasUnderscore ( ) const
inline

Definition at line 133 of file porlay.hxx.

References m_bUnderscore.

Referenced by SwTextPainter::DrawTextLine(), and SwTextFrame::FormatLine().

void SwLineLayout::Init ( SwLinePortion pNextPortion = nullptr)
void SwLineLayout::InitSpaceAdd ( )

Definition at line 300 of file porlay.cxx.

Referenced by SwTextAdjuster::CalcNewBlock().

SwLinePortion * SwLineLayout::Insert ( SwLinePortion pPortion)
overridevirtual

Reimplemented from SwLinePortion.

Definition at line 213 of file porlay.cxx.

References SwTextPortion::CopyLinePortion(), GetLen(), pBlink, and SwBlink::Replace().

bool SwLineLayout::IsBlinking ( ) const
inline

Definition at line 123 of file porlay.hxx.

References m_bBlinking.

Referenced by SwTextFrame::Format_(), and SwTextFormatter::FormatReset().

bool SwLineLayout::IsClipping ( ) const
inline

Definition at line 140 of file porlay.hxx.

References m_bClipping.

Referenced by SwTextPainter::DrawTextLine(), and SwTextFrame::FormatLine().

bool SwLineLayout::IsDummy ( ) const
inline
bool SwLineLayout::IsEndHyph ( ) const
inline

Definition at line 115 of file porlay.hxx.

References m_bEndHyph.

Referenced by SwTextIter::CntHyphens(), SwTextFrame::Format_(), and SwTextFrame::FormatLine().

bool SwLineLayout::IsFly ( ) const
inline

Definition at line 119 of file porlay.hxx.

References m_bFly.

Referenced by SwTextFormatter::FormatLine().

bool SwLineLayout::IsFormatAdj ( ) const
inline

Definition at line 113 of file porlay.hxx.

References m_bFormatAdj.

Referenced by SwTextAdjuster::CalcAdjLine(), and SwTextAdjuster::GetAdjusted().

bool SwLineLayout::IsHanging ( ) const
inline

Definition at line 131 of file porlay.hxx.

References m_bHanging.

Referenced by SwTextCursor::GetCursorOfst().

bool SwLineLayout::IsMidHyph ( ) const
inline

Definition at line 117 of file porlay.hxx.

References m_bMidHyph.

Referenced by SwTextIter::CntHyphens(), and SwTextFrame::Format_().

bool SwLineLayout::IsRest ( ) const
inline
bool SwLineLayout::IsSpaceAdd ( )
inline
void SwLineLayout::MaxAscentDescent ( SwTwips _orAscent,
SwTwips _orDescent,
SwTwips _orObjAscent,
SwTwips _orObjDescent,
const SwLinePortion _pDontConsiderPortion = nullptr,
const bool  _bNoFlyCntPorAndLinePor = false 
) const

determine ascent and descent for positioning of as-character anchored object

OD 07.01.2004 #i11859# - previously local method <lcl_MaxAscDescent> Method calculates maximum ascents and descents of the line layout. One value considering as-character anchored objects, one without these objects. Portions for other anchored objects aren't considered. OD 2005-05-20 #i47162# - add optional parameter <_bNoFlyCntPorAndLinePor> to control, if the fly content portions and line portion are considered.

Parameters
_orAscentoutput parameter - maximum ascent without as-character anchored objects
_orDescentoutput parameter - maximum descent without as-character anchored objects
_orObjAscentoutput parameter - maximum ascent with as-character anchored objects
_orObjDescentoutput parameter - maximum descent with as-character anchored objects
_pDontConsiderPortioninput parameter - portion, which isn't considered for calculating <_orObjAscent> and <_orObjDescent>, if it isn't a portion for a as-character anchored object or it isn't as high as the line.
_bNoFlyCntPorAndLinePoroptional input parameter - boolean, indicating that fly content portions and the line portion are considered or not.

Definition at line 608 of file porlay.cxx.

References SwLinePortion::GetAscent(), SwLinePortion::GetLen(), SwLinePortion::GetNextPortion(), SwPosSize::Height(), SwLinePortion::IsBreakPortion(), SwLinePortion::IsFlyCntPortion(), SwLinePortion::IsFlyPortion(), and SwLinePortion::IsGrfNumPortion().

Referenced by SwTextFormatter::AlignFlyInCntBase(), SwTextFrame::CalcHeightOfLastLine(), SwTextFormatter::CalcUnclipped(), SwTextFormatter::NewFlyCntPortion(), and SwTextFormatter::UpdatePos().

void SwLineLayout::RemoveFirstLLSpaceAdd ( )
inline

Definition at line 180 of file porlay.hxx.

Referenced by SwDoubleLinePortion::ResetSpaceAdd().

void SwLineLayout::ResetFlags ( )

Definition at line 657 of file porlay.cxx.

Referenced by SwTextFrame::Format_(), SwTextFormatter::FormatReset(), and SwLineLayout().

void SwLineLayout::SetBlinking ( const bool  bNew)
inline

Definition at line 122 of file porlay.hxx.

References m_bBlinking.

void SwLineLayout::SetClipping ( const bool  bNew)
inline

Definition at line 139 of file porlay.hxx.

References m_bClipping.

Referenced by SwTextFormatter::CalcRealHeight().

void SwLineLayout::SetContent ( const bool  bNew)
inline

Definition at line 124 of file porlay.hxx.

References m_bContent.

void SwLineLayout::SetDummy ( const bool  bNew)
inline

Definition at line 136 of file porlay.hxx.

References m_bDummy.

Referenced by SwTextFormatter::CalcFlyWidth().

void SwLineLayout::SetEndHyph ( const bool  bNew)
inline
void SwLineLayout::SetFly ( const bool  bNew)
inline

Definition at line 118 of file porlay.hxx.

References m_bFly.

Referenced by SwTextFormatter::BuildPortions().

void SwLineLayout::SetForcedLeftMargin ( )
inline

Definition at line 128 of file porlay.hxx.

References m_bForcedLeftMargin.

Referenced by SwTextFormatter::CalcFlyWidth().

void SwLineLayout::SetFormatAdj ( const bool  bNew)
inline

Definition at line 112 of file porlay.hxx.

References m_bFormatAdj.

Referenced by SwTextAdjuster::CalcAdjLine(), and SwTextFormatter::CalcAdjustLine().

void SwLineLayout::SetHanging ( const bool  bNew)
inline

Definition at line 130 of file porlay.hxx.

References m_bHanging.

Referenced by GetHangingMargin_().

void SwLineLayout::SetKanaComp ( std::unique_ptr< std::deque< sal_uInt16 >>  pNew)
inline

Definition at line 184 of file porlay.hxx.

Referenced by SwTextAdjuster::CalcKanaAdj().

void SwLineLayout::SetLLSpaceAdd ( long  nNew,
sal_uInt16  nIdx 
)
inline
void SwLineLayout::SetMidHyph ( const bool  bNew)
inline
void SwLineLayout::SetNext ( SwLineLayout pNew)
inline
void SwLineLayout::SetRealHeight ( sal_uInt16  nNew)
inline
void SwLineLayout::SetRedline ( const bool  bNew)
inline

Definition at line 126 of file porlay.hxx.

References m_bRedline.

void SwLineLayout::SetRest ( const bool  bNew)
inline

Definition at line 120 of file porlay.hxx.

References m_bRest.

Referenced by SwTextFormatter::WhichFirstPortion().

void SwLineLayout::SetUnderscore ( const bool  bNew)
inline

Definition at line 132 of file porlay.hxx.

References m_bUnderscore.

Member Data Documentation

bool SwLineLayout::m_bBlinking
private

Definition at line 93 of file porlay.hxx.

Referenced by IsBlinking(), and SetBlinking().

bool SwLineLayout::m_bClipping
private

Definition at line 94 of file porlay.hxx.

Referenced by IsClipping(), and SetClipping().

bool SwLineLayout::m_bContent
private

Definition at line 95 of file porlay.hxx.

Referenced by HasContent(), and SetContent().

bool SwLineLayout::m_bDummy
private

Definition at line 88 of file porlay.hxx.

Referenced by IsDummy(), and SetDummy().

bool SwLineLayout::m_bEndHyph
private

Definition at line 89 of file porlay.hxx.

Referenced by IsEndHyph(), and SetEndHyph().

bool SwLineLayout::m_bFly
private

Definition at line 91 of file porlay.hxx.

Referenced by IsFly(), and SetFly().

bool SwLineLayout::m_bForcedLeftMargin
private

Definition at line 97 of file porlay.hxx.

Referenced by HasForcedLeftMargin(), and SetForcedLeftMargin().

bool SwLineLayout::m_bFormatAdj
private

Definition at line 87 of file porlay.hxx.

Referenced by IsFormatAdj(), and SetFormatAdj().

bool SwLineLayout::m_bHanging
private

Definition at line 98 of file porlay.hxx.

Referenced by IsHanging(), and SetHanging().

bool SwLineLayout::m_bMidHyph
private

Definition at line 90 of file porlay.hxx.

Referenced by IsMidHyph(), and SetMidHyph().

bool SwLineLayout::m_bRedline
private

Definition at line 96 of file porlay.hxx.

Referenced by HasRedline(), and SetRedline().

bool SwLineLayout::m_bRest
private

Definition at line 92 of file porlay.hxx.

Referenced by IsRest(), and SetRest().

bool SwLineLayout::m_bUnderscore
private

Definition at line 99 of file porlay.hxx.

Referenced by HasUnderscore(), and SetUnderscore().

sal_uInt16 SwLineLayout::m_nRealHeight
private

Definition at line 86 of file porlay.hxx.

Referenced by GetRealHeight().

std::unique_ptr<std::deque<sal_uInt16> > SwLineLayout::m_pKanaComp
private

Definition at line 85 of file porlay.hxx.

Referenced by GetKanaComp().

std::unique_ptr<std::vector<long> > SwLineLayout::m_pLLSpaceAdd
private

Definition at line 84 of file porlay.hxx.

SwLineLayout* SwLineLayout::m_pNext
private

Definition at line 83 of file porlay.hxx.

Referenced by GetNext().


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