diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-17 13:40:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-14 10:19:32 +0100 |
commit | 8f54136caa786523fd224f6c98fc8e7c45cd805d (patch) | |
tree | e77e4cba4e281a32e2bee5fd6a10d43ae6c7a360 /vcl/unx/generic | |
parent | b5344daa0cfc31cf187832261651e5490b19d922 (diff) |
use std::unique_ptr for SalLayout
to make the ownership passing around more obvious
Change-Id: I147ec6d9cfe7566cf3600685e0730ed741c2d90d
Reviewed-on: https://gerrit.libreoffice.org/43454
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/font.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 210f38385600..e4314ea41243 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -457,10 +457,10 @@ bool CairoTextRender::GetGlyphOutline(const GlyphItem& rGlyph, return pSF->GetGlyphOutline(rGlyph, rPolyPoly); } -SalLayout* CairoTextRender::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel) +std::unique_ptr<SalLayout> CairoTextRender::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel) { if (mpFreetypeFont[nFallbackLevel]) - return new CommonSalLayout(*mpFreetypeFont[nFallbackLevel]); + return std::unique_ptr<SalLayout>(new CommonSalLayout(*mpFreetypeFont[nFallbackLevel])); return nullptr; } diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index bae13f646037..23458223f9f1 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -117,7 +117,7 @@ bool X11SalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, return mxTextRenderImpl->GetGlyphOutline(rGlyph, rPolyPoly); } -SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) +std::unique_ptr<SalLayout> X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) { return mxTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel); } diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index c835b2d5922c..40004fac5bf0 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -777,10 +777,10 @@ bool GenPspGraphics::GetGlyphOutline(const GlyphItem& rGlyph, return pSF->GetGlyphOutline(rGlyph, rB2DPolyPoly); } -SalLayout* GenPspGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel) +std::unique_ptr<SalLayout> GenPspGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel) { if (m_pFreetypeFont[nFallbackLevel]) - return new PspCommonSalLayout(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel]); + return std::unique_ptr<SalLayout>(new PspCommonSalLayout(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel])); return nullptr; } |