From ada20402efa81273e03e46cbedc21f25b9daeeac Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Tue, 9 Oct 2018 16:44:39 +0200 Subject: OSX implement bitmap-only rendering mode Eventually OSX should also depend on SVP and SVP should just export the platform agnostic code, so we can get rid of all the IOS and ANDROID ifdefs. Since the SVP mode now also uses a default DPI value of 96, we can get rid of those "broken" adjustments to the tests in commit a4ab0c08e747 ("Row height tolerance level increase for unittest") and commit 1e55a47e89a9 ("tdf#62268: allow row height recalculation on document load"). The DPI handling on OSX seems really broken. Additionally DPI should probably a float value, as rounding results in various of-by-one errors in tests. Change-Id: I47881683a9c3d3e1b4f8e7aba1d03842da4d6652 Reviewed-on: https://gerrit.libreoffice.org/64736 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- vcl/quartz/salgdicommon.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'vcl/quartz') diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 2e22d6077a2e..535bfa3c32b0 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -1432,8 +1432,15 @@ void AquaSalGraphics::ImplDrawPixel( long nX, long nY, const RGBAColor& rColor ) #ifndef IOS -void AquaSalGraphics::initResolution( NSWindow* ) +void AquaSalGraphics::initResolution(NSWindow* nsWindow) { + if (!nsWindow) + { + if (Application::IsBitmapRendering()) + mnRealDPIX = mnRealDPIY = 96; + return; + } + // #i100617# read DPI only once; there is some kind of weird caching going on // if the main screen changes // FIXME: this is really unfortunate and needs to be investigated -- cgit