93 if( nTmp + (pPor->
Height()/2) >= nPaintOfst )
121 const bool bUnderSized )
123 #if OSL_DEBUG_LEVEL > 1
158 if( nMaxRight < nTabPos )
160 nMaxRight = rPaint.
Right();
167 if( !bEndPor && nTmpLeft >= nMaxRight )
181 sal_uInt16 nTmpHeight, nTmpAscent;
187 bool bClip = ( bDrawInWindow || bUnderSized ) && !rClip.
IsChg();
200 #if OSL_DEBUG_LEVEL > 1
201 static bool bClipAlways =
false;
202 if( bClip && bClipAlways )
212 if ( aPnt1.X() < rPaint.
Left() )
213 aPnt1.setX( rPaint.
Left() );
214 if ( aPnt1.Y() < rPaint.
Top() )
215 aPnt1.setY( rPaint.
Top() );
217 GetInfo().GetPos().
Y() + nTmpHeight );
218 if ( aPnt2.X() > rPaint.
Right() )
219 aPnt2.setX( rPaint.
Right() );
220 if ( aPnt2.Y() > rPaint.
Bottom() )
221 aPnt2.setY( rPaint.
Bottom() );
223 const SwRect aLineRect( aPnt1, aPnt2 );
237 if( !pPor && !bEndPor )
244 const bool bAdjustBaseLine =
246 (
nullptr != pGrid );
248 if ( ! bAdjustBaseLine )
256 if( bAdjustBaseLine )
290 if ( bAdjustBaseLine )
325 std::pair<SwTextNode const*, sal_Int32>
const pos(
375 pUnderLineFnt->
GetPos().Y() :
377 pUnderLineFnt->
SetPos( aTmpPoint );
400 if ( pOldUnderLineFnt )
406 bFirst &= !pPor->
GetLen();
410 pArrow = static_cast<SwArrowPortion*>(pPor);
412 pPor = bDrawInWindow ||
GetInfo().
X() <= nMaxRight ||
444 std::pair<SwTextNode const*, sal_Int32>
const pos(
454 if ( bAdjustBaseLine )
464 const bool bNextUndersized =
470 if( bUnderSized || bNextUndersized )
472 if ( bAdjustBaseLine )
484 (nDiff >= 0 && bNextUndersized) )
526 if (
GetInfo().GetUnderFnt() &&
527 GetInfo().GetUnderFnt()->GetFont().GetUnderline() ==
GetFnt()->GetUnderline() &&
533 "CheckSpecialUnderline without underlined font" );
544 for (
auto const& e : pMerged->extents)
547 if (SfxItemState::SET == e.pNode->GetSwAttrSet().GetItemState(
552 aUnderMulti.
Select(
Range(nTmp, nTmp + e.nEnd - e.nStart - 1),
555 nTmp += e.nEnd - e.nStart;
576 aUnderMulti.
Select(
Range(sal_Int32(nStart), sal_Int32(nEnd) - 1),
587 for(
size_t i = 0;
i < nCnt; ++
i )
604 SwFont* pUnderlineFnt =
nullptr;
605 Point aCommonBaseLine;
619 sal_uInt16 nMaxBaseLineOfst = 0;
620 int nNumberOfPortions = 0;
622 while (nTmpIdx <= nUnderEnd && pPor)
630 aIter.
Seek( nTmpIdx );
637 nSumWidth += pPor->
Width();
642 if ( nAdjustBaseLine )
645 if ( nMaxBaseLineOfst < nTmpBaseLineOfst )
647 nMaxBaseLineOfst = nTmpBaseLineOfst;
648 nSumHeight = nFontHeight;
653 nSumHeight += pPor->
Width() * nFontHeight;
656 nBold += pPor->
Width();
661 nTmpIdx += pPor->
GetLen();
666 if ( nNumberOfPortions > 1 && nSumWidth )
668 const sal_uLong nNewFontHeight = nAdjustBaseLine ?
670 nSumHeight / nSumWidth;
677 nNewFontHeight ), nActual );
680 if ( 2 * nBold > nSumWidth )
686 aCommonBaseLine.setY( nAdjustBaseLine + nMaxBaseLineOfst );
SwAttrHandler & GetAttrHandler()
std::deque< sal_uInt16 > * GetpKanaComp() const
void Move(SwTextPaintInfo &rInf)
Represents the visualization of a paragraph.
void SetUnderFnt(SwUnderlineFont *pNew)
void Right(const tools::Long nRight)
sal_uInt16 GetLineNr() const
bool ChkSpecialUnderline() const
sal_uInt16 Height() const
bool SeekStartAndChg(SwTextSizeInfo &rInf, const bool bPara=false)
bool IsUnderlineBreak(const SwLinePortion &rPor, const SwFont &rFnt)
TextFrameIndex GetStart() const
const Color & GetUnderColor() const
void SetPos(const Point &rNew)
void Left(const tools::Long nLeft)
virtual tools::Long CalcSpacing(tools::Long nSpaceAdd, const SwTextSizeInfo &rInf) const
void CtorInitTextPainter(SwTextFrame *pFrame, SwTextPaintInfo *pInf)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
void SetFillColor(const Color &rColor)
const SwRect & getFramePrintArea() const
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
tools::Long GetLen(const Point &rPnt)
short Seek(SwFont &rFnt, sal_uLong nNode, sal_Int32 nNew, sal_Int32 nOld)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
bool SeekAndChg(SwTextSizeInfo &rInf)
bool Select(sal_Int32 nIndex, bool bSelect=true)
tools::Long GetSpaceAdd() const
const Size & GetSize(SwFontScript nWhich) const
FontStrikeout GetStrikeout() const
void SetKanaComp(std::deque< sal_uInt16 > *pNew)
Of course Writer needs its own rectangles.
RedlineType GetRedlineEndType() const
sal_Int32 GetRangeCount() const
bool HasRedlineEnd() const
bool Seek(TextFrameIndex nPos)
Enables the attributes used at char pos nPos in the logical font.
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
void SetColor(const Color &rColor)
const SwFont * GetFont() const
bool IsMarginPortion() const
virtual void Paint(const SwTextPaintInfo &rInf) const =0
bool IsBreakPortion() const
const SwRect & getFrameArea() const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
SwTextPaintInfo & GetInfo()
const SwLineLayout * GetNextLine() const
SvxCaseMap GetCaseMap() const
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
void ChgPhysFnt(SwViewShell const *pSh, OutputDevice &rOut)
void SetStrikeout(const FontStrikeout eStrikeout)
SwFontScript GetActual() const
void SetPaintOfst(const SwTwips nNew)
void CalcAscentAndHeight(sal_uInt16 &rAscent, sal_uInt16 &rHeight) const
const SwViewOption & GetOpt() const
void PaintMultiPortion(const SwRect &rPaint, SwMultiPortion &rMulti, const SwMultiPortion *pEnvPor=nullptr)
sal_uInt16 AdjustBaseLine(const SwLineLayout &rLine, const SwLinePortion *pPor, sal_uInt16 nPorHeight=0, sal_uInt16 nAscent=0, const bool bAutoToCentered=false) const
SwLinePortion * CalcPaintOfst(const SwRect &rPaint)
const SwLineLayout * GetPrevLine()
const SwLineInfo & GetLineInfo() const
const Point & GetPos() const
vcl::RenderContext * GetOut()
void SetFont(SwFont *pNew)
SwParaPortion * GetParaPortion()
bool IsFlyPortion() const
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
SwLinePortion * GetFirstPortion() const
bool IsParagraph(bool bHard=false) const
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
TextFrameIndex GetEnd() const
tools::Long Width() const
void SetEscapement(const short nNewEsc)
sal_uInt16 GetTabPos() const
static Color GetUnderColor(const SwFont *pFont)
TextFrameIndex GetIdx() const
void SetWeight(const FontWeight eWeight, const SwFontScript nWhich)
tools::Long GetBottomMargin() const
void PrePaint(const SwTextPaintInfo &rInf, const SwLinePortion *pLast) const
const Color & GetColor() const
TextFrameIndex GetLen() const
void SetPos(const Point &rPoint)
SwTextFrame * GetTextFrame()
const OUString & GetText() const
const Range & GetRange(sal_Int32 nRange) const
bool IsHolePortion() const
SwUnderlineFont * GetUnderFnt() const
const Point & GetPos() const
bool IsMultiPortion() const
FontLineStyle GetUnderline() const
FontLineStyle GetLineStyle() const
Base class for anything that can be part of a line in the Writer layout.
void CtorInitTextCursor(SwTextFrame *pFrame, SwTextSizeInfo *pInf)
bool SeekAndChgBefore(SwTextSizeInfo &rInf)
void Bottom(const tools::Long nBottom)
SwTextNode is a paragraph in the document model.
FontWeight GetWeight() const
void ChgClip(const SwRect &rRect, const SwTextFrame *pFrame=nullptr, bool bEnlargeRect=false, sal_Int32 nEnlargeTop=0, sal_Int32 nEnlargeBottom=0)
void SetLen(const TextFrameIndex nNew)
void SetSize(const Size &rSize, const SwFontScript nWhich)
const SwViewOption * GetViewOptions() const
bool HasSpecialAlign(bool bVert) const
void Top(const tools::Long nTop)
SwScriptInfo & GetScriptInfo()
double getLength(const B2DPolygon &rCandidate)
void SetpSpaceAdd(std::vector< tools::Long > *pNew)
tools::Long GetTopMargin() const
void DrawRedArrow(const SwLinePortion &rPor) const
const SwLineLayout * GetCurr() const
bool IsArrowPortion() const
SwTextFrame * GetTextFrame()
bool IsWordLineMode() const
void CheckSpecialUnderline(const SwLinePortion *pPor, tools::Long nAdjustBaseLine=0)
TextFrameIndex GetEnd() const
sal_uInt16 GetDropLines() const
bool IsQuoVadisPortion() const
void SelectAll(bool bSelect=true)
std::vector< tools::Long > * GetpLLSpaceAdd() const
void SetProportion(const sal_uInt8 nNewPropr)
SwLinePortion * GetNextPortion() const
void SetIdx(const TextFrameIndex nNew)
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
short GetEscapement() const
void Height(tools::Long nNew)
void SetOverline(const FontLineStyle eOverline)
bool IsFlyCntPortion() const
tools::Long GetHeight() const
SwRedlineItr * GetRedln()
bool HasUnderscore() const
void DrawTextLine(const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz)
bool IsPostItsPortion() const