summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-11-26 11:41:18 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-11-26 10:59:15 +0100
commit269e36ece4ff720e10c83126d7c553c7287645c6 (patch)
tree97960981163dad0592ee9c380fdcc0d8f84dded9 /test
parent82d8d76b8a6bb0d7b6585411666f5421a99b6d34 (diff)
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'test')
-rw-r--r--test/source/bootstrapfixture.cxx7
1 files changed, 7 insertions, 0 deletions
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 <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
+#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
#include <tools/link.hxx>
#include <vcl/graphicfilter.hxx>
@@ -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: */