summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-30 16:10:58 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-25 14:02:32 +0200
commitdd16804e52984ded1ee739a22822daa068a13707 (patch)
tree9e005e8bdc9d438cbcf7190f9440e60fc0769de0 /vcl/quartz
parent655e3bd9a880a8bf3a1f9d3514e64d0da3d36b8a (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/quartz')
-rw-r--r--vcl/quartz/salgdi.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index b9cdd2c5195a..eaf1d2b9c273 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -529,10 +529,9 @@ void AquaSalGraphics::SetFont(LogicalFontInstance* pReqFont, int nFallbackLevel)
std::unique_ptr<SalLayout> AquaSalGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel)
{
- if (mpTextStyle[nFallbackLevel])
- return std::unique_ptr<SalLayout>(new GenericSalLayout(*mpTextStyle[nFallbackLevel]));
-
- return nullptr;
+ if (!mpTextStyle[nFallbackLevel])
+ return nullptr;
+ return o3tl::make_unique<GenericSalLayout>(*mpTextStyle[nFallbackLevel]);
}
const FontCharMapRef AquaSalGraphics::GetFontCharMap() const