[Libreoffice-commits] core.git: vcl/headless vcl/inc
Caolán
caolan at localhost.localdomain
Mon Nov 23 09:16:17 PST 2015
vcl/headless/svpcairotextrender.cxx | 2 +-
vcl/headless/svpcairotextrender.hxx | 34 ----------------------------------
vcl/headless/svpgdi.cxx | 8 ++++----
vcl/headless/svptext.cxx | 36 ++++++++++++++++++------------------
vcl/inc/headless/svpgdi.hxx | 4 ++--
5 files changed, 25 insertions(+), 59 deletions(-)
New commits:
commit 0c75202ad20d3dc1f0a2a68375253d547f054405
Author: Caolán <caolan at localhost.localdomain>
Date: Mon Nov 23 16:34:15 2015 +0000
only one headless text renderer now
Change-Id: I045d7a58f3eae20c733fe93faa3a64687e7c85e3
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx
index 681d65d..bf5b6cf 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 1a0a1ec..0000000
--- 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 1a625fc..7075bf5 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 cb6720c..148c49b 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
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 686301d..944ac83 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -28,7 +28,7 @@
#include "salgdi.hxx"
#include "sallayout.hxx"
-#include "textrender.hxx"
+#include "svpcairotextrender.hxx"
#ifdef IOS
#define SvpSalGraphics AquaSalGraphics
@@ -79,7 +79,7 @@ private:
protected:
vcl::Region m_aClipRegion;
- std::unique_ptr<TextRenderImpl> m_xTextRenderImpl;
+ SvpCairoTextRender m_aTextRenderImpl;
protected:
virtual bool blendBitmap( const SalTwoRect&, const SalBitmap& rBitmap ) override;
More information about the Libreoffice-commits
mailing list