Calc border and inner line draw order TAGS: CALC

I can’t figure out how to make a black outer border be rendered on top of coloured inner lines. Is this even possible? The coloured inner lines always seem to be on top, both visually and when printed.

LibreOffice (Build c28ca90fd6e1a19e189fc16c05f8f8924961e12e) @ Microsoft Windows 10 Pro Version 10.0.19044
Filetype: ODS

If I select a 3x3 cell region and add a black outer border to and red vertical inner lines, green horizontal lines they all intersect in a way I can’t control. I would like to have the black outer border on top of the coloured lines. Is there a way to force the outer border to be on top? Similar to objects in LO-Draw where you can send-to-back and bring-to-front.

Off topic: It looked to me as if I had added the tags “calc” and “border” to the tag-box. I’ve now removed “border” if it wasn’t allowed and included tag in header.
Cell borders.ods (10.2 KB)

Please complete your question.
The help on this page is mainly provided by users like you.

An important aspect is the correct specification of the tags.
Choose at least one of the valid tags that match your situation: Writer, Calc, Draw, Impress, Math, Base or Common.

Do mean really CALC?

Your question and the corresponding description should be as detailed as possible.
Please remember that no one can look over your shoulder when you ask your question and describe it.

In order to be able to help you as quickly as possible, we need to know your operating system and the LibreOffice version (three digits, e.g. 7.3.2).
Please also state the file type in which you have saved your file.

All important information about your initial question should be present in the initial question box, otherwise edit and complete it., to do it.

Please do not use answers (solutions) or comments for this.

If you have already fulfilled some of these requirements, so much the better. Thanks.

Upload a reduced and anonymized file here so that someone can examine it.

Here you can find the further References for this page.

Thank you very much for your assistance.

There’s no way.
A reason: You are talking of CellRange formatting, and the UI seems to offer a dialog for the purpose. However, that dialog is titled “Format Cells…”, and that’s exactly what it does. Everything you are setting there is applied to every single cell of the range. A vertical “inner” border line is set as the right border of the cell to its left and at the same time as the left border of the cell to its right. The dialog, however, shows (at most) one instance of the vertical inner lines and one instance of the horizontal inner lines. This may induce an interpretation assuming “inner lines” and “outer lines” are conceptually different. They aren’t.
With different words: There isn’t a thing like CellRangeStyle. Only the single cells have styles (or respective hard-formatted attributes).
CF so-called table styles in Writer. Thoroughly considered, the idea of styles for ranges is very, very complicated.

BTW: The Calc API also knows structures as properties of cells named TableBorder / TableBorder2.
You may research how to use them with the help of UserCode.

Ok, thank you, Lupp, for the clarification.

I felt tempted to do a little bit of that research, but failed to get what I wanted: working settings for the vertical and horizontal inner borders of a range using in every case two lines with their widths and a distance. I neither know sufficient documentation nor can I tell effects from bugs.

Thus: You may check if the kind of double-line-borders demonstrated in the attached example are usable for you. There again are effects I would judge to be bugs (strangely not stable under recreatiung views).

BTW: Even for a well-trained ancient Egyptian pharao’s sign painter it must not have been easy to bring such table areas on the panel. After all, the “point” where lines meet or cross is in fact a parallelogram, and how to apply different colorings within its area cannot be reasonably described with terms like “above” or “hidden”. You may find also a well considered solution to the problem in the attached document.

disask82125cellBordersAndDiagonals.ods (20.9 KB)

My original problem was actually to have grey lines inside a black frame to contrast “subsections”. When the result wasn’t to my liking I retorted to make thinner lines for the “subsections” and a thicker outer frame, all in black.
Interresting to see how the diagonals in the doubleline-feature doesn’t stop at the first intersection but on the second except on the right edge.
Good for the ancient Egyptians they were well versed in trigonometry then. :slight_smile:

Am I supposed to close this thread somehow?