sw/source/uibase/table/chartins.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 6ed87188ac24816b735adcc6448190ac02811a11 Author: Dennis Francis <[email protected]> AuthorDate: Mon Feb 9 22:52:36 2026 +0530 Commit: Dennis Francis <[email protected]> CommitDate: Thu Feb 12 14:28:20 2026 +0100 lok: sw: empty parent causes irresponsive chart jsdialog Clicking any of the chart wizard buttons 'Next', 'Cancel', 'Finish' etc does not perform any action. With this patch the wizard buttons when clicked performs corresponding actions. To reproduce: 1. Create a .odt file 2. Create a 2x2 table and insert data (first col can be a, b; second col can be 1, 2) 3. Select the data, click insert Chart. 4. press Finish, The dialog is not closed. 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]> (cherry picked from commit 5e0b9f2ac68100eac288d08a30154f41f8925656) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199136 Tested-by: Jenkins diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 453e8ef03f44..473b48d24f19 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/weld/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 );
