Bug 99573 - Clear direct formatting ignores area fill attributes
Summary: Clear direct formatting ignores area fill attributes
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha1
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.3.0
Keywords: bibisected, bisected, regression
: 105728 108248 108661 (view as bug list)
Depends on:
Blocks: Clear-Formatting Paragraph DrawingLayer-FillStyles-regressions
  Show dependency treegraph
 
Reported: 2016-04-29 14:08 UTC by Oliver Specht (CIB)
Modified: 2019-01-28 11:55 UTC (History)
15 users (show)

See Also:
Crash report or crash signature:


Attachments
LO Writer. Paragraph has fill color, but it doesn't show in doc (8.28 KB, image/png)
2018-06-11 11:47 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Specht (CIB) 2016-04-29 14:08:08 UTC
- apply some area settings to a paragraph (color, hatching, ...) and some other other attributes in format/paragraph dialog
- select Format/Clear Direct Formatting
->background is not reset, all other attributes are reset
Comment 1 raal 2016-04-30 14:03:09 UTC
I can confirm with Version: 5.2.0.0.alpha0+
Build ID: 170a473597534cf59887b1d817538322e7039862
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-04-19_00:41:06
Comment 2 Octavio Alvarez 2016-09-18 10:42:18 UTC
Confirmed on Debian/Sid.

Version: 5.1.3.1
Build ID: 1:5.1.3~rc1-1
CPU Threads: 4; OS Version: Linux 4.5; UI Render: default; 
Locale: en-US (en_US.utf8)
Comment 3 Cor Nouws 2016-10-27 09:46:08 UTC
was OK in 3.3.0.4
Comment 4 raal 2016-10-28 12:13:13 UTC
reproducible with Version: 4.4.0.0.alpha0+
Comment 5 Terrence Enger 2016-11-01 19:08:37 UTC
Working on debian-stretch in the 44max bibisect repository, I see from
`git bisect good` ...

    There are only 'skip'ped commits left to test.
    The first bad commit could be any of:
    e642812606be49244f2f775e90169fbd1be29a97
    d3a0e6c621ceb08e11867a2e17f155ae1977cee2
    We cannot bisect more!

