Follow-up fix to Collabora Online "addfont" handling: avoid assertion failure

Change-Id: Ib75954a39d515088dbd432d0aa0ca5893194ecc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132970
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
Tor Lillqvist
2022-04-13 16:50:17 +03:00
parent 2bc4d1d22f
commit ab61263300

View File

@@ -4116,9 +4116,9 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c
else if (strcmp(pOption, "addfont") == 0)
{
OutputDevice *pDevice = Application::GetDefaultDevice();
OutputDevice::ImplClearAllFontData(true);
OutputDevice::ImplClearAllFontData(false);
pDevice->AddTempDevFont(OUString::fromUtf8(pValue), "");
OutputDevice::ImplRefreshAllFontData(true);
OutputDevice::ImplRefreshAllFontData(false);
}
}