-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In ODF (19.679.2 of ODF 1.3), the <table:covered-table-cell> element's
table:number-columns-repeated attribute has a default value of 1, meaning the cell spans the cell to its right. However when the XSLT import filter converts from SpreadsheetML's ss:MergeAcross to ODF's table:number-columns-repeated, it always inserts a <table:covered-table-cell> element, and then adds the table:number-columns-repeated attribute only if it is greater than 1. This breaks when ss:MergeAcross="0", because ODF's defaulting to 1 ends up occupying an extra empty cell to the right when it shouldn't. Fix this by only inserting the <table:covered-table-cell> when ss:MergeAcross > 0. Add a test document to prove this. Fixes #100989 - SpreadsheetML: cell with ss:MergeAcross="0" gets an extra empty cell to the right Patch by: me
- Loading branch information
Damjan Jovanovic
committed
Jan 12, 2023
1 parent
577fe17
commit a896732
Showing
3 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
test/testuno/data/uno/sc/fvt/Bug100989MergeAcross0AddsExtraEmptyCell.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?mso-application progid="Excel.Sheet"?> | ||
<Workbook xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel"> | ||
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> | ||
<Colors> | ||
<Color> | ||
<Index>3</Index> | ||
<RGB>#c0c0c0</RGB> | ||
</Color> | ||
<Color> | ||
<Index>4</Index> | ||
<RGB>#ff0000</RGB> | ||
</Color> | ||
</Colors> | ||
</OfficeDocumentSettings> | ||
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> | ||
<WindowHeight>9000</WindowHeight> | ||
<WindowWidth>13860</WindowWidth> | ||
<WindowTopX>240</WindowTopX> | ||
<WindowTopY>75</WindowTopY> | ||
<ProtectStructure>False</ProtectStructure> | ||
<ProtectWindows>False</ProtectWindows> | ||
</ExcelWorkbook> | ||
<Styles> | ||
<Style ss:ID="Default" ss:Name="Default"/> | ||
<Style ss:ID="Result" ss:Name="Result"> | ||
<Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/> | ||
</Style> | ||
<Style ss:ID="Result2" ss:Name="Result2"> | ||
<Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/> | ||
<NumberFormat ss:Format="Currency"/> | ||
</Style> | ||
<Style ss:ID="Heading" ss:Name="Heading"> | ||
<Alignment ss:Horizontal="Center"/> | ||
<Font ss:Bold="1" ss:Italic="1" ss:Size="16"/> | ||
</Style> | ||
<Style ss:ID="Heading1" ss:Name="Heading1"> | ||
<Alignment ss:Horizontal="Center" ss:Rotate="90"/> | ||
<Font ss:Bold="1" ss:Italic="1" ss:Size="16"/> | ||
</Style> | ||
<Style ss:ID="co1"/> | ||
<Style ss:ID="co2"/> | ||
<Style ss:ID="co3"/> | ||
<Style ss:ID="ta1"/> | ||
<Style ss:ID="ce1"/> | ||
</Styles> | ||
<ss:Worksheet ss:Name="Sheet1"> | ||
<Table ss:StyleID="ta1"> | ||
<Column ss:Width="218.4408"/> | ||
<Column ss:Width="89.9424"/> | ||
<Column ss:Span="4" ss:Width="64.26"/> | ||
<Row ss:Height="12.1032"> | ||
<Cell ss:StyleID="ce1"> | ||
<Data ss:Type="String">TestID</Data> | ||
</Cell> | ||
<Cell ss:StyleID="ce1"> | ||
<Data ss:Type="String">TestOK</Data> | ||
</Cell> | ||
<Cell ss:Index="7"/> | ||
</Row> | ||
<Row ss:Height="23.8392"> | ||
<Cell ss:StyleID="Default"> | ||
<Data ss:Type="String">A cell with ss:MergeAcross=”0” | ||
doesn't creates an empty column to the right</Data> | ||
</Cell> | ||
<Cell ss:StyleID="Default" ss:Formula="=R2C6="F2""> | ||
<Data ss:Type="Boolean">0</Data> | ||
</Cell> | ||
<Cell ss:Index="5" ss:MergeAcross="0"> | ||
<Data ss:Type="String">E2 with ss:MergeAcross="0"</Data> | ||
</Cell> | ||
<Cell> | ||
<Data ss:Type="String">F2</Data> | ||
</Cell> | ||
</Row> | ||
</Table> | ||
<x:WorksheetOptions/> | ||
</ss:Worksheet> | ||
</Workbook> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters