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

#include <porfld.hxx>

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

Public Member Functions

 SwFieldPortion (const SwFieldPortion &rField)
 
 SwFieldPortion (OUString aExpand, std::unique_ptr< SwFont > pFnt=nullptr, bool bPlaceHolder=false, TextFrameIndex nLen=TextFrameIndex(1))
 
virtual ~SwFieldPortion () override
 
void TakeNextOffset (const SwFieldPortion *pField)
 
void CheckScript (const SwTextSizeInfo &rInf)
 
bool HasFont () const
 
const SwFontGetFont () const
 
const OUString & GetExp () const
 
virtual bool GetExpText (const SwTextSizeInfo &rInf, OUString &rText) const override
 
virtual bool Format (SwTextFormatInfo &rInf) override
 
virtual void Paint (const SwTextPaintInfo &rInf) const override
 
virtual SwLinePortionCompress () override
 
virtual sal_uInt16 GetViewWidth (const SwTextSizeInfo &rInf) const override
 
bool IsFollow () const
 
void SetFollow (bool bNew)
 
bool IsLeft () const
 
void SetLeft (bool bNew)
 
bool IsHide () const
 
void SetHide (bool bNew)
 
bool IsCenter () const
 
void SetCenter (bool bNew)
 
bool HasFollow () const
 
void SetHasFollow (bool bNew)
 
TextFrameIndex GetNextOffset () const
 
void SetNextOffset (TextFrameIndex nNew)
 
TextFrameIndex GetFieldLen () const
 
virtual SwFieldPortionClone (const OUString &rExpand) const
 
virtual SwPosSize GetTextSize (const SwTextSizeInfo &rInfo) const override
 
virtual void HandlePortion (SwPortionHandler &rPH) const override
 
void SetContentControl (bool bContentControl)
 
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)
 

Public Attributes

sal_uInt16 m_nAttrFieldType
 

Protected Member Functions

void SetFont (std::unique_ptr< SwFont > pNew)
 
bool IsNoLength () const
 
void SetNoLength ()
 
- Protected Member Functions inherited from SwLinePortion
 SwLinePortion ()
 

Protected Attributes

OUString m_aExpand
 
std::unique_ptr< SwFontm_pFont
 
TextFrameIndex m_nNextOffset
 
TextFrameIndex m_nNextScriptChg
 
TextFrameIndex m_nFieldLen
 
sal_uInt16 m_nViewWidth
 
bool m_bFollow: 1
 
bool m_bLeft: 1
 
bool m_bHide: 1
 
bool m_bCenter: 1
 
bool m_bHasFollow: 1
 
bool m_bAnimated: 1
 
bool m_bNoPaint: 1
 
bool m_bReplace: 1
 
const bool m_bPlaceHolder: 1
 
bool m_bNoLength: 1
 
bool m_bContentControl = false
 
- Protected Attributes inherited from SwLinePortion
SwLinePortionmpNextPortion
 
TextFrameIndex mnLineLength
 
SwTwips mnAscent
 
SwTwips mnHangingBaseline
 

Friends

class SwTextFormatter
 

Additional Inherited Members

- Static Public Member Functions inherited from SwTextPortion
static SwTextPortionCopyLinePortion (const SwLinePortion &rPortion)
 

Detailed Description

Definition at line 34 of file porfld.hxx.

Constructor & Destructor Documentation

◆ SwFieldPortion() [1/2]

SwFieldPortion::SwFieldPortion ( const SwFieldPortion rField)

Definition at line 89 of file porfld.cxx.

References Field, GetExp, GetFont(), HasFont(), m_pFont, and SwLinePortion::SetWhichPor().

Referenced by Clone().

◆ SwFieldPortion() [2/2]

SwFieldPortion::SwFieldPortion ( OUString  aExpand,
std::unique_ptr< SwFont pFnt = nullptr,
bool  bPlaceHolder = false,
TextFrameIndex  nLen = TextFrameIndex(1) 
)

Definition at line 76 of file porfld.cxx.

References Field, and SwLinePortion::SetWhichPor().

◆ ~SwFieldPortion()

SwFieldPortion::~SwFieldPortion ( )
overridevirtual

