https://bugs.documentfoundation.org/show_bug.cgi?id=127348

            Bug ID: 127348
           Summary: Improve use of line dash definitions with rounded
                    dots/dashes
           Product: LibreOffice
           Version: 6.4.0.0.alpha0+ Master
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Keywords: needsUXEval
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: rb.hensc...@t-online.de

I write this as issue, because first the goal has to be clear before any
changes in code are down.
----

The ODF standard defines the element <draw:stroke-dash>. This has the
attributes: name, display-name, style, dots1, dots1-length, dots2,
dots2-length, distance. For the attribute 'style' the values 'round' and 'rect'
are possible. The lengths can be absolute or a percentage relative to the line
width. The line dash definitions in a foo.sod palette are written using the ODF
standard.

This would fit perfectly to our API structure 'LineDash'. This has the
components Style, Dots, DotLen, Dashes, DashLen, Distance where Style is a
com::sun::star::drawing::DashStyle. This is an enum with the values RECT,
ROUND, RECTRELATIVE, ROUNDRELATIVE.

But LibreOfffice determines whether a dash is rounded or square/flat not from
DashStyle, but from the LineCap line property. LibreOffice is not alone in
this, but OOXML and SVG also act in this way. Nevertheless the core works with
the structure 'LineDash'.

This leads to the following problems:

A) If the user applies a line dash definition that contains style="round" from
a palette, the dashes are not rounded. That prevents to provide a line style
with round points in the sidebar, for example. The sidebar has no section to
set the line cap.

B) If in a file only the stroke-dash definition contains the attribute
draw:style="round", but the object does not have the line property
svg:stroke-linecap="round", then the dashes are not rounded (tdf#53276).

C) If an object has the line property cap="round", but the stroke-dash
definition in the current palette has draw:style="rect", the palette entry is
not found and is not available in the dialogs, even if all other properties
fit. Exception is our own palette standard.sod.

How can the two concepts LineCap vs LineDash.Style be brought together?

My ideas to improve the situation:

If the user assigns a dash definition with draw:style="round" to an object via
sidebar, the line property linecap="round" is automatically set. The preview in
the sidebar shows the style as if linecap="round" is already set.

The line style dialog is changed, so that it sets the linecap to "round", if a
definition with draw:style="round" is selected, and disables the linecap
drop-down for such definitions. That would not effect our standard.sod palette,
because it has only definitions with draw:style="rect".

Keep the possibility to set a round cap for styles in standard.sod, although
our standard.sod has only draw:style="rect" definitions. But an author of a
custom palette has to provide all definitions in a "rect" and in a "round"
version, so that they will be found, regardless of whether the user has set
linecap to "round" or "square"/"flat". To keep the list of styles short for
custom palettes, the dialog can have an option to show either styles with
"round" or "rect" in case of custom palettes. But such would be a question of
design.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to