From 64f1d7ad58f7281c757411b7e890e220485a09bf Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 4 Jan 2018 23:27:08 +0100 Subject: 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 Reviewed-by: Michael Stahl --- toolkit/qa/cppunit/UnitConversion.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'toolkit') 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 #include +#ifdef _WIN32 +#include +#endif + using namespace ::com::sun::star; namespace @@ -96,6 +100,24 @@ void checkSize(uno::Reference 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(&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; -- cgit /libreoffice-6-3'>distro/cib/libreoffice-6-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author