93 if( nTmp + (pPor->
Height()/2) >= nPaintOfst )
121 const bool bUnderSized )
123#if OSL_DEBUG_LEVEL > 1
159 if( nMaxRight < nTabPos )
161 nMaxRight = rPaint.
Right();
168 if( !bEndPor && nTmpLeft >= nMaxRight )
182 SwTwips nTmpHeight, nTmpAscent;
188 bool bClip = ( bDrawInWindow || bUnderSized ) && !rClip.
IsChg();
201#if OSL_DEBUG_LEVEL > 1
202 static bool bClipAlways =
false;
203 if( bClip && bClipAlways )
213 if ( aPnt1.X() < rPaint.
Left() )
214 aPnt1.setX( rPaint.
Left() );
215 if ( aPnt1.Y() < rPaint.
Top() )
216 aPnt1.setY( rPaint.
Top() );
218 GetInfo().GetPos().
Y() + nTmpHeight );
219 if ( aPnt2.X() > rPaint.
Right() )
220 aPnt2.setX( rPaint.
Right() );
221 if ( aPnt2.Y() > rPaint.
Bottom() )
222 aPnt2.setY( rPaint.
Bottom() );
224 const SwRect aLineRect( aPnt1, aPnt2 );
238 if( !pPor && !bEndPor )
245 const bool bAdjustBaseLine =
249 if ( ! bAdjustBaseLine )
257 if( bAdjustBaseLine )
291 if ( bAdjustBaseLine )
326 std::pair<SwTextNode const*, sal_Int32>
const pos(
376 pUnderLineFnt->
GetPos().Y() :
378 pUnderLineFnt->
SetPos( aTmpPoint );
401 if ( pOldUnderLineFnt )
407 bFirst &= !pPor->
GetLen();
413 pPor = bDrawInWindow ||
GetInfo().
X() <= nMaxRight ||
445 std::pair<SwTextNode const*, sal_Int32>
const pos(
455 if ( bAdjustBaseLine )
465 const bool bNextUndersized =
471 if( bUnderSized || bNextUndersized )
473 if ( bAdjustBaseLine )
485 (nDiff >= 0 && bNextUndersized) )
527 if (
GetInfo().GetUnderFnt() &&
534 "CheckSpecialUnderline without underlined font" );
545 for (
auto const& e : pMerged->extents)
551 pItem->GetLineStyle());
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 );
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...
const Range & GetRange(sal_Int32 nRange) const
sal_Int32 GetRangeCount() const
bool Select(sal_Int32 nIndex, bool bSelect=true)
void SelectAll(bool bSelect=true)
constexpr tools::Long Width() const
FontLineStyle GetLineStyle() const
Indicator that the content does not fit into a fixed height frame (red triangle on the UI).
const SwFont * GetFont() const
SwAttrHandler & GetAttrHandler()
SwRedlineItr * GetRedln()
bool Seek(TextFrameIndex nPos)
Enables the attributes used at char pos nPos in the logical font.
void SetRedline(const RedlineType eRedline)
void SetOverline(const FontLineStyle eOverline)
void SetStrikeout(const FontStrikeout eStrikeout)
void SetEscapement(const short nNewEsc)
const Size & GetSize(SwFontScript nWhich) const
FontLineStyle GetUnderline() const
short GetEscapement() const
void SetProportion(const sal_uInt8 nNewPropr)
FontStrikeout GetStrikeout() const
void SetSize(const Size &rSize, const SwFontScript nWhich)
void SetFillColor(const Color &rColor)
const Color & GetUnderColor() const
SwFontScript GetActual() const
SvxCaseMap GetCaseMap() const
bool IsWordLineMode() const
FontWeight GetWeight() const
void SetColor(const Color &rColor)
const Color & GetColor() const
void ChgPhysFnt(SwViewShell const *pSh, OutputDevice &rOut)
void SetWeight(const FontWeight eWeight, const SwFontScript nWhich)
tools::Long GetHeight() const
const SwRect & getFrameArea() const
const SwRect & getFramePrintArea() const
tools::Long GetBottomMargin() const
tools::Long GetTopMargin() const
bool HasSpecialAlign(bool bVert) const
SwLinePortion * GetFirstPortion() const
bool HasUnderscore() const
RedlineType GetRedlineEndType() const
bool HasRedlineEnd() const
std::vector< tools::Long > * GetpLLSpaceAdd() const
std::deque< sal_uInt16 > * GetpKanaComp() const
Base class for anything that can be part of a line in the Writer layout.
bool IsMarginPortion() const
bool IsArrowPortion() const
SwLinePortion * GetNextPortion() const
bool IsPostItsPortion() const
virtual void Paint(const SwTextPaintInfo &rInf) const =0
TextFrameIndex GetLen() const
void Move(SwTextPaintInfo &rInf)
SwTwips GetHangingBaseline() const
virtual tools::Long CalcSpacing(tools::Long nSpaceAdd, const SwTextSizeInfo &rInf) const
bool IsBreakPortion() const
bool IsQuoVadisPortion() const
bool IsMultiPortion() const
bool IsHolePortion() const
bool IsFlyPortion() const
bool IsFlyCntPortion() const
void PrePaint(const SwTextPaintInfo &rInf, const SwLinePortion *pLast) const
SwScriptInfo & GetScriptInfo()
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Left(const tools::Long nLeft)
short Seek(SwFont &rFnt, SwNodeOffset nNode, sal_Int32 nNew, sal_Int32 nOld)
void ChgClip(const SwRect &rRect, const SwTextFrame *pFrame=nullptr, bool bEnlargeRect=false, sal_Int32 nEnlargeTop=0, sal_Int32 nEnlargeBottom=0)
sal_uInt16 GetTabPos() const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
SwTwips AdjustBaseLine(const SwLineLayout &rLine, const SwLinePortion *pPor, SwTwips nPorHeight=0, SwTwips nAscent=0, const bool bAutoToCentered=false) const
void AddExtraBlankWidth()
void CtorInitTextCursor(SwTextFrame *pFrame, SwTextSizeInfo *pInf)
Represents the visualization of a paragraph.
SwParaPortion * GetParaPortion()
TextFrameIndex GetEnd() const
bool SeekAndChgBefore(SwTextSizeInfo &rInf)
TextFrameIndex GetStart() const
bool SeekStartAndChg(SwTextSizeInfo &rInf, const bool bPara=false)
const SwLineLayout * GetPrevLine()
const SwLineLayout * GetCurr() const
sal_uInt16 GetLineNr() const
SwTextFrame * GetTextFrame()
void CalcAscentAndHeight(SwTwips &rAscent, SwTwips &rHeight) const
const SwLineInfo & GetLineInfo() const
const SwLineLayout * GetNextLine() const
bool SeekAndChg(SwTextSizeInfo &rInf)
sal_uInt16 GetDropLines() const
SwTextNode is a paragraph in the document model.
void SetpSpaceAdd(std::vector< tools::Long > *pNew)
void SetPaintOfst(const SwTwips nNew)
void SetPos(const Point &rNew)
const Point & GetPos() const
void DrawRedArrow(const SwLinePortion &rPor) const
SwLinePortion * CalcPaintOfst(const SwRect &rPaint)
void DrawTextLine(const SwRect &rPaint, SwSaveClip &rClip, const bool bUnderSz)
void PaintMultiPortion(const SwRect &rPaint, SwMultiPortion &rMulti, const SwMultiPortion *pEnvPor=nullptr)
SwTextPaintInfo & GetInfo()
void CheckSpecialUnderline(const SwLinePortion *pPor, tools::Long nAdjustBaseLine=0)
void CtorInitTextPainter(SwTextFrame *pFrame, SwTextPaintInfo *pInf)
SwTextFrame * GetTextFrame()
vcl::RenderContext * GetOut()
const SwViewOption & GetOpt() const
void SetUnderFnt(SwUnderlineFont *pNew)
void SetLen(const TextFrameIndex nNew)
void SetIdx(const TextFrameIndex nNew)
void SetFont(SwFont *pNew)
SwUnderlineFont * GetUnderFnt() const
void SetKanaComp(std::deque< sal_uInt16 > *pNew)
const OUString & GetText() const
TextFrameIndex GetIdx() const
virtual void Paint(const SwTextPaintInfo &rInf) const override
void SetPos(const Point &rPoint)
const Point & GetPos() const
bool IsParagraph(bool bHard=false) const
const SwViewOption * GetViewOptions() const
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
static Color GetUnderColor(const SwFont *pFont)
bool IsUnderlineBreak(const SwLinePortion &rPor, const SwFont &rFnt)
double getLength(const B2DPolygon &rCandidate)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
tools::Long GetLen(const Point &rPnt)