From 269e36ece4ff720e10c83126d7c553c7287645c6 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 26 Nov 2020 11:41:18 +0300 Subject: Introduce BootstrapFixture::IsDefaultDPI convenience function It should be used to conditionally disable tests that are unreliable in non-default-DPI environments. The workaround implemented by use of the function should be temporary, until a proper fix is found. Change-Id: Ie236226fcfd0ffb054149efc2b7a1727506c4ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106661 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- test/source/bootstrapfixture.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index 4d6b54a8f879..d05ae03d39e9 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -237,4 +238,10 @@ IMPL_STATIC_LINK( return GraphicFilter::GetGraphicFilter().GetFilterCallback().Call( rData ); } +bool test::BootstrapFixture::IsDefaultDPI() +{ + return (Application::GetDefaultDevice()->GetDPIX() == 96 + && Application::GetDefaultDevice()->GetDPIY() == 96); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit