From 9233b1549bd7198a6f367b5950352d93b07b2997 Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Fri, 27 Apr 2018 16:45:05 +0200 Subject: lok: sc: tunneling the ascii import dialog on paste action Modified CreateScImportAsciiDlg signature so that we are able to pass a pointer to a dialog parent window to ScImportAsciiDlg. Now the execution of the ScImportAsciiDlg dialog in ScViewFunc::PasteDataFormat is asynchronous, both for lok and desktop case. In order to achieve this result it has been needed to modify the lifespan of some objects previously local to PasteDataFormat. Since PasteDataFormat returns a boolean, I took care to check how this return value is used. I found out 2 cases: 1) in ScViewFunc::PasteFromSystem where it is used for popping up an error dialog box, informing the user in the case that the paste operation is failed; 2) in ScGridWindow::ExecuteDrop where it is used for informing the sysyem window manager of the success or fail of the drag and drop action. The first case is now handled by a lamba invoked on dialog execution end. The second case is always handled as the paste operation was successfull (hoping it doesn't do any real difference). The asynchronous call and the behaviors described above occur only when the paste operation involves some kind of text. Change-Id: Id4f96180a9336f665a22a2441ea490af993431b0 Reviewed-on: https://gerrit.libreoffice.org/53576 Tested-by: Jenkins Reviewed-by: Marco Cecchetti --- sc/inc/scabstdlg.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sc/inc') diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 707e2cda6569..4019eae3792b 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -396,7 +396,8 @@ class ScAbstractDialogFactory public: SC_DLLPUBLIC static ScAbstractDialogFactory* Create(); - virtual VclPtr CreateScImportAsciiDlg( const OUString& aDatName, + virtual VclPtr CreateScImportAsciiDlg(vcl::Window* pParent, + const OUString& aDatName, SvStream* pInStream, ScImportAsciiCall eCall) = 0; -- cgit