Bug 103705 - Clone formatting does not copy all paragraph-level properties
Summary: Clone formatting does not copy all paragraph-level properties
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.5.1 release
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: Paragraph Clone-Formatting
  Show dependency treegraph
 
Reported: 2016-11-04 15:18 UTC by Heiko Tietze
Modified: 2018-01-13 09:49 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of Clone Formatting issue (12.45 KB, application/vnd.oasis.opendocument.text)
2016-11-04 15:18 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2016-11-04 15:18:34 UTC
Created attachment 128489 [details]
Example of Clone Formatting issue

Character style properties such as bold, italic, colors etc. are perfectly copied. Also the paragraph style but not properties that affect the paragraph. In particular lists, alignment, indentation, and spacing is missing.

In the attached example properties for the objects at the first page are cloned to the second page.
Comment 1 Buovjaga 2016-11-17 12:48:26 UTC
Confirmed.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha1+
Build ID: c5f5b3e5334c52502c1de28828a44ad469c68850
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-11-14_06:24:21
Locale: fi-FI (fi_FI); Calc: group
Comment 2 Michael H. 2017-01-28 22:10:44 UTC
Confirmed in 5.2.5.1

Tab stops are also not cloned.

Workaround:
Define a style for the clone source paragraph and assign this style to the clone target paragraph.
Comment 3 Michael H. 2018-01-07 12:01:22 UTC
Still horribly broken in 6.0 RC1
Comment 4 Michael H. 2018-01-07 13:07:15 UTC
Behavior has changed from past versions.

See https://helponline.libreoffice.org/latest/en-US/text/shared/guide/paintbrush.html?DbPAR=SHARED
Comment 5 V Stuart Foote 2018-01-07 16:30:29 UTC
For the 6.0 help:

https://helponline.libreoffice.org/6.0/en-US/text/shared/guide/paintbrush.html?DbPAR=SHARED#bm_id380260

And, this does not seem to work as intended.
Comment 6 Michael H. 2018-01-07 16:35:33 UTC
Can you be more specific VSF? I tested on 6.0.0.1 and most of it does work, though some seems a little buggy, but hard to tell.

Can you say what exactly using the Example Attachment is not working?
Comment 7 V Stuart Foote 2018-01-07 18:14:31 UTC
(In reply to Michael H. from comment #6)
> Can you be more specific VSF? I tested on 6.0.0.1 and most of it does work,
> though some seems a little buggy, but hard to tell.
> 
> Can you say what exactly using the Example Attachment is not working?

Sorry, just went back through the example. 

The click, <Ctrl>+click, and <Ctrl><Shift>+click does apply the selection's character, paragaph+character, or paragraph only formatting respectively.

The numbered list style threw me for a moment, but realize doing the clone continuing is the correct behavior.

@Heiko, are you good with this now?
Comment 8 Heiko Tietze 2018-01-07 21:00:09 UTC
(In reply to V Stuart Foote from comment #7)
> The numbered list style threw me for a moment, but realize doing the clone
> continuing is the correct behavior.

Don't get this. Horizontal alignment, list style, and line spacing are not copied. So it's not solved IMHO.
Comment 9 Michael H. 2018-01-07 21:11:23 UTC
Using your own example attachment in this bug report, let's go through this step by step:

A. Horizontal alignment
1) Place the cursor on the line containing "Center" centered on page 1
2) Activate the cloning tool
3) Hold down CTRL and left click on "Center" on page 2
> "Center" moves from left justification to centered. OK

B. List Style
1) Place the cursor on the line containing "Bullet A" bulleted on page 1
2) Activate the cloning tool
3) Hold down CTRL and left click on "Bullet A" on page 2
> "Bullet A" moves from left justification to indention with the same bullet. OK

C. Line Spacing
1) Place the cursor on the line containing "Line spacing" which has a 1.5 line spacing on page 1
2) Activate the cloning tool
3) Hold down CTRL and left click on "Line spacing" on page 2
> "Style: Heading" drops down half a line. Checking the properties of "Line spacing" it now has 1.5 line spacing. OK

Can you confirm these steps and behaviors?
Comment 10 V Stuart Foote 2018-01-07 21:19:23 UTC
(In reply to Heiko Tietze from comment #8)
> 
> Don't get this. Horizontal alignment, list style, and line spacing are not
> copied. So it's not solved IMHO.

But they are copied and applied...

With a selection made--using the "Clone formatting" button from the Standard toolbar, there are 3 "apply" modes: 1) just character formatting, 2) character formatting + paragraph formatting, and 3) just paragraph formatting.

The corresponding "apply" modes are 1) character (word boundry) based format -- by clicking on the target; 2) character & paragraph formatting -- by <Ctrl>+clicking on the target; 3) paragraph only formatting -- by <Ctrl><Shift>+clicking on the target.

The paint mode defaults to a single action--one selection -> one paint. But that can be changed to allow multiple paints by double click on the "Clone formatting" button, and a click to release when done applying format.

It is a little weird, but seems to work as designed.
Comment 11 Heiko Tietze 2018-01-07 22:45:38 UTC
(In reply to Michael H. from comment #9)
> Can you confirm these steps and behaviors?

Yes, it works with ctrl. But why do I have to press ctrl for these properties and the others not? Because of the paragraph style level... (RTFM myself). We should update the tooltip accordingly.
Comment 12 Timur 2018-01-08 08:41:33 UTC
Heiko, this is your bug. Should we just rename it?
Like "Add 'to include paragraph formatting, hold down Ctrl' to Clone tooltip".
It will be long but it will be useful. 

Actually, all this from Help would be even better:
"By default only the character formatting is copied ; to include paragraph formatting, hold down Ctrl when you click. To copy only the paragraph formatting, hold down Ctrl+Shift when you click."
Comment 13 Heiko Tietze 2018-01-08 08:56:59 UTC
(In reply to Timur from comment #12)
> Heiko, this is your bug. Should we just rename it?
> Like "Add 'to include paragraph formatting, hold down Ctrl' to Clone
> tooltip".
> It will be long but it will be useful. 
> 
> Actually, all this from Help would be even better:
> "By default only the character formatting is copied ; to include paragraph
> formatting, hold down Ctrl when you click. To copy only the paragraph
> formatting, hold down Ctrl+Shift when you click."

Was waiting for more opinions; your proposal sounds good, I would go with the first on the tooltip as we provide extended tooltips when the offline help is installed.
Comment 14 Heiko Tietze 2018-01-08 10:09:25 UTC
Patch at https://gerrit.libreoffice.org/#/c/47578/
Comment 15 Yousuf Philips (jay) (retired) 2018-01-08 16:02:28 UTC
(In reply to Heiko Tietze from comment #14)
> Patch at https://gerrit.libreoffice.org/#/c/47578/

Using "Clone Formatting (double click for multi-selection, press Ctrl to include paragraph formatting)" is way to long as a regular tooltip, and if the Ctrl behaviour is the most important thing to let users know about, due to the weird default behaviour, then the multi-selection portion should be removed.

Also note that this change should be limited to the tooltip in writer and not a change made to the global tooltip.
Comment 16 Cor Nouws 2018-01-08 19:42:23 UTC
(In reply to Yousuf Philips (jay) from comment #15)
> Using "Clone Formatting (double click for multi-selection, press Ctrl to
> include paragraph formatting)" is way to long as a regular tooltip, and if
> the Ctrl behaviour is the most important thing to let users know about, due
> to the weird default behaviour, then the multi-selection portion should be
> removed.

If a choice is to be made, I vote for the proposed one too.
(The switch between short and long help, isn't for this tip?)
Comment 17 Heiko Tietze 2018-01-10 08:50:23 UTC
Latest variant of the tooltip is "Clone Formatting (double click for multi-selection, press Ctrl/Cmd to include paragraph formatting')". I take Cor's comment as +1, Jay gave a -1. Anyone else?
Comment 18 Timur 2018-01-10 12:56:08 UTC
I'm not aware of a tooltip length limit and I'm more in favor of useful explanation. So if there's no such a limit, +1.
Comment 19 Heiko Tietze 2018-01-10 12:59:54 UTC
The tooltip breaks on my system after "...Ctrl/Cmd to".
Comment 20 Michael H. 2018-01-10 18:12:46 UTC
Note that "double click for multi-selection, press Ctrl to include paragraph formatting" mixes two entirely different procedures.
- Double-clicking on the tool makes the tool sticky when you ACTIVATE the tool
- Pressing CTRL does nothing when you click on the tool! CTRL only has an effect when you APPLY the tool after it is activated!

Mixing these two in a brief tool-tip does not resolve the problem and may even make matters worse. Tool-tips generally have this format in LO: (Function or Tool Title + Shortcut Key (if defined). If the tool-tip is restricted to a single line, then including all the tips may stretch beyond the screen real estate.

To really describe the behavior of the Clone Formatting tool, multi-line tool-tips would be necessary (which is nicely done in PDF-xChange Editor!). Is this the direction to go in or is there a better solution? Perhaps the tool itself is not ideal as it currently functions (upon which we could almost all agree, it seems).

Due to the unique additional complexity of the LO cloning tool (compared to similar tools in other word processors), including a description of this complexity in a tool-tip will, in a sense, "clone" the complexity to the tool-tip ;-).

Taking this and all the suggestions here into consideration, I compared the behavior of the Clone Formatting tool to that of the Fill Format Mode tool for Styles and Formatting. Both tools do basically the same thing. So how do you disengage the Fill Format Mode? There are two ways: Click the tool again or press ESC. To apply just character (or even page) formatting, you have to first activate the style class and then activate the tool. This would be interesting for the Clone Formatting tool. (I could imagine a drop-down button with the choices: paragraph only, character only, both.)

Assuming that wicked suggestion gets dumped immediately, what else could make this easier and more intuitive for the user? What would adopting the sticky behavior of the Fill Format Mode tool for the Clone Formatting tool achieve?

1) It would eliminate having to include the long "double-click for multi-selection" in the tool-tip.
2) The tool-tip text could be compressed to, for example, 
"Clone Formatting (apply CTRL+click for paragraph, ESC to deactivate)"
3) It would make the the handling of the tool consistent with the Fill Format Mode tool, which makes (to me) sense!

Thoughts?
Comment 21 Heiko Tietze 2018-01-10 18:58:12 UTC
(In reply to Michael H. from comment #20)
> Thoughts?

It makes not much sense to distinguish between character and paragraph level when both are applied per direct formatting. It needs deep understanding of ODF ti follow and we better drop the difference. 
Making a function sticky per double-click might sound like a cool and innovative solution but is barely recognizable, nor implemented in a stringent way. The common solution to 'apply a function repeatedly' is provided by a 'redo the last command'. 

Your evaluation is absolutely right, but both features are not challenged here. The clone function itself was missing some properties, and eventually VSF and me stumbled over the weird ctrl modifier. I don't think we make it worse by adding a word to the tooltip. Leaving out parts of the unusual interaction just for sake of a single line tooltip in a common format ends up in a worse situation of users not knowing why lists are not accepted.
Comment 22 Commit Notification 2018-01-10 23:45:24 UTC
heiko tietze committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=effc05eecb1359239ca7a86103a6fd9fc8424015

tdf#103705 Tooltip improvement for clone formatting

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Timur 2018-01-12 09:11:52 UTC
Here, "tooltip" was changed, but it simply isn't long enough to contain all that's needed for a successful use of this command.  

There's larger "extended tip" available if local help is installed and that optin ticked. 
I don't like what I see there because it's some free text now. 
There, we should have key parts of real Help that explains all: double click to start, Ctrl/Cmd/Shift... paragraph and direct formatting. 

Another possibility would be to go for solution requested in Bug 101818, paste options pop-up.
Comment 24 Heiko Tietze 2018-01-12 09:55:52 UTC
(In reply to Timur from comment #23)
> Here, "tooltip" was changed, but it simply isn't long enough to contain all
> that's needed for a successful use of this command.  

Discussion was done in the design meeting, minutes at http://nabble.documentfoundation.org/Libreoffice-qa-Minutes-from-the-design-meeting-2018-Jan-10-tt4230517.html

This tip is basically a clue only to the multiple functions as there are not other ways to grasp the various accelerators on paste or the double click on copy. But the user has to learn how exactly it works reading the help.
Comment 25 Mike Kaganski 2018-01-13 09:49:52 UTC
Just wanted to mention here, that I hoped that interested parties would read a see-also link to bug 59029 that I had added. It looks form the discussion that continued after that, that it wasn't the case. So, to be specific: there have always been different modes for applying different levels of formatting using the tool. The default (to only copy character formatting) was set to what it is today in 4.0 in commit 1574c76ec20d1da479ed7e9c85a6cefacc132dfe.