[Libreoffice-bugs] [Bug 137683] TABLE 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
Wed Nov 18 16:07:20 UTC 2020


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

Justin L <jluth at mail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.documentfounda
                   |                            |tion.org/show_bug.cgi?id=12
                   |                            |5268
           Hardware|x86-64 (AMD64)              |All
            Version|6.4.6.2 release             |Master old  -3.6

--- Comment #7 from Justin L <jluth at mail.com> ---
Be warned: any work done here is DANGEROUS!!! See bug 125268.

The relevant parts from document.xml should be these.
<w:tc>
  <w:tcPr>
    <w:shd w:val="clear" w:color="auto" w:fill="7C26FF"/>
  </w:tcPr>
  <w:p>
    <w:pPr>
      <w:rPr>
        <w:color w:val="FFFFFF" w:themeColor="background1"/>
        <w:highlight w:val="none"/>
      </w:rPr>
    </w:pPr>
    <w:r>
      <w:rPr>
        <w:color w:val="FFFFFF" w:themeColor="background1"/>
      <w:highlight w:val="none"/>
      </w:rPr>
      <w:t>ABC</w:t>
    </w:r>
  </w:p>
</w:tc>

It looks like we don't handle LN_Value_ST_HighlightColor_none in
DomainMapper.cxx, nor do we export COL_AUTO in docx/doc/rtf.

This issue will need some research, because there seem to be two settings that
configure the same thing. RES_CHRATR_HIGHLIGHT and RES_CHRATR_BACKGROUND. Is it
safe to assume that LO has the same priority as DOCX?

There is also a user setting option that supposedly defines whether to export
as background or highlight. It probably needs some fixing too.

The initial commits to make the distinction and user setting can be found at
https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=Char+highlight%3A

and it all starts with
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8b949134441056a1455d67ddfdd7e0bc5f2ee682

MS Documentation for DOCX: 17.3.2.15 (Text Highlighting)
This element specifies a highlighting color which is applied as a background
behind the contents of this run. If this run has any background shading
specified using the shd element (§17.3.2.32), then the background shading shall
be superseded by the highlighting color when the contents of this run are
displayed. If this element is not present, the default value is to leave the
formatting applied at previous level in the style hierarchy. If this element is
never applied in the style hierarchy, then text highlighting shall not be
applied to the contents of this run.

Required reading is
http://zolnaitamas.blogspot.com/2015/03/word-compatible-text-highlighting-in.html

-- 
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/20201118/4dfef4dd/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list