Definition at line 114 of file porfld.cxx.

References m_pFont.

Member Function Documentation

◆ CheckScript()

void SwFieldPortion::CheckScript ( const SwTextSizeInfo rInf)

◆ Clone()

SwFieldPortion * SwFieldPortion::Clone ( const OUString &  rExpand) const
virtual

◆ Compress()

SwLinePortion * SwFieldPortion::Compress ( )
overridevirtual

Reimplemented from SwLinePortion.

Definition at line 50 of file porfld.cxx.

References SwLinePortion::Compress(), SwLinePortion::GetLen(), and m_aExpand.

Referenced by Format().

◆ dumpAsXml()

void SwFieldPortion::dumpAsXml ( xmlTextWriterPtr  pWriter,
const OUString &  rText,
TextFrameIndex nOffset 
) const
overridevirtual

Reimplemented from SwExpandPortion.

Definition at line 487 of file porfld.cxx.

References SwLinePortion::dumpAsXmlAttributes(), SwLinePortion::GetLen(), m_aExpand, and m_pFont.

◆ Format()

bool SwFieldPortion::Format ( SwTextFormatInfo rInf)
overridevirtual

Reimplemented from SwExpandPortion.

Reimplemented in SwNumberPortion, SwGrfNumPortion, SwCombinedPortion, SwFootnotePortion, SwQuoVadisPortion, and SwErgoSumPortion.

Definition at line 304 of file porfld.cxx.

References CH_BREAK, CH_TAB, CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, CHAR_HARDBLANK, CHAR_HARDHYPHEN, CHAR_SOFTHYPHEN, CHAR_WJ, CHAR_ZWSP, Clone(), COMPLETE_STRING, Compress(), SwTextPortion::Format(), SwLinePortion::FormatEOL(), SwTextSizeInfo::GetAscent(), SwFont::GetBottomBorderSpace(), SwTextSizeInfo::GetFont(), GetFont(), SwTextSizeInfo::GetIdx(), SwTextFormatInfo::GetLast(), SwTextSizeInfo::GetLen(), SwLinePortion::GetLen(), getLength(), SwTextFormatInfo::GetLineStart(), SwTextSizeInfo::GetOut(), SwTextPaintInfo::GetPos(), SwTextSizeInfo::GetText(), SwTextSizeInfo::GetTextHeight(), SwFont::GetTopBorderSpace(), SwTextFormatInfo::GetUnderflow(), SwTextFormatInfo::GetUnderScorePos(), SwTextSizeInfo::GetVsh(), SwPosSize::Height(), IsFollow(), SwLinePortion::IsQuoVadisPortion(), m_aExpand, m_bNoLength, m_nFieldLen, m_nNextOffset, m_nNextScriptChg, m_pFont, SwTextFormatInfo::ScanPortionEnd(), SwLinePortion::SetAscent(), SwLayoutModeModifier::SetAuto(), SetFollow(), SetFont(), SetHasFollow(), SwTextFormatInfo::SetHookChar(), SwTextSizeInfo::SetLen(), SwLinePortion::SetLen(), SwTextFormatInfo::SetLineStart(), SetNextOffset(), SwTextSizeInfo::SetNotEOL(), SwTextFormatInfo::SetRest(), SwTextFormatInfo::SetUnderScorePos(), SwTextFormatInfo::Width(), SwPosSize::Width(), and Point::X().

Referenced by SwNumberPortion::Format(), SwGrfNumPortion::Format(), SwFootnotePortion::Format(), SwQuoVadisPortion::Format(), and SwErgoSumPortion::Format().

◆ GetExp()

const OUString & SwFieldPortion::GetExp ( ) const
inline

◆ GetExpText()

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

◆ GetFieldLen()

TextFrameIndex SwFieldPortion::GetFieldLen ( ) const
inline

Definition at line 101 of file porfld.hxx.

References m_nFieldLen.

◆ GetFont()

const SwFont * SwFieldPortion::GetFont ( ) const
inline

Definition at line 71 of file porfld.hxx.

References m_pFont.

Referenced by SwTextFormatter::CalcAscent(), Format(), and SwFieldPortion().

◆ GetNextOffset()

