[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/inc desktop/qa
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun May 15 20:11:02 UTC 2016
desktop/inc/lib/init.hxx | 10 ++++++
desktop/qa/desktop_lib/test_desktop_lib.cxx | 43 +++++++++++++---------------
2 files changed, 30 insertions(+), 23 deletions(-)
New commits:
commit a67deda358bc760504e66b3375cd5982b9f4fa27
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Wed May 11 19:03:08 2016 -0400
Revert "LOK: simplify notification compression to minimize error"
Restoring back Some of the notification compression.
This reverts commit 4bdff9b94b545aa966c44b54c21c23dd724382c0.
Change-Id: I229911c63386b3668e8bd9541b48c80479cc2771
Reviewed-on: https://gerrit.libreoffice.org/25012
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 415143d..ae7a670 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -40,7 +40,17 @@ namespace desktop {
// Add the states that are safe to skip duplicates on,
// even when not consequent.
+ m_states.emplace(LOK_CALLBACK_TEXT_SELECTION_START, "NIL");
+ m_states.emplace(LOK_CALLBACK_TEXT_SELECTION_END, "NIL");
+ m_states.emplace(LOK_CALLBACK_TEXT_SELECTION, "NIL");
+ m_states.emplace(LOK_CALLBACK_GRAPHIC_SELECTION, "NIL");
+ m_states.emplace(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, "NIL");
m_states.emplace(LOK_CALLBACK_STATE_CHANGED, "NIL");
+ m_states.emplace(LOK_CALLBACK_MOUSE_POINTER, "NIL");
+ m_states.emplace(LOK_CALLBACK_CELL_CURSOR, "NIL");
+ m_states.emplace(LOK_CALLBACK_CELL_FORMULA, "NIL");
+ m_states.emplace(LOK_CALLBACK_CURSOR_VISIBLE, "NIL");
+ m_states.emplace(LOK_CALLBACK_SET_PART, "NIL");
Start();
}
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index fbd8896..13382ac 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -815,33 +815,33 @@ void DesktopLOKTest::testNotificationCompression()
handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // Superseeded.
handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15 25 15 10"); // Should be dropped.
handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""); // Superseeded.
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 1
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:Bold"); // 2
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 3
- handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // Superseeded.
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // 4
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // Should be dropped.
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 2
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:Bold"); // 3
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 4
handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // 5
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // 6
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15 25 15 10"); // Should be dropped.
+ handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // Should be dropped.
handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15 25 15 10"); // Superseeded.
handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15 25 15 10"); // Superseeded.
handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15 25 15 10"); // Superseedd.
handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15 25 15 10"); // Should be dropped.
handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15 25 15 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""); // 6
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15 25 15 10"); // 7
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15 25 15 10"); // 8
- handler->queue(LOK_CALLBACK_CELL_CURSOR, "15 25 15 10"); // 9
- handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""); // Superseeded.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""); // 7
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15 25 15 10"); // 8
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15 25 15 10"); // 9
+ handler->queue(LOK_CALLBACK_CELL_CURSOR, "15 25 15 10"); // 10
+ handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""); // 11
handler->queue(LOK_CALLBACK_CELL_CURSOR, "15 25 15 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // Superseeded.
- handler->queue(LOK_CALLBACK_SET_PART, "1"); // 11
- handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""); // 12
- handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // 13
- handler->queue(LOK_CALLBACK_SET_PART, "1"); // 14
+ handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // 12
+ handler->queue(LOK_CALLBACK_SET_PART, "1"); // 13
+ handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""); // Should be dropped.
+ handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // Should be dropped.
+ handler->queue(LOK_CALLBACK_SET_PART, "1"); // Should be dropped.
Scheduler::ProcessEventsToIdle();
- CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(14), notifs.size());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(13), notifs.size());
size_t i = 0;
CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, (int)std::get<0>(notifs[i]));
@@ -856,12 +856,12 @@ void DesktopLOKTest::testNotificationCompression()
CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_STATE_CHANGED, (int)std::get<0>(notifs[i]));
CPPUNIT_ASSERT_EQUAL(std::string(""), std::get<1>(notifs[i++]));
- CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_TILES, (int)std::get<0>(notifs[i]));
- CPPUNIT_ASSERT_EQUAL(std::string("15 25 15 10"), std::get<1>(notifs[i++]));
-
CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_MOUSE_POINTER, (int)std::get<0>(notifs[i]));
CPPUNIT_ASSERT_EQUAL(std::string("text"), std::get<1>(notifs[i++]));
+ CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_TILES, (int)std::get<0>(notifs[i]));
+ CPPUNIT_ASSERT_EQUAL(std::string("15 25 15 10"), std::get<1>(notifs[i++]));
+
CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_TEXT_SELECTION, (int)std::get<0>(notifs[i]));
CPPUNIT_ASSERT_EQUAL(std::string(""), std::get<1>(notifs[i++]));
@@ -874,9 +874,6 @@ void DesktopLOKTest::testNotificationCompression()
CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_CELL_CURSOR, (int)std::get<0>(notifs[i]));
CPPUNIT_ASSERT_EQUAL(std::string("15 25 15 10"), std::get<1>(notifs[i++]));
- CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_SET_PART, (int)std::get<0>(notifs[i]));
- CPPUNIT_ASSERT_EQUAL(std::string("1"), std::get<1>(notifs[i++]));
-
CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_CURSOR_VISIBLE, (int)std::get<0>(notifs[i]));
CPPUNIT_ASSERT_EQUAL(std::string(""), std::get<1>(notifs[i++]));
More information about the Libreoffice-commits
mailing list