[Libreoffice-bugs] [Bug 91292] FORMATTING: DOCX, Paragraph background color set to 'No Fill' not persisted on save

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Oct 27 16:40:20 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=91292

--- Comment #5 from Justin L <jluth at mail.com> ---
The ability to round-trip the background was lost as of LO 4.4 commit
7d9bb549d498d6beed2c4050c402d09643febdfa by Author: Armin Le Grand on
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

At that point, you can't even SEE that a background color is set, until LO5.0
commit 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e by Author: Miklos Vajna on
CommitDate: Sun Feb 1 01:48:38 2015 +0100
        writerfilter: import paragraph color as fill attributes

        In theory this is to be in sync with the ODF import. In practice the
old
        UNO property seems not to have a proper fallback to populate the doc
        model with the fillattributes, so without this even if the import
result
        is visible, it would be lost on ODF export.

It looks like FormatFillStyle needs to update the m_pBackgroundAttrList?  This
total hack worked...
if ( m_pBackgroundAttrList.is() && rFillStyle.GetValue() ==
drawing::FillStyle_NONE )
{
    m_pBackgroundAttrList = FastSerializerHelper::createAttrList();
    m_pBackgroundAttrList->add( FSNS( XML_w, XML_fill ), "auto" );
    m_pBackgroundAttrList->add( FSNS( XML_w, XML_val ), "clear" );
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171027/5905c0dd/attachment.html>


More information about the Libreoffice-bugs mailing list