Bug 535614 - Add support for a "Clone formatting/style" tool on all dialects
Summary: Add support for a "Clone formatting/style" tool on all dialects
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-06-06 15:16 EDT by Pierre-Charles David CLA
Modified: 2018-11-22 03:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2018-06-06 15:16:50 EDT
This would be especially useful for diagrams, but it should be made as general as possible to the extent it can be defined for other dialect (or even cross-dialects).

The idea is to reproduce the feature, standard in most office apps (e.g. [1]), with an action (available in the diagram's tabbar and probably in menus) that can apply to one or more elements all the custom styling from a selected reference element. The workflow would be:
1. Select an element on the diagram (the reference).
2. Click on the button in the tabbar. The mouse cursor changes into a paintbrush.
3. Click on another element in the diagram (the target): all the style parameters from the reference element that can be applied meaningfully to the target element are applied. On the target elements, the modified attributes are marked as customized so they are not reset on the next refresh.
4. If the user has maintained the Ctrl key when clicking on the target, the cursor stays "armed" and more target elements can be modified.

Ideally, the source and target elements could be in different diagrams, or even in different kinds of representations likes tables & trees (when it makes sense), or in representations from different sessions.

Note that there are many open questions:
* which actual attributes are considered "style attributes" in this context?
* how style attributes are matched for different kinds of representation elements?
* should this operation override already customized style attributes of the targets, or leave those alone and only modify attributes which have the "default" value computed from the mapping?

[1] https://help.libreoffice.org/latest/en-US/text/shared/02/paintbrush.html?&DbPAR=WRITER&System=WIN