diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-24 01:32:11 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-06 20:41:31 -0500 |
commit | 5609268b8104d207e89994a65ed8640bf52b1315 (patch) | |
tree | 0338e2243ecf795b32fdd5fbddb369c914d68eac | |
parent | c8faf047b50d0661e943f522b1a9777c1e81347d (diff) |
ServerFontLayout is already gone
Kill DrawServerFontLayout, and rename DrawSalLayout to DrawTextLayout,
in parity with GetTextLayout.
Change-Id: I3f61efd8c6ecde64f28301dca6a7c91eb0873702
Reviewed-on: https://gerrit.libreoffice.org/31224
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
(cherry picked from commit 59859a8aaa75384159e315ee2577d5cc7e2aa6e8)
-rw-r--r-- | vcl/headless/svptext.cxx | 9 | ||||
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/quartz/salgdi.h | 3 | ||||
-rw-r--r-- | vcl/inc/salgdi.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/textrender.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/cairotextrender.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/genpspgraphics.h | 3 | ||||
-rw-r--r-- | vcl/inc/unx/salgdi.h | 3 | ||||
-rw-r--r-- | vcl/inc/win/salgdi.h | 3 | ||||
-rw-r--r-- | vcl/quartz/salgdi.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/CommonSalLayout.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/font.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 8 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 2 |
15 files changed, 19 insertions, 39 deletions
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index 011a51c3f210..65c7d05cdbb6 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -117,14 +117,9 @@ SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe return m_aTextRenderImpl.GetTextLayout(rArgs, nFallbackLevel); } -void SvpSalGraphics::DrawServerFontLayout( const GenericSalLayout& rSalLayout, const FreetypeFont& rFreetypeFont ) +void SvpSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) { - m_aTextRenderImpl.DrawServerFontLayout( rSalLayout, rFreetypeFont ); -} - -void SvpSalGraphics::DrawSalLayout( const CommonSalLayout& rSalLayout ) -{ - DrawServerFontLayout( rSalLayout, rSalLayout.getFontData() ); + m_aTextRenderImpl.DrawTextLayout(rLayout); } void SvpSalGraphics::SetTextColor( SalColor nSalColor ) diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 23e93a09f71d..f092b0375822 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -174,8 +174,7 @@ public: virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) override; virtual bool GetGlyphOutline( sal_GlyphId nIndex, basegfx::B2DPolyPolygon& ) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; - virtual void DrawSalLayout( const CommonSalLayout& ) override; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) override; + virtual void DrawTextLayout( const CommonSalLayout& ) override; virtual bool supportsOperation( OutDevSupportType ) const override; virtual void drawPixel( long nX, long nY ) override; virtual void drawPixel( long nX, long nY, SalColor nSalColor ) override; diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 76cac7c0a370..06092e1e0ff6 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -400,8 +400,7 @@ public: virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; - virtual void DrawSalLayout( const CommonSalLayout& ) override; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) override {}; + virtual void DrawTextLayout( const CommonSalLayout& ) override; virtual bool supportsOperation( OutDevSupportType ) const override; #ifdef MACOSX diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 960dc388b15d..51fe2c641ceb 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -217,8 +217,7 @@ public: virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) = 0; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; - virtual void DrawSalLayout( const CommonSalLayout& ) = 0; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) = 0; + virtual void DrawTextLayout( const CommonSalLayout& ) = 0; virtual bool supportsOperation( OutDevSupportType ) const = 0; diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx index cfd2f9733a51..0c01526e3852 100644 --- a/vcl/inc/textrender.hxx +++ b/vcl/inc/textrender.hxx @@ -70,7 +70,7 @@ public: virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) = 0; virtual bool GetGlyphOutline( sal_GlyphId nIndex, basegfx::B2DPolyPolygon& ) = 0; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) = 0; + virtual void DrawTextLayout(const CommonSalLayout&) = 0; #if ENABLE_CAIRO_CANVAS virtual SystemFontData GetSysFontData( int nFallbackLevel ) const = 0; #endif // ENABLE_CAIRO_CANVAS diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx index 008cb158dce2..5c9859f00d97 100644 --- a/vcl/inc/unx/cairotextrender.hxx +++ b/vcl/inc/unx/cairotextrender.hxx @@ -86,7 +86,7 @@ public: virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) override; virtual bool GetGlyphOutline( sal_GlyphId nIndex, basegfx::B2DPolyPolygon& ) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) override; + virtual void DrawTextLayout(const CommonSalLayout&) override; #if ENABLE_CAIRO_CANVAS virtual SystemFontData GetSysFontData( int nFallbackLevel ) const override; #endif diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h index 9c87de406b67..0c4ea8fe9544 100644 --- a/vcl/inc/unx/genpspgraphics.h +++ b/vcl/inc/unx/genpspgraphics.h @@ -128,8 +128,7 @@ public: virtual bool GetGlyphBoundRect( sal_GlyphId, Rectangle& ) override; virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; - virtual void DrawSalLayout( const CommonSalLayout& ) override; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) override; + virtual void DrawTextLayout( const CommonSalLayout& ) override; virtual bool supportsOperation( OutDevSupportType ) const override; virtual void drawPixel( long nX, long nY ) override; virtual void drawPixel( long nX, long nY, SalColor nSalColor ) override; diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 7241a04138ae..f8a9e188af06 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -152,8 +152,7 @@ public: virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) override; virtual bool GetGlyphOutline( sal_GlyphId nIndex, basegfx::B2DPolyPolygon& ) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; - virtual void DrawSalLayout( const CommonSalLayout& ) override; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) override; + virtual void DrawTextLayout( const CommonSalLayout& ) override; virtual bool supportsOperation( OutDevSupportType ) const override; virtual void drawPixel( long nX, long nY ) override; diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 1cb0320bdaae..b771992db009 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -427,8 +427,7 @@ public: virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; - virtual void DrawSalLayout( const CommonSalLayout& ) override; - virtual void DrawServerFontLayout( const GenericSalLayout&, const FreetypeFont& ) override {}; + virtual void DrawTextLayout( const CommonSalLayout& ) override; virtual bool supportsOperation( OutDevSupportType ) const override; // Query the platform layer for control support diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 7daefd5e92fc..a58870f825af 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -422,7 +422,7 @@ bool AquaSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect return false; } -void AquaSalGraphics::DrawSalLayout(const CommonSalLayout& rLayout) +void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) { const CoreTextStyle& rStyle = rLayout.getFontData(); const FontSelectPattern& rFontSelect = rStyle.maFontSelData; diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 4d8d65f9501c..0cf7e01ce992 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -410,7 +410,7 @@ void CommonSalLayout::AdjustLayout(ImplLayoutArgs& rArgs) void CommonSalLayout::DrawText(SalGraphics& rSalGraphics) const { //call platform dependent DrawText functions - rSalGraphics.DrawSalLayout( *this ); + rSalGraphics.DrawTextLayout( *this ); } // Find if the nominal glyph of the character is an input to “vert” feature. diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 5109470e8866..9e75162b6caf 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -164,8 +164,10 @@ namespace } } -void CairoTextRender::DrawServerFontLayout( const GenericSalLayout& rLayout, const FreetypeFont& rFont ) +void CairoTextRender::DrawTextLayout(const CommonSalLayout& rLayout) { + const FreetypeFont& rFont = rLayout.getFontData(); + std::vector<cairo_glyph_t> cairo_glyphs; std::vector<int> glyph_extrarotation; cairo_glyphs.reserve( 256 ); diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index fa7a1204ba25..bed701da17ed 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -53,14 +53,9 @@ X11SalGraphics::GetFontGC() return pFontGC_; } -void X11SalGraphics::DrawServerFontLayout( const GenericSalLayout& rLayout, const FreetypeFont& rFreetypeFont ) +void X11SalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) { - mxTextRenderImpl->DrawServerFontLayout(rLayout, rFreetypeFont); -} - -void X11SalGraphics::DrawSalLayout( const CommonSalLayout& rLayout ) -{ - DrawServerFontLayout( rLayout, rLayout.getFontData() ); + mxTextRenderImpl->DrawTextLayout(rLayout); } const FontCharMapRef X11SalGraphics::GetFontCharMap() const diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 9d0fc990b30b..a266770c11cb 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -724,13 +724,7 @@ void PspFontLayout::DrawText( SalGraphics& ) const DrawPrinterLayout(*this, mrPrinterGfx); } -void GenPspGraphics::DrawServerFontLayout( const GenericSalLayout& rLayout, const FreetypeFont& /*unused*/ ) -{ - // print complex text - DrawPrinterLayout(rLayout, *m_pPrinterGfx); -} - -void GenPspGraphics::DrawSalLayout(const CommonSalLayout& rLayout) +void GenPspGraphics::DrawTextLayout(const CommonSalLayout& rLayout) { DrawPrinterLayout(rLayout, *m_pPrinterGfx); } diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index c76ddf074b6d..94e609e14fe1 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -3685,7 +3685,7 @@ void WinSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout, HDC hDC, boo assert(!result); } -void WinSalGraphics::DrawSalLayout(const CommonSalLayout& rLayout) +void WinSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) { HDC hDC = getHDC(); |