| commit | 574316ea568a09074cda20dd7953f578b081a754 | [log] |
|---|---|---|
| author | Julien Nabet <serval2412@yahoo.fr> | Sat Sep 09 22:59:06 2023 +0200 |
| committer | Lionel Mamane <lionel@mamane.lu> | Sun Sep 10 13:18:24 2023 +0200 |
| tree | bf699b043ace1f3183b9344ba74dadecad2194b9 | |
| parent | 7ccaecd33a30905e3929d43c8164b16bbb101b73 [diff] |
tdf#149195: Impossible to change link of a DB and keep the same registered name Just test nEntry to know if it's a new entry (and so the name must be different from an existing one) Change-Id: I3bda6b1d3d9bae3d79fdfc2cb1323f20add410c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156785 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins (cherry picked from commit a410b8f1111c738604ad2f67c111f98d91761051) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156735 Reviewed-by: Lionel Mamane <lionel@mamane.lu>
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 143112c..92cbbd0 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx
@@ -280,7 +280,10 @@ void DbRegistrationOptionsPage::openLinkDialog(const OUString& sOldName, const O ODocumentLinkDialog aDlg(GetFrameWeld(), nEntry == -1); aDlg.setLink(sOldName, sOldLocation); aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); // tdf#149195: control the name (ie check duplicate) only if new entry case if (nEntry == -1) aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); if (aDlg.run() != RET_OK) return;