LibreOffice Module vcl (master) 1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GenericSalLayout Class Reference

#include <sallayout.hxx>

Inheritance diagram for GenericSalLayout:
[legend]
Collaboration diagram for GenericSalLayout:
[legend]

Public Member Functions

 GenericSalLayout (LogicalFontInstance &)
 
 ~GenericSalLayout () override
 
void AdjustLayout (vcl::text::ImplLayoutArgs &) final override
 
bool LayoutText (vcl::text::ImplLayoutArgs &, const SalLayoutGlyphsImpl *) final override
 
void DrawText (SalGraphics &) const final override
 
SalLayoutGlyphs GetGlyphs () const final override
 
bool IsKashidaPosValid (int nCharPos, int nNextCharPos) const final override
 
double GetTextWidth () const final override
 
double FillDXArray (std::vector< double > *pDXArray, const OUString &rStr) const final override
 
sal_Int32 GetTextBreak (double nMaxWidth, double nCharExtra, int nFactor) const final override
 
void GetCaretPositions (std::vector< double > &rCaretPositions, const OUString &rStr) const override
 
LogicalFontInstanceGetFont () const
 
bool GetNextGlyph (const GlyphItem **pGlyph, basegfx::B2DPoint &rPos, int &nStart, const LogicalFontInstance **ppGlyphFont=nullptr) const override
 
const SalLayoutGlyphsImplGlyphsImpl () const
 
- Public Member Functions inherited from SalLayout
virtual ~SalLayout ()
 
basegfx::B2DPointDrawBase ()
 
const basegfx::B2DPointDrawBase () const
 
PointDrawOffset ()
 
const PointDrawOffset () const
 
basegfx::B2DPoint GetDrawPosition (const basegfx::B2DPoint &rRelative=basegfx::B2DPoint(0, 0)) const
 
virtual bool LayoutText (vcl::text::ImplLayoutArgs &, const SalLayoutGlyphsImpl *)=0
 
virtual void AdjustLayout (vcl::text::ImplLayoutArgs &)
 
virtual void InitFont () const
 
virtual void DrawText (SalGraphics &) const =0
 
Degree10 GetOrientation () const
 
void SetSubpixelPositioning (bool bSubpixelPositioning)
 
bool GetSubpixelPositioning () const
 
virtual sal_Int32 GetTextBreak (double nMaxWidth, double nCharExtra, int nFactor) const =0
 
virtual double FillDXArray (std::vector< double > *pDXArray, const OUString &rStr) const =0
 
virtual double GetTextWidth () const
 
virtual void GetCaretPositions (std::vector< double > &rCaretPositions, const OUString &rStr) const =0
 
virtual bool IsKashidaPosValid (int, int) const =0
 
virtual bool GetNextGlyph (const GlyphItem **pGlyph, basegfx::B2DPoint &rPos, int &nStart, const LogicalFontInstance **ppGlyphFont=nullptr) const =0
 
virtual bool GetOutline (basegfx::B2DPolyPolygonVector &) const
 
bool GetBoundRect (tools::Rectangle &) const
 
virtual SalLayoutGlyphs GetGlyphs () const
 

Private Member Functions

void MoveGlyph (int nStart, double nNewXPos)
 
void DropGlyph (int nStart)
 
void Simplify (bool bIsBase)
 
 GenericSalLayout (const GenericSalLayout &)=delete
 
GenericSalLayoutoperator= (const GenericSalLayout &)=delete
 
void ApplyDXArray (const double *, const sal_Bool *)
 
void Justify (double nNewWidth)
 
void ApplyAsianKerning (std::u16string_view rStr)
 
void GetCharWidths (std::vector< double > &rCharWidths, const OUString &rStr) const
 
void SetNeedFallback (vcl::text::ImplLayoutArgs &, sal_Int32, bool)
 
bool HasVerticalAlternate (sal_UCS4 aChar, sal_UCS4 aNextChar)
 
void ParseFeatures (std::u16string_view name)
 

Private Attributes

css::uno::Reference< css::i18n::XBreakIterator > mxBreak
 
SalLayoutGlyphsImpl m_GlyphItems
 
OString msLanguage
 
std::vector< hb_feature_t > maFeatures
 
hb_set_t * mpVertGlyphs
 
const bool mbFuzzing
 

