desktop/source/lib/init.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit cf56ab4c9e29cb076c3f986a75ade58d997cb43c Author: Caolán McNamara <[email protected]> AuthorDate: Fri Sep 12 09:14:25 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Nov 29 01:11: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]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2ef7c12af7b9..4cb16c203176 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5781,7 +5781,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();
