Bug 82661 - Paragraph background fills all space above paragraph
Summary: Paragraph background fills all space above paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: Other All
: highest major
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.5.0 target:4.4.1
Keywords: bibisected, bisected, regression
: 88168 89016 89304 89309 91271 (view as bug list)
Depends on:
Blocks: Regressions-DrawingLayer-FillStyles mab4.4
  Show dependency treegraph
 
Reported: 2014-08-15 13:14 UTC by Cor Nouws
Modified: 2018-11-29 06:01 UTC (History)
16 users (show)

See Also:
Crash report or crash signature:


Attachments
test document for paragraph background color (17.23 KB, application/vnd.oasis.opendocument.text)
2014-08-15 13:16 UTC, Cor Nouws
Details
screenshot with 4.3 (41.45 KB, image/png)
2015-02-02 00:53 UTC, wanchai
Details
screenshot with 4.4 (33.12 KB, image/png)
2015-02-02 00:53 UTC, wanchai
Details
LibreOffice version (41.18 KB, image/png)
2015-02-16 15:32 UTC, superkikim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2014-08-15 13:14:58 UTC
I'll attach a document with some paragraphs
On having a background color
Now in 4.4. master, that background color fill all the space above that paragraph.
So the space above that paragraph + space below the preceding paragraph.
It does not fill more space below the paragraph..

In earlier versions, the background color was just behind the text.
Comment 1 Cor Nouws 2014-08-15 13:16:43 UTC
Created attachment 104676 [details]
test document for paragraph background color
Comment 2 Cor Nouws 2014-08-15 13:17:08 UTC
was OK before > regression
Comment 3 Buovjaga 2014-11-04 12:14:45 UTC
Confirmed. I assume you tested on Linux, so adding bibisectRequest.

Win 7 64-bit Version: 4.4.0.0.alpha1+
Build ID: ad6d94009cf8ea526eb70bf1a07e5c6a21320f83
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-11-04_00:06:27
Comment 4 Jean-Baptiste Faure 2014-12-08 10:47:44 UTC
Still there in 4.4.0.0.beta2+.

May be related to the same commit from AOO than bug 84391.

Best regards. JBF
Comment 5 Rostislav 'R.Yu.' Okulov 2014-12-19 07:06:16 UTC
I saw not pink but all white background. Any way I think this is the same bug, isnt it?

Here is what I got.

git bisect start
# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
git bisect bad 423a84c4f7068853974887d98442bc2a2d0cc91b
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect good 65fd30f5cb4cdd37995a33420ed8273c0a29bf00
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# good: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect good 4850941efe43ae800be5c76e1102ab80ac2c085d
# good: [a900e72b6357882284c5955bdf939bf14269f5fb] source-hash-dd1050b182260a26a1d0ba6d0ef3a6fecc3f4e07
git bisect good a900e72b6357882284c5955bdf939bf14269f5fb
# skip: [e80660c5a1d812cd04586dae1f22767fc3778c4a] source-hash-07c60c8ee2d1465544a6a39e57bc06b3690b8dfb
git bisect skip e80660c5a1d812cd04586dae1f22767fc3778c4a
# good: [df9bcaed2faa2a8d11b19f877cdff3a12a887278] source-hash-6ba9692d8bbe3e3c245aca9a7c928e81178d05f1
git bisect good df9bcaed2faa2a8d11b19f877cdff3a12a887278
# bad: [741197a13a361480f59eeb3bd1401f984f49f1c0] source-hash-9a61470eb1fa161cba70f2e9c4ea8817dc7f617e
git bisect bad 741197a13a361480f59eeb3bd1401f984f49f1c0
# skip: [60da347518798811f7adbfbf1eb07d59cd9f08bf] source-hash-28fc951233a58fb4d8515ed4380140aaee0afd32
git bisect skip 60da347518798811f7adbfbf1eb07d59cd9f08bf
# good: [0acca754077bf74469c3e1a3c7eabbc3da795266] source-hash-5e651d4084df7662b56ea980934c0428ba31b062
git bisect good 0acca754077bf74469c3e1a3c7eabbc3da795266
# good: [ce3d21bc00b0756f1e7dbb4974db30e6d51b913b] source-hash-8485a276022e05bd34afb2321e72ecfad4589f7e
git bisect good ce3d21bc00b0756f1e7dbb4974db30e6d51b913b
# bad: [89894d82385af13d5393f07abeb76a2c309b1828] source-hash-062e69f40b749aa8a6058c3e6ca328af86aeb45b
git bisect bad 89894d82385af13d5393f07abeb76a2c309b1828
# good: [c567bb961271596a852b55742a65e04f0b92ecbb] source-hash-2e41702ed4f224f195d33054e2e714f546b4442c
git bisect good c567bb961271596a852b55742a65e04f0b92ecbb
# bad: [16d0a5059bce9198bfae647a72dc06b438be583f] source-hash-944c78ecb91608f4c3e9bab32fdbc90c67326525
git bisect bad 16d0a5059bce9198bfae647a72dc06b438be583f
# first bad commit: [16d0a5059bce9198bfae647a72dc06b438be583f] source-hash-944c78ecb91608f4c3e9bab32fdbc90c67326525

 16d0a5059bce9198bfae647a72dc06b438be583f is the first bad commit
