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
 
DeviceCoordinate GetTextWidth () const final override
 
DeviceCoordinate FillDXArray (std::vector< DeviceCoordinate > *pDXArray, const OUString &rStr) const final override
 
sal_Int32 GetTextBreak (DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const final override
 
void GetCaretPositions (int nArraySize, sal_Int32 *pCaretXArray) const final override
 
LogicalFontInstanceGetFont () const
 
bool GetNextGlyph (const GlyphItem **pGlyph, DevicePoint &rPos, int &nStart, const LogicalFontInstance **ppGlyphFont=nullptr, const vcl::font::PhysicalFontFace **pFallbackFont=nullptr) const override
 
const SalLayoutGlyphsImplGlyphsImpl () const
 
- Public Member Functions inherited from SalLayout
virtual ~SalLayout ()
 
DevicePointDrawBase ()
 
const DevicePointDrawBase () const
 
PointDrawOffset ()
 
const PointDrawOffset () const
 
DevicePoint GetDrawPosition (const DevicePoint &rRelative=DevicePoint(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
 
int GetUnitsPerPixel () const
 
Degree10 GetOrientation () const
 
void SetTextRenderModeForResolutionIndependentLayout (bool bTextRenderModeForResolutionIndependentLayout)
 
bool GetTextRenderModeForResolutionIndependentLayout () const
 
virtual sal_Int32 GetTextBreak (DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const =0
 
virtual DeviceCoordinate FillDXArray (std::vector< DeviceCoordinate > *pDXArray, const OUString &rStr) const =0
 
virtual DeviceCoordinate GetTextWidth () const
 
virtual void GetCaretPositions (int nArraySize, sal_Int32 *pCaretXArray) const =0
 
virtual bool IsKashidaPosValid (int, int) const =0
 
virtual bool GetNextGlyph (const GlyphItem **pGlyph, DevicePoint &rPos, int &nStart, const LogicalFontInstance **ppGlyphFont=nullptr, const vcl::font::PhysicalFontFace **pFallbackFont=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, tools::Long 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 (DeviceCoordinate nNewWidth)
 
void ApplyAsianKerning (std::u16string_view rStr)
 
void GetCharWidths (std::vector< DeviceCoordinate > &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
 
int mnUnitsPerPixel
 
Degree10 mnOrientation
 
Point maDrawOffset
 
DevicePoint maDrawBase
 
bool mbTextRenderModeForResolutionIndependentLayout
 

Detailed Description

Definition at line 101 of file sallayout.hxx.

Constructor & Destructor Documentation

◆ GenericSalLayout() [1/2]

GenericSalLayout::GenericSalLayout ( LogicalFontInstance rFont)

Definition at line 45 of file CommonSalLayout.cxx.

◆ ~GenericSalLayout()

GenericSalLayout::~GenericSalLayout ( )
override

Definition at line 52 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 417 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 194 of file CommonSalLayout.cxx.

References SalGraphics::DrawTextLayout().

◆ DropGlyph()

void GenericSalLayout::DropGlyph ( int  nStart)
private

Definition at line 581 of file sallayout.cxx.

References m_GlyphItems.

◆ FillDXArray()

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

Implements SalLayout.

Definition at line 268 of file sallayout.cxx.

References GetCharWidths(), and GetTextWidth().

◆ GetCaretPositions()

void GenericSalLayout::GetCaretPositions ( int  nArraySize,
sal_Int32 *  pCaretXArray 
) const
finaloverridevirtual

Implements SalLayout.

Definition at line 462 of file sallayout.cxx.

References i, m_GlyphItems, SalLayout::mnMinCharPos, and n.

◆ GetCharWidths()

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

◆ GetFont()

LogicalFontInstance & GenericSalLayout::GetFont ( ) const
inline

◆ GetGlyphs()

SalLayoutGlyphs GenericSalLayout::GetGlyphs ( ) const
finaloverridevirtual

Reimplemented from SalLayout.

Definition at line 141 of file CommonSalLayout.cxx.

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

◆ GetNextGlyph()

bool GenericSalLayout::GetNextGlyph ( const GlyphItem **  pGlyph,
DevicePoint rPos,
int nStart,
const LogicalFontInstance **  ppGlyphFont = nullptr,
const vcl::font::PhysicalFontFace **  pFallbackFont = nullptr 
) const
overridevirtual

◆ GetTextBreak()

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

Implements SalLayout.

Definition at line 493 of file sallayout.cxx.

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

◆ GetTextWidth()

DeviceCoordinate GenericSalLayout::GetTextWidth ( ) const
finaloverridevirtual

Reimplemented from SalLayout.

Definition at line 277 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 133 of file sallayout.hxx.

◆ HasVerticalAlternate()

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

Definition at line 204 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 872 of file CommonSalLayout.cxx.

References m_GlyphItems.

◆ Justify()

void GenericSalLayout::Justify ( DeviceCoordinate  nNewWidth)
private

◆ LayoutText()

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

◆ MoveGlyph()

void GenericSalLayout::MoveGlyph ( int  nStart,
tools::Long  nNewXPos 
)
private

Definition at line 556 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 591 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 162 of file sallayout.hxx.

Referenced by LayoutText(), and ParseFeatures().

◆ mbFuzzing

const bool GenericSalLayout::mbFuzzing
private

Definition at line 165 of file sallayout.hxx.

Referenced by SetNeedFallback().

◆ mpVertGlyphs

hb_set_t* GenericSalLayout::mpVertGlyphs
private

Definition at line 164 of file sallayout.hxx.

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

◆ msLanguage

OString GenericSalLayout::msLanguage
private

Definition at line 161 of file sallayout.hxx.

Referenced by LayoutText(), and ParseFeatures().

◆ mxBreak

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

Definition at line 157 of file sallayout.hxx.

Referenced by GetCharWidths(), and SetNeedFallback().


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