desktop/source/lib/init.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 7afb9d9a43509ceef0befc4cc10db819cfd51c07 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Sep 12 09:14:25 2025 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Thu Nov 13 13:22:20 2025 +0100 use SfxLokHelper::getViewOfId to get most recent view of this document Change-Id: I4bdc51b1c175c6a46094305090f711d8b3ffb388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190861 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 160b8451d3f9..d6eae2ccd1ff 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5796,7 +5796,9 @@ static char* doc_getPresentationInfo(LibreOfficeKitDocument* pThis) } bool bAllyState = false; - SfxViewShell* pViewShell = SfxViewShell::Current(); + LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis); + const int nView = SfxLokHelper::getViewId(pDocument->mnDocumentId); + SfxViewShell* pViewShell = SfxLokHelper::getViewOfId(nView); if (pViewShell) { bAllyState = pViewShell->GetLOKAccessibilityState();
