[Poll][Bugfix] What should be alignment behavior of merged cells ?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!

[Poll] How should A2,B1,B2 be formatted ?

Poll ended at Sun Oct 24, 2021 3:38 pm

Top+left, as if they were not accessible when merged with A1
3
50%
Bottom+right, as they were changed when merged with A1
0
No votes
I don't care, both OK
3
50%
 
Total votes: 6
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

[Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by openBrain »

Hi all,

A bug has been reported regarding alignment with merged cells here in the French subforum.
I can confirm there is a bug and I won't detail more as this isn't purpose of this thread.

To fix the bug, I have to decide before 2 scenarios, hence this poll.
It talks about cell alignment, i.e. if text inside cell is vertically located top/center/bottom, and horizontally located left/center/right. Case of automatic horizontal alignment taking into account cell content type if --voluntarily-- totally ignored.
To make it simple, let's imagine the following simple story (please do not care whether it's real or not) :
* New blank spreadsheet, all cells are aligned top+left
* Cell range A1:B2 is merged into a single cell (will call this latest merged cell 'MCELL' in following)
* MCELL alignment is changed to bottom+right
* MCELL is unmerged

Now you can go to the poll and raise your opinion about how should A2,B1,B2 be formatted ?
User avatar
thomas-neemann
Veteran
Posts: 11907
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by thomas-neemann »

openBrain wrote: Thu Oct 14, 2021 3:38 pm
In my opinion, something like this could be important for a desktop publishing program, but for a spreadsheet I think it is unimportant
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by openBrain »

thomas-neemann wrote: Thu Oct 14, 2021 3:47 pm In my opinion, something like this could be important for a desktop publishing program, but for a spreadsheet I think it is unimportant
I'll be clear, I won't commit to read the whole thread when I'll do the PR in a few days. I'll base it on the poll results. So I can only encourage you (and everybody else that want to give his/her opinion) to vote (even if admittedly, a "don't care" vote won't change things). ;)
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by TheMarkster »

I voted don't care.

Question: if all merged cells contain text should the text from all cells be included or should whatever is in A1 be all that remains after the merger? If only what is in A1 (which seems to be current behavior) then I think it makes sense to also use whatever alignment is already in A1.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by openBrain »

TheMarkster wrote: Thu Oct 14, 2021 7:43 pm Question: if all merged cells contain text should the text from all cells be included or should whatever is in A1 be all that remains after the merger? If only what is in A1 (which seems to be current behavior) then I think it makes sense to also use whatever alignment is already in A1.
I won't discuss the topic about merging filled cells and will focus on alignment only.
Seems logical to me that at merge time, the alignment is the one of the top left cell of the range.
My present issue is to define the behavior at unmerge time. I'm stuck making a PR as I can't decide myself which way is the best. :)
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by TheMarkster »

openBrain wrote: Thu Oct 14, 2021 8:16 pm I won't discuss the topic about merging filled cells and will focus on alignment only.
Seems logical to me that at merge time, the alignment is the one of the top left cell of the range.
My present issue is to define the behavior at unmerge time. I'm stuck making a PR as I can't decide myself which way is the best. :)
Would it work to use the merge cell's alignment for the new unmerged cells?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by openBrain »

TheMarkster wrote: Thu Oct 14, 2021 8:31 pm Would it work to use the merge cell's alignment for the new unmerged cells?
To me it's sounds like 2nd option of the poll :)
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by chennes »

What does LibreOffice do in this case?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Poll][Bugfix] What should be alignment behavior of merged cells ?

Post by openBrain »

chennes wrote: Fri Nov 19, 2021 5:11 pm What does LibreOffice do in this case?
I guess you're talking specifically about Calc. I just tested, it does exactly that. ;)
Post Reply