LibreOffice Module sw (master) 1
|
#include <fntcache.hxx>
Public Member Functions | |
SwFntObj (const SwSubFont &rFont, std::uintptr_t nFontCacheId, SwViewShell const *pSh) | |
virtual | ~SwFntObj () override |
vcl::Font * | GetScrFont () |
vcl::Font & | GetFont () |
const vcl::Font & | GetFont () 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) |
sal_uInt16 | GetFontHangingBaseline (const SwViewShell *pSh, const OutputDevice &rOut) |
void | GuessLeading (const SwViewShell &rSh, const FontMetric &rMet) |
void | SetDevFont (const SwViewShell *pSh, OutputDevice &rOut) |
OutputDevice * | GetPrt () const |
sal_uInt16 | GetZoom () const |
sal_uInt16 | GetPropWidth () const |
bool | IsSymbol () const |
void | DrawText (SwDrawTextInfo &rInf) |
Size | GetTextSize (SwDrawTextInfo &rInf) |
determine the TextSize (of the printer) More... | |
TextFrameIndex | GetModelPositionForViewPoint (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 void * | GetOwner () 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::Font * | m_pScrFont |
vcl::Font * | m_pPrtFont |
VclPtr< OutputDevice > | m_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 | m_nPropWidth |
sal_uInt16 | m_nScrHangingBaseline |
sal_uInt16 | m_nPrtHangingBaseline |
sal_uInt16 | m_nZoom |
bool | m_bSymbol: 1 |
bool | m_bPaintBlank: 1 |
Static Private Attributes | |
static tools::Long | s_nPixWidth |
static MapMode * | s_pPixMap = nullptr |
Friends | |
class | SwFntAccess |
void | InitCore () |
void | FinitCore () |
Additional Inherited Members | |
Protected Attributes inherited from SwCacheObj | |
const void * | m_pOwner |
Definition at line 60 of file fntcache.hxx.
SwFntObj::SwFntObj | ( | const SwSubFont & | rFont, |
std::uintptr_t | nFontCacheId, | ||
SwViewShell const * | pSh | ||
) |
Definition at line 86 of file fntcache.cxx.
References vcl::Font::GetCharSet(), vcl::Font::GetOverline(), vcl::Font::GetStrikeout(), vcl::Font::GetUnderline(), SwViewShell::GetViewOptions(), SwViewOption::GetZoom(), vcl::Font::IsWordLineMode(), LINESTYLE_NONE, m_aFont, m_aFont, m_bPaintBlank, m_bSymbol, m_nZoom, vcl::Font::SetLanguage(), and STRIKEOUT_NONE.
|
overridevirtual |
Definition at line 111 of file fntcache.cxx.
References m_aFont, m_pPrtFont, and m_pScrFont.
void SwFntObj::CreatePrtFont | ( | const OutputDevice & | rOut | ) |
Definition at line 119 of file fntcache.cxx.
References OutputDevice::GetFont(), OutputDevice::GetFontMetric(), vcl::Font::GetFontSize(), Size::Height(), m_aFont, m_nPropWidth, m_pPrinter, m_pPrtFont, m_pScrFont, vcl::Font::SetFontSize(), and Size::Width().
Referenced by CreateScrFont(), GetFontAscent(), GetFontHeight(), SetDevFont(), and SwFntAccess::SwFntAccess().
void SwFntObj::CreateScrFont | ( | const SwViewShell & | rSh, |
const OutputDevice & | rOut | ||
) |
Definition at line 413 of file fntcache.cxx.
References CreatePrtFont(), SwViewOption::getBrowseMode(), vcl::Font::GetCharSet(), FontMetric::GetExternalLeading(), OutputDevice::GetFont(), OutputDevice::GetFontMetric(), vcl::Font::GetItalic(), SwViewShell::GetRefDev(), SwViewShell::GetViewOptions(), vcl::Font::GetWeight(), SwViewShell::GetWin(), GuessLeading(), SwViewOption::IsPrtFormat(), m_aFont, m_bSymbol, m_nExtLeading, m_nGuessedLeading, m_nScrAscent, m_nScrHangingBaseline, m_nScrHeight, m_pPrinter, m_pPrtFont, m_pScrFont, pOut, OutputDevice::SetFont(), vcl::Font::SetItalic(), and vcl::Font::SetWeight().
Referenced by DrawText(), GetFontAscent(), GetFontHeight(), GetTextSize(), and SetDevFont().
void SwFntObj::DrawText | ( | SwDrawTextInfo & | rInf | ) |
Definition at line 769 of file fntcache.cxx.
References a, KernArray::adjust(), Point::AdjustX(), Point::AdjustY(), SwDrawTextInfo::ApplyAutoColor(), vcl::text::BiDiRtl, vcl::text::BiDiStrong, CH_BLANK, CH_BULLET, CJK, SwScriptInfo::CJKJustify(), COMPLETE_STRING, SwScriptInfo::Compress(), SwScriptInfo::CountCompChg(), SwScriptInfo::CountKashida(), CreateScrFont(), CTL, vcl::text::Default, OutputDevice::DrawStretchText(), OutputDevice::DrawText(), OutputDevice::DrawTextArray(), OutputDevice::DrawWaveLine(), SwFrame::FindPageFrame(), o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::get(), VclPtr< class reference_type >::get(), SwFont::GetActual(), SwViewOption::getBrowseMode(), SwDrawTextInfo::GetBullet(), FontMetric::GetBulletOffset(), vcl::Font::GetColor(), OutputDevice::GetConnectMetaFile(), OutputDevice::GetDigitLanguage(), SwViewShell::GetDoc(), GetFont(), OutputDevice::GetFont(), SwDrawTextInfo::GetFont(), OutputDevice::GetFontMetric(), vcl::Font::GetFontSize(), SwDrawTextInfo::GetFrame(), SwDrawTextInfo::GetGrammarCheck(), SwDrawTextInfo::GetGreyWave(), GetGridItem(), SwTextGridItem::GetGridType(), GetGridWidth(), SwDrawTextInfo::GetIdx(), SwDrawTextInfo::GetKanaComp(), SwDrawTextInfo::GetKern(), SwFont::GetLanguage(), SalLayoutGlyphsCache::GetLayoutGlyphs(), OutputDevice::GetLayoutMode(), SwDrawTextInfo::GetLen(), OutputDevice::GetLineColor(), OutputDevice::GetMapMode(), MapMode::GetMapUnit(), SwDrawTextInfo::GetNumberOfBlanks(), SwDrawTextInfo::GetOut(), OutputDevice::GetOutDevType(), vcl::Font::GetOverline(), SwDrawTextInfo::GetPos(), SwDrawTextInfo::GetpOut(), SwViewShell::GetRefDev(), MapMode::GetScaleX(), SwDrawTextInfo::GetScriptInfo(), SwDrawTextInfo::GetShell(), SwDrawTextInfo::GetSmartTags(), SwDrawTextInfo::GetSpace(), vcl::Font::GetStrikeout(), SwDrawTextInfo::GetText(), GetTextArray(), GetTextSize(), vcl::Font::GetUnderline(), SwViewShell::GetViewOptions(), SwDrawTextInfo::GetWidth(), SwViewShell::GetWin(), SwDrawTextInfo::GetWrong(), GRID_LINES_CHARS, gWaveCol(), Size::Height(), i, SwScriptInfo::IsArabicText(), SwDrawTextInfo::IsIgnoreFrameRTL(), MsLangId::isKorean(), SwViewOption::IsPrtFormat(), SwFrame::IsRightToLeft(), vcl::Font::IsSameInstance(), MapMode::IsSimple(), SwTextGridItem::IsSnapToChars(), SwDrawTextInfo::IsSpaceStop(), SwFrame::IsVertical(), SwFrame::IsVertLRBT(), OutputDevice::IsVirtual(), vcl::Font::IsWordLineMode(), SwScriptInfo::KashidaJustify(), LANGUAGE_THAI, lcl_DrawLineForWrongListData(), lcl_IsFontAdjustNecessary(), lcl_IsFullstopCentered(), lcl_IsMonoSpaceFont(), LINESTYLE_NONE, OutputDevice::LogicToPixel(), m_aFont, m_bPaintBlank, m_bSymbol, m_pPrinter, m_pPrtFont, m_pScrFont, min(), nIndex, NON_PRINTING_CHARACTER_COLOR, OUTDEV_PRINTER, OUTDEV_WINDOW, OutputDevice::PixelToLogic(), OutputDevice::Pop(), OutputDevice::Push(), s_nPixWidth, s_pFntObjPixOut, s_pPixMap, SalLayoutGlyphsCache::self(), KernArray::set(), vcl::Font::SetColor(), OutputDevice::SetFont(), SwDrawTextInfo::SetLen(), OutputDevice::SetLineColor(), vcl::Font::SetOverline(), vcl::Font::SetStrikeout(), vcl::Font::SetUnderline(), Point::setX(), Point::setY(), KernArray::size(), SwDrawTextInfo::SnapToGrid(), sw::Justify::SnapToGrid(), sw::Justify::SnapToGridEdge(), sw::Justify::SpaceDistribution(), SPACING_PRECISION_FACTOR, STRIKEOUT_NONE, SwTextFrame::SwitchHorizontalToVertical(), SwTextFrame::SwitchLTRtoRTL(), SwScriptInfo::ThaiJustify(), UnMapDirection(), Size::Width(), WRONG_SHOW_MIN, Point::X(), and Point::Y().
Referenced by SwSubFont::DrawText_().
|
inline |
|
inline |
|
inline |
Definition at line 94 of file fntcache.hxx.
References m_aFont.
sal_uInt16 SwFntObj::GetFontAscent | ( | const SwViewShell * | pSh, |
const OutputDevice & | rOut | ||
) |
Definition at line 269 of file fntcache.cxx.
References CreatePrtFont(), CreateScrFont(), FontMetric::GetAscent(), OutputDevice::GetFont(), GetFontLeading(), OutputDevice::GetFontMetric(), FontMetric::GetHangingBaseline(), SwViewShell::GetRefDev(), lcl_IsFontAdjustNecessary(), m_nPrtAscent, m_nPrtHangingBaseline, m_nScrAscent, and m_pPrtFont.
Referenced by SwSubFont::CalcEsc(), SwFont::ChgPhysFnt(), SwSubFont::GetAscent(), GetFontHangingBaseline(), SwSubFont::GetHeight(), and SwSubFont::GetTextSize_().
sal_uInt16 SwFntObj::GetFontHangingBaseline | ( | const SwViewShell * | pSh, |
const OutputDevice & | rOut | ||
) |
Definition at line 397 of file fntcache.cxx.
References GetFontAscent(), SwViewShell::GetRefDev(), lcl_IsFontAdjustNecessary(), m_nPrtHangingBaseline, and m_nScrHangingBaseline.
Referenced by SwSubFont::GetHangingBaseline().
sal_uInt16 SwFntObj::GetFontHeight | ( | const SwViewShell * | pSh, |
const OutputDevice & | rOut | ||
) |
Definition at line 307 of file fntcache.cxx.
References abs(), CreatePrtFont(), CreateScrFont(), FontMetric::GetAscent(), FontMetric::GetDescent(), OutputDevice::GetFont(), GetFontLeading(), OutputDevice::GetFontMetric(), SwViewShell::GetRefDev(), OutputDevice::GetTextHeight(), lcl_IsFontAdjustNecessary(), m_nPrtHeight, m_nScrHeight, and m_pPrtFont.
Referenced by SwSubFont::CalcEsc(), SwFont::ChgPhysFnt(), and SwSubFont::GetHeight().
sal_uInt16 SwFntObj::GetFontLeading | ( | const SwViewShell * | pSh, |
const OutputDevice & | rOut | ||
) |
Definition at line 346 of file fntcache.cxx.
References ADD_EXT_LEADING, IDocumentSettingAccess::get(), SwViewOption::getBrowseMode(), vcl::Font::GetCharSet(), FontMetric::GetExternalLeading(), vcl::Font::GetFamilyName(), OutputDevice::GetFont(), OutputDevice::GetFontMetric(), SwViewShell::getIDocumentSettingAccess(), SwViewShell::GetViewOptions(), SwViewShell::GetWin(), GuessLeading(), IsOpenSymbol(), SwViewOption::IsPrtFormat(), m_bSymbol, m_nExtLeading, m_nGuessedLeading, and m_pPrtFont.
Referenced by GetFontAscent(), GetFontHeight(), GetTextSize(), and SetDevFont().
|
inline |
Definition at line 96 of file fntcache.hxx.
References m_nGuessedLeading.
Referenced by GetTextSize().
TextFrameIndex SwFntObj::GetModelPositionForViewPoint | ( | SwDrawTextInfo & | rInf | ) |
Definition at line 1682 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(), SwDrawTextInfo::GetCharacterSpacing(), 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(), sw::Justify::GetModelPosition(), SwDrawTextInfo::GetNumberOfBlanks(), SwDrawTextInfo::GetOffset(), SwDrawTextInfo::GetOut(), SwDrawTextInfo::GetScriptInfo(), SwDrawTextInfo::GetShell(), SwDrawTextInfo::GetSpace(), SwDrawTextInfo::GetText(), GetTextArray(), GRID_LINES_CHARS, Size::Height(), SwScriptInfo::IsArabicText(), MsLangId::isKorean(), SwDrawTextInfo::IsPosMatchesBounds(), SwTextGridItem::IsSnapToChars(), SwDrawTextInfo::IsSpaceStop(), SwScriptInfo::KashidaJustify(), LANGUAGE_THAI, lcl_IsFullstopCentered(), lcl_IsMonoSpaceFont(), m_aFont, m_pPrinter, SwDrawTextInfo::SetCursorBidiLevel(), SwDrawTextInfo::SnapToGrid(), sw::Justify::SnapToGrid(), sw::Justify::SnapToGridEdge(), SPACING_PRECISION_FACTOR, and SwScriptInfo::ThaiJustify().
Referenced by SwSubFont::GetModelPositionForViewPoint_().
|
inline |
Definition at line 109 of file fntcache.hxx.
References m_nPropWidth.
Referenced by SwFntAccess::SwFntAccess().
|
inline |
Definition at line 107 of file fntcache.hxx.
References m_pPrinter.
Referenced by SwSubFont::DoOnCapitals().
|
inline |
Definition at line 92 of file fntcache.hxx.
References m_pScrFont.
Referenced by GetTextSize(), and SetDevFont().
Size SwFntObj::GetTextSize | ( | SwDrawTextInfo & | rInf | ) |
determine the TextSize (of the printer)
Definition at line 1538 of file fntcache.cxx.
References Size::AdjustHeight(), Size::AdjustWidth(), CJK, COMPLETE_STRING, SwScriptInfo::Compress(), SwScriptInfo::CountCompChg(), CreateScrFont(), SwFrame::FindPageFrame(), o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::get(), VclPtr< class reference_type >::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::GetKern(), OutputDevice::GetLayoutMode(), SwDrawTextInfo::GetLen(), SwDrawTextInfo::GetMeasureLen(), SwDrawTextInfo::GetOut(), SwDrawTextInfo::GetpOut(), GetScrFont(), SwDrawTextInfo::GetScriptInfo(), SwDrawTextInfo::GetShell(), SwDrawTextInfo::GetText(), GetTextArray(), OutputDevice::GetTextHeight(), OutputDevice::GetTextWidth(), GRID_LINES_CHARS, Size::Height(), i, vcl::Font::IsSameInstance(), SwTextGridItem::IsSnapToChars(), lcl_IsFullstopCentered(), lcl_IsMonoSpaceFont(), m_aFont, m_pPrinter, m_pPrtFont, m_pScrFont, OutputDevice::SetFont(), Size::setHeight(), SwDrawTextInfo::SetKanaDiff(), Size::setWidth(), SwDrawTextInfo::SnapToGrid(), sw::Justify::SnapToGrid(), and sw::Justify::SnapToGridEdge().
Referenced by SwSubFont::DoOnCapitals(), DrawText(), and SwSubFont::GetTextSize_().
|
inline |
Definition at line 108 of file fntcache.hxx.
References m_nZoom.
Referenced by SwFntAccess::SwFntAccess().
void SwFntObj::GuessLeading | ( | const SwViewShell & | rSh, |
const FontMetric & | rMet | ||
) |
Definition at line 488 of file fntcache.cxx.
References FontMetric::GetAscent(), Application::GetDefaultDevice(), FontMetric::GetDescent(), vcl::Font::GetFamilyName(), OutputDevice::GetFont(), OutputDevice::GetFontMetric(), vcl::Font::GetFontSize(), FontMetric::GetInternalLeading(), OutputDevice::GetMapMode(), Size::Height(), m_nGuessedLeading, m_nPrtAscent, m_pPrtFont, min(), OutputDevice::SetFont(), and OutputDevice::SetMapMode().
Referenced by CreateScrFont(), and GetFontLeading().
|
inline |
Definition at line 110 of file fntcache.hxx.
References m_bSymbol.
Referenced by SwSubFont::IsSymbol().
void SwFntObj::SetDevFont | ( | const SwViewShell * | pSh, |
OutputDevice & | rOut | ||
) |
Definition at line 568 of file fntcache.cxx.
References CreatePrtFont(), CreateScrFont(), OutputDevice::GetFont(), GetFontLeading(), SwViewShell::GetRefDev(), GetScrFont(), vcl::Font::IsSameInstance(), lcl_IsFontAdjustNecessary(), m_pPrinter, m_pPrtFont, m_pScrFont, and OutputDevice::SetFont().
Referenced by SwTextFrame::CalcHeightOfLastLine(), SwSubFont::ChgFnt(), and SwSubFont::DoOnCapitals().
|
friend |
Definition at line 62 of file fntcache.hxx.
|
private |
Definition at line 66 of file fntcache.hxx.
Referenced by CreatePrtFont(), CreateScrFont(), DrawText(), GetFont(), GetModelPositionForViewPoint(), GetTextSize(), SwFntAccess::SwFntAccess(), SwFntObj(), and ~SwFntObj().
|
private |
Definition at line 81 of file fntcache.hxx.
Referenced by DrawText(), and SwFntObj().
|
private |
Definition at line 80 of file fntcache.hxx.
Referenced by CreateScrFont(), DrawText(), GetFontLeading(), IsSymbol(), and SwFntObj().
|
private |
Definition at line 71 of file fntcache.hxx.
Referenced by CreateScrFont(), GetExternalLeading(), GetFontLeading(), and SwFntAccess::SwFntAccess().
|
private |
Definition at line 70 of file fntcache.hxx.
Referenced by CreateScrFont(), GetFontLeading(), GetGuessedLeading(), GuessLeading(), and SwFntAccess::SwFntAccess().
|
private |
Definition at line 76 of file fntcache.hxx.
Referenced by CreatePrtFont(), and GetPropWidth().
|
private |
Definition at line 73 of file fntcache.hxx.
Referenced by GetFontAscent(), GuessLeading(), and SwFntAccess::SwFntAccess().
|
private |
Definition at line 78 of file fntcache.hxx.
Referenced by GetFontAscent(), and GetFontHangingBaseline().
|
private |
Definition at line 75 of file fntcache.hxx.
Referenced by GetFontHeight(), and SwFntAccess::SwFntAccess().
|
private |
Definition at line 72 of file fntcache.hxx.
Referenced by CreateScrFont(), and GetFontAscent().
|
private |
Definition at line 77 of file fntcache.hxx.
Referenced by CreateScrFont(), and GetFontHangingBaseline().
|
private |
Definition at line 74 of file fntcache.hxx.
Referenced by CreateScrFont(), and GetFontHeight().
|
private |
Definition at line 79 of file fntcache.hxx.
Referenced by GetZoom(), and SwFntObj().
|
private |
Definition at line 69 of file fntcache.hxx.
Referenced by CreatePrtFont(), CreateScrFont(), DrawText(), GetModelPositionForViewPoint(), GetPrt(), GetTextSize(), SetDevFont(), and SwFntAccess::SwFntAccess().
|
private |
Definition at line 68 of file fntcache.hxx.
Referenced by CreatePrtFont(), CreateScrFont(), DrawText(), GetFontAscent(), GetFontHeight(), GetFontLeading(), GetTextSize(), GuessLeading(), SetDevFont(), and ~SwFntObj().
|
private |
Definition at line 67 of file fntcache.hxx.
Referenced by CreatePrtFont(), CreateScrFont(), DrawText(), GetScrFont(), GetTextSize(), SetDevFont(), SwFntAccess::SwFntAccess(), and ~SwFntObj().
|
staticprivate |
Definition at line 83 of file fntcache.hxx.
Referenced by DrawText().
|
staticprivate |
Definition at line 84 of file fntcache.hxx.
Referenced by DrawText().