Bug 155639 - Add join type round/bevel/miter to the border attributes
Summary: Add join type round/bevel/miter to the border attributes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Borders
  Show dependency treegraph
 
Reported: 2023-06-01 18:34 UTC by philipp
Modified: 2023-06-05 15:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Different corner behaviour for lines. Cell borders (left) and diagram surrounding (right). (17.21 KB, image/png)
2023-06-01 18:34 UTC, philipp
Details
Different corner behaviour for lines. Cell borders (left) and diagram surrounding (right). (14.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-06-01 19:21 UTC, philipp
Details
Screenshot MSO (13.03 KB, image/png)
2023-06-02 11:51 UTC, Heiko Tietze
Details
Examples of Line of Chart Area in Excel (39.95 KB, application/zip)
2023-06-05 10:48 UTC, Regina Henschel
Details
Screenshot of Examples of Line of Chart Area in Excel (71.45 KB, image/png)
2023-06-05 10:49 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description philipp 2023-06-01 18:34:28 UTC
Created attachment 187648 [details]
Different corner behaviour for lines. Cell borders (left) and diagram surrounding (right).

Overview: 
Line drawings differs by the object they surround.

Steps to reproduce:
1) Create new Calc sheet
2) Set to draw a border, e.g. "solid line", around some cells. Put line thickness to a fix value _A_ 
3) Create diagram, content does not matter
4) Set to draw a border around the diagram, set same thickness _A_

Actual results:
- The line around the diagram appears with rounded edges, while the cell surrounding appears with sharp edges. (Picture of screen view attached. Left is a frame around cells, right is a line drawing around a diagram. Same appearance stays true for printing/PDF export.)
- By unit conversion of the line thickness, thereby rounding errors, the line thicknesses can slightly differ. Seems, cell lines use "pt", while diagram lines are using also internally the localised units.

Expected Results:
Coherent line formatting. As "no rounded edges" is predefined by cells, i would have expected to see same around diagrams / or to be able to switch corners around diagrams to "not rounded", to harmonise the appearance if desired.

Reproducible: Always

User Profile Reset: Yes

Additional Info: same in Linux x64 and Windows x64, no platform dependency assumed.
Comment 1 BogdanB 2023-06-01 19:11:07 UTC
Hi, Philipp, can you create a simple document in order to test this bug much easier? And click on Add an attachment on bug page and upload it. Thanks.
Comment 2 philipp 2023-06-01 19:21:24 UTC
Created attachment 187649 [details]
Different corner behaviour for lines. Cell borders (left) and diagram surrounding (right).

Hi Bogdan,

please find it attached as "example-155639.ods". Sorry for "marking overhead", couldn't resist to spot it :)
Comment 3 BogdanB 2023-06-01 19:53:52 UTC
I confirm what you see in 7.6, but let's wait from UX Team a response. This difference could be a feature for diagram and a limitation for cells.

Thanks for reporting.

Tested with
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0fff72154d0dbb44e09546ff59f8a5ec288dfd2e
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 4 Heiko Tietze 2023-06-02 08:43:01 UTC
Does the difference between cells as rectangular, static objects and charts as variable, floating object count as a reason to use sharp vs. round edges?

Probably not, so let's have sharp edges on charts (and likely other objects) too.
Comment 5 philipp 2023-06-02 10:34:20 UTC
If you allow, users comment/question :) 
Would it also be an option to make round vs sharp edges of a chart still user-switchable? Leaving the current round edges of charts as default, which still probably serves most demands well and leaves the best optical impression, but add the chance for the user to switch the line properties to "not round edges"?
Comment 6 Heiko Tietze 2023-06-02 11:51:52 UTC
Created attachment 187664 [details]
Screenshot MSO

Unfortunately it appears to be the same for MS Excel and I wonder if modification to the line caps / rounded edges are possible at all (we always have to put cross-platform compatibility paramount).
Comment 7 Heiko Tietze 2023-06-02 11:52:08 UTC
Regina, what do you think?
Comment 8 Regina Henschel 2023-06-02 16:13:54 UTC
Excel allows to set the line join type to "rounded", "bevel" and "miter". We should allow it too. Excel allows further properties that are available for shapes (e.g. dashes) for the chart area too.

From point of ODF it is no difference to the line properties of a shape. Such feature could be represented in the file markup without introducing a LO-specific namespace. And the dialog tab could use the same layout as for shapes.

