summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-01-23 19:59:45 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2019-01-25 19:03:55 +0100
commit8d7435aa72af7fd0b454d7314c6c79f61f112679 (patch)
tree2146ba9fc325c4c5f7a2e40c23c59afe7e57a28d /vcl/quartz
parentd33998a2851eef17ccd0a85f24df587302df7c9c (diff)
Assert missing SalGraphics font on GetTextLayout
Trying to layout text without a font can't work. Without a font, currently the text is simply not painted, but this is still a programming error, so warn the developer. And we can get rid of all the intermediate OutputDevice font and gpahics checks, as everything now uses Harfbuzz and there won't be any layout which can't use the cached runs, so just generate them directly. Change-Id: Iae1fab0afeefec1cb1ca82c4e5d8dcbe9919859d Reviewed-on: https://gerrit.libreoffice.org/66818 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/salgdi.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index b17c17e3c676..8a7a69890cd5 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -508,6 +508,7 @@ void AquaSalGraphics::SetFont(LogicalFontInstance* pReqFont, int nFallbackLevel)
std::unique_ptr<GenericSalLayout> AquaSalGraphics::GetTextLayout(int nFallbackLevel)
{
+ assert(mpTextStyle[nFallbackLevel]);
if (!mpTextStyle[nFallbackLevel])
return nullptr;
return o3tl::make_unique<GenericSalLayout>(*mpTextStyle[nFallbackLevel]);