TextFrameIndex SwFieldPortion::GetNextOffset ( ) const
inline

Definition at line 98 of file porfld.hxx.

References m_nNextOffset.

Referenced by SwRubyPortion::CalcRubyOffset(), and TakeNextOffset().

◆ GetTextSize()

SwPosSize SwFieldPortion::GetTextSize ( const SwTextSizeInfo rInfo) const
overridevirtual

Reimplemented from SwExpandPortion.

Reimplemented in SwFootnotePortion.

Definition at line 504 of file porfld.cxx.

References SwExpandPortion::GetTextSize(), and m_pFont.

◆ GetViewWidth()

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

◆ HandlePortion()

void SwFieldPortion::HandlePortion ( SwPortionHandler rPH) const
overridevirtual

Reimplemented from SwExpandPortion.

Reimplemented in SwQuoVadisPortion.

Definition at line 482 of file porfld.cxx.

References SwLinePortion::GetLen(), SwLinePortion::GetWhichPor(), m_aExpand, and SwPortionHandler::Special().

◆ HasFollow()

bool SwFieldPortion::HasFollow ( ) const
inline

◆ HasFont()

bool SwFieldPortion::HasFont ( ) const
inline

Definition at line 69 of file porfld.hxx.

References m_pFont.

Referenced by SwTextFormatter::CalcAscent(), SwTabPortion::PreFormat(), and SwFieldPortion().

◆ IsCenter()

bool SwFieldPortion::IsCenter ( ) const
inline

Definition at line 92 of file porfld.hxx.

References m_bCenter.

Referenced by SwNumberPortion::Clone(), SwNumberPortion::Paint(), and SwGrfNumPortion::Paint().

◆ IsFollow()

bool SwFieldPortion::IsFollow ( ) const
inline

◆ IsHide()

bool SwFieldPortion::IsHide ( ) const
inline

Definition at line 89 of file porfld.hxx.

References m_bHide.

Referenced by SwTextFormatter::BuildPortions(), SwNumberPortion::Paint(), and SwGrfNumPortion::Paint().

◆ IsLeft()

bool SwFieldPortion::IsLeft ( ) const
inline

Definition at line 86 of file porfld.hxx.

References m_bLeft.

Referenced by SwNumberPortion::Clone(), SwNumberPortion::Paint(), and SwGrfNumPortion::Paint().

◆ IsNoLength()

bool SwFieldPortion::IsNoLength ( ) const
inlineprotected

Definition at line 58 of file porfld.hxx.

References m_bNoLength.

Referenced by SwTextFormatter::Underflow().

◆ Paint()

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

◆ SetCenter()

void SwFieldPortion::SetCenter ( bool  bNew)
inline

Definition at line 93 of file porfld.hxx.

References m_bCenter.

Referenced by SwNumberPortion::SwNumberPortion().

◆ SetContentControl()

void SwFieldPortion::SetContentControl ( bool  bContentControl)
inline

Definition at line 112 of file porfld.hxx.

References m_bContentControl.

◆ SetFollow()

void SwFieldPortion::SetFollow ( bool  bNew)
inline

Definition at line 84 of file porfld.hxx.

References m_bFollow.

Referenced by SwTextFormatter::BuildMultiPortion(), Format(), and SwRubyPortion::SwRubyPortion().

◆ SetFont()

void SwFieldPortion::SetFont ( std::unique_ptr< SwFont pNew)
inlineprotected

Definition at line 57 of file porfld.hxx.

References m_pFont.

Referenced by Format().

◆ SetHasFollow()

void SwFieldPortion::SetHasFollow ( bool  bNew)
inline

Definition at line 96 of file porfld.hxx.

References m_bHasFollow.

Referenced by Format().

◆ SetHide()

void SwFieldPortion::SetHide ( bool  bNew)
inline

◆ SetLeft()

void SwFieldPortion::SetLeft ( bool  bNew)
inline

Definition at line 87 of file porfld.hxx.

References m_bLeft.

Referenced by SwTextFormatter::NewFootnoteNumPortion(), and SwNumberPortion::SwNumberPortion().

◆ SetNextOffset()