Friends

void MultiSalLayout::ImplAdjustMultiLayout (vcl::text::ImplLayoutArgs &rArgs, vcl::text::ImplLayoutArgs &rMultiArgs, const double *pMultiDXArray)
 

Additional Inherited Members

- Protected Member Functions inherited from SalLayout
 SalLayout ()
 
- Protected Attributes inherited from SalLayout
int mnMinCharPos
 
int mnEndCharPos
 
LanguageTag maLanguageTag
 
Degree10 mnOrientation
 
Point maDrawOffset
 
basegfx::B2DPoint maDrawBase
 
bool mbSubpixelPositioning
 

Detailed Description

Definition at line 101 of file sallayout.hxx.

Constructor & Destructor Documentation

◆ GenericSalLayout() [1/2]

GenericSalLayout::GenericSalLayout ( LogicalFontInstance rFont)

Definition at line 46 of file CommonSalLayout.cxx.

◆ ~GenericSalLayout()

GenericSalLayout::~GenericSalLayout ( )
override

Definition at line 53 of file CommonSalLayout.cxx.

References mpVertGlyphs.

◆ GenericSalLayout() [2/2]

GenericSalLayout::GenericSalLayout ( const GenericSalLayout )
privatedelete

Member Function Documentation

◆ AdjustLayout()

void GenericSalLayout::AdjustLayout ( vcl::text::ImplLayoutArgs rArgs)
finaloverridevirtual

◆ ApplyAsianKerning()

void GenericSalLayout::ApplyAsianKerning ( std::u16string_view  rStr)
private

Definition at line 397 of file sallayout.cxx.

References lcl_CalcAsianKerning(), lcl_CanApplyAsianKerning(), m_GlyphItems, n, and nLength.

Referenced by AdjustLayout().

◆ ApplyDXArray()

void GenericSalLayout::ApplyDXArray ( const double *  pDXArray,
const sal_Bool pKashidaArray 
)
private

◆ DrawText()

void GenericSalLayout::DrawText ( SalGraphics rSalGraphics) const
finaloverridevirtual

Implements SalLayout.

Definition at line 152 of file CommonSalLayout.cxx.

References SalGraphics::DrawTextLayout().

◆ DropGlyph()

void GenericSalLayout::DropGlyph ( int  nStart)
private

Definition at line 582 of file sallayout.cxx.

References m_GlyphItems.

◆ FillDXArray()

double GenericSalLayout::FillDXArray ( std::vector< double > *  pDXArray,
const OUString &  rStr 
) const
finaloverridevirtual

Implements SalLayout.

Definition at line 258 of file sallayout.cxx.

References GetCharWidths(), and GetTextWidth().

◆ GetCaretPositions()

void GenericSalLayout::GetCaretPositions ( std::vector< double > &  rCaretPositions,
const OUString &  rStr 
) const
overridevirtual

Implements SalLayout.

Definition at line 442 of file sallayout.cxx.

References GetCharWidths(), i, m_GlyphItems, SalLayout::mnEndCharPos, SalLayout::mnMinCharPos, and n.

◆ GetCharWidths()

void GenericSalLayout::GetCharWidths ( std::vector< double > &  rCharWidths,
const OUString &  rStr 
) const
private

◆ GetFont()

LogicalFontInstance & GenericSalLayout::GetFont ( ) const
inline

Definition at line 126 of file sallayout.hxx.

Referenced by ApplyDXArray(), GetCharWidths(), HasVerticalAlternate(), and LayoutText().

◆ GetGlyphs()

SalLayoutGlyphs GenericSalLayout::GetGlyphs ( ) const
finaloverridevirtual

Reimplemented from SalLayout.

Definition at line 99 of file CommonSalLayout.cxx.

References SalLayoutGlyphs::AppendImpl(), SalLayoutGlyphsImpl::clone(), and m_GlyphItems.

◆ GetNextGlyph()

bool GenericSalLayout::GetNextGlyph ( const GlyphItem **  pGlyph,
basegfx::B2DPoint rPos,
int nStart,
const LogicalFontInstance **  ppGlyphFont = nullptr 
) const
overridevirtual

◆ GetTextBreak()

sal_Int32 GenericSalLayout::GetTextBreak ( double  nMaxWidth,
double  nCharExtra,
int  nFactor 
) const
finaloverridevirtual

