Issue 71293 - HTML export joined cells and hidden columns incorrectly
Summary: HTML export joined cells and hidden columns incorrectly
Status: ACCEPTED
Alias: None
Product: Calc
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.0.4
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2006-11-07 13:31 UTC by tuharsky
Modified: 2017-05-20 10:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test case -see List3 (24.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-11-07 13:32 UTC, tuharsky
no flags Details
testdoc for HTML Export (6.61 KB, application/vnd.oasis.opendocument.spreadsheet)
2007-04-12 10:31 UTC, frank
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description tuharsky 2006-11-07 13:31:02 UTC
See the test case, List3. In the row 1, there are joined cells A-D and E-H. Now
try to export the file, or select the table and use clipboard to copy it to,
say, NVU.

As You can see, the row 1 is crippled. The first joined cell, A-D, now includes
E too. The second cell starts at G and ends with H.

There are hidden cells B and F. Maybe the export dosen't handle them correctly.

Besides, the columns E, G, H are formatted incorrectly -they are too large in
export. I don't know, however, whether this is implied by this issue, or is a
separate one.
Comment 1 tuharsky 2006-11-07 13:32:43 UTC
Created attachment 40394 [details]
Test case -see List3
Comment 2 olly600 2006-12-28 11:30:09 UTC
I can't export your file at all.

Can you download and install the latest version of openoffice.org currently
version 2.1, export you file as html and report the results.

Comment 3 tuharsky 2006-12-28 11:56:55 UTC
The attachment is OK, just the MIME behind is flawed somehow. Right click on the
attachment and choose "save link as" to save the file to Your disk. Then open it
in OOo. Tested with OOo2.1.0.
Comment 4 gercokees 2007-03-23 10:35:24 UTC
Hi,
I found a way to reproduce the alignmentbehavour, and can therefore confirm this
issue.
Enter the following in a new sheet:

   A      B       C       D        E
1  heading                test v
2                    test test ^

align cell c4: right
now, merge cells: A1:C1, and hide column B
notice that cellvalues D1 and D2 are still above each-other
save the file as an html-file
open the html file

notice that the values in cells D1 and D2 are not above each-other anymore.

I suggest to create a new issue for the cell-formating-problem

Confirmed this issue, and enhanced summary
Comment 5 frank 2007-03-27 15:47:19 UTC
Hi,

checked with OOo2.2rc4 and could not reproduce. The resulting HTML file viewed
with firefox looks exactly as expected. The third table in the HTML looks the
same as in the ODS file.

Therefore closed worksforme.

Frank
Comment 6 frank 2007-03-27 15:48:02 UTC
closed wfm
Comment 7 gercokees 2007-03-30 07:48:47 UTC
I do not agree. (Tested with OOo 2.2)
In the example above, my post from friday march 23, the values in column d are
above eachother. when column b is a hidden column, after exporting to a html
file, the html file shows column d not aligned anymore...
therefore, i reopen this issue...
Comment 8 frank 2007-04-12 10:31:51 UTC
Created attachment 44372 [details]
testdoc for HTML Export
Comment 9 frank 2007-04-12 10:34:13 UTC
Hi Eike,

HTML Export is yours. Can something be done in the case gercokess described ? 
See the second attachment for the example he gave us.

Frank
Comment 10 ooo 2007-04-12 12:16:28 UTC
Accepted. First cell of exported testdoc has colspan=3. For each merged cell it
would have to be taken into account whether it spanned hidden cols/rows and
decrease the value of the colspan/rowspan attribute accordingly.
Comment 11 tuharsky 2008-06-12 14:15:50 UTC
Hi,

anything new? You have probably more important issues on list, I just wonder,
that this one seemed quite simple from what I read here..

Anyway, thank You for the work You have done analysing the issue.
Comment 12 ooo 2008-06-12 14:46:15 UTC
No news, and yes, other things to do, and yes, not that difficult ;-)
Adding keyword easy2dev in case someone wants to jump on it.
Comment 13 gang65 2010-06-29 11:23:35 UTC
I would like to handle this bug.
Where is the code response for HTML export?
Comment 14 gang65 2010-06-29 11:45:44 UTC
The problem is in bad number of "colspan" in "<td>"
After change in HTML from:
<td colspan="2" style="text-align:left;width:2.267cm; "
class="Default"><p>Heading</p></td>

to:
<td colspan="3" style="text-align:left;width:2.267cm; "
class="Default"><p>Heading</p></td>


The html page is displayed correctly
Comment 15 gang65 2010-06-29 12:35:03 UTC
I found following file which export document to html:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m83/sd/source/filter/html/htmlex.cxx
Comment 16 gang65 2010-06-29 13:25:08 UTC
I made mistake. Html export file for Calc is located at:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m83/sc/source/filter/html/htmlexp.cxx#WriteCell

And the interesting thing is located in WriteCell method in line 893 .

Why the "nC = rMergeAttr.GetColMerge();" returns "3" for sample document?
It should return "2"
Comment 17 niklas.nebel 2010-06-29 15:18:27 UTC
gang65, see er's comment above. GetColMerge() includes the hidden column.
Comment 18 gang65 2010-07-02 21:41:44 UTC
The solution is replace ScMergeFlagAttr::GetColMerge() method by subtraction of 
the number hidden columns that are spanned.
Comment 19 Marcus 2017-05-20 10:44:45 UTC
Reset the assignee to the default "issues@openoffice.apache.org".