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

#include <porhyph.hxx>

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

Public Member Functions

 SwSoftHyphPortion ()
 
virtual bool GetExpText (const SwTextSizeInfo &rInf, OUString &rText) const override
 We're expanding: More...
 
virtual SwLinePortionCompress () override
 
virtual void Paint (const SwTextPaintInfo &rInf) const override
 Cases: More...
 
virtual bool Format (SwTextFormatInfo &rInf) override
 We get the final width from the FormatEOL() More...
 
virtual void FormatEOL (SwTextFormatInfo &rInf) override
 Format End of Line. More...
 
void SetExpand (const bool bNew)
 
bool IsExpand () const
 
virtual sal_uInt16 GetViewWidth (const SwTextSizeInfo &rInf) const override
 
virtual void HandlePortion (SwPortionHandler &rPH) const override
 
- Public Member Functions inherited from SwHyphPortion
 SwHyphPortion ()
 
virtual bool GetExpText (const SwTextSizeInfo &rInf, OUString &rText) const override
 
virtual bool Format (SwTextFormatInfo &rInf) override
 
virtual void HandlePortion (SwPortionHandler &rPH) const override
 
void dumpAsXml (xmlTextWriterPtr pWriter, const OUString &rText, TextFrameIndex &nOffset) const override
 
- Public Member Functions inherited from SwExpandPortion
 SwExpandPortion ()
 
virtual bool Format (SwTextFormatInfo &rInf) override
 
virtual TextFrameIndex GetModelPositionForViewPoint (sal_uInt16 nOfst) const override
 the parameter is actually SwTwips apparently? More...
 
virtual bool GetExpText (const SwTextSizeInfo &rInf, OUString &rText) const override
 
virtual SwPosSize GetTextSize (const SwTextSizeInfo &rInfo) const override
 
virtual void Paint (const SwTextPaintInfo &rInf) const override
 
virtual void HandlePortion (SwPortionHandler &rPH) const override
 
void dumpAsXml (xmlTextWriterPtr pWriter, const OUString &rText, TextFrameIndex &nOffset) const override
 
- Public Member Functions inherited from SwTextPortion
 SwTextPortion ()
 
virtual void Paint (const SwTextPaintInfo &rInf) const override
 
virtual bool Format (SwTextFormatInfo &rInf) override
 
virtual void FormatEOL (SwTextFormatInfo &rInf) override
 
virtual TextFrameIndex GetModelPositionForViewPoint (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 tools::Long CalcSpacing (tools::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)
 
SwTwipsGetAscent ()
 
SwTwips GetAscent () const
 
void SetAscent (const SwTwips nNewAsc)
 
void PrtWidth (SwTwips nNewWidth)
 
SwTwips PrtWidth () const
 
void AddPrtWidth (const SwTwips nNew)
 
void SubPrtWidth (const SwTwips nNew)
 
SwTwips ExtraBlankWidth () const
 
void ExtraBlankWidth (const SwTwips nNew)
 
SwTwips GetHangingBaseline () const
 
void SetHangingBaseline (const SwTwips nNewBaseline)
 
virtual SwLinePortionInsert (SwLinePortion *pPortion)
 
virtual SwLinePortionAppend (SwLinePortion *pPortion)
 
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 IsTabCenterPortion () const
 
bool IsTabDecimalPortion () 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 ()
 
virtual TextFrameIndex GetModelPositionForViewPoint (sal_uInt16 nOfst) const
 the parameter is actually SwTwips apparently? More...
 
virtual SwPosSize GetTextSize (const SwTextSizeInfo &rInfo) const
 
void CalcTextSize (const SwTextSizeInfo &rInfo)
 
virtual void Paint (const SwTextPaintInfo &rInf) const =0
 
void PrePaint (const SwTextPaintInfo &rInf, const SwLinePortion *pLast) const
 
virtual bool Format (SwTextFormatInfo &rInf)
 
virtual void FormatEOL (SwTextFormatInfo &rInf)
 
void Move (SwTextPaintInfo &rInf)
 
virtual bool GetExpText (const SwTextSizeInfo &rInf, OUString &rText) const
 
virtual sal_uInt16 GetViewWidth (const SwTextSizeInfo &rInf) const
 
virtual tools::Long CalcSpacing (tools::Long nSpaceAdd, const SwTextSizeInfo &rInf) const
 
virtual void HandlePortion (SwPortionHandler &rPH) const
 
bool GetJoinBorderWithPrev () const
 
bool GetJoinBorderWithNext () const
 
void SetJoinBorderWithPrev (const bool bJoinPrev)
 
void SetJoinBorderWithNext (const bool bJoinNext)
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter, const OUString &rText, TextFrameIndex &rOffset) const
 
void dumpAsXmlAttributes (xmlTextWriterPtr writer, std::u16string_view rText, TextFrameIndex nOffset) const
 
- Public Member Functions inherited from SwPosSize
 SwPosSize (const SwTwips nW=0, const SwTwips nH=0)
 
 SwPosSize (const Size &rSize)
 
virtual ~SwPosSize ()
 
 SwPosSize (SwPosSize const &)=default
 
 SwPosSize (SwPosSize &&)=default
 
SwPosSizeoperator= (SwPosSize const &)=default
 
SwPosSizeoperator= (SwPosSize &&)=default
 
SwTwips Height () const
 
virtual void Height (const SwTwips nNew, const bool=true)
 
SwTwips Width () const
 
