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

#include <itrpaint.hxx>

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

Public Member Functions

 SwTextPainter (SwTextFrame *pTextFrame, SwTextPaintInfo *pTextPaintInf)
 
void DrawTextLine (const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz, ::std::optional< SwTaggedPDFHelper > &roTaggedLabel, ::std::optional< SwTaggedPDFHelper > &roTaggedParagraph, bool isPDFTaggingEnabled)
 
void PaintDropPortion ()
 
void PaintMultiPortion (const SwRect &rPaint, SwMultiPortion &rMulti, const SwMultiPortion *pEnvPor=nullptr)
 
void SetPaintDrop (const bool bNew)
 
bool IsPaintDrop () const
 
SwTextPaintInfoGetInfo ()
 
const SwTextPaintInfoGetInfo () const
 
- Public Member Functions inherited from SwTextCursor
 SwTextCursor (SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf)
 
void GetCharRect (SwRect *, TextFrameIndex, SwCursorMoveState *=nullptr, const tools::Long nMax=0)
 
void GetEndCharRect (SwRect *, TextFrameIndex, SwCursorMoveState *=nullptr, const tools::Long nMax=0)
 
TextFrameIndex GetModelPositionForViewPoint (SwPosition *pPos, const Point &rPoint, bool bChgNode, SwCursorMoveState *=nullptr) const
 
const SwLineLayoutCharCursorToLine (TextFrameIndex const nPos)
 
SwTwips AdjustBaseLine (const SwLineLayout &rLine, const SwLinePortion *pPor, SwTwips nPorHeight=0, SwTwips nAscent=0, const bool bAutoToCentered=false) const
 
- Public Member Functions inherited from SwTextAdjuster
void CalcAdjLine (SwLineLayout *pCurr)
 
void GetAdjusted () const
 
void CalcDropAdjust ()
 
void CalcDropRepaint ()
 
- Public Member Functions inherited from SwTextMargin
 SwTextMargin (SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf)
 
SwTwips GetLeftMargin () const
 
SwTwips Left () const
 
SwTwips Right () const
 
SwTwips FirstLeft () const
 
SwTwips CurrWidth () const
 
SwTwips GetLineStart () const
 
SwTwips GetLineEnd () const
 
Point GetTopLeft () const
 
bool IsOneBlock () const
 
bool IsLastBlock () const
 
bool IsLastCenter () const
 
SvxAdjust GetAdjust () const
 
sal_uInt16 GetLineWidth () const
 
SwTwips GetLeftMin () const
 
bool HasNegFirst () const
 
SwTwips GetTabLeft () const
 
sal_uInt16 GetDropLines () const
 
void SetDropLines (const sal_uInt16 nNew)
 
sal_uInt16 GetDropLeft () const
 
sal_uInt16 GetDropHeight () const
 
void SetDropHeight (const sal_uInt16 nNew)
 
sal_uInt16 GetDropDescent () const
 
void SetDropDescent (const sal_uInt16 nNew)
 
void DropInit ()
 
TextFrameIndex GetTextStart () const
 
TextFrameIndex GetTextEnd () const
 
SwTextSizeInfoGetInfo ()
 
const SwTextSizeInfoGetInfo () const
 
- Public Member Functions inherited from SwTextIter
 SwTextIter (SwTextFrame *pTextFrame, SwTextInfo *pTextInf)
 
const SwLineLayoutGetCurr () const
 
const SwLineLayoutGetNext () const
 
const SwLineLayoutGetPrev ()
 
TextFrameIndex GetLength () const
 
sal_Int32 GetLineNr () const
 
TextFrameIndex GetStart () const
 
TextFrameIndex GetEnd () const
 
SwTwips Y () const
 
SwTwips RegStart () const
 
sal_uInt16 RegDiff () const
 
bool IsRegisterOn () const
 
SwTextInfoGetInfo ()
 
const SwTextInfoGetInfo () const
 
void Top ()
 
void Bottom ()
 
const SwLineLayoutNext ()
 
const SwLineLayoutPrev ()
 
const SwLineLayoutNextLine ()
 
const SwLineLayoutPrevLine ()
 
const SwLineLayoutGetNextLine () const
 
const SwLineLayoutGetPrevLine ()
 
void CharToLine (TextFrameIndex)
 
void TwipsToLine (const SwTwips)
 
void TruncLines (bool bNoteFollow=false)
 
SwTwips GetLineHeight () const
 
void CalcAscentAndHeight (SwTwips &rAscent, SwTwips &rHeight) const
 
bool IsFirstTextLine () const
 
