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