commit 16d0a5059bce9198bfae647a72dc06b438be583f
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Tue May 20 10:16:41 2014 +0000

    source-hash-944c78ecb91608f4c3e9bab32fdbc90c67326525
    
    commit 944c78ecb91608f4c3e9bab32fdbc90c67326525
    Author:     Andrzej Hunt <andrzej.hunt@collabora.com>
    AuthorDate: Fri Apr 25 20:25:48 2014 +0100
    Commit:     Andrzej Hunt <andrzej.hunt@collabora.com>
    CommitDate: Sat Apr 26 08:24:36 2014 +0100
    
        fdo#75489 Pass toolbar context menu commands to toolbar for handling.
    
        The toolbar context menu is handled by the toolbar manager, however
        the items are provided and managed by the toolbar itself -- previously
        any events on the list of toolbar items in the context menu were silently
        discarded, whereas now we pass them on to the owning toolbar.
    
        Change-Id: Ia17718c3ff8acfba1b6d655022dd9469932f3493

:100644 100644 df7df9357f7ca1ecb4a9fb78f23774ae0075025c fa6afcb40a1990b220e346ee12647f81728f2f2b M      ccache.log
:100644 100644 8186336dc64fc91cff8a087490f54ca1584e4892 a03c81a56c3e0e34002c292723e3ab9cf4abf916 M      commitmsg
:100644 100644 9b48d132f39b397fc8d692d7daf7bf14e7c4b687 8673fadbb0d3fd57e58689b702c3b99a993cca9e M      make.log
:040000 040000 ae652e2ca7716809f637e49a6f79ce5f9cb529d1 ec6f85e2f9ba743959b62b182d705f755095f837 M      opt
Comment 6 Matthew Francis 2015-01-01 10:28:20 UTC
The below is the commit for the first transition, where the background went from pink to absent/white
(I'm betting that the second part (from absent to pink again but too large) is 7d9bb549d498d6beed2c4050c402d09643febdfa, but I will check next)

commit 4a0b5e569d070c286daefb0fdfe45c0dd15d241c
Author:     Armin Le Grand <alg@apache.org>
AuthorDate: Thu Apr 17 16:44:58 2014 +0000
Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
CommitDate: Fri Apr 25 13:08:06 2014 +0200

    i#124638 support for DrawingLayre FillStyle for GraphicFrames and ...
    
    ... EmbeddedObjectFrames in Writer
    
    (cherry picked from commit 8433ee82c9323501545164ddf6e6008db483ab7a)
Comment 7 Matthew Francis 2015-01-01 10:56:50 UTC
As I suspected, the second half of this was the below commit.

Adding Cc: to vmiklos@collabora.co.uk. Any chance you could take a look at this? Thanks


commit 7d9bb549d498d6beed2c4050c402d09643febdfa
Author:     Armin Le Grand <alg@apache.org>
AuthorDate: Mon Jun 2 15:00:50 2014 +0000
Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
CommitDate: Tue Jul 1 13:30:09 2014 +0200

    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
    
    (cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)
Comment 8 Pierre C 2015-01-11 10:02:01 UTC
Still on 4.4.0RC2. this is really annoying when using background colour on Titles.
Comment 9 Buovjaga 2015-01-15 17:35:10 UTC
*** Bug 88168 has been marked as a duplicate of this bug. ***
Comment 10 StefanW 2015-02-01 17:27:24 UTC
*** Bug 89016 has been marked as a duplicate of this bug. ***
Comment 11 wanchai 2015-02-02 00:53:22 UTC
Created attachment 113039 [details]
screenshot with 4.3
Comment 12 wanchai 2015-02-02 00:53:57 UTC
Created attachment 113040 [details]
screenshot with 4.4
Comment 13 wanchai 2015-02-02 00:57:05 UTC
I added two screenshots that illustrate the problem. A temporary workaround could be to add the background color the font, but then you need whitespace at the end.
Comment 14 Pierre C 2015-02-11 08:19:35 UTC
Still on 4.4.1.1 very annoying bug because all titles using background colour are now ugly

--> Back to 4.3.6
Comment 15 Cor Nouws 2015-02-11 20:18:43 UTC
*** Bug 89309 has been marked as a duplicate of this bug. ***
Comment 16 Cor Nouws 2015-02-11 20:54:16 UTC
*** Bug 89304 has been marked as a duplicate of this bug. ***
Comment 17 superkikim 2015-02-16 15:32:17 UTC
Created attachment 113435 [details]
LibreOffice version
Comment 18 superkikim 2015-02-16 15:33:32 UTC
I have the same behavior on 4.4.0.3 on LinuxMint 17.1 x64.

I opened a document created with Writer 4.2.7. In this version, I had the expected behavior. My Header1 style had a border, and the area inside the borders was colored with the color chosen in the Area dialog box. 

In 4.4.0.3, the color is extended above the paragraph, even if ident is zero.

This is not just related to the settings of the used style. 

For exemple. Let's say I have three paragraphes of three styles in use:

style1: Area Fill: None, Spacing above: 0cm, Spacing below: 0.25cm
style2: Area Fill: Color Gray 3, Spacing above: 1cm, Spacing below: 0.5cm
style3: Area Fill: Color Red 1, Spacing above: 0cm, Spacing below: 1cm

The area between style1 and style2 paragraphs will be gray 3 on 1.25cm
The area between style2 and style3 paragraphs will be red 1 on 0.5cm
The area below style3 is not colored (that is expected... hourra)

This is for me a major issue, as I have to edit and render a document for my study very soon, and there is no way I can correctly format it using styles.

This is marked NEW since 2014-08-15. Please take it in account in the best delays. Styles are critical feature in word processors.
Comment 19 Pierre C 2015-02-16 16:25:03 UTC
Same problem on Android beta

Yes, this is a real problem, a clear regression, and the workaround is to go back to 4.2.
Comment 20 superkikim 2015-02-16 16:38:21 UTC
For instance, 4.3.5.2 does not suffer of this bug. I've installed this version to go on.
Comment 21 Miklos Vajna 2015-02-17 11:13:49 UTC
Problem is that in SwFrm::PaintBackground(), we still compare background using RES_BACKGROUND and we ignore these new fill attributes during comparision.
Comment 23 Jean-Baptiste Faure 2015-02-17 11:53:01 UTC
(In reply to Miklos Vajna from comment #22)
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=1e33cd8355eb1d856a1439b4a095e379b3acf0bd

Thank you very much Miklos. Do you plan to backport this fix to 4.4 branch ?

Best regards. JBF
Comment 24 Miklos Vajna 2015-02-18 19:26:52 UTC
Sure: https://gerrit.libreoffice.org/14537
Comment 25 Commit Notification 2015-02-18 23:20:41 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#82661 SwFrm::PaintBackground: handle fill attrs when comparing background

It will be available in 4.5.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 26 Commit Notification 2015-02-19 09:34:09 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=010cd7e81ef0f8c524ff764eed80e746caa1d94c&h=libreoffice-4-4

tdf#82661 SwFrm::PaintBackground: handle fill attrs when comparing background

It will be available in 4.4.2.

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 27 Cor Nouws 2015-02-19 10:42:32 UTC
Hi Miklos,

Tested on Version: 4.5.0.0.alpha0+
Build ID: a5ab0e3a8b1cb7c06072229e1c4d956eb81fa002
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-02-17_18:43:52
Locale: nl_NL

Works perfect. Zillion thanks  :) !

Also tested with setting/removing header/footers on the page and that works good too. And quickly a gradient in an Writer object.

All fine!
Comment 28 Jean-Baptiste Faure 2015-02-19 13:52:51 UTC
Verified on LibreOffice 4.4.2.0.0+ built at home under Ubuntu 14.10 x86-64.
Works perfectly too. Thank you very much. :-)

