diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-11-12 10:56:54 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-11-12 12:10:00 +0100 |
commit | c33f23598f9bc5ed80c95b18e373c91b68b2511e (patch) | |
tree | 3c7fea3b1bfb1022f7cd7397d8e34b6d38db97a4 /test | |
parent | 60665dc4a2af238939b1a5056ae4a4ce2c083159 (diff) |
make it explicit whether to ignore the result of getLOKPayload()
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/+/125089
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/lokcallback.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/source/lokcallback.cxx b/test/source/lokcallback.cxx index 0f6970d2af9c..440aae461eee 100644 --- a/test/source/lokcallback.cxx +++ b/test/source/lokcallback.cxx @@ -151,8 +151,9 @@ void TestLokCallbackWrapper::flushLOKData() for (int type : updatedTypes) { - OString payload = viewShell->getLOKPayload(type, m_viewId); - if (!payload.isEmpty()) + bool ignore = false; + OString payload = viewShell->getLOKPayload(type, m_viewId, &ignore); + if (!ignore) libreOfficeKitViewCallback(type, payload.getStr()); } for (const PerViewIdData& data : updatedTypesPerViewId) @@ -161,8 +162,9 @@ void TestLokCallbackWrapper::flushLOKData() return shell->GetViewShellId().get() == data.sourceViewId; }); assert(viewShell != nullptr); - OString payload = viewShell->getLOKPayload(data.type, data.viewId); - if (!payload.isEmpty()) + bool ignore = false; + OString payload = viewShell->getLOKPayload(data.type, data.viewId, &ignore); + if (!ignore) libreOfficeKitViewCallbackWithViewId(data.type, payload.getStr(), data.viewId); } } |