LibreOffice Module sw (master)  1
Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
SwFntObj Class Reference

#include <fntcache.hxx>

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

Public Member Functions

 SwFntObj (const SwSubFont &rFont, const void *nFontCacheId, SwViewShell const *pSh)
 
virtual ~SwFntObj () override
 
vcl::FontGetScrFont ()
 
vcl::FontGetFont ()
 
const vcl::FontGetFont () const
 
sal_uInt16 GetGuessedLeading () const
 
sal_uInt16 GetExternalLeading () const
 
sal_uInt16 GetFontAscent (const SwViewShell *pSh, const OutputDevice &rOut)
 
sal_uInt16 GetFontHeight (const SwViewShell *pSh, const OutputDevice &rOut)
 
sal_uInt16 GetFontLeading (const SwViewShell *pSh, const OutputDevice &rOut)
 
void GuessLeading (const SwViewShell &rSh, const FontMetric &rMet)
 
void SetDevFont (const SwViewShell *pSh, OutputDevice &rOut)
 
OutputDeviceGetPrt () const
 
sal_uInt16 GetZoom () const
 
sal_uInt16 GetPropWidth () const
 
bool IsSymbol () const
 
std::map< SwTextGlyphsKey, SalLayoutGlyphs > & GetTextGlyphs ()
 
void DrawText (SwDrawTextInfo &rInf)
 
Size GetTextSize (SwDrawTextInfo &rInf)
 determine the TextSize (of the printer) More...
 
TextFrameIndex GetCursorOfst (SwDrawTextInfo &rInf)
 
void CreateScrFont (const SwViewShell &rSh, const OutputDevice &rOut)
 
void CreatePrtFont (const OutputDevice &rOut)
 
- Public Member Functions inherited from SwCacheObj
 SwCacheObj (const void *pOwner)
 
virtual ~SwCacheObj ()
 
const voidGetOwner () const
 
bool IsOwner (const void *pNew) const
 
sal_uInt16 GetCachePos () const
 
bool IsLocked () const
 
void Lock ()
 
void Unlock ()
 

Private Attributes

vcl::Font m_aFont
 
vcl::Fontm_pScrFont
 
vcl::Fontm_pPrtFont
 
VclPtr< OutputDevicem_pPrinter
 
sal_uInt16 m_nGuessedLeading
 
sal_uInt16 m_nExtLeading
 
sal_uInt16 m_nScrAscent
 
sal_uInt16 m_nPrtAscent
 
sal_uInt16 m_nScrHeight
 
sal_uInt16 m_nPrtHeight
 
sal_uInt16 const m_nPropWidth
 
sal_uInt16 m_nZoom
 
bool m_bSymbol: 1
 
bool m_bPaintBlank: 1
 
std::map< SwTextGlyphsKey, SalLayoutGlyphsm_aTextGlyphs
 Cache of already calculated layout glyphs. More...
 

Static Private Attributes

static long nPixWidth
 
static MapModepPixMap = nullptr
 

Friends

class SwFntAccess
 
void InitCore ()
 
void FinitCore ()
 

Additional Inherited Members

- Protected Attributes inherited from SwCacheObj
const voidm_pOwner
 

Detailed Description

Definition at line 75 of file fntcache.hxx.

Constructor & Destructor Documentation

SwFntObj::SwFntObj ( const SwSubFont rFont,
const void nFontCacheId,
SwViewShell const *  pSh 
)
SwFntObj::~SwFntObj ( )
overridevirtual

Definition at line 198 of file fntcache.cxx.

References m_aFont, m_pPrtFont, and m_pScrFont.

Member Function Documentation

void SwFntObj::CreatePrtFont ( const OutputDevice rOut)
void SwFntObj::CreateScrFont ( const SwViewShell rSh,
const OutputDevice rOut 
)
void SwFntObj::DrawText ( SwDrawTextInfo rInf)

Kana Compression

Asian Justification

With through/uderstr. Grouped style requires a blank at the end of a text edition special measures:

If it concerns a singular, underlined space acts, we must spend two:

Definition at line 821 of file fntcache.cxx.

