diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-10 12:48:13 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-11 00:16:39 +0200 |
commit | a909afbc21e8cdd03a7f27db798f830c76aa91d2 (patch) | |
tree | 540641dd83ebf9f51556306022026600e567fb1c /vcl/unx/generic/print | |
parent | e37135d4139f7c614c46fff6f82d519a05f1d9f8 (diff) |
Fold CommonSalLayout into GenericSalLayout
Now the crazy constructors of CommonSalLayout are gone, we can merge
the two and drop one level of indirection.
Change-Id: I166e4ed2c9d22c1ce75246d486f7526c4928f652
Reviewed-on: https://gerrit.libreoffice.org/54077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/unx/generic/print')
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index c1f1caf014a0..5d0eeeaa405a 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -54,7 +54,7 @@ #include <PhysicalFontFace.hxx> #include <salbmp.hxx> #include <salprn.hxx> -#include <CommonSalLayout.hxx> +#include <sallayout.hxx> using namespace psp; @@ -529,12 +529,12 @@ ImplPspFontData::ImplPspFontData(const psp::FastPrintFontInfo& rInfo) mnFontId( rInfo.m_nID ) {} -class PspCommonSalLayout : public CommonSalLayout +class PspSalLayout : public GenericSalLayout { public: - PspCommonSalLayout(psp::PrinterGfx&, FreetypeFont& rFont); + PspSalLayout(psp::PrinterGfx&, FreetypeFont& rFont); - virtual void InitFont() const override; + void InitFont() const final override; private: ::psp::PrinterGfx& mrPrinterGfx; @@ -546,8 +546,8 @@ private: bool mbArtBold; }; -PspCommonSalLayout::PspCommonSalLayout(::psp::PrinterGfx& rGfx, FreetypeFont& rFont) -: CommonSalLayout(*rFont.GetFontInstance()) +PspSalLayout::PspSalLayout(::psp::PrinterGfx& rGfx, FreetypeFont& rFont) +: GenericSalLayout(*rFont.GetFontInstance()) , mrPrinterGfx(rGfx) { mnFontID = mrPrinterGfx.GetFontID(); @@ -558,14 +558,14 @@ PspCommonSalLayout::PspCommonSalLayout(::psp::PrinterGfx& rGfx, FreetypeFont& rF mbArtBold = mrPrinterGfx.GetArtificialBold(); } -void PspCommonSalLayout::InitFont() const +void PspSalLayout::InitFont() const { - CommonSalLayout::InitFont(); + GenericSalLayout::InitFont(); mrPrinterGfx.SetFont(mnFontID, mnFontHeight, mnFontWidth, mnOrientation, mbVertical, mbArtItalic, mbArtBold); } -void GenPspGraphics::DrawTextLayout(const CommonSalLayout& rLayout) +void GenPspGraphics::DrawTextLayout(const GenericSalLayout& rLayout) { const GlyphItem* pGlyph; Point aPos; @@ -763,7 +763,7 @@ bool GenPspGraphics::GetGlyphOutline(const GlyphItem& rGlyph, std::unique_ptr<SalLayout> GenPspGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel) { if (m_pFreetypeFont[nFallbackLevel]) - return std::unique_ptr<SalLayout>(new PspCommonSalLayout(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel])); + return std::unique_ptr<SalLayout>(new PspSalLayout(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel])); return nullptr; } |