diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-09-30 16:10:58 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-25 14:02:32 +0200 |
commit | dd16804e52984ded1ee739a22822daa068a13707 (patch) | |
tree | 9e005e8bdc9d438cbcf7190f9440e60fc0769de0 /vcl/unx/generic/gdi | |
parent | 655e3bd9a880a8bf3a1f9d3514e64d0da3d36b8a (diff) |
Drop duplicate PhysicalFontFace reference
A LogicalFontInstance has a pointer to its parent font face.
And don't pretend we can actually nest MultiSalLayout, so
store the GenericSalLayout internally.
Change-Id: I801acbc34497fc57e8e185eee34c1a1162dbea93
Reviewed-on: https://gerrit.libreoffice.org/62314
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx/generic/gdi')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index b7356eda56a5..adcb0deec8ac 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -40,6 +40,7 @@ #include <cairo.h> #include <cairo-ft.h> #include <sallayout.hxx> +#include <o3tl/make_unique.hxx> namespace { @@ -487,10 +488,9 @@ bool CairoTextRender::GetGlyphOutline(const GlyphItem& rGlyph, std::unique_ptr<SalLayout> CairoTextRender::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel) { - if (mpFreetypeFont[nFallbackLevel]) - return std::unique_ptr<SalLayout>(new GenericSalLayout(*mpFreetypeFont[nFallbackLevel]->GetFontInstance())); - - return nullptr; + if (!mpFreetypeFont[nFallbackLevel]) + return nullptr; + return o3tl::make_unique<GenericSalLayout>(*mpFreetypeFont[nFallbackLevel]->GetFontInstance()); } #if ENABLE_CAIRO_CANVAS |