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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194797
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2025-11-29 01:11:20 +01:00
parent 95d41ebfb6
commit cf56ab4c9e
+3 -1
View File
@@ -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();