Bug 65848 - FILEOPEN: CALC doesn't import scaling factor set on xlsx files
Summary: FILEOPEN: CALC doesn't import scaling factor set on xlsx files
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: BSA target:6.0.0 target:5.4.0.2 targe...
Keywords: regression
: 86396 103484 106853 (view as bug list)
Depends on:
Blocks: Calc-Images
  Show dependency treegraph
 
Reported: 2013-06-17 09:19 UTC by katyan
Modified: 2020-04-06 19:45 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen - Left window: OpenOffice Scaling factor 70%[OK!]; Right window: LibreOffice Scaling factor 100% [BAD!] (216.57 KB, image/jpeg)
2013-06-17 09:19 UTC, katyan
Details
File in Excel shows 90%, in Calc shows 100% (131.81 KB, image/jpeg)
2016-02-20 00:59 UTC, David Berky
Details
test-three (7).xlsx show in comparison image (32.64 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-02-20 01:00 UTC, David Berky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description katyan 2013-06-17 09:19:57 UTC
Created attachment 80938 [details]
Screen - Left window: OpenOffice Scaling factor 70%[OK!]; Right window: LibreOffice Scaling factor 100% [BAD!]

Problem description: 
When using PHPExcel class to produce Calc spreadsheets LibreOffice doesn't set scaling factor as expected. 
I have tested the same document using LibreOffice 4.0.3.3 release and scaling factor was set to 100%. When I opened the same document in OpenOffice 


Steps to reproduce:
1. $objPHPExcel = new PHPExcel();
2. Add data
3. Set Breaks			$objPHPExcel->getActiveSheet()->setBreak( 'K1' , PHPExcel_Worksheet::BREAK_COLUMN );
			$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(1);
			$objPHPExcel->getActiveSheet()->getPageSetup()->setScale(70);

Current behavior:
Scaling factor is set to 100%

Expected behavior:
Scaling factor should be 70%

              
Operating System: Windows 7
Version: 4.0.3.3 release
Comment 1 Robinson Tryon (qubit) 2014-02-03 16:54:34 UTC Comment hidden (no-value)
Comment 2 Robinson Tryon (qubit) 2014-02-03 17:02:48 UTC
(In reply to comment #0)
> Problem description: 
> When using PHPExcel class to produce Calc spreadsheets LibreOffice doesn't
> set scaling factor as expected. 
> I have tested the same document using LibreOffice 4.0.3.3 release and
> scaling factor was set to 100%. When I opened the same document in
> OpenOffice 

Hi katyan,

Could you please attach a sample document created by PHPExcel that demonstrates this behavior of LibreOffice?

Thanks,
--R
Comment 3 QA Administrators 2014-09-03 21:32:53 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2014-10-05 22:59:58 UTC Comment hidden (obsolete)
Comment 5 Robinson Tryon (qubit) 2015-12-18 10:44:52 UTC Comment hidden (no-value, obsolete)
Comment 6 David Berky 2016-02-20 00:58:18 UTC
It's not just files created with PHPExcel, it also appears to be happening with files created in Excel itself.  The "Scaling Factor" value set by either Excel (Office 365) or PHPExcel (v1.8.1) is not respected in Calc (v5.0.4.2) - see attached images and test file.
Comment 7 David Berky 2016-02-20 00:59:44 UTC
Created attachment 122809 [details]
File in Excel shows 90%, in Calc shows 100%
Comment 8 David Berky 2016-02-20 01:00:43 UTC
Created attachment 122810 [details]
test-three (7).xlsx show in comparison image
Comment 9 Buovjaga 2016-02-26 18:47:56 UTC
Setting to NEW as we have confirmation.
Comment 10 Bojan Šarić 2016-10-04 20:42:06 UTC
Is there any improvement on this?
I can confirm that LibreOffice Calc does not follow 'setScale' parameter given in PHPExcel.
MS EXcel 78%
LibreOffice Calc 100%
Comment 11 Andreas Hofmann 2016-11-28 11:49:33 UTC
I can also reproduce this issue with LibreOffice 5.2.3.3, and would need it fixed.
Comment 12 Commit Notification 2017-06-28 03:19:30 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

always import page scaling, tdf#65848

It will be available in 6.0.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 13 Commit Notification 2017-06-28 14:51:31 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

add test for tdf#65848

It will be available in 6.0.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 14 Timur 2017-06-30 15:12:09 UTC
I added Bug 86396 to Seel Also because it was about filesave ever since OO, but it seems also fixed, so I'll mark as a duplicate.
Comment 15 Timur 2017-06-30 15:12:53 UTC
*** Bug 86396 has been marked as a duplicate of this bug. ***
Comment 16 Timur 2017-06-30 15:13:32 UTC
*** Bug 103484 has been marked as a duplicate of this bug. ***
Comment 17 Gabor Kelemen (allotropia) 2017-07-03 06:54:06 UTC
Can we have this in 5.4 as well, please?
Comment 18 Buovjaga 2017-07-03 08:18:28 UTC
(In reply to Gabor Kelemen from comment #17)
> Can we have this in 5.4 as well, please?

The patch needs review: https://gerrit.libreoffice.org/#/c/39339/
For 5.3: https://gerrit.libreoffice.org/#/c/39340/
Comment 19 Commit Notification 2017-07-03 19:02:13 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b1abc47af7a64ab8d3204cb85f173f0023da3ff&h=libreoffice-5-4

always import page scaling, tdf#65848

It will be available in 5.4.0.2.

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 20 Commit Notification 2017-07-03 19:02:31 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ae56c9862222718871b6bf098162c2b8b4c44b82&h=libreoffice-5-3

always import page scaling, tdf#65848

It will be available in 5.3.5.

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 21 Xisco Faulí 2017-10-28 18:20:38 UTC
*** Bug 106853 has been marked as a duplicate of this bug. ***