summaryrefslogtreecommitdiff
path: root/fpicker/source/office/OfficeFilePicker.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-31 11:57:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-10-31 22:08:07 +0100
commit9d1c68ae17ef566b9034478c7b29411c62684289 (patch)
tree265f9e7decdbe9dc77ff7a108d878b68ed9887a6 /fpicker/source/office/OfficeFilePicker.cxx
parent97be9270868990d3d45b29724c8fdc3598d2a64c (diff)
replace StartExecuteModal with StartExecuteAsync
Change-Id: I2c0e0266f6bb468ebb5285f95d1824cf12100812 Reviewed-on: https://gerrit.libreoffice.org/62690 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker/source/office/OfficeFilePicker.cxx')
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 8966e7f9f426..6f22961fdf8d 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -212,22 +212,18 @@ void SvtFilePicker::prepareExecute()
}
-
-IMPL_LINK( SvtFilePicker, DialogClosedHdl, Dialog&, rDlg, void )
+void SvtFilePicker::DialogClosedHdl(sal_Int32 nResult)
{
if ( m_xDlgClosedListener.is() )
{
- sal_Int16 nRet = static_cast< sal_Int16 >( rDlg.GetResult() );
+ sal_Int16 nRet = static_cast< sal_Int16 >(nResult);
css::ui::dialogs::DialogClosedEvent aEvent( *this, nRet );
m_xDlgClosedListener->dialogClosed( aEvent );
m_xDlgClosedListener.clear();
}
}
-
// SvtFilePicker
-
-
PickerFlags SvtFilePicker::getPickerFlags()
{
// set the winbits for creating the filedialog
@@ -505,8 +501,11 @@ void SAL_CALL SvtFilePicker::startExecuteModal( const Reference< css::ui::dialog
m_xDlgClosedListener = xListener;
prepareDialog();
prepareExecute();
- getDialog()->EnableAutocompletion();
- getDialog()->StartExecuteModal( LINK( this, SvtFilePicker, DialogClosedHdl ) );
+ SvtFileDialog_Base* pDialog = getDialog();
+ pDialog->EnableAutocompletion();
+ pDialog->StartExecuteAsync([=](sal_Int32 nResult){
+ DialogClosedHdl(nResult);
+ });
}