diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 1b6bb7d1d9aa..76cbe8983af7 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -983,7 +983,8 @@ bool Dialog::ImplStartExecute() if (bModal) pSVData->maAppData.mnModalMode++; - css::uno::Reference xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_SET_THROW); + css::uno::Reference xEventBroadcaster( + css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_SET_THROW); css::document::DocumentEvent aObject; aObject.EventName = "DialogExecute"; xEventBroadcaster->documentEventOccured(aObject); @@ -992,6 +993,20 @@ bool Dialog::ImplStartExecute() else UITestLogger::getInstance().log("ModelessDialogExecuted Id:" + get_id()); + if (comphelper::LibreOfficeKit::isActive()) + { + if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) + { + // Dialog boxes don't get the Resize call and they + // can have invalid size at 'created' message above. + // If there is no difference, the client should detect it and ignore us, + // otherwise, this should make sure that the window has the correct size. + std::vector aItems; + aItems.emplace_back("size", GetSizePixel().toString()); + pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); + } + } + return true; }