ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.9k stars 332 forks source link

colSpan is always reduces by 1 in Office XML and HTML documents #1154

Closed regs01 closed 1 year ago

regs01 commented 1 year ago

This issue is unique.

Operating System

Windows 10 / 8.1 / 7

Version information

7.2.1

Expected Behavior

Should be per attribute value.

Actual Behavior

When a document has a cell with colSpan attribute it's always reduces by 1. So colSpan=4 treated as colSpan=3. rowSpan is fine.

Reproduction Steps

No response

Additional information

Example of document. test.doc

<HTML xmlns:w="urn:schemas-microsoft-com:office:word">
<HEAD>
  <TITLE>Test Document</TITLE>
  <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View></w:WordDocument></xml><![endif]-->
  <META http-equiv=Content-Type content="text/html; charset=utf-8">
  <STYLE>
    body {font-family: 'cambria', 'times new roman'; color: #222;}
    table {border: none;}
    .table {border:solid 1px #ccc; width:100%; border-collapse:collapse;}
    .table td {padding:5px; border:solid 1px #ccc;}
  </STYLE>
</HEAD>
<BODY>
<TABLE class="table">
<TBODY>
  <TR>
    <TD><P>1</P></TD>
    <TD><P>2</P></TD>
    <TD><P>3</P></TD>
    <TD><P>4</P></TD>
    <TD><P>5</P></TD>
    <TD><P>6</P></TD>
  </TR>
  <TR>
    <TD colSpan=4><P>4</P></TD>
    <TD><P>5</P></TD>
    <TD><P>6</P></TD>
  </TR>
</TBODY>
</TABLE>
<P></P>
</BODY>
</HTML>

incorrect

if i set to colspan to 5, it would display as 4

what should be

regs01 commented 1 year ago

Seem to be fixed in 7.3.0.