void SwFieldPortion::SetNextOffset ( TextFrameIndex  nNew)
inline

Definition at line 99 of file porfld.hxx.

References m_nNextOffset.

Referenced by Clone(), Format(), and SwRubyPortion::SwRubyPortion().

◆ SetNoLength()

void SwFieldPortion::SetNoLength ( )
inlineprotected

Definition at line 59 of file porfld.hxx.

References m_bNoLength.

Referenced by SwTextFormatter::TryNewNoLengthPortion().

◆ TakeNextOffset()

void SwFieldPortion::TakeNextOffset ( const SwFieldPortion pField)

Definition at line 68 of file porfld.cxx.

References GetNextOffset(), m_aExpand, m_bFollow, m_nNextOffset, and u.

Friends And Related Function Documentation

◆ SwTextFormatter

friend class SwTextFormatter
friend

Definition at line 36 of file porfld.hxx.

Member Data Documentation

◆ m_aExpand

OUString SwFieldPortion::m_aExpand
protected

◆ m_bAnimated

bool SwFieldPortion::m_bAnimated
protected

Definition at line 50 of file porfld.hxx.

Referenced by SwGrfNumPortion::IsAnimated(), and SwGrfNumPortion::SetAnimated().

◆ m_bCenter

bool SwFieldPortion::m_bCenter
protected

Definition at line 48 of file porfld.hxx.

Referenced by IsCenter(), and SetCenter().

◆ m_bContentControl

bool SwFieldPortion::m_bContentControl = false
protected

Definition at line 55 of file porfld.hxx.

Referenced by Paint(), and SetContentControl().

◆ m_bFollow

bool SwFieldPortion::m_bFollow
protected

Definition at line 45 of file porfld.hxx.

Referenced by IsFollow(), SetFollow(), and TakeNextOffset().

◆ m_bHasFollow

bool SwFieldPortion::m_bHasFollow
protected

Definition at line 49 of file porfld.hxx.

Referenced by HasFollow(), and SetHasFollow().

◆ m_bHide

bool SwFieldPortion::m_bHide
protected

Definition at line 47 of file porfld.hxx.

Referenced by IsHide(), and SetHide().

◆ m_bLeft

bool SwFieldPortion::m_bLeft
protected

Definition at line 46 of file porfld.hxx.

Referenced by IsLeft(), and SetLeft().

◆ m_bNoLength

bool SwFieldPortion::m_bNoLength
protected

Definition at line 54 of file porfld.hxx.

Referenced by Clone(), Format(), IsNoLength(), and SetNoLength().

◆ m_bNoPaint

bool SwFieldPortion::m_bNoPaint
protected

◆ m_bPlaceHolder

const bool SwFieldPortion::m_bPlaceHolder
protected

Definition at line 53 of file porfld.hxx.

Referenced by Clone(), and Paint().

◆ m_bReplace

bool SwFieldPortion::m_bReplace
protected

Definition at line 52 of file porfld.hxx.

Referenced by SwGrfNumPortion::Paint(), and SwGrfNumPortion::SwGrfNumPortion().

◆ m_nAttrFieldType

sal_uInt16 SwFieldPortion::m_nAttrFieldType

Definition at line 66 of file porfld.hxx.

◆ m_nFieldLen

TextFrameIndex SwFieldPortion::m_nFieldLen
protected

Definition at line 42 of file porfld.hxx.

Referenced by CheckScript(), Format(), and GetFieldLen().

◆ m_nNextOffset

TextFrameIndex SwFieldPortion::m_nNextOffset
protected

Definition at line 40 of file porfld.hxx.

Referenced by Clone(), Format(), GetNextOffset(), SetNextOffset(), and TakeNextOffset().

◆ m_nNextScriptChg

TextFrameIndex SwFieldPortion::m_nNextScriptChg
protected

Definition at line 41 of file porfld.hxx.

Referenced by CheckScript(), and Format().

◆ m_nViewWidth

sal_uInt16 SwFieldPortion::m_nViewWidth
protected

Definition at line 44 of file porfld.hxx.

Referenced by GetViewWidth().

◆ m_pFont

std::unique_ptr<SwFont> SwFieldPortion::m_pFont
protected

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