References Point::AdjustX(), SwDrawTextInfo::ApplyAutoColor(), aStr, CH_BLANK, CH_BULLET, CJK, SwScriptInfo::CJKJustify(), COMPLETE_STRING, SwScriptInfo::Compress(), SwScriptInfo::CountCompChg(), SwScriptInfo::CountKashida(), CreateScrFont(), CTL, OutputDevice::DrawStretchText(), OutputDevice::DrawText(), OutputDevice::DrawTextArray(), OutputDevice::DrawWaveLine(), SwFrame::FindPageFrame(), VclPtr< OutputDevice >::get(), SwFont::GetActual(), SwViewOption::getBrowseMode(), SwDrawTextInfo::GetBullet(), FontMetric::GetBulletOffset(), OutputDevice::GetConnectMetaFile(), OutputDevice::GetDigitLanguage(), SwViewShell::GetDoc(), OutputDevice::GetFont(), GetFont(), SwDrawTextInfo::GetFont(), OutputDevice::GetFontMetric(), vcl::Font::GetFontSize(), SwDrawTextInfo::GetFrame(), SwDrawTextInfo::GetGrammarCheck(), SwDrawTextInfo::GetGreyWave(), GetGridItem(), SwTextGridItem::GetGridType(), GetGridWidth(), SwDrawTextInfo::GetIdx(), SwDrawTextInfo::GetKanaComp(), SwDrawTextInfo::GetKern(), vcl::Font::GetKerning(), SwFont::GetLanguage(), OutputDevice::GetLayoutMode(), SwDrawTextInfo::GetLen(), OutputDevice::GetLineColor(), OutputDevice::GetMapMode(), SwDrawTextInfo::GetNumberOfBlanks(), SwDrawTextInfo::GetOut(), OutputDevice::GetOutDevType(), SwDrawTextInfo::GetPos(), SwDrawTextInfo::GetpOut(), SwViewShell::GetRefDev(), MapMode::GetScaleX(), SwDrawTextInfo::GetScriptInfo(), SwDrawTextInfo::GetShell(), SwDrawTextInfo::GetSmartTags(), SwDrawTextInfo::GetSpace(), SwDrawTextInfo::GetText(), OutputDevice::GetTextArray(), GetTextSize(), SwViewShell::GetViewOptions(), SwDrawTextInfo::GetWidth(), SwViewShell::GetWin(), SwDrawTextInfo::GetWrong(), GRID_LINES_CHARS, gWaveCol(), Size::Height(), Height, i, SwScriptInfo::IsArabicText(), SwDrawTextInfo::IsIgnoreFrameRTL(), MsLangId::isKorean(), SwViewOption::IsPrtFormat(), SwFrame::IsRightToLeft(), vcl::Font::IsSameInstance(), SwTextGridItem::IsSnapToChars(), SwDrawTextInfo::IsSpaceStop(), SwFrame::IsVertical(), SwFrame::IsVertLRBT(), OutputDevice::IsVirtual(), vcl::Font::IsWordLineMode(), SwScriptInfo::KashidaJustify(), LANGUAGE_THAI, Latin, lcl_DrawLineForWrongListData(), lcl_IsFontAdjustNecessary(), lcl_IsFullstopCentered(), lcl_IsMonoSpaceFont(), lcl_WhichPunctuation(), LINESTYLE_NONE, OutputDevice::LogicToPixel(), m_aFont, m_aTextGlyphs, m_bPaintBlank, m_bSymbol, m_pPrinter, m_pPrtFont, m_pScrFont, NON_PRINTING_CHARACTER_COLOR, SwScriptInfo::NONE, nPixWidth, nType, OUTDEV_PRINTER, OUTDEV_WINDOW, OutputDevice::PixelToLogic(), OutputDevice::Pop(), pPixMap, OutputDevice::Push(), s_pFntObjPixOut, OutputDevice::SetDigitLanguage(), OutputDevice::SetFont(), OutputDevice::SetLayoutMode(), SwDrawTextInfo::SetLen(), OutputDevice::SetLineColor(), Point::setX(), Point::setY(), SwDrawTextInfo::SnapToGrid(), SPACING_PRECISION_FACTOR, SwScriptInfo::SPECIAL_RIGHT, STRIKEOUT_NONE, SwTextFrame::SwitchHorizontalToVertical(), SwTextFrame::SwitchLTRtoRTL(), SwScriptInfo::ThaiJustify(), UnMapDirection(), Size::Width(), WRONG_SHOW_MIN, Point::X(), and Point::Y().

Referenced by SwDoDrawCapital::Do(), and SwSubFont::DrawText_().

TextFrameIndex SwFntObj::GetCursorOfst ( SwDrawTextInfo rInf)

Definition at line 2073 of file fntcache.cxx.