bool IsParaLine () const
 
const SwLineInfoGetLineInfo () const
 
SwTwips GetFirstPos () const
 
bool SeekAndChg (SwTextSizeInfo &rInf)
 
bool SeekAndChgBefore (SwTextSizeInfo &rInf)
 
bool SeekStartAndChg (SwTextSizeInfo &rInf, const bool bPara=false)
 
SwTextFrameGetTextFrame ()
 
const SwTextFrameGetTextFrame () const
 
void CntHyphens (sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
 
- Public Member Functions inherited from SwAttrIter
 SwAttrIter (SwTextNode &rTextNode, SwScriptInfo &rScrInf, SwTextFrame const *const pFrame=nullptr)
 All subclasses of this always have a SwTextFrame passed to the constructor, but SwAttrIter itself may be created without a SwTextFrame in certain special cases via this ctor here. More...
 
virtual ~SwAttrIter ()
 
SwRedlineItrGetRedln ()
 
TextFrameIndex GetNextAttr () const
 
bool Seek (TextFrameIndex nPos)
 Enables the attributes used at char pos nPos in the logical font. More...
 
bool IsSymbol (TextFrameIndex nPos)
 
bool SeekAndChgAttrIter (TextFrameIndex nPos, OutputDevice *pOut)
 Executes ChgPhysFnt if Seek() returns true and change font to merge character border with neighbours. More...
 
bool SeekStartAndChgAttrIter (OutputDevice *pOut, const bool bParaFont)
 
bool MaybeHasHints () const
 
SwTextAttrGetAttr (TextFrameIndex nPos) const
 Returns the attribute for a position. More...
 
SwFontGetFnt ()
 
const SwFontGetFnt () const
 
sal_uInt8 GetPropFont () const
 
void SetPropFont (const sal_uInt8 nNew)
 
SwAttrHandlerGetAttrHandler ()
 

Protected Member Functions

void CtorInitTextPainter (SwTextFrame *pFrame, SwTextPaintInfo *pInf)
 
 SwTextPainter (SwTextNode const *pTextNode)
 
- Protected Member Functions inherited from SwTextCursor
void CtorInitTextCursor (SwTextFrame *pFrame, SwTextSizeInfo *pInf)
 
 SwTextCursor (SwTextNode const *pTextNode)
 
void AddExtraBlankWidth ()
 
- Protected Member Functions inherited from SwTextAdjuster
 SwTextAdjuster (SwTextNode const *pTextNode)
 
void CalcNewBlock (SwLineLayout *pCurr, const SwLinePortion *pStopAt, SwTwips nReal=0, bool bSkipKashida=false)
 
SwTwips CalcKanaAdj (SwLineLayout *pCurr)
 
- Protected Member Functions inherited from SwTextMargin
void Right (const SwTwips nNew)
 
void CtorInitTextMargin (SwTextFrame *pFrame, SwTextSizeInfo *pInf)
 
 SwTextMargin (SwTextNode const *pTextNode)
 
- Protected Member Functions inherited from SwTextIter
SwLineLayoutGetPrev_ ()
 
void Init ()
 
void CtorInitTextIter (SwTextFrame *pFrame, SwTextInfo *pInf)
 
 SwTextIter (SwTextNode const *pTextNode)
 
- Protected Member Functions inherited from SwAttrIter
void Chg (SwTextAttr const *pHt)
 
void Rst (SwTextAttr const *pHt)
 
void CtorInitAttrIter (SwTextNode &rTextNode, SwScriptInfo &rScrInf, SwTextFrame const *pFrame=nullptr)
 
 SwAttrIter (SwTextNode const *pTextNode)
 

Private Member Functions

SwLinePortionCalcPaintOfst (const SwRect &rPaint, bool &rbSkippedNumPortions)
 
void CheckSpecialUnderline (const SwLinePortion *pPor, tools::Long nAdjustBaseLine=0)
 

Private Attributes

bool m_bPaintDrop
 

Additional Inherited Members

- Static Public Member Functions inherited from SwTextCursor
static void SetRightMargin (const bool bNew)
 
static bool IsRightMargin ()
 
- Protected Attributes inherited from SwTextIter
SwLineInfo m_aLineInf
 
SwTextFramem_pFrame
 
SwTextInfom_pInf
 
SwLineLayoutm_pCurr
 
SwLineLayoutm_pPrev
 
SwTwips m_nFrameStart
 
SwTwips m_nY
 
SwTwips m_nRegStart
 
TextFrameIndex m_nStart
 
sal_uInt16 m_nRegDiff
 
sal_Int32 m_nLineNr
 
bool m_bPrev: 1
 
bool m_bRegisterOn: 1
 
bool m_bOneBlock: 1
 
bool m_bLastBlock: 1
 
bool m_bLastCenter: 1
 
- Protected Attributes inherited from SwAttrIter
SwAttrHandler m_aAttrHandler
 
SwViewShellm_pViewShell
 
SwFontm_pFont
 
SwScriptInfom_pScriptInfo
 

Detailed Description

Definition at line 30 of file itrpaint.hxx.

Constructor & Destructor Documentation

◆ SwTextPainter() [1/2]

SwTextPainter::SwTextPainter ( SwTextNode const *  pTextNode)
inlineexplicitprotected

Definition at line 39 of file itrpaint.hxx.

◆ SwTextPainter() [2/2]

SwTextPainter::SwTextPainter ( SwTextFrame pTextFrame,
SwTextPaintInfo pTextPaintInf 
)
inline

Definition at line 46 of file itrpaint.hxx.

References CtorInitTextPainter().

Member Function Documentation

◆ CalcPaintOfst()

SwLinePortion * SwTextPainter::CalcPaintOfst ( const SwRect rPaint,
bool &  rbSkippedNumPortions 
)
private

◆ CheckSpecialUnderline()

void SwTextPainter::CheckSpecialUnderline ( const SwLinePortion pPor,
tools::Long  nAdjustBaseLine = 0 
)
private

Definition at line 581 of file itrpaint.cxx.

References SwTextCursor::AdjustBaseLine(), COL_AUTO(), COL_TRANSPARENT(), SwFont::GetActual(), SwAttrIter::GetAttrHandler(), SwFont::GetCaseMap(), SwTextIter::GetEnd(), SwFont::GetEscapement(), SwAttrIter::GetFnt(), SwUnderlineFont::GetFont(), SwAttrHandler::GetFont(), GetFont(), SwFont::GetHeight(), SwTextSizeInfo::GetIdx(), GetInfo(), CharFormat::GetItem(), SwLinePortion::GetLen(), GetLen(), getLength(), SvxTextLineItem::GetLineStyle(), SwLinePortion::GetNextPortion(), SwTextInfo::GetParaPortion(), MultiSelection::GetRange(), MultiSelection::GetRangeCount(), SwAttrIter::GetRedln(), SwParaPortion::GetScriptInfo(), SwFont::GetSize(), SwTextIter::GetTextFrame(), GetUnderColor(), SwTextSizeInfo::GetUnderFnt(), SwFont::GetUnderline(), SwFont::GetWeight(), i, SwMultiPortion::IsBidi(), SwLinePortion::IsBreakPortion(), SwLinePortion::IsFlyCntPortion(), SwLinePortion::IsFlyPortion(), SwLinePortion::IsHolePortion(), SwLinePortion::IsMarginPortion(), SwLinePortion::IsMultiPortion(), IsUnderlineBreak(), SwFont::IsWordLineMode(), LINESTYLE_NONE, SwTextIter::m_pCurr, SwAttrIter::m_pFont, sw::MapModelToView(), Range::Max(), Range::Min(), sw::MergedAttrIter::NextAttr(), RES_CHRATR_UNDERLINE(), SwAttrIter::Seek(), MultiSelection::Select(), MultiSelection::SelectAll(), SwFont::SetColor(), SwFont::SetEscapement(), SwFont::SetFillColor(), SwFont::SetOverline(), SwFont::SetProportion(), SwFont::SetSize(), SwFont::SetStrikeout(), SwTextSizeInfo::SetUnderFnt(), SwFont::SetWeight(), Point::setY(), STRIKEOUT_NONE, WEIGHT_BOLD, WEIGHT_NORMAL, Size::Width(), and SwPosSize::Width().

Referenced by DrawTextLine(), and PaintMultiPortion().

◆ CtorInitTextPainter()

void SwTextPainter::CtorInitTextPainter ( SwTextFrame pFrame,
SwTextPaintInfo pInf 
)
protected

◆ DrawTextLine()

void SwTextPainter::DrawTextLine ( const SwRect rPaint,
SwSaveClip rClip,
const bool  bUnderSz,
::std::optional< SwTaggedPDFHelper > &  roTaggedLabel,
::std::optional< SwTaggedPDFHelper > &  roTaggedParagraph,
bool  isPDFTaggingEnabled 
)

Definition at line 126 of file itrpaint.cxx.

References SwTextCursor::AddExtraBlankWidth(), SwTextCursor::AdjustBaseLine(), SwRect::Bottom(), SwTextIter::CalcAscentAndHeight(), CalcPaintOfst(), CheckSpecialUnderline(), SwSaveClip::ChgClip(), SwFont::ChgPhysFnt(), COL_AUTO(), SwTextPaintInfo::DrawRedArrow(), IDocumentSettingAccess::get(), SwTextAdjuster::GetAdjusted(), SwLinePortion::GetAscent(), SwFrame::GetBottomMargin(), SwFont::GetColor(), SwTextIter::GetCurr(), SwTextFrame::GetDoc(), SwTextMargin::GetDropLines(), SwTextIter::GetEnd(), SwLineLayout::GetFirstPortion(), SwAttrIter::GetFnt(), GetFont(), SwFrameAreaDefinition::getFrameArea(), SwFrameAreaDefinition::getFramePrintArea(), GetGridItem(), SwLinePortion::GetHangingBaseline(), SwDoc::getIDocumentSettingAccess(), SwTextSizeInfo::GetIdx(), GetInfo(), SwLinePortion::GetLen(), getLength(), SwTextIter::GetLineHeight(), SwTextIter::GetLineInfo(), SwTextIter::GetLineNr(), SwFrame::GetNext(), SwLineLayout::GetNext(), SwTextIter::GetNext(), SwTextIter::GetNextLine(), SwLinePortion::GetNextPortion(), SwTextSizeInfo::GetOpt(), SwTextSizeInfo::GetOut(), SwLineLayout::GetpKanaComp(), SwLineLayout::GetpLLSpaceAdd(), SwUnderlineFont::GetPos(), SwTextPaintInfo::GetPos(), SwTextIter::GetPrevLine(), SwLineLayout::GetRedlineEndType(), SwAttrIter::GetRedln(), SwTextIter::GetStart(), SwFont::GetStrikeout(), SwTabPortion::GetTabPos(), SwTextSizeInfo::GetText(), SwTextSizeInfo::GetTextFrame(), SwTextIter::GetTextFrame(), SwTextMargin::GetTopLeft(), SwFrame::GetTopMargin(), SwTextSizeInfo::GetUnderFnt(), SwFont::GetUnderline(), SwViewShell::GetViewOptions(), SwTextSizeInfo::GetVsh(), SwFieldPortion::HasFollow(), SwLineLayout::HasRedline(), SwLineLayout::HasRedlineEnd(), SwLineInfo::HasSpecialAlign(), SwLineLayout::HasUnderscore(), SwPosSize::Height(), SwRect::Height(), SwLinePortion::InFieldGrp(), SwLinePortion::InHyphGrp(), SwLinePortion::InNumberGrp(), SwLinePortion::InTabGrp(), SwLinePortion::InTextGrp(), SwLinePortion::IsArrowPortion(), SwLinePortion::IsBreakPortion(), SwSaveClip::IsChg(), SwLineLayout::IsClipping(), SwLinePortion::IsHolePortion(), SwFrame::IsInTab(), SwLinePortion::IsMarginPortion(), SwLinePortion::IsMultiPortion(), SwViewOption::IsParagraph(), SwViewOption::IsPDFExport(), SwLinePortion::IsQuoVadisPortion(), SwLineLayout::IsRest(), SwFrame::IsTextFrame(), SwRect::Left(), LINESTYLE_NONE, m_bPaintDrop, SwTextIter::m_pCurr, SwAttrIter::m_pFont, SwTextIter::m_pFrame, sw::MapViewToModel(), SwLinePortion::Move(), SwTextSizeInfo::OnWin(), SwLinePortion::Paint(), SwTmpEndPortion::Paint(), PaintMultiPortion(), pos, pOut, SwLinePortion::PrePaint(), SwTextSizeInfo::ResetKanaIdx(), SwTextPaintInfo::ResetSpaceIdx(), SwTextMargin::Right(), SwRect::Right(), SwRedlineItr::Seek(), SwTextIter::SeekAndChg(), SwTextIter::SeekAndChgBefore(), SwTextIter::SeekStartAndChg(), SwTextSizeInfo::SetIdx(), SwTextSizeInfo::SetKanaComp(), SwTextSizeInfo::SetLen(), SwTextPaintInfo::SetPos(), SwUnderlineFont::SetPos(), SwTextPaintInfo::SetpSpaceAdd(), SwBreakPortion::SetRedline(), SwTextSizeInfo::SetUnderFnt(), Point::setX(), Point::setY(), STRIKEOUT_NONE, TAB_OVER_MARGIN, TAB_OVER_SPACING, SwRect::Top(), SwPosSize::Width(), X, Point::X(), SwTextPaintInfo::X(), Point::Y(), SwTextPaintInfo::Y(), and SwTextIter::Y().

Referenced by SwTextFrame::PaintSwFrame().

◆ GetInfo() [1/2]

SwTextPaintInfo & SwTextPainter::GetInfo ( )
inline

◆ GetInfo() [2/2]

const SwTextPaintInfo & SwTextPainter::GetInfo ( ) const
inline

Definition at line 65 of file itrpaint.hxx.

References SwTextIter::GetInfo().

◆ IsPaintDrop()

bool SwTextPainter::IsPaintDrop ( ) const
inline

Definition at line 62 of file itrpaint.hxx.

References m_bPaintDrop.

Referenced by SwTextFrame::FormatImpl(), and SwTextFrame::PaintSwFrame().

◆ PaintDropPortion()

void SwTextPainter::PaintDropPortion ( )

◆ PaintMultiPortion()

void SwTextPainter::PaintMultiPortion ( const SwRect rPaint,
SwMultiPortion rMulti,
const SwMultiPortion pEnvPor = nullptr 
)

Definition at line 1520 of file pormulti.cxx.

References SwTextCursor::AdjustBaseLine(), SwMultiPortion::CalcSpacing(), CheckSpecialUnderline(), DIR_TOP2BOTTOM, SwTextPaintInfo::DrawViewOpt(), Field, SwFrame::FindPageFrame(), SwLinePortion::GetAscent(), SwLineLayout::GetFirstPortion(), SwUnderlineFont::GetFont(), SwTextSizeInfo::GetFont(), GetFont(), GetGridItem(), SwTextSizeInfo::GetIdx(), GetInfo(), SwTextSizeInfo::GetLen(), SwLinePortion::GetLen(), SwLineLayout::GetNext(), SwLinePortion::GetNextPortion(), SwAttrIter::GetPropFont(), SwAttrIter::GetRedln(), SwMultiPortion::GetRoot(), SwTextGridItem::GetRubyHeight(), SwTextGridItem::GetRubyTextBelow(), SwTextSizeInfo::GetTextFrame(), SwTextIter::GetTextFrame(), SwTextSizeInfo::GetUnderFnt(), SwMultiPortion::HasBrackets(), SwMultiPortion::HasRotation(), SwPosSize::Height(), SwLineLayout::Height(), SwLinePortion::InFieldGrp(), SwLinePortion::InTabGrp(), SwLinePortion::InTextGrp(), SwMultiPortion::IsBidi(), SwLinePortion::IsBreakPortion(), SwMultiPortion::IsDouble(), SwLinePortion::IsMarginPortion(), SwLinePortion::IsMultiPortion(), SwLineLayout::IsRest(), SwMultiPortion::IsRevers(), SwFrame::IsRightToLeft(), SwMultiPortion::IsRuby(), SwTextGridItem::IsSquaredMode(), SwTextIter::m_pCurr, SwTextIter::m_pFrame, SwLayoutModeModifier::Modify(), SwLinePortion::Move(), SwMultiPortion::OnRight(), SwMultiPortion::OnTop(), SwTextSizeInfo::OnWin(), SwLinePortion::Paint(), PaintMultiPortion(), SwLinePortion::PrePaint(), SwTextIter::SeekAndChg(), SwTextIter::SeekAndChgBefore(), SwTextSizeInfo::SetDirection(), SwTextSizeInfo::SetIdx(), SwTextSizeInfo::SetLen(), SwUnderlineFont::SetPos(), SwAttrIter::SetPropFont(), SwFont::SetProportion(), SwTextSizeInfo::SetRuby(), SwTextSizeInfo::SetSnapToGrid(), SwTextSizeInfo::SetUnderFnt(), SwFont::SetVertical(), SwTextSizeInfo::SnapToGrid(), SwPosSize::Width(), X, SwTextPaintInfo::X(), and SwTextPaintInfo::Y().

Referenced by DrawTextLine(), and PaintMultiPortion().

◆ SetPaintDrop()

void SwTextPainter::SetPaintDrop ( const bool  bNew)
inline

Definition at line 61 of file itrpaint.hxx.

References m_bPaintDrop.

Referenced by SwTextFrame::FormatImpl(), and SwTextFormatter::NewDropPortion().

Member Data Documentation

◆ m_bPaintDrop

bool SwTextPainter::m_bPaintDrop
private

Definition at line 32 of file itrpaint.hxx.

Referenced by CtorInitTextPainter(), DrawTextLine(), IsPaintDrop(), and SetPaintDrop().


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