Kaydet (Commit) 64f1d7ad authored tarafından Michael Stahl's avatar Michael Stahl

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/47444Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 7e51276d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment