Bug 71481 - Clone formatting appends copied formatting rather than overwriting applied formatting
Summary: Clone formatting appends copied formatting rather than overwriting applied fo...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected
: 82725 86041 89542 104920 (view as bug list)
Depends on:
Blocks: Clone-Formatting
  Show dependency treegraph
 
Reported: 2013-11-11 10:14 UTC by kyles
Modified: 2019-12-15 17:06 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Related pic. (85.22 KB, application/zip)
2013-11-11 10:14 UTC, kyles
Details
Step1. Select Format Paintbrush on default font "Test 1" (22.09 KB, image/jpeg)
2013-11-12 05:53 UTC, kyles
Details
Step2. Use Paintbrush to "Test 2 & Test 3" (20.02 KB, image/jpeg)
2013-11-12 05:53 UTC, kyles
Details
Step3. Nothing changed. Format Paintbrush no function. (18.46 KB, image/jpeg)
2013-11-12 05:54 UTC, kyles
Details
Step4. Select Format Paintbrush on bigger font "Test 2" (20.88 KB, image/jpeg)
2013-11-12 05:55 UTC, kyles
Details
Step5. Use Paintbrush to "Test 1 & Test 2 & Test 3" (20.22 KB, image/jpeg)
2013-11-12 05:55 UTC, kyles
Details
Step6. All text format will be changed. (19.41 KB, image/jpeg)
2013-11-12 05:55 UTC, kyles
Details
Sample document (9.47 KB, application/vnd.oasis.opendocument.text)
2017-07-30 21:31 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kyles 2013-11-11 10:14:45 UTC
Created attachment 89007 [details]
Related pic.

Step1. Select Format Paintbrush on default font "Test 1"
Step2. Use Paintbrush to "Test 2 & Test 3"
Step3. Nothing changed. Format Paintbrush no function.

Step4. Select Format Paintbrush on default font "Test 2"
Step5. Use Paintbrush to "Test 1 & Test 2 & Test 3"
Step6. All text format will be changed.
Comment 1 kyles 2013-11-12 05:53:18 UTC
Created attachment 89067 [details]
Step1. Select Format Paintbrush on default font "Test 1"
Comment 2 kyles 2013-11-12 05:53:45 UTC
Created attachment 89068 [details]
Step2. Use Paintbrush to "Test 2 & Test 3"
Comment 3 kyles 2013-11-12 05:54:30 UTC
Created attachment 89069 [details]
Step3. Nothing changed. Format Paintbrush no function.
Comment 4 kyles 2013-11-12 05:55:11 UTC
Created attachment 89070 [details]
Step4. Select Format Paintbrush on bigger font "Test 2"
Comment 5 kyles 2013-11-12 05:55:38 UTC
Created attachment 89071 [details]
Step5. Use Paintbrush to "Test 1 & Test 2 & Test 3"
Comment 6 kyles 2013-11-12 05:55:56 UTC
Created attachment 89072 [details]
Step6. All text format will be changed.
Comment 7 m.a.riosv 2015-02-22 01:30:19 UTC
*** Bug 89542 has been marked as a duplicate of this bug. ***
Comment 8 Zeki Bildirici 2015-05-31 19:11:58 UTC
Hi,

I can confirm this annoying bug on 4.4.3.2

Best regards,
Zeki
Comment 9 Buovjaga 2015-10-02 16:17:04 UTC
*** Bug 86041 has been marked as a duplicate of this bug. ***
Comment 10 QA Administrators 2016-11-08 10:42:25 UTC Comment hidden (obsolete)
Comment 11 Aron Budea 2017-07-30 21:25:59 UTC
If it's unclear for anyone, the issue is that if the formatting is the default, it's not copied with the clone formatting tool.

This is actually a regression, it's working fine in 3.6.0.4, but not okay in 4.0.0.3
Comment 12 Aron Budea 2017-07-30 21:31:31 UTC
Created attachment 135007 [details]
Sample document

The attached sample contains items with different formatting.

Examples:
- cloning from 1. to any other doesn't change anything,
- cloning from 2. to 3. adds bold to 3., but doesn't remove italic,
- cloning from 5. to any other only updates font size,
- cloning from 6. to any other only updates color.

The expectation is that the target has the exact same formatting in the end as the source (as long as direct formatting is concerned).
Comment 13 Aron Budea 2017-07-30 21:44:04 UTC
*** Bug 82725 has been marked as a duplicate of this bug. ***
Comment 14 Aron Budea 2017-07-30 21:50:46 UTC
Bibsected to this range in bug 82725 comment 14:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=15af925c254f27046427de70a59011e2ac3d6bdb..836822522a2e9f009c0870cbbcd48d45bbd3c622

There is a commit in that range that says:
"Format paintbrush default behaviour
Don't copy paragraph formats by default"
https://cgit.freedesktop.org/libreoffice/core/commit/?id=1574c76ec20d1da479ed7e9c85a6cefacc132dfe

