53 eUnderline( eUL ), eStrikeout( eStrkout ), aColor( rCol )
93 const_cast<SwTextPaintInfo&
>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
125 if ( nNoBreakWidth > 0 )
132 for (sal_Int16
i = 1;
i < nSpaces; ++
i)
146 rInf.
DrawText(aBuf.makeStringAndClear(), *
this);
148 const_cast<SwTextPaintInfo&
>(rInf).SetFont(const_cast<SwFont*>(pOldFnt));
171 bool bBG,
bool bGK ) :
172 nKern( nKrn ), bBackground( bBG ), bGridKern( bGK )
184 nKern( 0 ), bBackground( false ), bGridKern( true )
265 if (
auto pCrSh = dynamic_cast<SwCursorShell*>( pSh ) ) {
267 SwContentFrame const*
const pCurrFrame = pCrSh->GetCurrFrame(
false);
268 if (pCurrFrame==static_cast<SwContentFrame const *>(
this)) {
277 OSL_ENSURE( !
IsVertical() || !
IsSwapped(),
"SwTextFrame::EmptyHeight with swapped frame" );
279 std::unique_ptr<SwFont> pFnt;
286 pFnt.reset(
new SwFont( pAttrSet, pIDSA ));
291 pFnt.reset(
new SwFont( aFontAccess.Get()->GetFont() ));
292 pFnt->CheckFontCacheId( pSh, pFnt->GetActual() );
296 pFnt->SetVertical( 2700_deg10 );
327 pFnt->SetFntChg(
true );
328 pFnt->ChgPhysFnt( pSh, *pOut );
329 nRet = pFnt->GetHeight( pSh, *pOut );
336 OSL_ENSURE( !
IsVertical() || !
IsSwapped(),
"SwTextFrame::FormatEmpty with swapped frame" );
348 if( !bCollapse && ( ( ( !
IsRightToLeft() && ( SvxAdjust::Left != nAdjust ) ) ||
361 if ( !bCollapse && bFirstFlyCheck &&
367 pIndex; pIndex = pIndex->
GetNext())
370 if (dynamic_cast<const sw::mark::IBookmark*>(pMark) !=
nullptr)
405 if( !bCollapse && !bFirstFlyCheck &&
426 rRegStart = aRectFnSet.
GetPrtTop(*pFrame);
463 MapMode aOldMap( pOut->GetMapMode() );
464 pOut->SetMapMode(
MapMode( MapUnit::MapTwip ) );
466 aFnt.ChgFnt( pSh, *pOut );
467 rRegDiff = aFnt.GetHeight( pSh, *pOut );
468 sal_uInt16 nNetHeight = rRegDiff;
472 case SvxLineSpaceRule::Auto:
474 case SvxLineSpaceRule::Min:
481 OSL_FAIL(
": unknown LineSpaceRule" );
485 case SvxInterLineSpaceRule::Off:
487 case SvxInterLineSpaceRule::Prop:
491 nTmp = nTmp ? 50 : 100;
496 rRegDiff =
static_cast<sal_uInt16
>(nTmp);
497 nNetHeight = rRegDiff;
500 case SvxInterLineSpaceRule::Fix:
503 nNetHeight = rRegDiff;
506 default: OSL_FAIL(
": unknown InterLineSpaceRule" );
510 aFnt.GetAscent( pSh, *pOut ) );
511 pOut->SetMapMode( aOldMap );
516 if ( aRectFnSet.
IsVert() )
517 rRegStart -= nTmpDiff;
519 rRegStart += nTmpDiff;
523 return ( 0 != rRegDiff );
534 aPos.AdjustY( -150 );
553 OUString & rOutString,
SwFont & rTmpFont,
int &)
const
563 rOutString =
"/";
break;
574 const sal_uInt16 nProp = 40;
581 OUString & rOutString,
SwFont & rFont,
int & rDeltaY)
const
588 rOutString = OUStringChar(
mcChar);
616 rDeltaY = nOSAscent - nOrigAscent;
635 &&
DoPaint(rInf, aOutString, aTmpFont, deltaY)))
644 Point aNewPos( aOldPos );
649 aNewPos.AdjustX(deltaX);
650 aNewPos.AdjustY(deltaY);
653 aNewPos.AdjustY(-deltaX);
654 aNewPos.AdjustX(deltaY);
657 aNewPos.AdjustY(deltaX);
658 aNewPos.AdjustX(-deltaY);
virtual SwLinePortion * Compress() override
vcl::RenderContext * GetOut() const
void SetHasRotatedPortions(bool bHasRotatedPortions)
Base class of the Writer layout elements.
virtual bool Format(SwTextFormatInfo &rInf) override
const SvxLRSpaceItem & GetLRSpace(bool=true) const
static Color & GetFieldShadingsColor()
void Right(const tools::Long nRight)
void DrawBackBrush(const SwLinePortion &rPor) const
virtual bool DoPaint(SwTextPaintInfo const &rInf, OUString &rOutString, SwFont &rTmpFont, int &rDeltaY) const override
sal_uInt16 GetPropLineSpace() const
Represents the style of a paragraph.
SwTwips EmptyHeight() const
bool IsPagePreview() const
virtual void Paint(const SwTextPaintInfo &rInf) const override
SwPageDesc * FindPageDesc()
SvxAdjust GetAdjust() const
sal_uInt16 Height() const
virtual void Paint(const SwTextPaintInfo &rInf) const override
SwBreakPortion(const SwLinePortion &rPortion)
sal_uInt16 GetRegHeight() const
bool IsAnyObj(const SwRect &rRect) const
true when a frame or DrawObj must be taken in account.
bool GetHasRotatedPortions() const
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
void Left(const tools::Long nLeft)
void SetCompletePaint() const
SwArrowPortion(const SwLinePortion &rPortion)
bool IsInFootnote() const
bool GetJoinBorderWithPrev() const
SwFrameType GetType() const
virtual bool DoPaint(SwTextPaintInfo const &rInf, OUString &rOutString, SwFont &rTmpFont, int &rDeltaY) const
constexpr OUStringChar CH_PAR
const SwRect & getFramePrintArea() const
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
sw::MergedPara * GetMergedPara()
The purpose of this class is to be the universal interface between formatting/text output and the pos...
void SetLast(SwLinePortion *pNewLast)
void DrawBorder(const SwLinePortion &rPor) const
Draw character border around a line portion.
void SetEmphasisMark(const FontEmphasisMark eValue)
virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo &rInf) const override
SwParaPortion * GetPara()
void DrawText(const OUString &rText, const SwLinePortion &rPor, TextFrameIndex nIdx=TextFrameIndex(0), TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING), const bool bKern=false) const
void HideAndShowObjects()
Hides respectively shows objects, which are anchored at paragraph, at/as a character of the paragraph...
const Size & GetSize(SwFontScript nWhich) const
#define DFLT_ESC_AUTO_SUB
Of course Writer needs its own rectangles.
void SetOutline(const bool bOutline)
SwPosSize GetTextSize(OutputDevice *pOut, const SwScriptInfo *pSI, const OUString &rText, TextFrameIndex nIdx, TextFrameIndex nLen) const
virtual void Text(TextFrameIndex nLength, PortionType nType, sal_Int32 nHeight=0, sal_Int32 nWidth=0)=0
(empty) destructor
Degree10 GetOrientation(const bool bVertLayout=false, const bool bVertFormatLRBT=false) const
void SetPitch(const FontPitch ePitch, const SwFontScript nWhich)
SvxLineSpaceRule GetLineSpaceRule() const
static bool IsShowChanges(const RedlineFlags eM)
const SwIndex * GetNext() const
void SetColor(const Color &rColor)
SwKernPortion(SwLinePortion &rPortion, short nKrn, bool bBG=false, bool bGridKern=false)
static OutputDevice * GetDefaultDevice()
void SetShadow(const bool bShadow)
const SwRegisterItem & GetRegister(bool=true) const
sal_uInt16 mnHalfCharWidth
virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo &rInf) const override
sal_uInt16 GetLineHeight() const
virtual void FormatEOL(SwTextFormatInfo &rInf) override
virtual void Paint(const SwTextPaintInfo &rInf) const override
const SwRect & getFrameArea() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool getBrowseMode() const
sal_uInt16 GetAscent(SwViewShell const *pSh, const OutputDevice &rOut)
Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each cate...
const FontStrikeout eStrikeout
void SetUnderline(const FontLineStyle eUnderline)
virtual bool Format(SwTextFormatInfo &rInf) override
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
void SetStrikeout(const FontStrikeout eStrikeout)
void SetAlign(const FontAlign eAlign)
SwFontScript GetActual() const
void DrawRect(const tools::Rectangle &rRect)
SwTmpEndPortion(const SwLinePortion &rPortion, const FontLineStyle eUnderline, const FontStrikeout eStrikeout, const Color &rColor)
SwFormatColl & GetAnyFormatColl() const
void SetUndersized(const bool bNew)
SwTextNode * GetTextNodeFirst()
const SwViewOption & GetOpt() const
virtual SwRedlineTable::size_type GetRedlinePos(const SwNode &rNode, RedlineType nType) const =0
SwTextNode const * GetTextNodeForParaProps() const
void SetRegHeight(sal_uInt16 const nNew)
void SetTransparent(const bool bTrans)
void Init(const SwAttrSet &rAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess)
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
vcl::RenderContext * GetOut()
virtual void Paint(const SwTextPaintInfo &rInf) const override
void DrawLineBreak(const SwLinePortion &rPor) const
SwPageFrame * FindPageFrame()
void SetWhichPor(const PortionType nNew)
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
vector_type::size_type size_type
tools::Long GetHeight(const SwRect &rRect) const
bool IsParagraph(bool bHard=false) const
SwLayoutFrame * GetUpper()
void SetRelief(const FontRelief eNew)
const SvxAdjustItem & GetAdjust(bool=true) const
Marks a character position inside a document model node.
void CalcRect(const SwLinePortion &rPor, SwRect *pRect, SwRect *pIntersect=nullptr, const bool bInsideBox=false) const
Calculate the rectangular area where the portion takes place.
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
virtual void Paint(const SwTextPaintInfo &rInf) const override
void SetEscapement(const short nNewEsc)
tools::Long GetPrtTop(const SwFrame &rFrame) const
Provides access to settings of a document.
SvxInterLineSpaceRule GetInterLineSpaceRule() const
#define NON_PRINTING_CHARACTER_COLOR
TextFrameIndex GetIdx() const
void SetWeight(const FontWeight eWeight, const SwFontScript nWhich)
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
bool IsLineBreak(bool bHard=false) const
void RemoveFromCache()
Removes this frame completely from the Cache.
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
bool HasSwAttrSet() const
void PrePaint(const SwTextPaintInfo &rInf, const SwLinePortion *pLast) const
void SSize(const Size &rNew)
static bool IsFieldShadings()
bool FillRegister(SwTwips &rRegStart, sal_uInt16 &rRegDiff)
Determines the start position and step size of the register.
static constexpr OUStringLiteral S_NOBREAK_FOR_REDLINE
TextFrameIndex GetLen() const
A page of the document layout.
SwTextFrame * GetTextFrame()
bool IsPaintBlank() const
const OUString & GetText() const
short GetInterLineSpace() const
virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) const override
the parameter is actually SwTwips apparently?
SwLinePortion * mpNextPortion
virtual SwLinePortion * Compress() override
sal_uInt16 GetRegAscent() const
const Point & GetPos() const
Base class for anything that can be part of a line in the Writer layout.
TextFrameIndex mnLineLength
void Bottom(const tools::Long nBottom)
SwTextNode is a paragraph in the document model.
tools::Rectangle SVRect() const
void ChgClip(const SwRect &rRect, const SwTextFrame *pFrame=nullptr, bool bEnlargeRect=false, sal_Int32 nEnlargeTop=0, sal_Int32 nEnlargeBottom=0)
PortionType GetWhichPor() const
virtual bool Format(SwTextFormatInfo &rInf) override
void ClearPara()
Removes the Line information from the Cache but retains the entry itself.
const SwViewOption * GetViewOptions() const
vcl::Window * GetWin() const
const SvxParaGridItem & GetParaGrid(bool=true) const
virtual void Paint(const SwTextPaintInfo &rInf) const override
const FontLineStyle eUnderline
void AdjustFrame(const SwTwips nChgHeight, bool bHasToFit=false)
bool IsRightToLeft() const
void Top(const tools::Long nTop)
tools::Long Height() const
SwLinePortion * FindPrevPortion(const SwLinePortion *pRoot)
virtual OutputDevice * getReferenceDevice(bool bCreate) const =0
Returns the current reference device.
SwLinePortion * GetLast()
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
void SetName(const OUString &rName, const SwFontScript nWhich)
bool IsShowBookmarks(bool const bHard=false) const
void SetAscent(const sal_uInt16 nNewAsc)
void SetNewLine(const bool bNew)
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
const SwIndex * GetFirstIndex() const
virtual void FormatEOL(SwTextFormatInfo &rInf)
sal_uInt16 GetBaseHeight() const
void SetProportion(const sal_uInt8 nNewPropr)
bool GetJoinBorderWithNext() const
SwLinePortion * GetNextPortion() const
void SetEmpty(const bool bNew)
SwViewShell * GetCurrShell() const
virtual void HandlePortion(SwPortionHandler &rPH) const override
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...
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
static constexpr size_type npos
void Height(tools::Long nNew)
void SetOverline(const FontLineStyle eOverline)
sal_uInt16 GetRubyHeight() const
virtual SwLinePortion * Insert(SwLinePortion *pPortion)
SwRootFrame * getRootFrame()
void DrawViewOpt(const SwLinePortion &rPor, PortionType nWhich) const
void SetRegAscent(sal_uInt16 const nNew)
void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd)
const Color & GetFillColor() const