Best regards. JBF
Comment 29 Pierre C 2015-02-20 09:42:29 UTC
Works fine on libreoffice master 4.5.0alpha+ win x64

Any chance to get it for 4.4.1.2 ?
Comment 30 Miklos Vajna 2015-02-20 11:46:53 UTC
https://gerrit.libreoffice.org/14564
Comment 31 Commit Notification 2015-02-20 12:15:57 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be3f5f82719930f415b5ca38451e8aa4bcd02027&h=libreoffice-4-4-1

tdf#82661 SwFrm::PaintBackground: handle fill attrs when comparing background

It will be available in 4.4.1.

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 32 Jean-Baptiste Faure 2015-05-21 07:13:35 UTC
*** Bug 91271 has been marked as a duplicate of this bug. ***
Comment 33 Jean-Baptiste Faure 2015-05-21 07:16:17 UTC
Reopening this bug because it seems that its fix is non complete: it does not work in the case where the background color is black (and only in this case). See bug 91271.

Best regards. JBF
Comment 34 Miklos Vajna 2015-06-11 20:06:50 UTC
Let's leave this reopened, but next time please don't do this -- it helps development if we have one fix for one but, then a second fix for a second bug. Resolving that other one as a duplicate of this means that now there will be at least two commits as a fix for this bug, which means that the fix for this bug won't be a single commit anymore.
Comment 35 Miklos Vajna 2015-06-12 22:10:19 UTC
The black color corner-case of bug 91271 is fixed by commit 551c204740a37c8dbc7acd35bc9fe683ade3fe80 (Fix tdf#87509 - default sdr attribute is special object., 2015-05-24), also backported to libreoffice-5-0 and libreoffice-4-4, so marking this bug as resolved again.
Comment 36 Robinson Tryon (qubit) 2015-12-17 08:30:08 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]