Download it now!
Bug 119639 - Hidden shape in imported XLS shown in Print window and printed
Summary: Hidden shape in imported XLS shown in Print window and printed
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:6.2.0
Keywords: filter:xls
Depends on:
Blocks: Print XLS
  Show dependency treegraph
 
Reported: 2018-09-01 21:16 UTC by Aron Budea
Modified: 2018-09-15 18:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample XLS (with hidden shape) (27.50 KB, application/vnd.ms-excel)
2018-09-01 21:16 UTC, Aron Budea
Details
Reference XLS (visible shape, not printed) (27.50 KB, application/vnd.ms-excel)
2018-09-01 21:17 UTC, Aron Budea
Details
Reference XLS (visible shape, printed) (27.50 KB, application/vnd.ms-excel)
2018-09-01 21:18 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-09-01 21:16:54 UTC
Created attachment 144600 [details]
Sample XLS (with hidden shape)

This is the same as bug 108691, but for XLS files.

In the attached spreadsheet a rectangle covers most of the numbers, but is set to invisible, so it's not shown. It's not shown in Print Preview and when exported to PDF, either. So far so good.

However, it is shown in Print dialog's preview, and also appears during printing, which is bad.

Observed using LO 6.2 master build (e055b4a0fc23e1d0ad5d498f9195790dd41f6b3e) & 3.3.0 / Windows 7.
Comment 1 Aron Budea 2018-09-01 21:17:56 UTC
Created attachment 144601 [details]
Reference XLS (visible shape, not printed)
Comment 2 Aron Budea 2018-09-01 21:18:31 UTC
Created attachment 144602 [details]
Reference XLS (visible shape, printed)
Comment 3 Aron Budea 2018-09-01 21:30:32 UTC
In Excel hidden drawing object is not printed (at least not shown in the preview), but there's no mention of that in the specification.
The relevant properties for binary formats can be found in MS-ODRAW, under 2.3.4.44 Group Shape Boolean Properties (fUsefHidden, fUsefPrint, fHidden, fPrint).

However, fUsefPrint/fPrint appears to be unused, see the reference spreadsheets. In a hex viewer, look for BF 03 (0x03BF), and the following 4 bytes, which is the Group Shape Boolean Properties structure.

In the sample with the hidden shape this is: BF 03 02 00 02 00
In both reference samples this is: BF 03 00 00 02 00

The aingle difference is the fUsefHidden boolean value on the 2nd bit.
Perhaps there's a similar structure that stores the to-be-printed property as for XLSX files (see bug 108691 comment 4).
Comment 4 Commit Notification 2018-09-07 12:51:26 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b38065ea941375bf4f78f13314e84f4a875545d9

tdf#108691, tdf#119639 Don't print hidden objects in XLS(X)

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Aron Budea 2018-09-09 00:00:41 UTC
The case in the description should now be fixed, for a related issue I've opened bug 119765.
Comment 6 BogdanB 2018-09-15 18:39:43 UTC
it works on 6.2 on linux:

Version: 6.2.0.0.alpha0+
Build ID: 9a9b81c7212fa6a6762246593acf3f1950677a22
CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-09-08_00:00:43
Locale: ro-RO (ro_RO.UTF-8); Calc: threaded