From 66e48719c0a58508d75c0204531513541ae6db09 Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Sun, 20 Nov 2022 11:35:03 +0100 Subject: 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 --- sw/source/ui/index/cnttab.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sw') 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; } -- cgit