[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/quartz vcl/source vcl/unx vcl/win

Khaled Hosny khaledhosny at eglug.org
Sat Nov 26 10:59:02 UTC 2016


 vcl/headless/svptext.cxx                 |    9 ++-------
 vcl/inc/headless/svpgdi.hxx              |    3 +--
 vcl/inc/quartz/salgdi.h                  |    3 +--
 vcl/inc/salgdi.hxx                       |    3 +--
 vcl/inc/textrender.hxx                   |    2 +-
 vcl/inc/unx/cairotextrender.hxx          |    2 +-
 vcl/inc/unx/genpspgraphics.h             |    3 +--
 vcl/inc/unx/salgdi.h                     |    3 +--
 vcl/inc/win/salgdi.h                     |    3 +--
 vcl/quartz/salgdi.cxx                    |    2 +-
 vcl/source/gdi/CommonSalLayout.cxx       |    2 +-
 vcl/unx/generic/gdi/cairotextrender.cxx  |    4 +++-
 vcl/unx/generic/gdi/font.cxx             |    9 ++-------
 vcl/unx/generic/print/genpspgraphics.cxx |    8 +-------
 vcl/win/gdi/winlayout.cxx                |    2 +-
 15 files changed, 19 insertions(+), 39 deletions(-)

New commits:
commit 59859a8aaa75384159e315ee2577d5cc7e2aa6e8
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Nov 24 01:32:11 2016 +0200

    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 at eglug.org>
    Tested-by: Khaled Hosny <khaledhosny at eglug.org>

diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 011a51c..65c7d05 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 97fd678..a5440e2 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 61fe823..2e3f97d 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 f61805e..71a8442 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 cfd2f97..0c01526 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 008cb15..5c9859f 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 f4fe486..9d2e530 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 3bad16e..8d56c8c 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 5e1978c..6dedfe7 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 7daefd5..a58870f 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 ea7093d..59a5d80 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 5109470..9e75162 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 fa7a120..bed701d 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 d6e6c03..a02005a 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 1cb227b..19ab9ae 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;


More information about the Libreoffice-commits mailing list