diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-24 01:32:11 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-26 10:58:38 +0000 |
commit | 59859a8aaa75384159e315ee2577d5cc7e2aa6e8 (patch) | |
tree | d40bdc98a7bc5574c662d93dd7d54d4d9231617c | |
parent | 8c173ce9ba4d90770cd85b148fe3122a097396a7 (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>
-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 97fd67809100..a5440e23518b 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -168,8 +168,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 61fe823e137f..2e3f97df7e9b 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 f61805e30916..71a8442f15ea 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 f4fe48629ef7..9d2e5302655d 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 3bad16eea681..8d56c8c43208 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 5e1978c892f3..6dedfe7b0882 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -424,8 +424,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 ea7093d5dab9..59a5d807d69e 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -384,7 +384,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 given glyph index can result from applying “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 d6e6c037a873..a02005ad8209 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 1cb227bc85d4..19ab9aed8eab 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -3606,7 +3606,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(); bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled() && !mbPrinter; |