void Width (const SwTwips nNew)
 
Size SvLSize () const
 
void SvLSize (const Size &rSize)
 
void SvXSize (const Size &rSize)
 
SwPosSizeoperator= (const Size &rSize)
 

Private Attributes

bool m_bExpand
 
sal_uInt16 m_nViewWidth
 

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 mnLineLength
 
SwTwips mnAscent
 
SwTwips mnHangingBaseline
 

Detailed Description

Definition at line 60 of file porhyph.hxx.

Constructor & Destructor Documentation

◆ SwSoftHyphPortion()

SwSoftHyphPortion::SwSoftHyphPortion ( )

Definition at line 401 of file txthyph.cxx.

References SwLinePortion::SetLen(), SwLinePortion::SetWhichPor(), and SoftHyphen.

Member Function Documentation

◆ Compress()

SwLinePortion * SwSoftHyphPortion::Compress ( )
overridevirtual

Reimplemented from SwLinePortion.

Definition at line 399 of file txthyph.cxx.

◆ Format()

bool SwSoftHyphPortion::Format ( SwTextFormatInfo rInf)
overridevirtual

We get the final width from the FormatEOL()

During the underflow-phase we determine, whether or not there's an alternative spelling at all ...

Case 1: "Au-to" 1) {Au}{-}{to}, {to} does not fit anymore => underflow 2) {-} calls hyphenate => no alternative 3) FormatEOL() and bFull = true

Case 2: "Zuc-ker" 1) {Zuc}{-}{ker}, {ker} does not fit anymore => underflow 2) {-} calls hyphenate => alternative! 3) Underflow() and bFull = true 4) {Zuc} calls hyphenate => {Zuk}{-}{ker}

Reimplemented from SwHyphPortion.

Definition at line 459 of file txthyph.cxx.

References SwTextGuess::AlternativeSpelling(), SwTextFormatInfo::ChgHyph(), SwHyphPortion::Format(), FormatEOL(), SwTextFormatInfo::GetFly(), SwTextSizeInfo::GetIdx(), SwTextFormatInfo::GetRoot(), SwTextFormatInfo::GetSoftHyphPos(), SwTextFormatInfo::IsHyphenate(), SwTextFormatInfo::IsHyphForbud(), SwTextFormatInfo::IsInterHyph(), SwTextFormatInfo::IsUnderflow(), SwLineLayout::SetEndHyph(), SetExpand(), SwLineLayout::SetMidHyph(), SwTextFormatInfo::SetSoftHyphPos(), SwTextFormatInfo::SetUnderflow(), SwLinePortion::Truncate(), and SwPosSize::Width().

◆ FormatEOL()

void SwSoftHyphPortion::FormatEOL ( SwTextFormatInfo rInf)
overridevirtual

◆ GetExpText()

bool SwSoftHyphPortion::GetExpText ( const SwTextSizeInfo rInf,
OUString &  rText 
) const
overridevirtual

We're expanding:

  • if the special characters should be visible
  • if we're at the end of the line
  • if we're before a (real/emulated) line break

Reimplemented from SwHyphPortion.

Definition at line 547 of file txthyph.cxx.

References SwHyphPortion::GetExpText(), SwLinePortion::GetNextPortion(), SwTextSizeInfo::GetOpt(), SwLinePortion::InFixGrp(), SwLinePortion::IsBreakPortion(), SwLinePortion::IsDropPortion(), IsExpand(), SwLinePortion::IsLayPortion(), SwLinePortion::IsParaPortion(), SwViewOption::IsSoftHyph(), and SwTextSizeInfo::OnWin().

◆ GetViewWidth()

sal_uInt16 SwSoftHyphPortion::GetViewWidth ( const SwTextSizeInfo rInf) const
overridevirtual

◆ HandlePortion()

void SwSoftHyphPortion::HandlePortion ( SwPortionHandler rPH) const
overridevirtual

◆ IsExpand()

bool SwSoftHyphPortion::IsExpand ( ) const
inline

Definition at line 73 of file porhyph.hxx.

References m_bExpand.

Referenced by FormatEOL(), GetExpText(), GetViewWidth(), and SwTextFormatter::Hyphenate().

◆ Paint()

void SwSoftHyphPortion::Paint ( const SwTextPaintInfo rInf) const
overridevirtual

Cases:

1) SoftHyph is in the line, ViewOpt off -> invisible, neighbors unchanged 2) SoftHyph is in the line, ViewOpt on -> visible, neighbors unchanged 3) SoftHyph is at the end of the line, ViewOpt on or off -> always visible, neighbors unchanged

Reimplemented from SwExpandPortion.

Definition at line 433 of file txthyph.cxx.

References SwTextPaintInfo::DrawViewOpt(), SwExpandPortion::Paint(), SoftHyphen, and SwPosSize::Width().

◆ SetExpand()

void SwSoftHyphPortion::SetExpand ( const bool  bNew)
inline

Definition at line 72 of file porhyph.hxx.

References m_bExpand.

Referenced by Format(), and FormatEOL().

Member Data Documentation

◆ m_bExpand

bool SwSoftHyphPortion::m_bExpand
private

Definition at line 62 of file porhyph.hxx.

Referenced by IsExpand(), and SetExpand().

◆ m_nViewWidth

sal_uInt16 SwSoftHyphPortion::m_nViewWidth
private

Definition at line 63 of file porhyph.hxx.

Referenced by GetViewWidth().


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