Implements SalLayout.

Definition at line 497 of file sallayout.cxx.

References GetCharWidths(), i, SalLayout::mnEndCharPos, and SalLayout::mnMinCharPos.

◆ GetTextWidth()

double GenericSalLayout::GetTextWidth ( ) const
finaloverridevirtual

Reimplemented from SalLayout.

Definition at line 267 of file sallayout.cxx.

References SalLayoutGlyphsImpl::IsValid(), and m_GlyphItems.

Referenced by FillDXArray(), and Justify().

◆ GlyphsImpl()

const SalLayoutGlyphsImpl & GenericSalLayout::GlyphsImpl ( ) const
inline

Definition at line 132 of file sallayout.hxx.

◆ HasVerticalAlternate()

bool GenericSalLayout::HasVerticalAlternate ( sal_UCS4  aChar,
sal_UCS4  aNextChar 
)
private

Definition at line 162 of file CommonSalLayout.cxx.

References GetFont(), LogicalFontInstance::GetGlyphIndex(), and mpVertGlyphs.

Referenced by LayoutText().

◆ IsKashidaPosValid()

bool GenericSalLayout::IsKashidaPosValid ( int  nCharPos,
int  nNextCharPos 
) const
finaloverridevirtual

Implements SalLayout.

Definition at line 812 of file CommonSalLayout.cxx.

References m_GlyphItems.

◆ Justify()

void GenericSalLayout::Justify ( double  nNewWidth)
private

Definition at line 279 of file sallayout.cxx.

References GetTextWidth(), SalLayoutGlyphsImpl::IsValid(), and m_GlyphItems.

Referenced by AdjustLayout().

◆ LayoutText()

bool GenericSalLayout::LayoutText ( vcl::text::ImplLayoutArgs rArgs,
const SalLayoutGlyphsImpl pGlyphs 
)
finaloverridevirtual

◆ MoveGlyph()

void GenericSalLayout::MoveGlyph ( int  nStart,
double  nNewXPos 
)
private

Definition at line 557 of file sallayout.cxx.

References m_GlyphItems.

◆ operator=()

GenericSalLayout & GenericSalLayout::operator= ( const GenericSalLayout )
privatedelete

◆ ParseFeatures()

void GenericSalLayout::ParseFeatures ( std::u16string_view  name)
private

◆ SetNeedFallback()

void GenericSalLayout::SetNeedFallback ( vcl::text::ImplLayoutArgs rArgs,
sal_Int32  nCharPos,
bool  bRightToLeft 
)
private

◆ Simplify()

void GenericSalLayout::Simplify ( bool  bIsBase)
private

Definition at line 592 of file sallayout.cxx.

References i, and m_GlyphItems.

Friends And Related Function Documentation

◆ MultiSalLayout::ImplAdjustMultiLayout

void MultiSalLayout::ImplAdjustMultiLayout ( vcl::text::ImplLayoutArgs rArgs,
vcl::text::ImplLayoutArgs rMultiArgs,
const double *  pMultiDXArray 
)
friend

Member Data Documentation

◆ m_GlyphItems

SalLayoutGlyphsImpl GenericSalLayout::m_GlyphItems
private

◆ maFeatures

std::vector<hb_feature_t> GenericSalLayout::maFeatures
private

Definition at line 161 of file sallayout.hxx.

Referenced by LayoutText(), and ParseFeatures().

◆ mbFuzzing

const bool GenericSalLayout::mbFuzzing
private

Definition at line 164 of file sallayout.hxx.

Referenced by SetNeedFallback().

◆ mpVertGlyphs

hb_set_t* GenericSalLayout::mpVertGlyphs
private

Definition at line 163 of file sallayout.hxx.

Referenced by HasVerticalAlternate(), and ~GenericSalLayout().

◆ msLanguage

OString GenericSalLayout::msLanguage
private

Definition at line 160 of file sallayout.hxx.

Referenced by LayoutText(), and ParseFeatures().

◆ mxBreak

css::uno::Reference<css::i18n::XBreakIterator> GenericSalLayout::mxBreak
private

Definition at line 156 of file sallayout.hxx.

Referenced by GetCharWidths(), and SetNeedFallback().


The documentation for this class was generated from the following files: