[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/qa desktop/source

Ashod Nakashian ashod.nakashian at collabora.co.uk
Tue Nov 29 02:50:17 UTC 2016


 desktop/qa/desktop_lib/test_desktop_lib.cxx |    7 +------
 desktop/source/lib/init.cxx                 |   18 ------------------
 2 files changed, 1 insertion(+), 24 deletions(-)

New commits:
commit c1769bc3a3803193211e75ff9a23fd0617d05bfb
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon Nov 28 21:46:44 2016 -0500

    Revert "Lok: compress duplicate state-changed events"
    
    This reverts commit b63915253e460e0168bbe68e457c273228c7134e.
    
    Change-Id: I866f757d5200f176f7eb98d703e92e558e79983e
    Reviewed-on: https://gerrit.libreoffice.org/31340
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 6bf0452..d38a6a0 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -1088,15 +1088,13 @@ void DesktopLOKTest::testNotificationCompression()
     handler->queue(LOK_CALLBACK_CELL_CURSOR, "15 25 15 10"); // Should be dropped.
     handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // 12
     handler->queue(LOK_CALLBACK_SET_PART, "1"); // 13
-    handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:AssignLayout=20"); // Superseeded
     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.
-    handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:AssignLayout=1"); // 14
 
     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]));
@@ -1137,9 +1135,6 @@ void DesktopLOKTest::testNotificationCompression()
 
     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_STATE_CHANGED, (int)std::get<0>(notifs[i]));
-    CPPUNIT_ASSERT_EQUAL(std::string(".uno:AssignLayout=1"), std::get<1>(notifs[i++]));
 }
 
 void DesktopLOKTest::testPartInInvalidation()
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ea266b1..c36ddd6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -820,24 +820,6 @@ void CallbackFlushHandler::queue(const int type, const char* data)
                 }
             }
             break;
-
-            // State changes with same name override previous ones with a different value.
-            // Ex. ".uno:PageStatus=Slide 20 of 83" overwrites any previous PageStatus.
-            case LOK_CALLBACK_STATE_CHANGED:
-            {
-                // Compare the state name=value and overwrite earlier entries with same name.
-                const auto pos = payload.find('=');
-                if (pos != std::string::npos)
-                {
-                    const std::string name = payload.substr(0, pos + 1);
-                    removeAll(
-                        [type, &payload, &name] (const queue_type::value_type& elem) {
-                            return (elem.first == type) && (elem.second.compare(0, name.size(), name) == 0);
-                        }
-                    );
-                }
-            }
-            break;
         }
     }
 


More information about the Libreoffice-commits mailing list