<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - HTML Document: Table borders disappear, because multiple style attributes are written within a single tag"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=132739">132739</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>HTML Document: Table borders disappear, because multiple style attributes are written within a single tag
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.3.6.1 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>a.berg@science-computing.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
If you create a HTML document containing a table with cell borders and colored
cell background, LibreOffice writes multiple style attributes into every td tag
like this:
    <td width="33%" bgcolor="#5983b0" style="background: #5983b0"
style="border-top: 1px double #333333; border-bottom: 1px double #333333;
border-left: 1px double #333333; border-right: none; padding-top: 0.04in;
padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">

The problem is, that LibreOffice itself and also Firefox simply ignore the
re-definition of style (the second style argument).

I'm not quite sure what the XHTML-specification says about this, but AFAIU it
should be one style argument containing both background and border styles.

At least LibreOffice should display the document the same way it looked like
before closing.

Steps to Reproduce:
1. Start soffice
2. "File" -> "New" -> "HTML Document"
3. "Insert Table", e.g. 3x3
4. Select the whole table, right click -> "Table Properties..." -> "Borders" ->
"Set Outer Border and All Inner Lines"
5. Select "Color": "Dark Gray 2", click "OK"
6. Select the whole table, set "Table Cell Background Color" e.g. to "Light
Blue 1"
7. Save the document as html file (watch the cell borders)
8. Close soffice
9. Open document with soffice or any modern web browser (take a look at the
borders now)

or

1. Take a HTML document containing a table with borders and cells with
background color created by LibreOffice 4.3.7.2.
2. Open this document with LibreOffice >= 5.3.6.1.
3. Change something, save.
4. Have your table borders disappear.

Actual Results:
Cell borders are shown wrong. Same in a modern web browser.

Expected Results:
The HTML document should be saved as displayed.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Latest known unaffected version: 4.3.7.2 (on CentOS 6).
In 4.3.7.2 the background color wasn't written in CSS, but only with the
bgcolor argument (see test_4.3.7.2.html).

Earliest known affected version: 5.3.6.1 (on CentOS 7).
Latest known affected version: 6.4.3.2.

Version: 6.4.3.2
Build ID: 6.4.3.2-1.fc32
CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>