diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-04 23:27:08 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-05 15:15:49 +0100 |
commit | 64f1d7ad58f7281c757411b7e890e220485a09bf (patch) | |
tree | b8b4f5b5734fc9f6d049185c98790aa0b1289b29 /toolkit | |
parent | 7e51276d4040ac480343bc94f6e37c7b437fae83 (diff) |
toolkit: disable UnitConversion test for non-default resolution on WNT
Apparently this fails currently for unknown reasons, see report
by Luke Benes at
https://lists.freedesktop.org/archives/libreoffice/2017-December/079196.html
Change-Id: Ib4c79fbc6a4353ab51612836f51196bc37a90ae1
Reviewed-on: https://gerrit.libreoffice.org/47444
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/qa/cppunit/UnitConversion.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/toolkit/qa/cppunit/UnitConversion.cxx b/toolkit/qa/cppunit/UnitConversion.cxx index 3178e38ff159..62fe284e8d5a 100644 --- a/toolkit/qa/cppunit/UnitConversion.cxx +++ b/toolkit/qa/cppunit/UnitConversion.cxx @@ -28,6 +28,10 @@ #include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/awt/XWindow.hpp> +#ifdef _WIN32 +#include <windows.h> +#endif + using namespace ::com::sun::star; namespace @@ -96,6 +100,24 @@ void checkSize(uno::Reference<awt::XUnitConversion> const& xConv, awt::Size cons */ void ToolkitTest::testXUnitConversion() { +#ifdef _WIN32 + HKEY hkey; + DWORD type; + DWORD data; + DWORD size(sizeof(data)); + LONG ret = ::RegOpenKeyW(HKEY_CURRENT_USER, L"Control Panel\\Desktop", &hkey); + if (ret == ERROR_SUCCESS) + { + ret = ::RegQueryValueExW(hkey, L"LogPixels", nullptr, &type, + reinterpret_cast<LPBYTE>(&data), &size); + if (ret == ERROR_SUCCESS && type == REG_DWORD && data != 96) + { + std::cerr << "non-default resolution, skipping textXUnitConversion\n"; + return; + } + } +#endif + // create a window sal_Int32 x = 100; sal_Int32 y = 100; |