Description: The background color is active when inserting a header using Insert Header/Footer - Header default style. Steps to Reproduce: 1. Open Writer 2. Insert -> Header/Footer -> Header -> Default style 3. Format -> Page -> Header tab 4. Click More -> Area tab -> Color tab will be active 5. Press OK, OK -> Header will be blue Color tab should be set to none. Actual Results: Color is enabled Expected Results: No color. Same as when insert a header from: Format -> Page -> Header tab Reproducible: Always User Profile Reset: No Additional Info: Version: 6.2.0.0.alpha0+ Build ID: 3846561f79cf9065abd9ca83c9fbfbe7e52e28e2 CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; TinderBox: Win-x86@42, Branch:master, Time: 2018-10-20_23:33:00 Locale: nl-NL (nl_NL); Calc: CL
Version: 6.0.6.2 Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77 CPU threads: 2; OS: Windows 6.1; UI render: default; Locale: en-US (en_US); Calc: group Thank you for reporting the bug. I can confirm that the bug is present.
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=7d9bb549d498d6beed2c4050c402d09643febdfa author Armin Le Grand <alg@apache.org> 2014-06-02 15:00:50 +0000 committer Miklos Vajna <vmiklos@collabora.co.uk> 2014-07-01 13:30:09 +0200 commit 7d9bb549d498d6beed2c4050c402d09643febdfa (patch) tree 2caf67e36c9ccd058268b003cf2bc39b9b102b53 parent a5e137eb1d37361c60175e8fba780fc46b377a23 (diff) Related: #i124638# Second step of DrawingLayer FillAttributes... Bisected with: bibisect-44max Adding Cc: to Armin Le Grand
Code Pointer: One approach is to check the fill style attribute item state in the border background set, pBBSet, after the page header or footer set is put. If the fill style attribute is not SET put the fill style item to none. LO code that will be used in this approach SfxItemSet SfxItemSet::GetItemState SfxItemState::SET SfxTabPage::GetWhich XATTR_FILLSTYLE SfxItemSet::Put XFillStyleItem drawing::FillStyle_NONE https://opengrok.libreoffice.org/xref/core/svx/source/dialog/hdft.cxx?r=55042cb5#594
I'd say this is no big deal. The highlight is NOT added UNLESS you go to the area tab (which as stated introduces a default blue colour instead of showing the current value of NONE), and then OK the result. In other words, by not changing the blue colour, you are accepting its default of blue. But yes, it is a bit unexpected to just browse through settings and then have the document change on you.
svx/source/xoutdev/xpool.cxx const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); //light blue 2 rPoolDefaults XATTR_FILLSTYLE = new XFillStyleItem(); //default SOLID This can forced to NONE when the header is turned on with FN_INSERT_PAGEFOOTER in sw/source/uibase/wrtsh/wrtsh1.cxx's SwWrtShell::ChangeHeaderOrFooter() if( bOn ) { SvxULSpaceItem aUL(bHeader ? 0 : MM50, bHeader ? MM50 : 0, RES_UL_SPACE ); SwFrameFormat* pFormat = bHeader ? const_cast<SwFrameFormat*>(rMaster.GetHeader().GetHeaderFormat()) : const_cast<SwFrameFormat*>(rMaster.GetFooter().GetFooterFormat()); pFormat->SetFormatAttr( aUL ); + XFillStyleItem aFill(css::drawing::FillStyle_NONE); + pFormat->SetFormatAttr(aFill); }
I think the fix I outlined is probably the best approach for this. So this could be a super-easy hack (where the work was all done for you - and you just need to go through the compile and submit stages).
I would like to fix this issue!
Looks like there are now two open patches, both failing to compile: https://gerrit.libreoffice.org/c/core/+/113468 https://gerrit.libreoffice.org/c/core/+/113564 I have to say I am a bit stunned that you decided to skip the compile step in Justin's advice "you just need to go through the compile and submit stages".
I had gone through the build stages and it worked pretty fine for me. I need to look into again as it isn't verified.
(In reply to Buovjaga from comment #8) > Looks like there are now two open patches, both failing to compile: > https://gerrit.libreoffice.org/c/core/+/113468 > https://gerrit.libreoffice.org/c/core/+/113564 Not sure why the second one is 404, but here is a newer one from Advait: https://gerrit.libreoffice.org/c/core/+/114022
Done! I had made some relevant changes in my older patch and its building perfectly now. Changing the status of the bug from asigned to fixed. Thanks.
(In reply to Radhey Parekh from comment #11) > Done! I had made some relevant changes in my older patch and its building > perfectly now. Changing the status of the bug from asigned to fixed. Thanks. The status remains intact until Justin is happy with either your work or Advait's
Radhey Parekh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/307ee1357cf2c4acd2f3e5a90285e8cb7c4c14e2 tdf#120801: The background colour is active when inserting a header It will be available in 7.2.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.
I tested on this version and not yet solved. I see a difference: active is black, and not anymore blue, but the end result is the same. Tested in Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: e96554b67b17f9d3d91b0bb1f29ab0b9cdc43dcb CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
(In reply to BogdanB from comment #14) > I tested on this version and not yet solved. That doesn't sound logical. What steps are you taking? Following the steps in comment 1, I get Area:None. [Yes, if you switch from "none" to "color" then it says the "active" is black / "new" is blue, but that is irrelevant.]
Created attachment 172689 [details] video of the bug Please see the video, the latest version of 7.2 Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: ec629c5ee22d02f99d66a5cf975ce239876b7f4d CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded Am I doing something wrong?
(In reply to BogdanB from comment #16) > Am I doing something wrong? Yes - you are not stopping at step 4. When you get to step four, the Area tab is NOT set to Color, but to none. Prior to the patch it was set to Color.
Ok. I agree. I verified in Version: 7.1.3.2 (x64) / LibreOffice Community and in that version indeed is set on color, not on None. So, this bug is fixed in 7.2. Thanks for fixing this.