Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | SpreadsheetML: cell with ss:MergeAcross="0" gets an extra empty cell to the right | ||||||
---|---|---|---|---|---|---|---|
Product: | Calc | Reporter: | dcviana <dcviana> | ||||
Component: | open-import | Assignee: | AOO issues mailing list <issues> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | Trivial | ||||||
Priority: | P3 | CC: | damjan, issues, mseidel, rb.henschel | ||||
Version: | OOo 3.0.1 | Keywords: | oooqa | ||||
Target Milestone: | 4.1.14 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | 4.2.0-dev | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
dcviana
2009-04-09 15:07:28 UTC
Created attachment 61491 [details]
Small file that shows the problem. Please open in both Excel (2003 and up) and Calc to see the problem.
Reproducible. The attached document shows two columns (A,B) when opened in Excel2007. It shows these columns in A and C and an additional, empty column between them in OOoDEV300m44. Deleting the: ss:MergeAcross="0" attribute from each <Cell>: <Cell ss:Index="1" ss:StyleID="20" ss:MergeAcross="0" ss:MergeDown="0"> is enough to move the cells from column C to column B. Something must be going wrong when converting ss:MergeAcross. The ODF resulting from the XSLT filter has these in between A1 and B1 when I don't delete ss:MergeAcross="0": <table:covered-table-cell/> and it's missing when I do delete ss:MergeAcross="0". Fixed by the below commit, resolving FIXED. Thank you for your bug report and sample document :-). commit a896732bfcd282115c06407a2f1da77694fa8d19 Author: Damjan Jovanovic Date: Thu Jan 12 03:02:18 2023 +0200 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 Cherry-picked for AOO41X in commit d1836b62275253243e873969ddd24d2e327afc76. Has this already been cherry-picked for AOO42X? (In reply to Matthias Seidel from comment #7) > Has this already been cherry-picked for AOO42X? No. The same problem with cherry-picking here. Carl seems to maintain the test files only in trunk... So this is fixed in AOO41X but not in AOO42X. We must not forget to cherry-pick it. For the moment, I will set it as "Target Milestone" 4.1.14. Cherry-picked for AOO42X with b9aa0698b102697d60533d02e6cbe50f52d1cb50. |