philipp, in case you do not need interoperability with Excel, you can use the line-property of the object instead of the border of the chart area to get a sharp corner immediately. When you activate the object with a single click, you find the line properties of the object in the sidebar. Only that this line is lost on export to Excel.
Comment 9 philipp 2023-06-02 17:38:31 UTC
Wow, even perfect user support beside that development considerations. Many thanks, using the object properties to draw the line instead of the chart area properties offers the desired "optical synchronisation" to the cell boxing directly. (And the mentioned new options sound very good.)
Comment 10 QA Administrators 2023-06-03 03:16:42 UTC Comment hidden (obsolete)
Comment 11 Heiko Tietze 2023-06-05 06:59:05 UTC
(In reply to Regina Henschel from comment #8)
> From point of ODF it is no difference to the line properties of a shape.

(In reply to philipp from comment #9)
> (And the mentioned new options sound very good.)

I'm not convinced that we need another option. The workaround is efficient, Excel does the same as we do, the use case / requirement is weak anyway. Okay for you, Philipp, to resolve as NOTABUG?
Comment 12 philipp 2023-06-05 09:12:56 UTC
Hi Heiko and All, 

> I'm not convinced that we need another option. The workaround is efficient,
> Excel does the same as we do, the use case / requirement is weak anyway.
> Okay for you, Philipp, to resolve as NOTABUG?

I confirm that the workaround (i.e. to switch for realising the drawing as property of object instead of the chart) solves the situation well in my situation. Anyhow I note that Regina warned, to my understanding, Excel interoperability would be lost using this workaround. (I could not confirm yet due to lack of Ms machinery.)

Regina in #8
> Excel allows to set the line join type to "rounded", "bevel" and "miter". We 
> should allow it too. Excel allows further properties that are available for 
> shapes (e.g. dashes) for the chart area too.

Back to the original issue, seems it would stay in that sense: when one saves a chart drawing in Excel with particular line join type, LO would then wash it out to "rounded". So I second Reginas "we should allow it too". Whether my reporting therefore shall be adapted to "line join type not preserved in LO, 'bevel'/'miter' changed to 'round'" (unconfirmed) or to (notabug), I leave here as decision for others :)
Comment 13 Regina Henschel 2023-06-05 09:16:09 UTC
(In reply to Heiko Tietze from comment #11)
> Excel does the same as we do, the use case / requirement is weak anyway.

For LibreOffice a chart is an OLE-object. So LibreOffice can have a line belonging to the referenced chart itself and can have a line as part of the holding OLE-object. That is different in Excel. Excel can only have a line belonging to the chart. I think the request is valid. It would increase interoperability with Excel. The request might have a low priority.
Comment 14 Heiko Tietze 2023-06-05 09:22:32 UTC
(In reply to philipp from comment #12)
> > Excel allows to set the line join type to "rounded", "bevel" and "miter".

I don't see such an option and in fact Excel works exactly the same as we do, see comment 6.

The option to change the corner style for borders is what a) sounds like over-engineering, b) is added to all borders, c) implies a lot of effort for very low benefit.
Comment 15 Regina Henschel 2023-06-05 10:48:37 UTC
Created attachment 187727 [details]
Examples of Line of Chart Area in Excel

To style it in Excel:
 Simple click on chart > menu Format.
 Click on bottom right corner in Shape Styles to open sidebar.
 Make sure ChartArea is selected, if not, select it in Chart Options drop down
 Part Fill&Line, open section Border
 Select Solid instead of Automatic.

Now you have the same settings as you know from styling shapes. Set the width to something larger, e.g. 5pt, to make differences better visible.
Comment 16 Regina Henschel 2023-06-05 10:49:23 UTC
Created attachment 187728 [details]
Screenshot of Examples of Line of Chart Area in Excel
Comment 17 Heiko Tietze 2023-06-05 13:09:59 UTC
In this case we do need to alter the attributes that we correctly read from Excel. 

I wonder how "none" comes into play (lines do not join at corners). Is it defined at all?
Comment 18 Regina Henschel 2023-06-05 15:31:32 UTC
"none" is a valid value in ODF and it is also in the API in com::sun::star::rendering::PathJoinType. So we should support it.

But it is ugly and not supported by other applications. I would support a request to set value "none" to "deprecated" and remove it some versions later.