Issue 23296

Summary: XLS-Import: Position for Header/Footer are not correct
Product: Calc Reporter: oc
Component: codeAssignee: oc
Status: CLOSED FIXED QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
the test doc for import and export none

Description oc 2003-12-08 11:02:13 UTC
Open attached bugdoc. The header and footer are not at the same position like in
Comment 1 daniel.rentz 2004-01-26 10:46:18 UTC
Comment 2 daniel.rentz 2004-06-02 16:53:52 UTC
fixed in src680/dr19
Comment 3 daniel.rentz 2004-06-23 11:03:15 UTC
Additional comments on differences between Calc and Excel:

If header is switched off:

Behaviour of Calc and Excel is equal: "Top border" describes distance from sheet 
data to top border of paper.

If header is switched on:

- "Top border" in Calc is distance between top border of paper and top of header.
- "Top border" in Excel still is distance between top border of paper and *sheet 
data*. Header is inside this distance (and may overlay the sheet data if too big).

- "Header margin" in Calc is distance between bottom of header and top of sheet 
data. Therefore: Position of sheet data is "Top border" + header height + "Header 
- "Header margin" in Excel is distance between top border of paper and header. It is 
completely unrelated to sheet data position.

In Calc, the header margin must be >=0. This implies that in Calc it is not possible 
to let the header overlay the sheet data (see issue 30586).

Import/export filter now converts the Calc and Excel margins as good as possible.
On import, if header overlays sheet data, an explicit header height is set, that cuts 
the lower part of the header. This way the position of the sheet data is imported 
correctly. Otherwise the header height is calculated dynamically (the setting 
"Dynamic header height" is switched on).
On export, if the "Dynamic header height" setting is switched on, the current size 
of the header is calculated and used. If switched off, the explicit height is used. 
This would return to Excel's behaviour to overlay the sheet data with the header.

All above applies to footers too, related to bottom border of paper.
Comment 4 daniel.rentz 2004-07-06 16:03:05 UTC
Comment 5 daniel.rentz 2004-07-06 16:05:39 UTC
Created attachment 16289 [details]
the test doc for import and export
Comment 6 daniel.rentz 2004-07-06 16:06:31 UTC
another problem: picture not visible after import -> issue 30613

back to QA
Comment 7 daniel.rentz 2004-07-06 16:08:11 UTC
Comment 8 oc 2004-07-13 11:40:43 UTC
verified in interal build cws_dr19
Comment 9 frank 2004-10-06 11:24:03 UTC
Found integrated in master src680m54 using Linux and Windows build
Comment 10 frank 2007-04-10 14:44:57 UTC
*** Issue 76209 has been marked as a duplicate of this issue. ***