summaryrefslogtreecommitdiff
path: root/test/source/lokcallback.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-08-17 08:40:31 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-08-17 09:28:59 +0200
commit0b85a66cc3d8e54747506089f92e154dc7665bfe (patch)
tree8a4a755a6803649e12e018089fc810946a5257f6 /test/source/lokcallback.cxx
parent78fb8fe0c5a58bc4d5074de66e77c20c3a441fd3 (diff)
Return std::optional instead of using bool* argument
Change-Id: I47f03411a6677f22291bea4dc06920ab9052349a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138399 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'test/source/lokcallback.cxx')
-rw-r--r--test/source/lokcallback.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/source/lokcallback.cxx b/test/source/lokcallback.cxx
index 323ba4af1f10..c938e1e699a8 100644
--- a/test/source/lokcallback.cxx
+++ b/test/source/lokcallback.cxx
@@ -151,10 +151,9 @@ void TestLokCallbackWrapper::flushLOKData()
for (int type : updatedTypes)
{
- bool ignore = false;
- OString payload = viewShell->getLOKPayload(type, m_viewId, &ignore);
- if (!ignore)
- libreOfficeKitViewCallback(type, payload.getStr());
+ std::optional<OString> payload = viewShell->getLOKPayload(type, m_viewId);
+ if (payload)
+ libreOfficeKitViewCallback(type, payload->getStr());
}
for (const PerViewIdData& data : updatedTypesPerViewId)
{
@@ -162,10 +161,9 @@ void TestLokCallbackWrapper::flushLOKData()
return shell->GetViewShellId().get() == data.sourceViewId;
});
assert(viewShell != nullptr);
- bool ignore = false;
- OString payload = viewShell->getLOKPayload(data.type, data.viewId, &ignore);
- if (!ignore)
- libreOfficeKitViewCallbackWithViewId(data.type, payload.getStr(), data.viewId);
+ std::optional<OString> payload = viewShell->getLOKPayload(data.type, data.viewId);
+ if (payload)
+ libreOfficeKitViewCallbackWithViewId(data.type, payload->getStr(), data.viewId);
}
}