and from `git bisect log` (whitespace added) ...

    # bad: [cf6ea17155fabb2a120ba07c150735591ac861d7]
        source-hash-3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2
    # good: [fc71ac001f16209654d15ef8c1c4018aa55769f5]
        source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
    git bisect start 'latest' 'oldest'
    # bad: [8cf60cc706948588e2f33a6d98b7c55d454e362a]
        source-hash-f340f0454627939f1830826fb5cc53a90e6c62a4
    git bisect bad 8cf60cc706948588e2f33a6d98b7c55d454e362a
    # bad: [d9885f526fc7a09cc8f9f8ee643af1b966be24bb]
        source-hash-d1465c64c6f64ad8dd25e40cdc69649b24b305ea
    git bisect bad d9885f526fc7a09cc8f9f8ee643af1b966be24bb
    # good: [e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a]
        source-hash-dc9cc46f3223aff3f85d3ce9696178a5f4d3d087
    git bisect good e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a
    # good: [1477f347fb61b5b07de64312247b49371812f5b4]
        source-hash-4598bbe41d0906a34ceb1126c7fce2108642cd8e
    git bisect good 1477f347fb61b5b07de64312247b49371812f5b4
    # good: [fdbfc593506d9f38152b80f14c9e7afdbef0b40a]
        source-hash-6024ddbfac8e62db50dd5352d610c87d279627de
    git bisect good fdbfc593506d9f38152b80f14c9e7afdbef0b40a
    # good: [b1d1e3e3ac1515cf33be95eba837476142fb6ca8]
        source-hash-f55ddffd7e81cc8f3314047a6aa62991e2d293b1
    git bisect good b1d1e3e3ac1515cf33be95eba837476142fb6ca8
    # good: [163b7bd042acbad89907ad1e16c268229c8468a0]
        source-hash-e123226d874d59799ba4ca2a8919e50e7eb2ba3b
    git bisect good 163b7bd042acbad89907ad1e16c268229c8468a0
    # good: [5f58bd9cfbc5685748d354f12827ebda6c034708]
        source-hash-4e7f1f7f1113a1f0d60ed17d7712700683c35a24
    git bisect good 5f58bd9cfbc5685748d354f12827ebda6c034708
    # good: [552acdffffc36cc51fbb2266909af74febd76b5a]
        source-hash-cbfaf0c7945c68befac41a1e6561a49398cb6826
    git bisect good 552acdffffc36cc51fbb2266909af74febd76b5a
    # good: [0a3179e3faf94d913aed6fca59118ab1d9e67f0c]
        source-hash-69ea62a069f89f5efae8d3cee93a64a4b7ba8ba8
    git bisect good 0a3179e3faf94d913aed6fca59118ab1d9e67f0c
    # skip: [e642812606be49244f2f775e90169fbd1be29a97]
        source-hash-7d9bb549d498d6beed2c4050c402d09643febdfa
    git bisect skip e642812606be49244f2f775e90169fbd1be29a97
    # bad: [cc4b2429f5608f132e2d374bc320ac31a197cd65]
        source-hash-c3f70303cf3725cfd64d3b07c0e7e895f8ac629d
    git bisect bad cc4b2429f5608f132e2d374bc320ac31a197cd65
    # good: [1b9125c983db686bc5a1711c5030e30b600b4c1b]
        source-hash-42fcd888ae537152f9d59c03e945d4bf9aaeb7dd
    git bisect good 1b9125c983db686bc5a1711c5030e30b600b4c1b
    # bad: [d3a0e6c621ceb08e11867a2e17f155ae1977cee2]
        source-hash-c7853b5b5cb71899b6b60fd2175763785b8afb7f
    git bisect bad d3a0e6c621ceb08e11867a2e17f155ae1977cee2
    # good: [e3c84f2b17b881007208ac54c45cbfcd7dc395b2]
        source-hash-a5e137eb1d37361c60175e8fba780fc46b377a23
    git bisect good e3c84f2b17b881007208ac54c45cbfcd7dc395b2
    # only skipped commits left to test
    # possible first bad commit: [d3a0e6c621ceb08e11867a2e17f155ae1977cee2]
        source-hash-c7853b5b5cb71899b6b60fd2175763785b8afb7f
    # possible first bad commit: [e642812606be49244f2f775e90169fbd1be29a97]
        source-hash-7d9bb549d498d6beed2c4050c402d09643febdfa

I am removing keyword bibisectRequest and adding bisected.
Comment 6 Xisco Faulí 2016-11-07 13:10:25 UTC
Regression introduced by:

author	Armin Le Grand <alg@apache.org>	2014-06-02 15:00:50 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-07-01 11:30:09 (GMT)
commit	7d9bb549d498d6beed2c4050c402d09643febdfa (patch)
tree	2caf67e36c9ccd058268b003cf2bc39b9b102b53
parent	a5e137eb1d37361c60175e8fba780fc46b377a23 (diff)

Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including
Header and Footer) for direct attributes and style attributes

Adding Cc: to Armin Le Grand

Same commit as in bug 90273
Comment 7 Cor Nouws 2016-11-07 14:06:16 UTC
@Armin, hi ;)
When you come to this issue, please note:
"  Subject: [libreoffice-design] Minutes of the Design Hangout: 2016-Nov-04
Date: Fri, 4 Nov 2016 15:58:32 +0100
From: Heiko Tietze <tietze.heiko@googlemail.com>

 * Inconsistent behavior of clone formatting    + Issue was communicated per email (not all formatting properties are cloned)
   + Weird toggle on/off function https://bugs.documentfoundation.org/show_bug.cgi?id=59029
   - Benjamin would want to clone all direct formatting properties, Eve rather paragraph or character styles (Jay)
   - Split button is a good solution (Cor)
   - All properties should be cloned in default action (Cor)
   => File tickets and discuss on Bugzilla (AI: Heiko) "
