diff options
author | Caolán <caolan@localhost.localdomain> | 2015-11-23 16:34:15 +0000 |
---|---|---|
committer | Caolán <caolan@localhost.localdomain> | 2015-11-23 17:15:51 +0000 |
commit | 0c75202ad20d3dc1f0a2a68375253d547f054405 (patch) | |
tree | 3bda372df0b6436be0563e99592286cc141bec4d /vcl/headless | |
parent | 0721765417f787c8f4b1382b5d9100fa3a2a61ad (diff) |
only one headless text renderer now
Change-Id: I045d7a58f3eae20c733fe93faa3a64687e7c85e3
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpcairotextrender.cxx | 2 | ||||
-rw-r--r-- | vcl/headless/svpcairotextrender.hxx | 34 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 8 | ||||
-rw-r--r-- | vcl/headless/svptext.cxx | 36 |
4 files changed, 23 insertions, 57 deletions
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx index 681d65dd2e5a..bf5b6cfd7462 100644 --- a/vcl/headless/svpcairotextrender.cxx +++ b/vcl/headless/svpcairotextrender.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "svpcairotextrender.hxx" +#include "headless/svpcairotextrender.hxx" #include "headless/svpgdi.hxx" SvpCairoTextRender::SvpCairoTextRender(SvpSalGraphics& rParent) diff --git a/vcl/headless/svpcairotextrender.hxx b/vcl/headless/svpcairotextrender.hxx deleted file mode 100644 index 1a0a1ec3b871..000000000000 --- a/vcl/headless/svpcairotextrender.hxx +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_VCL_UNX_GTK3_GDI_GTK3CAIROTEXTRENDER_HXX -#define INCLUDED_VCL_UNX_GTK3_GDI_GTK3CAIROTEXTRENDER_HXX - -#include "cairotextrender.hxx" - -class SvpSalGraphics; - -class SvpCairoTextRender : public CairoTextRender -{ -protected: - SvpSalGraphics& mrParent; - -public: - explicit SvpCairoTextRender(SvpSalGraphics& rParent); - - virtual GlyphCache& getPlatformGlyphCache() override; - virtual cairo_t* getCairoContext() override; - virtual void getSurfaceOffset(double& nDX, double& nDY) override; - virtual void clipRegion(cairo_t* cr) override; - virtual void drawSurface(cairo_t* cr) override; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 1a625fc30317..7075bf56aa58 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -20,7 +20,7 @@ #include "headless/svpgdi.hxx" #include "headless/svpbmp.hxx" #ifndef IOS -#include "svpcairotextrender.hxx" +#include "headless/svpcairotextrender.hxx" #endif #include "saldatabasic.hxx" @@ -221,9 +221,9 @@ SvpSalGraphics::SvpSalGraphics() : m_bUseFillColor( false ), m_aFillColor( COL_WHITE ), m_aDrawMode( basebmp::DrawMode::Paint ), - m_bClipSetup( false ) + m_bClipSetup( false ), + m_aTextRenderImpl(*this) { - m_xTextRenderImpl.reset(new SvpCairoTextRender(*this)); } SvpSalGraphics::~SvpSalGraphics() @@ -234,7 +234,7 @@ void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice ) { m_aOrigDevice = rDevice; ResetClipRegion(); - m_xTextRenderImpl->setDevice(rDevice); + m_aTextRenderImpl.setDevice(rDevice); } void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index cb6720ca0cd9..148c49b6d8f3 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -24,38 +24,38 @@ sal_uInt16 SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel ) { - return m_xTextRenderImpl->SetFont(pIFSD, nFallbackLevel); + return m_aTextRenderImpl.SetFont(pIFSD, nFallbackLevel); } void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel ) { - m_xTextRenderImpl->GetFontMetric(pMetric, nFallbackLevel); + m_aTextRenderImpl.GetFontMetric(pMetric, nFallbackLevel); } const FontCharMapPtr SvpSalGraphics::GetFontCharMap() const { - return m_xTextRenderImpl->GetFontCharMap(); + return m_aTextRenderImpl.GetFontCharMap(); } bool SvpSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const { - return m_xTextRenderImpl->GetFontCapabilities(rFontCapabilities); + return m_aTextRenderImpl.GetFontCapabilities(rFontCapabilities); } void SvpSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection ) { - m_xTextRenderImpl->GetDevFontList(pFontCollection); + m_aTextRenderImpl.GetDevFontList(pFontCollection); } void SvpSalGraphics::ClearDevFontCache() { - m_xTextRenderImpl->ClearDevFontCache(); + m_aTextRenderImpl.ClearDevFontCache(); } bool SvpSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection, const OUString& rFileURL, const OUString& rFontName) { - return m_xTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName); + return m_aTextRenderImpl.AddTempDevFont(pFontCollection, rFileURL, rFontName); } bool SvpSalGraphics::CreateFontSubset( @@ -67,12 +67,12 @@ bool SvpSalGraphics::CreateFontSubset( int nGlyphCount, FontSubsetInfo& rInfo) { - return m_xTextRenderImpl->CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo); + return m_aTextRenderImpl.CreateFontSubset(rToFile, pFont, pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo); } const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority) { - return m_xTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority); + return m_aTextRenderImpl.GetFontEncodingVector(pFont, pNonEncoded, ppPriority); } const void* SvpSalGraphics::GetEmbedFontData( @@ -83,12 +83,12 @@ const void* SvpSalGraphics::GetEmbedFontData( FontSubsetInfo& rInfo, long* pDataLen) { - return m_xTextRenderImpl->GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen); + return m_aTextRenderImpl.GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen); } void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen ) { - m_xTextRenderImpl->FreeEmbedFontData(pData, nLen); + m_aTextRenderImpl.FreeEmbedFontData(pData, nLen); } void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, @@ -96,39 +96,39 @@ void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, Int32Vector& rWidths, Ucs2UIntMap& rUnicodeEnc ) { - m_xTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc); + m_aTextRenderImpl.GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc); } bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) { - return m_xTextRenderImpl->GetGlyphBoundRect(aGlyphId, rRect); + return m_aTextRenderImpl.GetGlyphBoundRect(aGlyphId, rRect); } bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon& rPolyPoly ) { - return m_xTextRenderImpl->GetGlyphOutline(aGlyphId, rPolyPoly); + return m_aTextRenderImpl.GetGlyphOutline(aGlyphId, rPolyPoly); } SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) { - return m_xTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel); + return m_aTextRenderImpl.GetTextLayout(rArgs, nFallbackLevel); } void SvpSalGraphics::DrawServerFontLayout( const ServerFontLayout& rSalLayout ) { - m_xTextRenderImpl->DrawServerFontLayout(rSalLayout ); + m_aTextRenderImpl.DrawServerFontLayout(rSalLayout ); } void SvpSalGraphics::SetTextColor( SalColor nSalColor ) { - m_xTextRenderImpl->SetTextColor(nSalColor); + m_aTextRenderImpl.SetTextColor(nSalColor); } #if ENABLE_CAIRO_CANVAS SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const { - return m_xTextRenderImpl->GetSysFontData(nFallbacklevel); + return m_aTextRenderImpl.GetSysFontData(nFallbacklevel); } #endif // ENABLE_CAIRO_CANVAS |