20#include <com/sun/star/linguistic2/XHyphenator.hpp>
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)
199, m_bStopUnderflow(false)
200, m_bFootnoteInside(false)
201, m_bOtherThanFootnoteInside(false)
203, m_bFirstMulti(false)
206, m_bScriptSpace(false)
207, m_bForbiddenChars(false)
208, m_bSnapToGrid(false)
214 m_pKanaComp(rNew.GetpKanaComp()),
219 m_pUnderFnt(rNew.GetUnderFnt()),
220 m_pFrame(rNew.m_pFrame),
221 m_pOpt(&rNew.GetOpt()),
222 m_pText(&rNew.GetText()),
223 m_nIdx(rNew.GetIdx()),
225 m_nMeasureLen(rNew.GetMeasureLen()),
226 m_nKanaIdx( rNew.GetKanaIdx() ),
227 m_bOnWin( rNew.OnWin() ),
228 m_bNotEOL( rNew.NotEOL() ),
229 m_bURLNotify( rNew.URLNotify() ),
230 m_bStopUnderflow( rNew.StopUnderflow() ),
231 m_bFootnoteInside( rNew.IsFootnoteInside() ),
232 m_bOtherThanFootnoteInside( rNew.IsOtherThanFootnoteInside() ),
233 m_bMulti( rNew.IsMulti() ),
234 m_bFirstMulti( rNew.IsFirstMulti() ),
235 m_bRuby( rNew.IsRuby() ),
236 m_bHanging( rNew.IsHanging() ),
237 m_bScriptSpace( rNew.HasScriptSpace() ),
238 m_bForbiddenChars( rNew.HasForbiddenChars() ),
242#if OSL_DEBUG_LEVEL > 0
278#if OSL_DEBUG_LEVEL > 0
326 m_pKanaComp(rNew.GetpKanaComp()),
331 m_pUnderFnt(rNew.GetUnderFnt()),
332 m_pFrame( rNew.m_pFrame ),
333 m_pOpt(&rNew.GetOpt()),
338 m_nKanaIdx( rNew.GetKanaIdx() ),
339 m_bOnWin( rNew.OnWin() ),
340 m_bNotEOL( rNew.NotEOL() ),
341 m_bURLNotify( rNew.URLNotify() ),
342 m_bStopUnderflow( rNew.StopUnderflow() ),
343 m_bFootnoteInside( rNew.IsFootnoteInside() ),
344 m_bOtherThanFootnoteInside( rNew.IsOtherThanFootnoteInside() ),
345 m_bMulti( rNew.IsMulti() ),
346 m_bFirstMulti( rNew.IsFirstMulti() ),
347 m_bRuby( rNew.IsRuby() ),
348 m_bHanging( rNew.IsHanging() ),
349 m_bScriptSpace( rNew.HasScriptSpace() ),
350 m_bForbiddenChars( rNew.HasForbiddenChars() ),
354#if OSL_DEBUG_LEVEL > 0
382 "SwTextSizeInfo::NoteAnimation() changed m_pOut" );
387 const OUString& rText,
423 sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff,
433 nMaxSizeDiff = o3tl::narrowing<sal_uInt16>(aDrawInf.
GetKanaDiff());
434 nMinSize = aSize.
Width();
439 const sal_uInt16 nComp,
445 OSL_ENSURE(
m_pRef ==
m_pOut,
"GetTextBreak is supposed to use the RefDev" );
459 const sal_uInt16 nComp,
466 OSL_ENSURE(
m_pRef ==
m_pOut,
"GetTextBreak is supposed to use the RefDev" );
481 return pos.first->GetTextAttrForCharAt(
pos.second);
499 , m_pWrongList( rInf.GetpWrongList() )
500 , m_pGrammarCheckList( rInf.GetGrammarCheckList() )
501 , m_pSmartTags( rInf.GetSmartTags() )
502 , m_pSpaceAdd( rInf.GetpSpaceAdd() ),
503 m_pBrushItem( rInf.GetBrushItem() ),
504 m_aTextFly( rInf.GetTextFly() ),
505 m_aPos( rInf.GetPos() ),
506 m_aPaintRect( rInf.GetPaintRect() ),
507 m_nSpaceIdx( rInf.GetSpaceIdx() )
512 , m_pWrongList( rInf.GetpWrongList() )
513 , m_pGrammarCheckList( rInf.GetGrammarCheckList() )
514 , m_pSmartTags( rInf.GetSmartTags() )
515 , m_pSpaceAdd( rInf.GetpSpaceAdd() ),
516 m_pBrushItem( rInf.GetBrushItem() ),
517 m_aTextFly( rInf.GetTextFly() ),
518 m_aPos( rInf.GetPos() ),
519 m_aPaintRect( rInf.GetPaintRect() ),
520 m_nSpaceIdx( rInf.GetSpaceIdx() )
534class SwTransparentTextGuard
546 ~SwTransparentTextGuard();
549SwTransparentTextGuard::SwTransparentTextGuard(
const SwLinePortion& rPor,
551 : m_aNewMapMode(rPaintInf.GetOut()->GetMapMode())
552 , m_rPaintInf(rPaintInf)
553 , m_rDrawInf(rDrawInf)
555 rPaintInf.
CalcRect(rPor, &m_aPorRect);
556 rDrawInf.
SetOut(*m_aContentVDev);
558 m_aContentMetafile.Record(m_aContentVDev.get());
567SwTransparentTextGuard::~SwTransparentTextGuard()
569 m_aContentMetafile.Stop();
570 m_aContentMetafile.WindStart();
571 m_aNewMapMode.SetOrigin(m_aPorRect.TopLeft());
572 m_aContentMetafile.SetPrefMapMode(m_aNewMapMode);
573 m_aContentMetafile.SetPrefSize(m_aPorRect.SSize());
574 m_rDrawInf.SetOut(*m_rPaintInf.GetOut());
576 sal_uInt8 nTransPercentVcl = 255 - m_rPaintInf.GetFont()->GetColor().GetAlpha();
577 const Color aTransColor(nTransPercentVcl, nTransPercentVcl, nTransPercentVcl);
578 aVCLGradient.
SetStyle(GradientStyle::Linear);
588 m_rPaintInf.GetOut()->DrawTransparent(m_aContentMetafile, m_aPorRect.TopLeft(),
589 m_aPorRect.SSize(), aVCLGradient);
595 const bool bKern,
const bool bWrong,
596 const bool bSmartTag,
597 const bool bGrammarCheck )
609 sal_uInt16 nComp = 0;
613 bool bCfgIsAutoGrammar =
false;
622 rPor.
Width(), bBullet );
660 aFontPos.AdjustX( -nLeftBorderSpace );
667 aFontPos.AdjustX(nLeftBorderSpace );
670 aFontPos.AdjustY( -nLeftBorderSpace );
673 aFontPos.AdjustX( -nLeftBorderSpace );
676 aFontPos.AdjustY(nLeftBorderSpace );
680 if( aFontPos.X() < 0 )
682 if( aFontPos.Y() < 0 )
687 std::unique_ptr<SwTransparentTextGuard, o3tl::default_delete<SwTransparentTextGuard>> pTransparentText;
690 pTransparentText.reset(
new SwTransparentTextGuard(rPor, *
this, aDrawInf));
697 const Point aPoint( aFontPos.X(), aFontPos.Y() - rPor.
GetAscent() );
699 aDrawInf.
SetPos( aPoint );
710 aDrawInf.
SetPos( aFontPos );
725 const bool bInsideBox )
const
748 aPoint.setY(
Y() - aSize.
Height() );
771 aPoint.AdjustX( -(aSize.
Width()) );
773 SwRect aRect( aPoint, aSize );
783 const bool bJoinWithPrev =
784 static_cast<const SwTextPortion&
>(rPor).GetJoinBorderWithPrev();
785 const bool bJoinWithNext =
786 static_cast<const SwTextPortion&
>(rPor).GetJoinBorderWithNext();
789 aRect.
AddTop(
GetFont()->CalcShadowSpace(SvxShadowItemSide::TOP, bIsVert, bIsVertLRBT,
790 bJoinWithPrev, bJoinWithNext));
791 aRect.
AddBottom( -
GetFont()->CalcShadowSpace(SvxShadowItemSide::BOTTOM, bIsVert, bIsVertLRBT,
792 bJoinWithPrev, bJoinWithNext));
793 aRect.
AddLeft(
GetFont()->CalcShadowSpace(SvxShadowItemSide::LEFT, bIsVert, bIsVertLRBT,
794 bJoinWithPrev, bJoinWithNext));
795 aRect.
AddRight( -
GetFont()->CalcShadowSpace(SvxShadowItemSide::RIGHT, bIsVert, bIsVertLRBT,
796 bJoinWithPrev, bJoinWithNext));
802 if( aRect.
HasArea() && pIntersect )
806 if (
GetOut()->IsClipRegion() )
808 SwRect aClip(
GetOut()->GetClipRegion().GetBoundRect() );
842 static SwFont s_aFnt = [&]()
865 rNonConstTextPaintInfo.
SetFont( &s_aFnt );
870 if (nDir == 900_deg10 || nDir == 2700_deg10)
871 nMaxWidth = rRect.
Height();
874 assert(nDir == 0_deg10);
875 nMaxWidth = rRect.
Width();
879 const OUString aTmp( cChar );
881 while ( aFontSize.
Width() > nMaxWidth )
883 SwTwips nFactor = ( 100 * aFontSize.
Width() ) / nMaxWidth;
894 s_aFnt.
SetSize( aFontSize, nAct );
898 if ( aFontSize.
Width() >= nOldWidth )
907 switch ( nDir.
get() )
911 nX += ( rRect.
Width() - aFontSize.
Width() ) / 2;
926 Point aTmpPos( nX, nY );
927 rNonConstTextPaintInfo.
SetPos( aTmpPos );
928 sal_uInt16 nOldWidth = rPor.
Width();
930 rTextPaintInfo.
DrawText( aTmp, rPor );
932 rNonConstTextPaintInfo.
SetFont(
const_cast<SwFont*
>(pOldFnt) );
933 rNonConstTextPaintInfo.
SetPos( aOldPos );
938 if (
OnWin() || !bRetouche )
942 DrawFlyRect(
m_pOut, rRect );
973 const auto& rBreakPortion =
static_cast<const SwBreakPortion&
>(rPor);
977 sal_uInt16 nOldWidth = rPor.
Width();
1020 aRect.
Pos().AdjustX(20 );
1029 aRect.
Pos().AdjustY( -(aRect.
Height() + 20) );
1030 aRect.
Pos().AdjustX( -(aRect.
Width() + 20) );
1062 aTmp.setY(
m_aPos.Y() - nFontAscent );
1067 aTmp.setX(
m_aPos.X() - nFontAscent );
1073 aTmp.setX(
m_aPos.X() - nFontHeight +
1079 SwRect aTmpRect( aTmp, aSize );
1099 !
GetOpt().IsPagePreview())
1104 pOut->SetLineColor();
1124 OSL_ENSURE(
OnWin(),
"SwTextPaintInfo::DrawBackground: printer pollution ?" );
1127 CalcRect( rPor,
nullptr, &aIntersect,
true );
1136 pOut->SetFillColor( *pColor );
1140 pOut->SetLineColor();
1150 CalcRect( rPor, &aIntersect,
nullptr,
true );
1154 const ::sw::mark::IMark* pFieldmark =
1159 SAL_INFO(
"sw.core",
"Found Fieldmark " << pFieldmark->ToString());
1162 SAL_INFO(
"sw.core",
"Found StartMark");
1163 if (
OnWin() && (pFieldmark!=
nullptr || bIsStartMark) &&
1165 !
GetOpt().IsPagePreview())
1178 CalcRect( rPor,
nullptr, &aIntersect,
true );
1262 SAL_WARN(
"sw",
"something dodgy, clamping text index to prevent crash");
1266 sal_uInt16 nOldWidth = rPor.
Width();
1271 CalcRect( rPor,
nullptr, &aIntersect,
true );
1327 if ( !
GetOpt().IsPagePreview()
1328 && !
GetOpt().IsReadonly()
1341 if ( !
GetOpt().IsPagePreview()
1348 if (
GetOpt().IsTab() ) bDraw =
true;
1351 if (
GetOpt().IsSoftHyph() )bDraw =
true;
1354 if (
GetOpt().IsHardBlank())bDraw =
true;
1358 OSL_ENSURE(
false,
"SwTextPaintInfo::DrawViewOpt: don't know how to draw this" );
1367 sal_Int16 nMinLeading, sal_Int16 nMinTrailing,
1368 bool bNoCapsHyphenation,
bool bNoLastWordHyphenation,
1369 sal_Int16 nMinWordLength, sal_Int16 nTextHyphZone )
1371 sal_Int32 nLen = rVals.getLength();
1376 PropertyValue *pVal = rVals.getArray();
1380 pVal[0].Value <<= nMinLeading;
1384 pVal[1].Value <<= nMinTrailing;
1388 pVal[2].Value <<= bNoCapsHyphenation;
1392 pVal[3].Value <<= bNoLastWordHyphenation;
1396 pVal[4].Value <<= nMinWordLength;
1400 pVal[5].Value <<= nTextHyphZone;
1404 PropertyValue *pVal = rVals.getArray();
1405 pVal[0].Value <<= nMinLeading;
1406 pVal[1].Value <<= nMinTrailing;
1407 pVal[2].Value <<= bNoCapsHyphenation;
1408 pVal[3].Value <<= bNoLastWordHyphenation;
1409 pVal[4].Value <<= nMinWordLength;
1410 pVal[5].Value <<= nTextHyphZone;
1413 OSL_FAIL(
"unexpected size of sequence" );
1420 "hyphenation values not yet initialized" );
1432 const bool bAuto = bAutoHyphen || rAttr.
IsHyphen();
1436 const sal_Int16 nMinimalTrailing = rAttr.
GetMinTrail();
1442 bNoCapsHyphenation, bNoLastWordHyphenation,
1443 nMinimalWordLength, nTextHyphZone );
1449 const bool bNewQuick,
const bool bTst )
1475 SW_MOD()->GetCTLOptions().GetCTLTextNumerals());
1520 "hyphenationmissing",
SwResId(STR_HYPH_MISSING),
1521 SwResId(STR_HYPH_MISSING_DETAIL)
1523 InfobarType::WARNING);
1550 OSL_ENSURE(pMaster,
"pTextFrame without Master");
1577 const bool bQuickL,
const bool bTst)
1596 m_pUnderflow(nullptr),
1598 m_pLastTab(nullptr),
1600 m_nLineStart(rInf.GetIdx()),
1602 m_nLeft(rInf.m_nLeft),
1603 m_nRight(rInf.m_nRight),
1604 m_nFirst(rInf.m_nLeft),
1605 m_nRealWidth(sal_uInt16(nActWidth)),
1606 m_nWidth(m_nRealWidth),
1608 m_nLineNetHeight(0),
1609 m_nForcedLeftMargin(0),
1611 m_bFootnoteDone(true),
1618 m_bUnderflow(false),
1619 m_bInterHyph(false),
1622 m_bQuick(rInf.m_bQuick),
1623 m_bNoEndHyph(false),
1624 m_bNoMidHyph(false),
1625 m_bIgnoreFly(false),
1626 m_bFakeLineStart(false),
1627 m_bTabOverflow( false ),
1628 m_bTestFormat(rInf.m_bTestFormat),
1660 const sal_Unicode cThousandSep =
',' == cTabDec ?
'.' :
',';
1663 const sal_Unicode cThousandSep2 =
',' == cTabDec ?
'.' :
'\'';
1665 bool bNumFound =
false;
1668 for( ;
i < nEnd; ++
i )
1697 if( cTabDec == cPos )
1699 OSL_ENSURE( cPos,
"Unexpected end of string" );
1711 if ( ( 0x2F < cPos && cPos < 0x3A ) ||
1712 ( bNumFound && ( cPos == cThousandSep || cPos == cThousandSep2 ) ) )
1735 if ( cPos != cTabDec && cPos != cThousandSep && cPos !=cThousandSep2 && ( 0x2F >= cPos || cPos >= 0x3A ) )
1749 if(
GetLast()->IsKernPortion() )
1752 !
GetLast()->IsHolePortion() ) )
1781 if (!bTabOverMargin && !bTabOverSpacing)
1812 if (!bTabOverMargin)
1826 OUString
const & rCh )
1828 , m_pOldSmartTagList(nullptr)
1829 , m_pOldGrammarCheckList(nullptr)
1875 const sal_Int32 nListPos = pSmartTags->
Pos(
nPos);
1876 if (nListPos ==
pos.second && pSmartTags->
SubList(
nPos) !=
nullptr)
1882 && nListPos <
pos.second && !
aText.isEmpty())
1904 const sal_Int32 nListPos = pGrammar->
Pos(
nPos);
1905 if (nListPos ==
pos.second && pGrammar->
SubList(
nPos) !=
nullptr)
1911 && nListPos <
pos.second && !
aText.isEmpty())
@ TABS_RELATIVE_TO_INDENT
@ MS_WORD_COMP_TRAILING_BLANKS
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...
static OutputDevice * GetDefaultDevice()
bool IsTransparent() const
void SetStyle(GradientStyle eStyle)
void SetOfsX(sal_uInt16 nOfsX)
void SetStartIntensity(sal_uInt16 nIntens)
void SetBorder(sal_uInt16 nBorder)
void SetStartColor(const Color &rColor)
void SetSteps(sal_uInt16 nSteps)
void SetOfsY(sal_uInt16 nOfsY)
void SetAngle(Degree10 nAngle)
void SetEndColor(const Color &rColor)
void SetEndIntensity(sal_uInt16 nIntens)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual ::sw::mark::IFieldmark * getFieldmarkFor(const SwPosition &pos) const =0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
static OUString convertToBcp47(LanguageType nLangID)
static bool usesHyphenation(LanguageType nLang)
const vcl::Font & GetFont() const
void DrawRect(const tools::Rectangle &rRect)
const Point & GetRefPoint() const
const Color & GetLineColor() const
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
DrawModeFlags GetDrawMode() const
const AllSettings & GetSettings() const
static std::shared_ptr< const vcl::text::TextLayoutCache > CreateTextLayoutCache(OUString const &)
const Color & GetFillColor() const
void AppendInfoBarWhenReady(const OUString &sId, const OUString &sPrimaryMessage, const OUString &sSecondaryMessage, InfobarType aInfobarType, bool bShowCloseButton=true)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
bool IsSmartTagsEnabled() const
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
bool IsNoLastWordHyphenation() const
sal_uInt16 & GetTextHyphenZone()
sal_uInt8 & GetMinWordLength()
sal_uInt8 & GetMaxHyphens()
bool IsNoCapsHyphenation() const
sal_uInt8 & GetMinTrail()
static sal_Int16 CheckHyphLang(css::uno::Reference< css::linguistic2::XHyphenator >const &xHyph, LanguageType nLang)
Indicator that the content does not fit into a fixed height frame (red triangle on the UI).
sal_Int32 m_nPosition
current iteration index in text node
void SetFnt(SwFont *pNew)
const SvxParaVertAlignItem & GetParaVertAlign(bool=true) const
const SwFormatDrop & GetDrop(bool=true) const
const SvxTabStopItem & GetTabStops(bool=true) const
const SvxScriptSpaceItem & GetScriptSpace(bool=true) const
const SvxForbiddenRuleItem & GetForbiddenRule(bool=true) const
const SvxHangingPunctuationItem & GetHangingPunctuation(bool=true) const
const SvxParaGridItem & GetParaGrid(bool=true) const
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
const SvxHyphenZoneItem & GetHyphenZone(bool=true) const
const css::lang::Locale & GetLocale(const LanguageType aLang)
SwLineBreakClear GetClear() const
SwTextFrame * FindMaster() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
IDocumentMarkAccess * getIDocumentMarkAccess()
SwDocShell * GetDocShell()
void SetKern(tools::Long nNew)
void SetAscent(sal_uInt16 nNew)
void SetSpaceStop(bool bNew)
void SetNumberOfBlanks(TextFrameIndex const nNew)
void SetSnapToGrid(bool bNew)
void SetHyphPos(TextFrameIndex *const pNew)
void SetPos(const Point &rNew)
void SetSize(const Size &rNew)
void SetFont(SwFont *pNew)
void SetSmartTags(sw::WrongListIterator *const pNew)
void SetMeasureLen(TextFrameIndex const nNew)
void SetKanaComp(short nNew)
tools::Long GetKanaDiff() const
void SetFrame(const SwTextFrame *pNewFrame)
void SetGrammarCheck(sw::WrongListIterator *const pNew)
void SetOut(OutputDevice &rNew)
void SetUnderFnt(SwUnderlineFont *pULFnt)
void SetSpace(tools::Long nNew)
void SetWrong(sw::WrongListIterator *const pNew)
SwFontSave(const SwTextSizeInfo &rInf, SwFont *pFnt, SwAttrIter *pItr=nullptr)
void DrawStretchText_(SwDrawTextInfo &rInf)
void SetCharSet(const rtl_TextEncoding eCharSet, const SwFontScript nWhich)
const std::optional< Color > & GetBackColor() const
bool DifferentFontCacheId(const SwFont *pFnt, SwFontScript nWhich)
void DrawText_(SwDrawTextInfo &rInf)
const Size & GetSize(SwFontScript nWhich) const
void SetVertical(Degree10 nDir, const bool bVertLayout=false, const bool bVertLayoutLRBT=false)
Degree10 GetOrientation(const bool bVertLayout=false, const bool bVertFormatLRBT=false) const
void SetAlign(const TextAlign eAlign)
void SetName(const OUString &rName, const SwFontScript nWhich)
Size GetTextSize_(SwDrawTextInfo &rInf)
void SetSize(const Size &rSize, const SwFontScript nWhich)
SwFontScript GetActual() const
TextFrameIndex GetTextBreak(SwDrawTextInfo const &rInf, tools::Long nTextWidth)
void SetColor(const Color &rColor)
const std::optional< editeng::SvxBorderLine > & GetLeftBorder() const
const Color & GetColor() const
LanguageType GetLanguage() const
void SetTransparent(const bool bTrans)
void SetFamily(const FontFamily eFamily, const SwFontScript nWhich)
sal_uInt16 GetAscent(SwViewShell const *pSh, const OutputDevice &rOut)
void ChgPhysFnt(SwViewShell const *pSh, OutputDevice &rOut)
tools::Long GetHeight() const
sal_uInt16 GetLeftBorderSpace() const
const Color & GetHighlightColor() const
void SetStyleName(const OUString &rStyleName, const SwFontScript nWhich)
const SwRect & getFrameArea() const
bool IsRightToLeft() const
SwRootFrame * getRootFrame()
bool IsFootnoteAllowed() const
void CtorInitLineInfo(const SwAttrSet &rAttrSet, const SwTextNode &rTextNode)
tools::Long m_nListTabStopPosition
const SvxLineSpacingItem * m_pSpace
bool m_bListTabStopIncluded
std::optional< SvxTabStopItem > m_oRuler
SvxParaVertAlignItem::Align m_nVertAlign
Collection of SwLinePortion instances, representing one line of text.
virtual void Height(const SwTwips nNew, const bool bText=true) override
SwTwips GetRealHeight() const
Base class for anything that can be part of a line in the Writer layout.
bool IsBlankPortion() const
bool IsHangingPortion() const
SwLinePortion * GetNextPortion() const
bool GetJoinBorderWithPrev() const
PortionType GetWhichPor() const
TextFrameIndex GetLen() const
bool IsKernPortion() const
bool GetJoinBorderWithNext() const
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const
bool IsDropPortion() const
virtual tools::Long CalcSpacing(tools::Long nSpaceAdd, const SwTextSizeInfo &rInf) const
bool IsBreakPortion() const
bool IsHolePortion() const
bool IsFlyPortion() const
bool InFixMargGrp() const
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
SwScriptInfo & GetScriptInfo()
Of course Writer needs its own rectangles.
SwRect & Intersection(const SwRect &rRect)
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
void AddLeft(const tools::Long nAdd)
void AddBottom(const tools::Long nAdd)
void AddRight(const tools::Long nAdd)
void AddTop(const tools::Long nAdd)
Point BottomRight() const
tools::Rectangle SVRect() const
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
SwViewShell * GetCurrShell() const
static bool FlushVout()
Output virtual Device (e.g. for animations)
size_t CountCompChg() const
static SwSmartTagMgr & Get()
sal_uInt16 GetTabPos() const
void CtorInitTextFly(const SwTextFrame *pFrame)
void DrawTextOpaque(SwDrawTextInfo &rInf)
This method is called by DrawText().
TextFrameIndex m_nLastBookmarkPos
need to check for bookmarks at every portion
SwLinePortion * GetLast()
SwTabPortion * GetLastTab()
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
const SwFormatDrop * GetDropFormat() const
SwLinePortion * m_pUnderflow
void SetLineStart(TextFrameIndex const nNew)
bool InitHyph(const bool bAuto=false)
sal_uInt16 m_nLineNetHeight
void SetLineNetHeight(const sal_uInt16 nNew)
bool CheckFootnotePortion_(SwLineLayout const *pCurr)
void SetLineHeight(const sal_uInt16 nNew)
TextFrameIndex m_nUnderScorePos
enlarge repaint if underscore has been found
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd)
TextFrameIndex m_nSoftHyphPos
SoftHyphPos for Hyphenation.
sal_Unicode m_cTabDecimal
SwTabPortion * m_pLastTab
void SetLast(SwLinePortion *pNewLast)
sal_uInt16 m_nForcedLeftMargin
SwTwips m_nLeftMargin
First or left margin, depending on context.
sal_Unicode GetTabDecimal() const
void SetTabDecimal(const sal_Unicode cNew)
bool IsHyphenate() const
If the Hyphenator returns ERROR or the language is set to NOLANGUAGE we do not hyphenate.
bool CheckCurrentPosBookmark()
SwTwips GetLineWidth()
Returns the distance between the current horizontal position and the end of the line.
const css::beans::PropertyValues & GetHyphValues() const
SwTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyphL=false, const bool bQuickL=false, const bool bTst=false)
bool ChgHyph(const bool bNew)
css::beans::PropertyValues m_aHyphVals
Represents the visualization of a paragraph.
void SwitchVerticalToHorizontal(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from vertical to horizontal layout.
SwPosition MapViewToModelPos(TextFrameIndex nIndex) const
TextFrameIndex GetOffset() const
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(TextFrameIndex nIndex) const
map position in potentially merged text frame to SwPosition
void SwitchLTRtoRTL(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from LTR to RTL layout.
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
SwParaPortion * GetPara()
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout.
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
SwTextNode const * GetTextNodeForParaProps() const
SwParaPortion * GetParaPortion()
TextFrameIndex m_nTextStart
void CtorInitTextInfo(SwTextFrame *pFrame)
SwTextNode is a paragraph in the document model.
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...
bool HasMarkedLabel() const
Returns if this text node has a marked label.
const SvxBrushItem * m_pBrushItem
void SetPaintOfst(const SwTwips nNew)
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 DrawTab(const SwLinePortion &rPor) const
void DrawText(const OUString &rText, const SwLinePortion &rPor, TextFrameIndex nIdx=TextFrameIndex(0), TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING), const bool bKern=false) const
void DrawBackground(const SwLinePortion &rPor, const Color *pColor=nullptr) const
void SetPos(const Point &rNew)
const Point & GetPos() const
sw::WrongListIterator * m_pSmartTags
void CalcRect(const SwLinePortion &rPor, SwRect *pRect, SwRect *pIntersect=nullptr, const bool bInsideBox=false) const
Calculate the rectangular area where the portion takes place.
void DrawRect(const SwRect &rRect, bool bRetouche) const
void DrawBackBrush(const SwLinePortion &rPor) const
std::vector< tools::Long > * m_pSpaceAdd
void DrawPostIts(bool bScript) const
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich, const Color *pColor=nullptr) const
void DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool bChecked) const
void DrawRedArrow(const SwLinePortion &rPor) const
sw::WrongListIterator * m_pGrammarCheckList
tools::Long GetSpaceAdd() const
sw::WrongListIterator * m_pWrongList
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
void DrawLineBreak(const SwLinePortion &rPor) const
void CtorInitTextPaintInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const SwRect &rPaint)
This portion represents a part of the paragraph string.
TextFrameIndex GetSpaceCnt(const SwTextSizeInfo &rInf, TextFrameIndex &rCnt) const
SwTextFrame * GetTextFrame()
vcl::RenderContext * GetOut()
void CtorInitTextSizeInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, TextFrameIndex nIdx)
sal_uInt8 GetDirection() const
const SwViewOption & GetOpt() const
void SetMulti(const bool bNew)
VclPtr< OutputDevice > m_pOut
void SetLen(const TextFrameIndex nNew)
VclPtr< OutputDevice > m_pRef
void SetSnapToGrid(const bool bN)
TextFrameIndex GetTextBreak(const tools::Long nLineWidth, const TextFrameIndex nMaxLen, const sal_uInt16 nComp, vcl::text::TextLayoutCache const *) const
TextFrameIndex GetMeasureLen() const
void SetMeasureLen(const TextFrameIndex nNew)
const std::shared_ptr< const vcl::text::TextLayoutCache > & GetCachedVclData() const
void SetCachedVclData(std::shared_ptr< const vcl::text::TextLayoutCache > const &pCachedVclData)
void NoteAnimation() const
void SetForbiddenChars(const bool bN)
vcl::RenderContext * GetRefDev()
void SetIdx(const TextFrameIndex nNew)
void SetFont(SwFont *pNew)
TextFrameIndex m_nMeasureLen
bool m_bOtherThanFootnoteInside
SwPosSize GetTextSize(OutputDevice *pOut, const SwScriptInfo *pSI, const OUString &rText, TextFrameIndex nIdx, TextFrameIndex nLen) const
void SetFirstMulti(const bool bNew)
sal_uInt16 GetAscent() const
sal_Unicode GetChar(TextFrameIndex const nPos) const
std::deque< sal_uInt16 > * m_pKanaComp
void SetText(const OUString &rNew)
TextFrameIndex GetLen() const
bool IsFirstMulti() const
const OUString & GetText() const
SwPosSize GetTextSize() const
TextFrameIndex GetIdx() const
void SetHanging(const bool bNew)
bool HasHint(TextFrameIndex nPos) const
void SetScriptSpace(const bool bNew)
sal_uInt16 GetKanaComp() const
const SwViewOption * m_pOpt
SwUnderlineFont * m_pUnderFnt
sw::WrongListIterator * m_pOldSmartTagList
TextFrameIndex nMeasureLen
SwTextSlot(const SwTextSizeInfo *pNew, const SwLinePortion *pPor, bool bTextLen, bool bExgLists, OUString const &rCh=OUString())
std::unique_ptr< SwWrongList > m_pTempList
sw::WrongListIterator * m_pOldGrammarCheckList
const OUString * pOldText
std::unique_ptr< sw::WrongListIterator > m_pTempIter
std::shared_ptr< const vcl::text::TextLayoutCache > m_pOldCachedVclData
static void PaintPostIts(OutputDevice *pOut, const SwRect &rRect, bool bIsScript)
bool IsPagePreview() const
bool IsBlank(bool bHard=false) const
static bool IsFieldShadings()
static Color & GetFieldShadingsColor()
bool IsOnlineSpell() const
static sal_uInt16 GetPostItsWidth(const OutputDevice *pOut)
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
bool isOutputToWindow() const
vcl::Window * GetWin() const
vcl::RenderContext & GetRefDev() const
sal_Int32 Pos(sal_uInt16 nIdx) const
sal_uInt16 GetWrongPos(sal_Int32 nValue) const
Find the first position that is greater or equal to the given value.
SwWrongList * SubList(sal_uInt16 nIdx) const
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection(editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection) const override
#define CH_TXTATR_NEWLINE
#define CH_TXT_ATR_FIELDSTART
#define CH_TXTATR_BREAKWORD
#define DRAW_SPECIAL_OPTIONS_ROTATE
#define DRAW_SPECIAL_OPTIONS_CENTER
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.
static void lcl_InitHyphValues(PropertyValues &rVals, sal_Int16 nMinLeading, sal_Int16 nMinTrailing, bool bNoCapsHyphenation, bool bNoLastWordHyphenation, sal_Int16 nMinWordLength, sal_Int16 nTextHyphZone)
static TextFrameIndex GetMinLen(const SwTextSizeInfo &rInf)
static void ChkOutDev(const SwTextSizeInfo &rInf)
#define CHAR_LINEBREAK_RTL
#define LANGUAGE_DONTKNOW
constexpr OUStringLiteral UPN_IS_GRAMMAR_AUTO
#define UPH_HYPH_NO_LAST_WORD
#define UPH_HYPH_MIN_WORD_LENGTH
#define UPH_HYPH_MIN_LEADING
constexpr OUStringLiteral UPN_HYPH_ZONE
constexpr OUStringLiteral UPN_HYPH_NO_CAPS
constexpr OUStringLiteral UPN_HYPH_MIN_WORD_LENGTH
constexpr OUStringLiteral UPN_HYPH_NO_LAST_WORD
constexpr OUStringLiteral UPN_HYPH_MIN_LEADING
#define UPH_HYPH_MIN_TRAILING
constexpr OUStringLiteral UPN_HYPH_MIN_TRAILING
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
double getLength(const B2DPolygon &rCandidate)
std::map< sal_Int32, std::shared_ptr< SetItemPropertyStorage > > PropertyValues
OUString const & GetDefBulletFontname()
retrieve font family name used for the default bullet list characters
tools::Long SnapToGrid(KernArray &rKernArray, std::u16string_view aText, sal_Int32 nStt, sal_Int32 nLen, tools::Long nGridWidth, bool bForceLeft)
Snap ideographs to text grids: a) Ideographic open brackets are aligned to the rightmost edge of span...
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
#define SPECIAL_FONT_HEIGHT
#define SPACING_PRECISION_FACTOR
Marks a position in the document model.
UNDERLYING_TYPE get() const
tools::Long GetLen(const Point &rPnt)
const sal_Unicode CH_BREAK
const sal_Unicode CH_BLANK
OUString SwResId(TranslateId aId)
uno::Reference< linguistic2::XHyphenator > GetHyphenator()
constexpr sal_Int32 COMPLETE_STRING
#define NON_PRINTING_CHARACTER_COLOR