Comment 8 Terrence Enger 2016-11-10 16:35:28 UTC
I see the problem also on Windows Vista running LibreOffice ...

    Version: 5.3.0.0.alpha1+
    Build ID: 4b4abb73fcd7f2802e73102b3e7c30face8d309c
    CPU Threads: 2; OS Version: Windows 6.0; UI Render: default; Layout Engine: old; 
    TinderBox: Win-x86@39, Branch:master, Time: 2016-10-31_02:54:50
    Locale: en-CA (en_CA); Calc: group
Comment 9 Kumāra 2016-12-16 07:27:04 UTC Comment hidden (obsolete)
Comment 10 Terrence Enger 2016-12-19 13:52:30 UTC
I still see the problem on debian-stretch 64-bit with daily Linux
dbgutil repository version 2016-12-16

    Version: 5.4.0.0.alpha0+
    Build ID: c60e07a86338b13eda6487f45b393e407275904b
    CPU Threads: 2; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
    Locale: en-CA (en_CA.utf8); Calc: group

and on Windows Vista with LibreOffice version

    Version: 5.4.0.0.alpha0+
    Build ID: 0c565095983b0cc8b96a78012c611b7a03962204
    CPU Threads: 2; OS Version: Windows 6.0; UI Render: default; 
    TinderBox: Win-x86@39, Branch:master, Time: 2016-12-16_01:40:04
    Locale: en-CA (en_CA); Calc: group
Comment 11 Xisco Faulí 2017-02-12 12:20:34 UTC
*** Bug 105728 has been marked as a duplicate of this bug. ***
Comment 12 Gabriele Ponzo 2017-05-30 09:39:33 UTC
Still present on
Version: 5.4.0.0.beta1
Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: it-IT (it_IT.UTF-8); Calc: group
Comment 13 Yousuf Philips (jay) (retired) 2017-07-30 21:00:49 UTC
*** Bug 108661 has been marked as a duplicate of this bug. ***
Comment 14 Roman Kuznetsov 2018-06-11 11:46:24 UTC
still repro in 6.1 beta 1, 

Version: 6.1.0.0.beta1+
Build ID: 8e660e3b5e4877ee4dca362f7cdca62d8929436a
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-1, Time: 2018-06-10_17:57:02
Locale: ru-RU (ru_RU); Calc: CL

but if even fill of area set as any color, then in document the paragraph doesn't show as color filled (see attach) (i guess that it is another bug)
Comment 15 Roman Kuznetsov 2018-06-11 11:47:44 UTC
Created attachment 142652 [details]
LO Writer. Paragraph has fill color, but it doesn't show in doc
Comment 16 Justin L 2018-12-24 09:47:50 UTC
*** Bug 108248 has been marked as a duplicate of this bug. ***
Comment 17 Justin L 2018-12-24 18:04:28 UTC
The clear direct attributes function seems to be FN_FORMAT_RESET. One way to handle this is to HandleResetAttrAtTextNode RES_BACKGROUND and reset XATTR_FILLSTYLE and XATTR_FILLCOLOR as well.

Note that on a round-trip the formatting IS gone, but only for .odt, not .doc or .docx, for reasons I would guess as being related to bug 47471.
Comment 18 Justin L 2018-12-26 06:33:55 UTC
proposed fix: https://gerrit.libreoffice.org/65609
Comment 19 Commit Notification 2019-01-26 18:36:37 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/f08362c0b64b6a1f746c4c0ab008e4817595e69e%5E%21

tdf#99573 uiwriter: clear RES_BACKGROUND -> XATTR_FILL_*

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 20 Xisco Faulí 2019-01-28 11:55:22 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 6da3cd5521ffba2f6502929260d33c91ec56d556
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Justin Luth, Thanks for fixing this!!