sd/source/ui/view/drviews1.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit bebc0372cb5cfd608047402cb86c5a20285b416e Author: Jaume Pujantell <[email protected]> AuthorDate: Tue Jul 15 17:02:32 2025 +0200 Commit: Jaume Pujantell <[email protected]> CommitDate: Fri Oct 31 13:31:07 2025 +0100 lokit pdfium: send empty link data This is a follow-up to b307d3f997eee3014697734f04ad99b4f3ef50ae. Send and empty status if there are no links so online knows to erase the link data. Change-Id: I7695ed87f7e0c19338b0f42ad3c860035ffd0d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187926 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 3217f0d4b368a96b30909e2aa7d4afc9a985a88b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193255 Tested-by: Jenkins Reviewed-by: Jaume Pujantell <[email protected]> diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 784717d04792..e6eef33c79c3 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -803,19 +803,22 @@ namespace { void notifyLinkAnnotations(SfxViewShell* pViewShell, SdPage* pPage) { - if (!pViewShell || !pPage || !pPage->hasLinkAnnotations()) + if (!pViewShell || !pPage) return; ::tools::JsonWriter jsonWriter; jsonWriter.put("commandName", "PageLinks"); { - auto jsonLinks = jsonWriter.startArray("links"); - for (const auto& link : pPage->getLinkAnnotations()) + auto jsonState = jsonWriter.startNode("state"); { - auto jsonLink = jsonWriter.startStruct(); - std::stringstream ss; - ss << link.first; - jsonWriter.put("rectangle", ss.str()); - jsonWriter.put("uri", link.second); + auto jsonLinks = jsonWriter.startArray("links"); + for (const auto& link : pPage->getLinkAnnotations()) + { + auto jsonLink = jsonWriter.startStruct(); + std::stringstream ss; + ss << link.first; + jsonWriter.put("rectangle", ss.str()); + jsonWriter.put("uri", link.second); + } } } OString aPayload = jsonWriter.finishAndGetAsOString();