References CH_BLANK, CJK, SwScriptInfo::CJKJustify(), SwScriptInfo::Compress(), SwScriptInfo::CountCompChg(), SwScriptInfo::CountKashida(), CTL, SwScriptInfo::DirType(), SwFrame::FindPageFrame(), g_pBreakIt, SwFont::GetActual(), SwBreakIt::GetBreakIter(), OutputDevice::GetDigitLanguage(), SwViewShell::GetDoc(), SwDrawTextInfo::GetFont(), vcl::Font::GetFontSize(), SwDrawTextInfo::GetFrame(), GetGridItem(), SwTextGridItem::GetGridType(), GetGridWidth(), SwDrawTextInfo::GetIdx(), SwDrawTextInfo::GetKanaComp(), SwDrawTextInfo::GetKern(), SwFont::GetLanguage(), OutputDevice::GetLayoutMode(), SwDrawTextInfo::GetLen(), SwBreakIt::GetLocale(), SwDrawTextInfo::GetNumberOfBlanks(), SwDrawTextInfo::GetOfst(), SwDrawTextInfo::GetOut(), SwDrawTextInfo::GetScriptInfo(), SwDrawTextInfo::GetShell(), SwDrawTextInfo::GetSpace(), SwDrawTextInfo::GetSperren(), SwDrawTextInfo::GetText(), OutputDevice::GetTextArray(), GRID_LINES_CHARS, Size::Height(), i, SwScriptInfo::IsArabicText(), MsLangId::isKorean(), SwDrawTextInfo::IsPosMatchesBounds(), SwTextGridItem::IsSnapToChars(), SwDrawTextInfo::IsSpaceStop(), SwScriptInfo::KashidaJustify(), LANGUAGE_THAI, lcl_IsFullstopCentered(), lcl_IsMonoSpaceFont(), m_aFont, m_aTextGlyphs, m_pPrinter, SwDrawTextInfo::SetCursorBidiLevel(), OutputDevice::SetDigitLanguage(), OutputDevice::SetLayoutMode(), SwDrawTextInfo::SnapToGrid(), SPACING_PRECISION_FACTOR, and SwScriptInfo::ThaiJustify().

Referenced by SwDoCapitalCursorOfst::Do(), and SwSubFont::GetCursorOfst_().

sal_uInt16 SwFntObj::GetExternalLeading ( ) const
inline

Definition at line 113 of file fntcache.hxx.

References m_nExtLeading.

Referenced by GetTextSize().

vcl::Font& SwFntObj::GetFont ( )
inline

Definition at line 109 of file fntcache.hxx.

References m_aFont.

Referenced by SwDoDrawCapital::Do(), and DrawText().

const vcl::Font& SwFntObj::GetFont ( ) const
inline

Definition at line 110 of file fntcache.hxx.

References m_aFont.

sal_uInt16 SwFntObj::GetFontAscent ( const SwViewShell pSh,
const OutputDevice rOut 
)
sal_uInt16 SwFntObj::GetFontHeight ( const SwViewShell pSh,
const OutputDevice rOut 
)
sal_uInt16 SwFntObj::GetFontLeading ( const SwViewShell pSh,
const OutputDevice rOut 
)
sal_uInt16 SwFntObj::GetGuessedLeading ( ) const
inline

Definition at line 112 of file fntcache.hxx.

References m_nGuessedLeading.

Referenced by GetTextSize().

sal_uInt16 SwFntObj::GetPropWidth ( ) const
inline

Definition at line 124 of file fntcache.hxx.

References m_nPropWidth.

Referenced by SwFntAccess::SwFntAccess().

OutputDevice* SwFntObj::GetPrt ( ) const
inline

Definition at line 122 of file fntcache.hxx.

References m_pPrinter.

Referenced by SwSubFont::DoOnCapitals().

vcl::Font* SwFntObj::GetScrFont ( )
inline

Definition at line 108 of file fntcache.hxx.

References m_pScrFont.

Referenced by GetTextSize(), and SetDevFont().

std::map<SwTextGlyphsKey, SalLayoutGlyphs>& SwFntObj::GetTextGlyphs ( )
inline

Definition at line 126 of file fntcache.hxx.

References m_aTextGlyphs.

Size SwFntObj::GetTextSize ( SwDrawTextInfo rInf)

determine the TextSize (of the printer)

Definition at line 1871 of file fntcache.cxx.

