sw/source/uibase/table/chartins.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 5e0b9f2ac68100eac288d08a30154f41f8925656 Author: Dennis Francis <[email protected]> AuthorDate: Mon Feb 9 22:52:36 2026 +0530 Commit: Miklos Vajna <[email protected]> CommitDate: Wed Feb 11 09:21:41 2026 +0100 lok: sw: empty parent causes irresponsive chart jsdialog Signed-off-by: Dennis Francis <[email protected]> Change-Id: I5af8ba00a0b55b3d2ed10fa0f020ac21c4922afb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199065 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index f7290820da35..9fbc7e23d34c 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -21,6 +21,7 @@ #include <sfx2/dispatch.hxx> #include <IDocumentChartDataProviderAccess.hxx> #include <osl/diagnose.h> +#include <vcl/weldutils.hxx> #include <swmodule.hxx> #include <wrtsh.hxx> @@ -174,10 +175,16 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY ); if( xInit.is() ) { + css::uno::Reference< css::awt::XWindow > xParent; + vcl::Window* pWin = rWrtShell.GetWin(); + if (pWin) + { + xParent = new weld::TransportAsXWindow(pWin->GetFrameWeld()); + } // initialize dialog uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence( { - {"ParentWindow", uno::Any(uno::Reference< awt::XWindow >())}, + {"ParentWindow", uno::Any(xParent)}, {"ChartModel", uno::Any(xChartModel)} })); xInit->initialize( aSeq );
