From 309bffba603ae65e76148dff3add1a541a2b5d81 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 12 Nov 2021 10:56:54 +0100 Subject: make it explicit whether to ignore the result of getLOKPayload() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Returning an empty string to signify 'ignore' was a poor design, as some messages types actually may have valid empty messages. Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124979 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- desktop/source/lib/init.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6a1e0871fceb..2191a87f5b87 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2191,8 +2191,9 @@ void CallbackFlushHandler::enqueueUpdatedTypes() void CallbackFlushHandler::enqueueUpdatedType( int type, const SfxViewShell* viewShell, int viewId ) { - OString payload = viewShell->getLOKPayload( type, viewId ); - if(payload.isEmpty()) + bool ignore = false; + OString payload = viewShell->getLOKPayload( type, viewId, &ignore ); + if(ignore) return; // No actual payload to send. CallbackData callbackData(payload.getStr(), viewId); m_queue1.emplace_back(type); -- cgit