diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2018-04-27 16:45:05 +0200 |
---|---|---|
committer | Marco Cecchetti <mrcekets@gmail.com> | 2018-05-28 18:36:42 +0200 |
commit | 9233b1549bd7198a6f367b5950352d93b07b2997 (patch) | |
tree | 8fcf3cc5b2126a6ae5dd0833ada5cd546b05a3b4 /sc/inc | |
parent | e99cb63b7d76ce02d0d9cdf13bf5e19e936ad035 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/scabstdlg.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
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<AbstractScImportAsciiDlg> CreateScImportAsciiDlg( const OUString& aDatName, + virtual VclPtr<AbstractScImportAsciiDlg> CreateScImportAsciiDlg(vcl::Window* pParent, + const OUString& aDatName, SvStream* pInStream, ScImportAsciiCall eCall) = 0; |