diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-11-20 11:35:03 +0100 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-11-22 09:01:07 +0100 |
commit | 66e48719c0a58508d75c0204531513541ae6db09 (patch) | |
tree | 16e3ba369970afe4f40bb351d4f3c2c3d0cc60b0 /sw | |
parent | b8758f3919f99c454cf957b93e6f5394b61d0478 (diff) |
tdf#120405 - Use previously selected file, if selection is aborted
If a user aborts the selection of a concordance file, use the previously selected one, if it exists.
Change-Id: I55547ca98034269e897d6bc86ccc4dcfd63be9fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142997
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 4db6f48abcbf..d2671d2dd664 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -102,10 +102,16 @@ static OUString lcl_CreateAutoMarkFileDlg(weld::Window* pParent, const OUString& xFP->setDisplayDirectory( aPathOpt.GetUserConfigPath() ); } - if( aDlgHelper.Execute() == ERRCODE_NONE ) + const ErrCode aErrCode = aDlgHelper.Execute(); + if (aErrCode == ERRCODE_NONE) { sRet = xFP->getSelectedFiles().getConstArray()[0]; } + // tdf#120405 - use previously selected file, if selection is aborted + else if (aErrCode == ERRCODE_ABORT && !rURL.isEmpty()) + { + sRet = rURL; + } return sRet; } |