fdo#74702 OutputDevice::ImplInitFontList() fails if no fonts on device
It makes no sense that ImplInitFontList() only fails for Window instances. I have carefully checked all the functions that use this function, and there are no good cases when no fonts won't cause problems. In fact, we have a number of functions that specifically rely on the fact that ImplInitFontList will populate OutputDevice::mpFontCollection with at least one font. Therefore, I'm making this abort if it can't populate the collection, regardless of whether it is a Window, Printer or VirtualDevice. I have also refactored GetDefaultDevice - I now check the default pOutDev parameter to see if it is NULL (the default), in which case it is referring to the default window, so I call on Application::GetDefaultDevice() instead of going straight to the pimpl data structure used by the Application class. Change-Id: I2861521d876d776d7862fc4a7ec56b7acf818789 Reviewed-on: https://gerrit.libreoffice.org/8741Reviewed-by:Chris Sherlock <chris.sherlock79@gmail.com> Tested-by:
Chris Sherlock <chris.sherlock79@gmail.com>
Showing
Please
register
or
sign in
to comment