diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-11 08:15:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-11 09:27:07 +0100 |
commit | bea1fe240010d4870d2fd3877ee07ba31d1dcda0 (patch) | |
tree | defc020945cfbb0861793de220f73887abb7389b /vcl/inc | |
parent | 2513e6864fee07da9ec8ea5489ada82de0991b15 (diff) |
merge SalLayoutGlyphsImpl and SalGenericLayoutGlyphsImpl
Change-Id: I5697d2b7961ce714835316879610f23aeabbd8ec
Reviewed-on: https://gerrit.libreoffice.org/69030
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/impglyphitem.hxx | 28 | ||||
-rw-r--r-- | vcl/inc/sallayout.hxx | 2 |
2 files changed, 10 insertions, 20 deletions
diff --git a/vcl/inc/impglyphitem.hxx b/vcl/inc/impglyphitem.hxx index 009be6cc2506..24690216db63 100644 --- a/vcl/inc/impglyphitem.hxx +++ b/vcl/inc/impglyphitem.hxx @@ -92,33 +92,23 @@ VCL_DLLPUBLIC bool GlyphItem::GetGlyphOutline(basegfx::B2DPolyPolygon& rPoly) co class SalLayoutGlyphsImpl : public std::vector<GlyphItem> { -protected: - void SetPImpl(SalLayoutGlyphs* pFacade) { pFacade->m_pImpl = this; } + friend class GenericSalLayout; public: - virtual ~SalLayoutGlyphsImpl(); - virtual SalLayoutGlyphsImpl* clone(SalLayoutGlyphs&) const = 0; - virtual bool IsValid() const = 0; - virtual void Invalidate() = 0; -}; - -class SalGenericLayoutGlyphsImpl : public SalLayoutGlyphsImpl -{ - friend class GenericSalLayout; + ~SalLayoutGlyphsImpl(); + SalLayoutGlyphsImpl* clone(SalLayoutGlyphs& rGlyphs) const; + LogicalFontInstance& GetFont() const { return *m_rFontInstance; } + bool IsValid() const; + void Invalidate(); +private: mutable rtl::Reference<LogicalFontInstance> m_rFontInstance; - SalGenericLayoutGlyphsImpl(SalLayoutGlyphs& rGlyphs, LogicalFontInstance& rFontInstance) + SalLayoutGlyphsImpl(SalLayoutGlyphs& rGlyphs, LogicalFontInstance& rFontInstance) : m_rFontInstance(&rFontInstance) { - SetPImpl(&rGlyphs); + rGlyphs.m_pImpl = this; } - -public: - SalLayoutGlyphsImpl* clone(SalLayoutGlyphs& rGlyphs) const override; - LogicalFontInstance& GetFont() const { return *m_rFontInstance; } - bool IsValid() const override; - void Invalidate() override; }; #endif // INCLUDED_VCL_IMPGLYPHITEM_HXX diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index 373b8e93695f..e71359e48165 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -182,7 +182,7 @@ public: // used by display layers LogicalFontInstance& GetFont() const - { return static_cast<SalGenericLayoutGlyphsImpl*>(m_GlyphItems.Impl())->GetFont(); } + { return m_GlyphItems.Impl()->GetFont(); } bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, const PhysicalFontFace** pFallbackFont = nullptr, |