Needs verification, though.
Comment 15 Yousuf Philips (jay) (retired) 2017-07-30 22:02:04 UTC
So checked MS Word and Google Docs and it behaves in what i would expect would be the correct behaviour. Glad to see its a regression and lets see who changed it and if it was intentional and what the reasoning for it was. Sad that is has been broken for so long. We definitely need a test case for such a basic feature.
Comment 16 Mike Kaganski 2017-08-03 12:31:49 UTC
Just (In reply to Aron Budea from comment #11)
> If it's unclear for anyone, the issue is that if the formatting is the
> default, it's not copied with the clone formatting tool.

This is not a regression. This is not even a bug.
Our documentation
https://help.libreoffice.org/Common/Copying_Attributes_With_the_Clone_Formatting_Tool
is rather clear on it:

> 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.

This was different before 3.6, which release notes (https://wiki.documentfoundation.org/ReleaseNotes/3.6) mention the change:
> Format paintbrush now differentiates automatic character formating
> attributes applied to a paragraph from those applied to a portion of the
> text inside a paragraph. These automatic character formating attributes are
> applied to the entire paragraph by default; if Ctrl is held while the format
> is passed, these attributes are applied to only the selected text.
> (Maxime de Roucy)
... which refers to the commit mentioned in comment 14.

The problem is that manual formatting appends instead of overwrite, yes; but please concentrate on real bug, not on expected behavior.
Comment 17 Aron Budea 2017-08-06 00:22:03 UTC
(In reply to Mike Kaganski from comment #16)
> This is not a regression. This is not even a bug.
> Our documentation
> https://help.libreoffice.org/Common/
> Copying_Attributes_With_the_Clone_Formatting_Tool
> is rather clear on it:
> 
> > 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.

How is it possible to see if something is paragraph or character formatting?
For example I could set a 3-word paragraph to bold, and unbold the 2nd word, but instead I could set the 1st and 3rd words to bold, and not touch the 2nd. In one case bold is considered paragraph formatting, in other case it isn't.
Comment 18 Mike Kaganski 2017-08-06 20:46:06 UTC
(In reply to Aron Budea from comment #17)
> How is it possible to see if something is paragraph or character formatting?
> For example I could set a 3-word paragraph to bold, and unbold the 2nd word,
> but instead I could set the 1st and 3rd words to bold, and not touch the
> 2nd. In one case bold is considered paragraph formatting, in other case it
> isn't.

I agree that it could be improved, because all this is not user-visible. But my point was that currently-visible behavior is not a bug or regression, but a consciously made decision.

To improve here, we must first decide how to continue with our combination of character styles, paragraph styles that contain character settings, direct formatting of paragraphs and characters. Because it's not easy to devise a good format copy tool that would work "intuitively" in any circumstances, and in the same time would not ruin style-based approach.

Simply applying all character-related properties to characters as direct formatting, where some of them come from paragraph style, would tend to multiply direct formatting and lead to surprises where user will be "unable to apply another paragraph style (nothing changes)" where the reality will be that new paragraph style's settings are overridden by direct character formatting. Also consider, e.g., when a user copies character formatting (and makes many paragraph-defined formatting the manual one), then decides to copy also paragraph settings (including style), and has both paragraph style *and* same-looking manual formatting applied.

Skipping paragraph-style-related character formatting leads to surprise when user sees that some of character properties are not copied.

What is the best approach when manual character formatting (e.g., italics) does not conflict with paragraph-style-defined character properties (font and its size, e.g.)? Do we need to overwrite all the settings from source, and make destination text formatted exactly like source, despite some properties of origin and destination differ only because of para styles?

I suppose that dealing with this like with a "regression" is wrong, and UX-advise is required, with thoughtful analysis and some design specs before "fixing" it.
Comment 19 Cor Nouws 2017-08-09 12:14:57 UTC
Thanks Mike for the examples.
I tend to warn for the use of Clone Formatting. It's easy to use, but there is a good chance that the result is a mess, from maintenance / style point of view.
Limiting the chance to mess up with styles could be done by restricting the use to only clone direct formatting. Now that will make users wonder too what is happening. OTOH, do people that use it, know about styles? So why worry.. yes, if you have to work with a document from someone who uses that tool.
I wouldn't know a consistent solution at the moment to make all happy here.
Removing 'regression' keyword
Comment 20 Xisco Faulí 2017-10-28 18:25:41 UTC
*** Bug 104920 has been marked as a duplicate of this bug. ***
Comment 21 QA Administrators 2019-07-03 02:42:34 UTC Comment hidden (obsolete)
Comment 22 sdc.blanco 2019-12-15 17:06:26 UTC
Maybe this is a documentation problem, as suggested in bug #112872 (comment 4)

Meanwhile the discussion here in comment 16 through comment 19 has been valuable for understanding why clone format does not work (for me) sometimes.  And why "Clear Direct Formatting" can be a solution.