References Size::AdjustHeight(), Size::AdjustWidth(), CH_BLANK, CJK, COMPLETE_STRING, SwScriptInfo::Compress(), SwScriptInfo::CountCompChg(), CreateScrFont(), SwFrame::FindPageFrame(), VclPtr< OutputDevice >::get(), SwFont::GetActual(), OutputDevice::GetDigitLanguage(), SwViewShell::GetDoc(), GetExternalLeading(), OutputDevice::GetFont(), SwDrawTextInfo::GetFont(), GetFontLeading(), vcl::Font::GetFontSize(), SwDrawTextInfo::GetFrame(), GetGridItem(), SwTextGridItem::GetGridType(), GetGridWidth(), GetGuessedLeading(), SwDrawTextInfo::GetIdx(), SwDrawTextInfo::GetKanaComp(), SwDrawTextInfo::GetKanaDiff(), SwDrawTextInfo::GetKern(), vcl::Font::GetKerning(), OutputDevice::GetLayoutMode(), SwDrawTextInfo::GetLen(), SwDrawTextInfo::GetOut(), SwDrawTextInfo::GetpOut(), GetScrFont(), SwDrawTextInfo::GetScriptInfo(), SwDrawTextInfo::GetShell(), SwDrawTextInfo::GetText(), OutputDevice::GetTextArray(), OutputDevice::GetTextHeight(), OutputDevice::GetTextWidth(), SwDrawTextInfo::GetVclCache(), GRID_LINES_CHARS, Size::Height(), i, vcl::Font::IsSameInstance(), SwTextGridItem::IsSnapToChars(), lcl_IsFullstopCentered(), lcl_IsMonoSpaceFont(), m_aFont, m_aTextGlyphs, m_pPrinter, m_pPrtFont, m_pScrFont, OutputDevice::SetDigitLanguage(), OutputDevice::SetFont(), Size::setHeight(), SwDrawTextInfo::SetKanaDiff(), OutputDevice::SetLayoutMode(), Size::setWidth(), SwDrawTextInfo::SnapToGrid(), USHRT_MAX, and Size::Width().

Referenced by SwSubFont::DoOnCapitals(), DrawText(), and SwSubFont::GetTextSize_().

sal_uInt16 SwFntObj::GetZoom ( ) const
inline

Definition at line 123 of file fntcache.hxx.

References m_nZoom.

Referenced by SwFntAccess::SwFntAccess().

void SwFntObj::GuessLeading ( const SwViewShell rSh,
const FontMetric rMet 
)
bool SwFntObj::IsSymbol ( ) const
inline

Definition at line 125 of file fntcache.hxx.

References m_bSymbol.

Referenced by SwSubFont::IsSymbol().

void SwFntObj::SetDevFont ( const SwViewShell pSh,
OutputDevice rOut 
)

Friends And Related Function Documentation

void FinitCore ( )
friend

Definition at line 665 of file init.cxx.

void InitCore ( )
friend

Definition at line 449 of file init.cxx.

friend class SwFntAccess
friend

Definition at line 77 of file fntcache.hxx.

Member Data Documentation

vcl::Font SwFntObj::m_aFont
private
std::map<SwTextGlyphsKey, SalLayoutGlyphs> SwFntObj::m_aTextGlyphs
private

Cache of already calculated layout glyphs.

Definition at line 97 of file fntcache.hxx.

Referenced by DrawText(), GetCursorOfst(), GetTextGlyphs(), and GetTextSize().

bool SwFntObj::m_bPaintBlank
private

Definition at line 94 of file fntcache.hxx.

Referenced by DrawText(), and SwFntObj().

bool SwFntObj::m_bSymbol
private

Definition at line 93 of file fntcache.hxx.

Referenced by CreateScrFont(), DrawText(), GetFontLeading(), IsSymbol(), and SwFntObj().

sal_uInt16 SwFntObj::m_nExtLeading
private
sal_uInt16 SwFntObj::m_nGuessedLeading
private
sal_uInt16 const SwFntObj::m_nPropWidth
private

Definition at line 91 of file fntcache.hxx.

Referenced by CreatePrtFont(), and GetPropWidth().

sal_uInt16 SwFntObj::m_nPrtAscent
private

Definition at line 88 of file fntcache.hxx.

Referenced by GetFontAscent(), GuessLeading(), and SwFntAccess::SwFntAccess().

sal_uInt16 SwFntObj::m_nPrtHeight
private

Definition at line 90 of file fntcache.hxx.

Referenced by GetFontHeight(), and SwFntAccess::SwFntAccess().

sal_uInt16 SwFntObj::m_nScrAscent
private

Definition at line 87 of file fntcache.hxx.

Referenced by CreateScrFont(), and GetFontAscent().

sal_uInt16 SwFntObj::m_nScrHeight
private

Definition at line 89 of file fntcache.hxx.

Referenced by CreateScrFont(), and GetFontHeight().

sal_uInt16 SwFntObj::m_nZoom
private

Definition at line 92 of file fntcache.hxx.

Referenced by CreateScrFont(), GetZoom(), and SwFntObj().

VclPtr<OutputDevice> SwFntObj::m_pPrinter
private
vcl::Font* SwFntObj::m_pPrtFont
private
vcl::Font* SwFntObj::m_pScrFont
private
long SwFntObj::nPixWidth
staticprivate

Definition at line 99 of file fntcache.hxx.

Referenced by DrawText().

MapMode * SwFntObj::pPixMap = nullptr
staticprivate

Definition at line 100 of file fntcache.hxx.

Referenced by DrawText(), FinitCore(), and InitCore().


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