From 40ddb619cfc88d161cb74a1f516dd39196658d50 Mon Sep 17 00:00:00 2001 From: Darshan-upadhyay1110 Date: Fri, 10 May 2024 20:04:01 +0530 Subject: Add new LOK CALLBACK for vertical ruler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - We're adding a new LOK callback LOK_CALLBACK_VERTICAL_RULER_UPDATE. - The reason is that we currently override the existing callback. - Using the same callback for both vertical and horizontal rulers causes an issue. - override will create problem like it will only send any one of the ruler orientation update. - It results in online updates being limited to just one ruler orientation. - By introducing a new callback, we ensure updates for both vertical and horizontal rulers both are captured correctly in online. Change-Id: I02d0e3e7e4ac8a07a83644460aa0ba36e0f3c013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167481 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl (cherry picked from commit 11b936629dd4ef9308d63b312900b8b7c8ff19b4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167464 Tested-by: Jenkins --- desktop/source/lib/init.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'desktop/source/lib') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c8af7f847ee5..2519f2d985c6 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1526,6 +1526,7 @@ CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, Li m_states.emplace(LOK_CALLBACK_TABLE_SELECTED, "NIL"_ostr); m_states.emplace(LOK_CALLBACK_TAB_STOP_LIST, "NIL"_ostr); m_states.emplace(LOK_CALLBACK_RULER_UPDATE, "NIL"_ostr); + m_states.emplace(LOK_CALLBACK_VERTICAL_RULER_UPDATE, "NIL"_ostr); m_states.emplace(LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE, "NIL"_ostr); } @@ -1834,6 +1835,7 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) case LOK_CALLBACK_SET_PART: case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE: case LOK_CALLBACK_RULER_UPDATE: + case LOK_CALLBACK_VERTICAL_RULER_UPDATE: case LOK_CALLBACK_A11Y_FOCUS_CHANGED: case LOK_CALLBACK_A11Y_CARET_CHANGED: case LOK_CALLBACK_A11Y_TEXT_SELECTION_CHANGED: -- cgit