20 #include <com/sun/star/linguistic2/XHyphenator.hpp>
62 #include <strings.hrc>
75 #define CHAR_UNDERSCORE u'_'
76 #define CHAR_LEFT_ARROW u'\x25C0'
77 #define CHAR_RIGHT_ARROW u'\x25B6'
78 #define CHAR_TAB u'\x2192'
79 #define CHAR_TAB_RTL u'\x2190'
80 #define CHAR_LINEBREAK u'\x21B5'
81 #define CHAR_LINEBREAK_RTL u'\x21B3'
83 #define DRAW_SPECIAL_OPTIONS_CENTER 1
84 #define DRAW_SPECIAL_OPTIONS_ROTATE 2
87 : m_pSpace( nullptr ),
90 m_bListTabStopIncluded(
false ),
91 m_nListTabStopPosition( 0 )
109 SvxTabAdjust::Left );
113 for ( sal_uInt16
i = 0;
i <
m_oRuler->Count();
i++ )
116 (*m_oRuler)[
i].GetAdjustment() == SvxTabAdjust::Default )
127 for ( sal_uInt16
i = 0;
i <
m_oRuler->Count();
i++ )
130 (*m_oRuler)[
i].GetAdjustment() == SvxTabAdjust::Default )
149 SAL_WARN(
"sw.core",
"+SwTextInfo::CTOR: missing paragraph information");
156 : m_pPara( const_cast<
SwTextInfo&>(rInf).GetParaPortion() )
157 , m_nTextStart( rInf.GetTextStart() )
160 #if OSL_DEBUG_LEVEL > 0
169 OSL_ENSURE( pOut && pRef,
"ChkOutDev: invalid output devices" );
183 : m_pKanaComp(nullptr)
188 , m_pUnderFnt(nullptr)
197 , m_bURLNotify(
false)
198 , m_bStopUnderflow(
false)
199 , m_bFootnoteInside(
false)
200 , m_bOtherThanFootnoteInside(
false)
202 , m_bFirstMulti(
false)
205 , m_bScriptSpace(
false)
206 , m_bForbiddenChars(
false)
207 , m_bSnapToGrid(
false)
213 m_pKanaComp(rNew.GetpKanaComp()),
218 m_pUnderFnt(rNew.GetUnderFnt()),
219 m_pFrame(rNew.m_pFrame),
220 m_pOpt(&rNew.GetOpt()),
221 m_pText(&rNew.GetText()),
222 m_nIdx(rNew.GetIdx()),
224 m_nKanaIdx( rNew.GetKanaIdx() ),
225 m_bOnWin( rNew.OnWin() ),
226 m_bNotEOL( rNew.NotEOL() ),
227 m_bURLNotify( rNew.URLNotify() ),
228 m_bStopUnderflow( rNew.StopUnderflow() ),
229 m_bFootnoteInside( rNew.IsFootnoteInside() ),
230 m_bOtherThanFootnoteInside( rNew.IsOtherThanFootnoteInside() ),
231 m_bMulti( rNew.IsMulti() ),
232 m_bFirstMulti( rNew.IsFirstMulti() ),
233 m_bRuby( rNew.IsRuby() ),
234 m_bHanging( rNew.IsHanging() ),
235 m_bScriptSpace( rNew.HasScriptSpace() ),
236 m_bForbiddenChars( rNew.HasForbiddenChars() ),
237 m_bSnapToGrid( rNew.SnapToGrid() ),
240 #if OSL_DEBUG_LEVEL > 0
259 m_pRef = &m_pVsh->GetRefDev();
271 m_pOut = rDoc.getIDocumentDeviceAccess().getPrinter(
false);
276 #if OSL_DEBUG_LEVEL > 0
297 m_pVsh->GetViewOptions() :
324 m_pKanaComp(rNew.GetpKanaComp()),
329 m_pUnderFnt(rNew.GetUnderFnt()),
330 m_pFrame( rNew.m_pFrame ),
331 m_pOpt(&rNew.GetOpt()),
335 m_nKanaIdx( rNew.GetKanaIdx() ),
336 m_bOnWin( rNew.OnWin() ),
337 m_bNotEOL( rNew.NotEOL() ),
338 m_bURLNotify( rNew.URLNotify() ),
339 m_bStopUnderflow( rNew.StopUnderflow() ),
340 m_bFootnoteInside( rNew.IsFootnoteInside() ),
341 m_bOtherThanFootnoteInside( rNew.IsOtherThanFootnoteInside() ),
342 m_bMulti( rNew.IsMulti() ),
343 m_bFirstMulti( rNew.IsFirstMulti() ),
344 m_bRuby( rNew.IsRuby() ),
345 m_bHanging( rNew.IsHanging() ),
346 m_bScriptSpace( rNew.HasScriptSpace() ),
347 m_bForbiddenChars( rNew.HasForbiddenChars() ),
348 m_bSnapToGrid( rNew.SnapToGrid() ),
351 #if OSL_DEBUG_LEVEL > 0
379 "SwTextSizeInfo::NoteAnimation() changed m_pOut" );
384 const OUString& rText,
419 sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff,
429 nMaxSizeDiff = o3tl::narrowing<sal_uInt16>(aDrawInf.
GetKanaDiff());
430 nMinSize = aSize.
Width();
435 const sal_uInt16 nComp,
441 OSL_ENSURE(
m_pRef ==
m_pOut,
"GetTextBreak is supposed to use the RefDev" );
455 const sal_uInt16 nComp,
462 OSL_ENSURE(
m_pRef ==
m_pOut,
"GetTextBreak is supposed to use the RefDev" );
477 return pos.first->GetTextAttrForCharAt(
pos.second);
495 , m_pWrongList( rInf.GetpWrongList() )
496 , m_pGrammarCheckList( rInf.GetGrammarCheckList() )
497 , m_pSmartTags( rInf.GetSmartTags() )
498 , m_pSpaceAdd( rInf.GetpSpaceAdd() ),
499 m_pBrushItem( rInf.GetBrushItem() ),
500 m_aTextFly( rInf.GetTextFly() ),
501 m_aPos( rInf.GetPos() ),
502 m_aPaintRect( rInf.GetPaintRect() ),
503 m_nSpaceIdx( rInf.GetSpaceIdx() )
508 , m_pWrongList( rInf.GetpWrongList() )
509 , m_pGrammarCheckList( rInf.GetGrammarCheckList() )
510 , m_pSmartTags( rInf.GetSmartTags() )
511 , m_pSpaceAdd( rInf.GetpSpaceAdd() ),
512 m_pBrushItem( rInf.GetBrushItem() ),
513 m_aTextFly( rInf.GetTextFly() ),
514 m_aPos( rInf.GetPos() ),
515 m_aPaintRect( rInf.GetPaintRect() ),
516 m_nSpaceIdx( rInf.GetSpaceIdx() )
530 class SwTransparentTextGuard
542 ~SwTransparentTextGuard();
545 SwTransparentTextGuard::SwTransparentTextGuard(
const SwLinePortion& rPor,
547 : m_aNewMapMode(rPaintInf.GetOut()->GetMapMode())
548 , m_rPaintInf(rPaintInf)
549 , m_rDrawInf(rDrawInf)
551 rPaintInf.
CalcRect(rPor, &m_aPorRect);
552 rDrawInf.
SetOut(*m_aContentVDev);
554 m_aContentMetafile.Record(m_aContentVDev.get());
563 SwTransparentTextGuard::~SwTransparentTextGuard()
565 m_aContentMetafile.Stop();
566 m_aContentMetafile.WindStart();
567 m_aNewMapMode.SetOrigin(m_aPorRect.TopLeft());
568 m_aContentMetafile.SetPrefMapMode(m_aNewMapMode);
569 m_aContentMetafile.SetPrefSize(m_aPorRect.SSize());
570 m_rDrawInf.SetOut(*m_rPaintInf.GetOut());
572 sal_uInt8 nTransPercentVcl = 255 - m_rPaintInf.GetFont()->GetColor().GetAlpha();
573 const Color aTransColor(nTransPercentVcl, nTransPercentVcl, nTransPercentVcl);
574 aVCLGradient.
SetStyle(GradientStyle::Linear);
584 m_rPaintInf.GetOut()->DrawTransparent(m_aContentMetafile, m_aPorRect.TopLeft(),
585 m_aPorRect.SSize(), aVCLGradient);
591 const bool bKern,
const bool bWrong,
592 const bool bSmartTag,
593 const bool bGrammarCheck )
605 sal_uInt16 nComp = 0;
609 bool bCfgIsAutoGrammar =
false;
618 rPor.
Width(), bBullet );
629 aDrawInf.SetNumberOfBlanks( rPor.
InTextGrp() ?
630 static_cast<const SwTextPortion&
>(rPor).GetSpaceCnt( *
this, nCharCnt ) :
634 aDrawInf.SetSpace( nSpaceAdd );
635 aDrawInf.SetKanaComp( nComp );
638 aDrawInf.SetFont(
m_pFnt );
656 aFontPos.AdjustX( -nLeftBorderSpace );
663 aFontPos.AdjustX(nLeftBorderSpace );
666 aFontPos.AdjustY( -nLeftBorderSpace );
669 aFontPos.AdjustX( -nLeftBorderSpace );
672 aFontPos.AdjustY(nLeftBorderSpace );
676 if( aFontPos.X() < 0 )
678 if( aFontPos.Y() < 0 )
683 std::unique_ptr<SwTransparentTextGuard, o3tl::default_delete<SwTransparentTextGuard>> pTransparentText;
686 pTransparentText.reset(
new SwTransparentTextGuard(rPor, *
this, aDrawInf));
693 const Point aPoint( aFontPos.X(), aFontPos.Y() - rPor.
GetAscent() );
695 aDrawInf.SetPos( aPoint );
696 aDrawInf.SetSize( aSize );
698 aDrawInf.SetKern( bKern ? rPor.
Width() : 0 );
699 aDrawInf.SetWrong( bTmpWrong ?
m_pWrongList :
nullptr );
701 aDrawInf.SetSmartTags( bTmpSmart ?
m_pSmartTags :
nullptr );
706 aDrawInf.SetPos( aFontPos );
711 aDrawInf.SetWrong( bTmpWrong ?
m_pWrongList :
nullptr );
713 aDrawInf.SetSmartTags( bTmpSmart ?
m_pSmartTags :
nullptr );
721 const bool bInsideBox )
const
725 aSize.
setWidth( static_cast<const SwHangingPortion&>(rPor).GetInnerWidth() );
731 aSize.AdjustWidth(nAdd );
739 aSize.setWidth( aSize.Height() );
740 aSize.setHeight( nTmp );
744 aPoint.setY(
Y() - aSize.Height() );
767 aPoint.AdjustX( -(aSize.Width()) );
769 SwRect aRect( aPoint, aSize );
779 const bool bJoinWithPrev =
780 static_cast<const SwTextPortion&
>(rPor).GetJoinBorderWithPrev();
781 const bool bJoinWithNext =
782 static_cast<const SwTextPortion&
>(rPor).GetJoinBorderWithNext();
785 aRect.
AddTop(
GetFont()->CalcShadowSpace(SvxShadowItemSide::TOP, bIsVert, bIsVertLRBT,
786 bJoinWithPrev, bJoinWithNext));
787 aRect.
AddBottom( -
GetFont()->CalcShadowSpace(SvxShadowItemSide::BOTTOM, bIsVert, bIsVertLRBT,
788 bJoinWithPrev, bJoinWithNext));
789 aRect.
AddLeft(
GetFont()->CalcShadowSpace(SvxShadowItemSide::LEFT, bIsVert, bIsVertLRBT,
790 bJoinWithPrev, bJoinWithNext));
791 aRect.
AddRight( -
GetFont()->CalcShadowSpace(SvxShadowItemSide::RIGHT, bIsVert, bIsVertLRBT,
792 bJoinWithPrev, bJoinWithNext));
798 if( aRect.
HasArea() && pIntersect )
802 if (
GetOut()->IsClipRegion() )
804 SwRect aClip(
GetOut()->GetClipRegion().GetBoundRect() );
838 static SwFont s_aFnt = [&]()
861 rNonConstTextPaintInfo.
SetFont( &s_aFnt );
866 if (nDir == 900_deg10 || nDir == 2700_deg10)
867 nMaxWidth = rRect.
Height();
870 assert(nDir == 0_deg10);
871 nMaxWidth = rRect.
Width();
875 const OUString aTmp( cChar );
877 while ( aFontSize.
Width() > nMaxWidth )
879 SwTwips nFactor = ( 100 * aFontSize.
Width() ) / nMaxWidth;
890 s_aFnt.
SetSize( aFontSize, nAct );
894 if ( aFontSize.
Width() >= nOldWidth )
903 switch ( nDir.
get() )
907 nX += ( rRect.
Width() - aFontSize.
Width() ) / 2;
922 Point aTmpPos( nX, nY );
923 rNonConstTextPaintInfo.
SetPos( aTmpPos );
924 sal_uInt16 nOldWidth = rPor.
Width();
926 rTextPaintInfo.
DrawText( aTmp, rPor );
928 rNonConstTextPaintInfo.
SetFont( const_cast<SwFont*>(pOldFnt) );
929 rNonConstTextPaintInfo.
SetPos( aOldPos );
934 if (
OnWin() || !bRetouche )
937 const_cast<SwTextPaintInfo*>(
this)->GetTextFly().
938 DrawFlyRect(
m_pOut, rRect );
969 const auto& rBreakPortion =
static_cast<const SwBreakPortion&
>(rPor);
973 sal_uInt16 nOldWidth = rPor.
Width();
1011 SwRect aRect( static_cast<const SwArrowPortion&>(rPor).
GetPos(), aSize );
1013 if( static_cast<const SwArrowPortion&>(rPor).IsLeft() )
1016 aRect.
Pos().AdjustX(20 );
1025 aRect.
Pos().AdjustY( -(aRect.
Height() + 20) );
1026 aRect.
Pos().AdjustX( -(aRect.
Width() + 20) );
1058 aTmp.setY(
m_aPos.Y() - nFontAscent );
1063 aTmp.setX(
m_aPos.X() - nFontAscent );
1069 aTmp.setX(
m_aPos.X() - nFontHeight +
1075 SwRect aTmpRect( aTmp, aSize );
1120 OSL_ENSURE(
OnWin(),
"SwTextPaintInfo::DrawBackground: printer pollution ?" );
1123 CalcRect( rPor,
nullptr, &aIntersect,
true );
1146 CalcRect( rPor, &aIntersect,
nullptr,
true );
1150 const ::sw::mark::IMark* pFieldmark =
1155 SAL_INFO(
"sw.core",
"Found Fieldmark " << pFieldmark->ToString());
1158 SAL_INFO(
"sw.core",
"Found StartMark");
1159 if (
OnWin() && (pFieldmark!=
nullptr || bIsStartMark) &&
1161 !
GetOpt().IsPagePreview())
1174 CalcRect( rPor,
nullptr, &aIntersect,
true );
1258 SAL_WARN(
"sw",
"something dodgy, clamping text index to prevent crash");
1262 sal_uInt16 nOldWidth = rPor.
Width();
1267 CalcRect( rPor,
nullptr, &aIntersect,
true );
1323 if ( !
GetOpt().IsPagePreview()
1324 && !
GetOpt().IsReadonly()
1337 if ( !
GetOpt().IsPagePreview()
1344 if (
GetOpt().IsTab() ) bDraw =
true;
1347 if (
GetOpt().IsSoftHyph() )bDraw =
true;
1350 if (
GetOpt().IsHardBlank())bDraw =
true;
1354 OSL_ENSURE(
false,
"SwTextPaintInfo::DrawViewOpt: don't know how to draw this" );
1363 sal_Int16 nMinLeading, sal_Int16 nMinTrailing,
bool bNoCapsHyphenation )
1365 sal_Int32 nLen = rVals.getLength();
1370 PropertyValue *pVal = rVals.getArray();
1374 pVal[0].Value <<= nMinLeading;
1378 pVal[1].Value <<= nMinTrailing;
1382 pVal[2].Value <<= bNoCapsHyphenation;
1386 PropertyValue *pVal = rVals.getArray();
1387 pVal[0].Value <<= nMinLeading;
1388 pVal[1].Value <<= nMinTrailing;
1389 pVal[2].Value <<= bNoCapsHyphenation;
1392 OSL_FAIL(
"unexpected size of sequence" );
1399 "hyphenation values not yet initialized" );
1410 MaxHyph() = rAttr.GetMaxHyphens();
1411 const bool bAuto = bAutoHyphen || rAttr.IsHyphen();
1414 const sal_Int16 nMinimalLeading = std::max(rAttr.GetMinLead(),
sal_uInt8(2));
1415 const sal_Int16 nMinimalTrailing = rAttr.GetMinTrail();
1416 const bool bNoCapsHyphenation = rAttr.IsNoCapsHyphenation();
1423 const bool bNewQuick,
const bool bTst )
1449 SW_MOD()->GetCTLOptions().GetCTLTextNumerals());
1494 "hyphenationmissing",
SwResId(STR_HYPH_MISSING),
1495 SwResId(STR_HYPH_MISSING_DETAIL)
1497 InfobarType::WARNING);
1524 OSL_ENSURE(pMaster,
"pTextFrame without Master");
1551 const bool bQuickL,
const bool bTst)
1570 m_pUnderflow(nullptr),
1572 m_pLastTab(nullptr),
1574 m_nLineStart(rInf.GetIdx()),
1576 m_nLeft(rInf.m_nLeft),
1577 m_nRight(rInf.m_nRight),
1578 m_nFirst(rInf.m_nLeft),
1579 m_nRealWidth(sal_uInt16(nActWidth)),
1580 m_nWidth(m_nRealWidth),
1582 m_nLineNetHeight(0),
1583 m_nForcedLeftMargin(0),
1585 m_bFootnoteDone(true),
1592 m_bUnderflow(
false),
1593 m_bInterHyph(
false),
1596 m_bQuick(rInf.m_bQuick),
1597 m_bNoEndHyph(
false),
1598 m_bNoMidHyph(
false),
1599 m_bIgnoreFly(
false),
1600 m_bFakeLineStart(
false),
1601 m_bTabOverflow(
false ),
1602 m_bTestFormat(rInf.m_bTestFormat),
1616 if( pPor->IsFootnotePortion() && nHeight >
static_cast<SwFootnotePortion*
>(pPor)->Orig() )
1634 const sal_Unicode cThousandSep =
',' == cTabDec ?
'.' :
',';
1637 const sal_Unicode cThousandSep2 =
',' == cTabDec ?
'.' :
'\'';
1639 bool bNumFound =
false;
1642 for( ; i < nEnd; ++i )
1671 if( cTabDec == cPos )
1673 OSL_ENSURE( cPos,
"Unexpected end of string" );
1685 if ( ( 0x2F < cPos && cPos < 0x3A ) ||
1686 ( bNumFound && ( cPos == cThousandSep || cPos == cThousandSep2 ) ) )
1709 if ( cPos != cTabDec && cPos != cThousandSep && cPos !=cThousandSep2 && ( 0x2F >= cPos || cPos >= 0x3A ) )
1723 if(
GetLast()->IsKernPortion() )
1726 !
GetLast()->IsHolePortion() ) )
1755 if (!bTabOverMargin && !bTabOverSpacing)
1784 nLineWidth = nTextFrameWidth -
X();
1786 if (!bTabOverMargin)
1790 nLineWidth = nTextFrameWidth - pLastTab->
GetTabPos();
1800 OUString
const & rCh )
1802 , m_pOldSmartTagList(nullptr)
1803 , m_pOldGrammarCheckList(nullptr)
1843 const sal_uInt16
nPos = pSmartTags->GetWrongPos(
pos.second);
1844 const sal_Int32 nListPos = pSmartTags->Pos(nPos);
1845 if (nListPos ==
pos.second && pSmartTags->SubList(nPos) !=
nullptr)
1851 && nListPos <
pos.second && !
aText.isEmpty())
1872 const sal_uInt16
nPos = pGrammar->GetWrongPos(
pos.second);
1873 const sal_Int32 nListPos = pGrammar->Pos(nPos);
1874 if (nListPos ==
pos.second && pGrammar->SubList(nPos) !=
nullptr)
1880 && nListPos <
pos.second && !
aText.isEmpty())
void SetEndColor(const Color &rColor)
vcl::RenderContext * GetOut() const
TextFrameIndex m_nLastBookmarkPos
need to check for bookmarks at every portion
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
void SetLineNetHeight(const sal_uInt16 nNew)
virtual void Height(const SwTwips nNew, const bool bText=true) override
OutDevType GetOutDevType() const
const sal_Unicode CH_BREAK
bool IsFirstMulti() const
VclPtr< OutputDevice > m_pRef
Represents the visualization of a paragraph.
static Color & GetFieldShadingsColor()
void SwitchVerticalToHorizontal(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from vertical to horizontal layout...
const SvxHyphenZoneItem & GetHyphenZone(bool=true) const
sal_uInt16 GetLeftBorderSpace() const
#define DRAW_SPECIAL_OPTIONS_ROTATE
void Right(const tools::Long nRight)
void DrawBackBrush(const SwLinePortion &rPor) const
void SetSnapToGrid(const bool bN)
const SwFormatDrop & GetDrop(bool=true) const
Marks a position in the document model.
bool IsPagePreview() const
const SvxForbiddenRuleItem & GetForbiddenRule(bool=true) const
bool CheckFootnotePortion_(SwLineLayout const *pCurr)
const css::beans::PropertyValues & GetHyphValues() const
void setWidth(tools::Long nWidth)
const Point & GetRefPoint() const
const SvxTabStopItem & GetTabStops(bool=true) const
SwDocShell * GetDocShell()
static void lcl_InitHyphValues(PropertyValues &rVals, sal_Int16 nMinLeading, sal_Int16 nMinTrailing, bool bNoCapsHyphenation)
bool IsTransparent() const
sal_Unicode m_cTabDecimal
void SetPos(const Point &rNew)
void Left(const tools::Long nLeft)
virtual tools::Long CalcSpacing(tools::Long nSpaceAdd, const SwTextSizeInfo &rInf) const
bool GetJoinBorderWithPrev() const
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout...
sal_Unicode GetTabDecimal() const
static OUString convertToBcp47(LanguageType nLangID)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
void SetLast(SwLinePortion *pNewLast)
SwTabPortion * GetLastTab()
static std::shared_ptr< const vcl::text::TextLayoutCache > CreateTextLayoutCache(OUString const &)
Size GetTextSize_(SwDrawTextInfo &rInf)
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd)
tools::Long GetLen(const Point &rPnt)
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
bool DifferentFontCacheId(const SwFont *pFnt, SwFontScript nWhich)
void SetKanaComp(short nNew)
SwParaPortion * GetPara()
bool GetListTabStopPosition(tools::Long &nListTabStopPosition) const
Retrieves the list tab stop position, if the paragraph's list level defines one and this list tab sto...
const SvxBrushItem * m_pBrushItem
void SetScriptSpace(const bool bNew)
const MapMode & GetMapMode() const
std::map< sal_Int32, std::shared_ptr< SetItemPropertyStorage > > PropertyValues
const OUString * pOldText
bool IsHangingPortion() const
#define CH_TXTATR_NEWLINE
void DrawText(const OUString &rText, const SwLinePortion &rPor, TextFrameIndex nIdx=TextFrameIndex(0), TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING), const bool bKern=false) const
tools::Long GetSpaceAdd() const
void NoteAnimation() const
void Pos(const Point &rNew)
void SetBorder(sal_uInt16 nBorder)
const Size & GetSize(SwFontScript nWhich) const
constexpr OUStringLiteral UPN_HYPH_MIN_TRAILING
void DrawPostIts(bool bScript) const
IDocumentMarkAccess * getIDocumentMarkAccess()
void SetText(const OUString &rNew)
void SetMulti(const bool bNew)
Of course Writer needs its own rectangles.
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
bool HasHint(TextFrameIndex nPos) const
void SetFrame(const SwTextFrame *pNewFrame)
tools::Long m_nListTabStopPosition
SwPosSize GetTextSize(OutputDevice *pOut, const SwScriptInfo *pSI, const OUString &rText, TextFrameIndex nIdx, TextFrameIndex nLen) const
void DrawText_(const OUString &rText, const SwLinePortion &rPor, const TextFrameIndex nIdx, const TextFrameIndex nLen, const bool bKern, const bool bWrong=false, const bool bSmartTag=false, const bool bGrammarCheck=false)
void SetHanging(const bool bNew)
void SetEndIntensity(sal_uInt16 nIntens)
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Degree10 GetOrientation(const bool bVertLayout=false, const bool bVertFormatLRBT=false) const
#define DRAW_SPECIAL_OPTIONS_CENTER
bool ChgHyph(const bool bNew)
void DrawText_(SwDrawTextInfo &rInf)
void AddTop(const tools::Long nAdd)
void SetColor(const Color &rColor)
size_t CountCompChg() const
static OutputDevice * GetDefaultDevice()
OUString SwResId(TranslateId aId)
constexpr tools::Long Width() const
static sal_uInt16 GetPostItsWidth(const OutputDevice *pOut)
sal_Int32 m_nPosition
current iteration index in text node
#define CH_TXTATR_BREAKWORD
void SetSteps(sal_uInt16 nSteps)
void AppendInfoBarWhenReady(const OUString &sId, const OUString &sPrimaryMessage, const OUString &sSecondaryMessage, InfobarType aInfobarType, bool bShowCloseButton=true)
void SetOfsY(sal_uInt16 nOfsY)
#define CHAR_LINEBREAK_RTL
bool IsBreakPortion() const
const SwRect & getFrameArea() const
const vcl::Font & GetFont() const
void SetFnt(SwFont *pNew)
sal_Unicode GetChar(TextFrameIndex const nPos) const
virtual ::sw::mark::IFieldmark * getFieldmarkFor(const SwPosition &pos) const =0
void SetUnderFnt(SwUnderlineFont *pULFnt)
sal_uInt16 GetAscent(SwViewShell const *pSh, const OutputDevice &rOut)
void SetOut(OutputDevice &rNew)
SwRect & Intersection(const SwRect &rRect)
void CtorInitLineInfo(const SwAttrSet &rAttrSet, const SwTextNode &rTextNode)
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
void SetStartColor(const Color &rColor)
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich, const Color *pColor=nullptr) const
SwLinePortion * m_pUnderflow
void Width(tools::Long nNew)
vcl::RenderContext * GetRefDev()
bool m_bListTabStopIncluded
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
sal_uInt8 GetDirection() const
void CtorInitTextSizeInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, TextFrameIndex nIdx)
void ChgPhysFnt(SwViewShell const *pSh, OutputDevice &rOut)
void DrawTextOpaque(SwDrawTextInfo &rInf)
This method is called by DrawText().
const std::optional< Color > & GetBackColor() const
constexpr OUStringLiteral UPN_IS_GRAMMAR_AUTO
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetHyphPos(TextFrameIndex *const pNew)
const SvxHangingPunctuationItem & GetHangingPunctuation(bool=true) const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTRED
SwFontScript GetActual() const
bool IsBlank(bool bHard=false) const
void SetPaintOfst(const SwTwips nNew)
void DrawRect(const tools::Rectangle &rRect)
bool InFixMargGrp() const
TextFrameIndex GetOffset() const
void DrawBackground(const SwLinePortion &rPor, const Color *pColor=nullptr) const
This portion represents a part of the paragraph string.
Point BottomRight() const
const SwViewOption & GetOpt() const
void SetStyleName(const OUString &rStyleName, const SwFontScript nWhich)
SwTextNode const * GetTextNodeForParaProps() const
sal_uInt16 m_nLineNetHeight
SwPosSize GetTextSize() const
UNDERLYING_TYPE get() const
void SetTransparent(const bool bTrans)
css::beans::PropertyValues m_aHyphVals
tools::Long GetKanaDiff() const
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const
TextFrameIndex m_nTextStart
TextFrameIndex m_nUnderScorePos
enlarge repaint if underscore has been found
Collection of SwLinePortion instances, representing one line of text.
const SvxParaVertAlignItem & GetParaVertAlign(bool=true) const
SwTwips GetRealHeight() const
SwTwips GetLineWidth()
Returns the distance between the current horizontal position and the end of the line.
static SwSmartTagMgr & Get()
vcl::RenderContext * GetOut()
void SetFont(SwFont *pNew)
void DrawLineBreak(const SwLinePortion &rPor) const
void AddBottom(const tools::Long nAdd)
SwParaPortion * GetParaPortion()
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
bool IsFlyPortion() const
void SetVertical(Degree10 nDir, const bool bVertLayout=false, const bool bVertLayoutLRBT=false)
bool InitHyph(const bool bAuto=false)
std::unique_ptr< SwWrongList > m_pTempList
SwTextSlot(const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen, bool bExgLists, OUString const &rCh=OUString())
const sal_Unicode CH_BLANK
bool IsKernPortion() const
void SetCachedVclData(std::shared_ptr< const vcl::text::TextLayoutCache > const &pCachedVclData)
sw::WrongListIterator * m_pGrammarCheckList
const Color & GetLineColor() const
#define CH_TXT_ATR_FIELDSTART
void CalcRect(const SwLinePortion &rPor, SwRect *pRect, SwRect *pIntersect=nullptr, const bool bInsideBox=false) const
Calculate the rectangular area where the portion takes place.
constexpr OUStringLiteral UPN_HYPH_MIN_LEADING
const SwFormatDrop * GetDropFormat() const
constexpr OUStringLiteral UPN_HYPH_NO_CAPS
SwUnderlineFont * m_pUnderFnt
#define LANGUAGE_DONTKNOW
bool IsSmartTagsEnabled() const
void DrawStretchText_(SwDrawTextInfo &rInf)
sal_uInt16 GetTabPos() const
sw::WrongListIterator * m_pSmartTags
#define NON_PRINTING_CHARACTER_COLOR
void DrawTab(const SwLinePortion &rPor) const
const std::optional< editeng::SvxBorderLine > & GetLeftBorder() const
SwLineBreakClear GetClear() const
TextFrameIndex GetIdx() const
#define SPECIAL_FONT_HEIGHT
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
bool IsDropPortion() const
void DrawRect(const SwRect &rRect, bool bRetouche) const
void SetTabDecimal(const sal_Unicode cNew)
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
const AllSettings & GetSettings() const
bool IsOnlineSpell() const
void AddRight(const tools::Long nAdd)
DrawModeFlags GetDrawMode() const
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
static bool IsFieldShadings()
void SetOfsX(sal_uInt16 nOfsX)
const Color & GetColor() const
TextFrameIndex GetLen() const
void CtorInitTextPaintInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint)
SwTextFrame * GetTextFrame()
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(TextFrameIndex nIndex) const
map position in potentially merged text frame to SwPosition
static void PaintPostIts(OutputDevice *pOut, const SwRect &rRect, bool bIsScript)
SwTabPortion * m_pLastTab
const OUString & GetText() const
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
bool IsHolePortion() const
VclPtr< OutputDevice > m_pOut
static void ChkOutDev(const SwTextSizeInfo &rInf)
void CtorInitTextInfo(SwTextFrame *pFrame)
const Point & GetPos() const
void SetForbiddenChars(const bool bN)
bool m_bOtherThanFootnoteInside
void SwitchLTRtoRTL(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from LTR to RTL layout.
Base class for anything that can be part of a line in the Writer layout.
void SetAngle(Degree10 nAngle)
void AddLeft(const tools::Long nAdd)
static void lcl_DrawSpecial(const SwTextPaintInfo &rTextPaintInfo, const SwLinePortion &rPor, SwRect &rRect, const Color &rCol, sal_Unicode cChar, sal_uInt8 nOptions)
Draws a special portion E.g.
const css::lang::Locale & GetLocale(const LanguageType aLang)
void Bottom(const tools::Long nBottom)
SwTextNode is a paragraph in the document model.
const SwViewOption * m_pOpt
std::deque< sal_uInt16 > * m_pKanaComp
LanguageType GetLanguage() const
static bool usesHyphenation(LanguageType nLang)
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
bool IsHyphenate() const
If the Hyphenator returns ERROR or the language is set to NOLANGUAGE we do not hyphenate.
tools::Rectangle SVRect() const
void SetLen(const TextFrameIndex nNew)
void SetFirstMulti(const bool bNew)
void SetAlign(const TextAlign eAlign)
SwTextFrame * FindMaster() const
constexpr tools::Long Height() const
void SetSize(const Size &rSize, const SwFontScript nWhich)
PortionType GetWhichPor() const
OUString const & GetDefBulletFontname()
retrieve font family name used for the default bullet list characters
const SvxLineSpacingItem * m_pSpace
LanguageType GetDigitLanguage() const
std::unique_ptr< sw::WrongListIterator > m_pTempIter
const SvxParaGridItem & GetParaGrid(bool=true) const
const SvxScriptSpaceItem & GetScriptSpace(bool=true) const
#define SAL_INFO(area, stream)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
std::optional< SvxTabStopItem > m_oRuler
bool IsRightToLeft() const
void SetFamily(const FontFamily eFamily, const SwFontScript nWhich)
void Top(const tools::Long nTop)
void SetCharSet(const rtl_TextEncoding eCharSet, const SwFontScript nWhich)
TextFrameIndex GetLen() const
void SetSnapToGrid(bool bNew)
sw::WrongListIterator * m_pWrongList
bool IsFootnoteAllowed() const
virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection(editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection) const override
SwTwips m_nLeftMargin
First or left margin, depending on context.
void SetLineStart(TextFrameIndex const nNew)
SwFontSave(const SwTextSizeInfo &rInf, SwFont *pFnt, SwAttrIter *pItr=nullptr)
sw::WrongListIterator * m_pOldSmartTagList
SwScriptInfo & GetScriptInfo()
double getLength(const B2DPolygon &rCandidate)
SwLinePortion * GetLast()
const Color & GetHighlightColor() const
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
bool CheckCurrentPosBookmark()
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
void SetName(const OUString &rName, const SwFontScript nWhich)
TextFrameIndex GetTextBreak(SwDrawTextInfo const &rInf, tools::Long nTextWidth)
void DrawRedArrow(const SwLinePortion &rPor) const
#define UPH_HYPH_MIN_LEADING
constexpr sal_Int32 COMPLETE_STRING
void setHeight(tools::Long nHeight)
static TextFrameIndex GetMinLen(const SwTextSizeInfo &rInf)
uno::Reference< linguistic2::XHyphenator > GetHyphenator()
TextFrameIndex GetTextBreak(const tools::Long nLineWidth, const TextFrameIndex nMaxLen, const sal_uInt16 nComp, vcl::text::TextLayoutCache const *) const
#define SPACING_PRECISION_FACTOR
#define SAL_WARN(area, stream)
bool HasMarkedLabel() const
Returns if this text node has a marked label.
void SetLineHeight(const sal_uInt16 nNew)
void SetFont(SwFont *pNew)
static sal_Int16 CheckHyphLang(css::uno::Reference< css::linguistic2::XHyphenator >const &xHyph, LanguageType nLang)
void SetStyle(GradientStyle eStyle)
void CtorInitTextFly(const SwTextFrame *pFrame)
sal_uInt16 GetKanaComp() const
bool GetJoinBorderWithNext() const
SwLinePortion * GetNextPortion() const
SwTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL=false, const bool bQuickL=false, const bool bTst=false)
static bool FlushVout()
Output virtual Device (e.g. for animations)
void SetIdx(const TextFrameIndex nNew)
sal_uInt16 m_nForcedLeftMargin
SwViewShell * GetCurrShell() const
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...
void Height(tools::Long nNew)
std::shared_ptr< const vcl::text::TextLayoutCache > m_pOldCachedVclData
SwPosition MapViewToModelPos(TextFrameIndex nIndex) const
SvxParaVertAlignItem::Align m_nVertAlign
#define UPH_HYPH_MIN_TRAILING
tools::Long GetHeight() const
SwRootFrame * getRootFrame()
const std::shared_ptr< const vcl::text::TextLayoutCache > & GetCachedVclData() const
TextFrameIndex m_nSoftHyphPos
SoftHyphPos for Hyphenation.
void SetStartIntensity(sal_uInt16 nIntens)
const Color & GetFillColor() const
sal_uInt16 GetAscent() const
bool m_bDetectedRangeSegmentation false
std::vector< tools::Long > * m_pSpaceAdd
sw::WrongListIterator * m_pOldGrammarCheckList
bool IsBlankPortion() const