lok: sc: tunneling the ascii import dialog on paste action
I needed to modify CreateScImportAsciiDlg signature so that we are able to pass a pointer to a dialog parent window to ScImportAsciiDlg. Moreover, I needed to perform the execution of the ScImportAsciiDlg dialog in ScViewFunc::PasteDataFormat asynchronously, 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 system window manager of the success or fail of the drag and drop action. The first case is now handled by a lamba invoked soon after the dialog execution ended. The second case is more tricky: I handle it as the paste operation is always successful, hoping it doesn't do any real difference since the return value is used not by LO but by the system window manager (e.g. gtk). The asynchronous call and the behaviors described above occur only when the paste operation involves some kind of simple text, in all other cases nothing is changed. Change-Id: Id4f96180a9336f665a22a2441ea490af993431b0 Reviewed-on: https://gerrit.libreoffice.org/53931Reviewed-by:Jan Holesovsky <kendy@collabora.com> Tested-by:
Jan Holesovsky <kendy@collabora.com>
Showing
Please
register
or
sign in
to comment