Files
ElyOffice/patches/libreoffice/0002-lok-dispatch-to-document-frame.patch
T
ZacharyZhang-NY b7fca0146d Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git),
ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
2026-10-08 21:20:08 -04:00

22 lines
1.1 KiB
Diff

--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5627,14 +5627,16 @@
}
}
bool bResult = false;
+ // Dispatch to this document's frame, not the desktop's active one.
+ uno::Reference<frame::XFrame> xFrame = pViewShell->GetViewFrame().GetFrame().GetFrameInterface();
if (bNotifyWhenFinished && pDocument->mpCallbackFlushHandlers.count(nView))
{
- bResult = comphelper::dispatchCommand(aCommand, comphelper::containerToSequence(aPropertyValuesVector),
+ bResult = comphelper::dispatchCommand(aCommand, xFrame, comphelper::containerToSequence(aPropertyValuesVector),
new DispatchResultListener(pCommand, pDocument->mpCallbackFlushHandlers[nView],
pDocSh && pDocSh->IsModified()));
}
else
- bResult = comphelper::dispatchCommand(aCommand, comphelper::containerToSequence(aPropertyValuesVector));
+ bResult = comphelper::dispatchCommand(aCommand, xFrame, comphelper::containerToSequence(aPropertyValuesVector));
if (!bResult)
{