diff --git a/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk b/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk index 5b1727efbe98..ead598f965e5 100644 --- a/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk +++ b/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk @@ -33,6 +33,10 @@ $(eval $(call gb_CppunitTest_add_libs,libreofficekit_tiledrendering,\ )) endif +$(eval $(call gb_CppunitTest_use_api,libreofficekit_tiledrendering,\ + offapi \ +)) + $(eval $(call gb_CppunitTest_use_configuration,libreofficekit_tiledrendering)) # vim: set noet sw=4 ts=4: diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index a4e84ee8d122..a805121992e5 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -19,6 +19,8 @@ #include #include +#include + #if defined __clang__ && defined __linux__ #include #include @@ -263,16 +265,16 @@ void TiledRenderingTest::testDocumentLoadLanguage(Office* pOffice) // assert that '.' is the decimal separator insertString(*pDocument, "1.5"); - pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 1027); // right arrow - pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 1027); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::RIGHT); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::RIGHT); processEventsToIdle(); insertString(*pDocument, "=2*A1"); - pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 1280); // enter - pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 1280); - pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 1025); // up arrow - pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 1025); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::RETURN); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::RETURN); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::UP); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::UP); processEventsToIdle(); // we've got a meaningful result @@ -290,16 +292,16 @@ void TiledRenderingTest::testDocumentLoadLanguage(Office* pOffice) // with cs-CZ, the decimal separator is ',' instead, assert that insertString(*pDocument, "1,5"); - pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 1027); // right arrow - pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 1027); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::RIGHT); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::RIGHT); processEventsToIdle(); insertString(*pDocument, "=2*A1"); - pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 1280); // enter - pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 1280); - pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, 1025); // up arrow - pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, 1025); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::RETURN); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::RETURN); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, css::awt::Key::UP); + pDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, css::awt::Key::UP); processEventsToIdle(); // we've got a meaningful result