sfx2/source/doc/objstor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 48bbdf24ebe3cf78199bf213ab5585a293dc40ae Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Mon Jan 15 22:50:45 2024 +0100 Commit: Andreas Heinisch <andreas.heini...@yahoo.de> CommitDate: Tue Jan 16 10:57:33 2024 +0100 tdf#53614 - Don't try to lock file after cancelling the import process After cancelling the import process don't try to lock the file. Otherwise, the document in use dialog will be shown which has literally no effect. Change-Id: I0a9c786899a7fc648678c785e316d28fc43c7fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162150 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index a7253f7a0b83..854389ae31be 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -654,7 +654,9 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) EnableSetModified( false ); - pMedium->LockOrigFileOnDemand( true, false ); + // tdf#53614 - don't try to lock file after cancelling the import process + if (GetErrorIgnoreWarning() != ERRCODE_ABORT) + pMedium->LockOrigFileOnDemand( true, false ); if ( GetErrorIgnoreWarning() == ERRCODE_NONE && bOwnStorageFormat && ( !pFilter || !( pFilter->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) ) ) { uno::Reference< embed::XStorage > xStorage;