LibreOffice Module sw (master)  1
Macros | Typedefs | Functions | Variables
fntcache.cxx File Reference
#include <sal/config.h>
#include <i18nlangtag/mslangid.hxx>
#include <officecfg/Office/Common.hxx>
#include <vcl/outdev.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
#include <vcl/lazydelete.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <breakit.hxx>
#include <config_fuzzers.h>
#include <paintfrm.hxx>
#include <viewsh.hxx>
#include <viewopt.hxx>
#include <fntcache.hxx>
#include <IDocumentSettingAccess.hxx>
#include <swfont.hxx>
#include <wrong.hxx>
#include <txtfrm.hxx>
#include <pagefrm.hxx>
#include <tgrditem.hxx>
#include <scriptinfo.hxx>
#include <editeng/brushitem.hxx>
#include <swmodule.hxx>
#include <accessibilityoptions.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
#include <doc.hxx>
#include <editeng/fhgtitem.hxx>
#include <vcl/glyphitem.hxx>
#include <vcl/vcllayout.hxx>
#include <docsh.hxx>
#include <strings.hrc>
#include <fntcap.hxx>
#include <vcl/outdev/ScopedStates.hxx>
#include <o3tl/hash_combine.hxx>
#include <cstdint>
#include <memory>
Include dependency graph for fntcache.cxx:

Go to the source code of this file.


#define WRONG_SHOW_MIN   5


typedef std::vector< std::pair< TextFrameIndex, TextFrameIndex > > SwForbidden


constexpr Color gWaveCol (COL_GRAY)
static SalLayoutGlyphslcl_CreateLayout (const SwTextGlyphsKey &rKey, SwTextGlyphsMap::iterator it)
 Pre-calculates glyph items for the rendered subset of rKey's text, assuming outdev state does not change between the outdev calls. More...
static bool lcl_IsFontAdjustNecessary (const vcl::RenderContext &rOutDev, const vcl::RenderContext &rRefDev)
static void lcl_calcLinePos (const CalcLinePosData &rData, Point &rStart, Point &rEnd, TextFrameIndex const nStart, TextFrameIndex const nWrLen)
static sal_uInt8 lcl_WhichPunctuation (sal_Unicode cChar)
static bool lcl_IsMonoSpaceFont (const vcl::RenderContext &rOut)
static bool lcl_IsFullstopCentered (const vcl::RenderContext &rOut)
static void lcl_DrawLineForWrongListData (SwForbidden &rForbidden, const SwDrawTextInfo &rInf, sw::WrongListIterator *pWList, const CalcLinePosData &rCalcLinePosData, const Size &rPrtFontSize)
void SwClearFntCacheTextGlyphs ()
 Clears the pre-calculated text glyphs in all SwFntObj instances. More...


SwFntCachepFntCache = nullptr
SwFntObjpLastFont = nullptr
static vcl::DeleteOnDeinit< VclPtr< OutputDevice > > s_pFntObjPixOut
const SalLayoutFlags eGlyphItemsOnlyLayout = SalLayoutFlags::GlyphItemsOnly

Macro Definition Documentation

#define WRONG_SHOW_MIN   5

Definition at line 684 of file fntcache.cxx.

Referenced by SwFntObj::DrawText(), and lcl_DrawLineForWrongListData().

Typedef Documentation

typedef std::vector<std::pair<TextFrameIndex, TextFrameIndex> > SwForbidden

Definition at line 729 of file fntcache.cxx.

Function Documentation

constexpr Color gWaveCol ( COL_GRAY  )

Referenced by SwFntObj::DrawText().

static void lcl_calcLinePos ( const CalcLinePosData &  rData,
Point &  rStart,
Point &  rEnd,
TextFrameIndex const  nStart,
TextFrameIndex const  nWrLen 
static SalLayoutGlyphs* lcl_CreateLayout ( const SwTextGlyphsKey rKey,
SwTextGlyphsMap::iterator  it 

Pre-calculates glyph items for the rendered subset of rKey's text, assuming outdev state does not change between the outdev calls.

Definition at line 204 of file fntcache.cxx.

References eGlyphItemsOnlyLayout, OutputDevice::ImplLayout(), SwTextGlyphsKey::m_aText, SwTextGlyphsKey::m_nIndex, SwTextGlyphsKey::m_nLength, SwTextGlyphsKey::m_pOutputDevice, and Point.

Referenced by SwFntObj::GetCachedSalLayoutGlyphs(), and SwFntObj::GetCachedTextWidth().

static void lcl_DrawLineForWrongListData ( SwForbidden rForbidden,
const SwDrawTextInfo rInf,
sw::WrongListIterator pWList,
const CalcLinePosData &  rCalcLinePosData,
const Size rPrtFontSize 
static bool lcl_IsFontAdjustNecessary ( const vcl::RenderContext rOutDev,
const vcl::RenderContext rRefDev 
static bool lcl_IsFullstopCentered ( const vcl::RenderContext rOut)
static bool lcl_IsMonoSpaceFont ( const vcl::RenderContext rOut)
static sal_uInt8 lcl_WhichPunctuation ( sal_Unicode  cChar)
void SwClearFntCacheTextGlyphs ( )

Clears the pre-calculated text glyphs in all SwFntObj instances.

Definition at line 2656 of file fntcache.cxx.

References SwFntCache::First(), and SwFntCache::Next().

Referenced by SwDoc::SetTabCols(), and SwLayIdle::SwLayIdle().

Variable Documentation

const SalLayoutFlags eGlyphItemsOnlyLayout = SalLayoutFlags::GlyphItemsOnly

Definition at line 194 of file fntcache.cxx.

Referenced by lcl_CreateLayout().

SwFntCache* pFntCache = nullptr
SwFntObj* pLastFont = nullptr
vcl::DeleteOnDeinit< VclPtr<OutputDevice> > s_pFntObjPixOut

Definition at line 74 of file fntcache.cxx.

Referenced by SwFntObj::DrawText().