Following tdf#96012, on pc Debian x86-64 with master sources updated today but also wit 5.0.3 Debian package, primary key checkbox in Type formatting is never checked. Steps to reproduce: 1) Retrieve tsv file from https://bugs.documentfoundation.org/attachment.cgi?id=120744 2) Open tsv file (Calc launches), check "Comma", so you've got several columns 3) Copy all content of Calc sheet 4) Open new or existing hsqldb Base file 5) Go to Tables panel 6) Edit Menu paste>Copy Table Window (options are definition and data and use first lines as columns> Next> Apply All columns> next> Type Formatting 7) Right click on a field in left panel => a popup box appears with a checkbox unchecked + "Primary key" 8) Check the box => a key appears to show the field is a primary key now 9) Right click again on the same field => a popup box appears with a checkbox still unchecked Expected behavior: since the field is now a primary key, checkbox should be checked
Lionel: would you have some time to take a look to https://gerrit.libreoffice.org/#/c/20386/ ? With this patch, the only glitch I've seen was this situation: a) Consider 2 fields: A and B b) If A is the primary key but you select both fields, A and B => the primary checkbox in popup isn't checked. OK (should be checked only if the whole primary key is selected I suppose) c) but then you check the primary checkbox => B is the primary key and A is no more a primary key Is it wrong? Should A and B be a multiple fields primary key?
IMO it should behave as it does in Table Design. I just tried it out and: 1) It is checked only if the selected columns are *exactly* all of the primary key, no more, no less. 2) When anything else than exactly the primary key is selected, clicking on "primary key" *sets* the primary key. No per-field toggle!
Created attachment 121004 [details] table design step 1
Created attachment 121005 [details] table design step 2
Created attachment 121006 [details] paste dialog step 1
Created attachment 121007 [details] paste dialog step 2
Between step 1 and step 2, I right-clicked and chose "primary key". Note the difference in result.
Thank you Lionel for your detailed feedback, I updated the patch and it seems ok now but perhaps I missed something.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b0658929bea09386f524879228b35996375537f4 tdf#96234: Type Formatting, Primary key checkbox may be checked It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=82b0bf45d0527db84e11689dc8a15eefaa699409&h=libreoffice-5-1 tdf#96234: Type Formatting, Primary key checkbox may be checked It will be available in 5.1.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
In review for 5.0: https://gerrit.libreoffice.org/#/c/20410/
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c21d081d0d3a66f0b7695c6c82910a7f0b588af2&h=libreoffice-5-0 tdf#96234: Type Formatting, Primary key checkbox may be checked It will be available in 5.0.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.