Bug 120161 - PRINTING, PDF Export: Problem with selected cells which cross pages
Summary: PRINTING, PDF Export: Problem with selected cells which cross pages
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.1.2 release
Hardware: All All
: high major
Assignee: Serge Krot (CIB)
URL:
Whiteboard: target:6.3.0 target:6.2.3 target:6.1....
Keywords: bibisected, bisected, regression
: 119189 120268 122013 122569 122974 123160 124001 124372 124576 (view as bug list)
Depends on:
Blocks: PDF-Export Print
  Show dependency treegraph
 
Reported: 2018-09-27 15:26 UTC by Tim Wright
Modified: 2021-02-05 19:31 UTC (History)
21 users (show)

See Also:
Crash report or crash signature:


Attachments
Example CALC sheet which demonstrates the issue (10.89 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-09-27 15:28 UTC, Tim Wright
Details
File with screenshots (128.11 KB, application/vnd.oasis.opendocument.graphics)
2018-09-28 17:36 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Wright 2018-09-27 15:26:21 UTC
Description:
Not all cells in selection will print if the selection crosses page boundaries - only seems to print up to first page boundary, even where lots of free space remains on the page.

Steps to Reproduce:
1. Create spreadsheet which when printed is longer (more rows) than one page. See "Example.ods" attachment
2. View page breaks by print preview.
3. Select some cells which cross the boundary (eg cells A41:A78 in example)
4. Print using "Selected cells" option.

Actual Results:
Only cells up to the first page boundary are printed (in the example case, only cells A41:A53)

Expected Results:
All selected cells should be printed.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes

Version: 6.1.1.2 (x64)
Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
CPU threads: 12; OS: Windows 10.0; UI render: default; 
Locale: en-GB (en_GB); Calc: CL
Comment 1 Tim Wright 2018-09-27 15:28:23 UTC
Created attachment 145219 [details]
Example CALC sheet which demonstrates the issue
Comment 2 BogdanB 2018-09-28 10:15:17 UTC
Confirm on 6.1.2.1 on windows.

From what I remember it is another bug like this.
Comment 3 m_a_riosv 2018-09-28 17:36:14 UTC
Created attachment 145255 [details]
File with screenshots

It's a regression, works with 6.0.7
Comment 4 BogdanB 2018-09-28 18:55:09 UTC Comment hidden (me-too)
Comment 5 BogdanB 2018-09-28 19:19:59 UTC Comment hidden (obsolete)
Comment 6 Oliver Brinzing 2018-10-03 07:27:57 UTC
*** Bug 120268 has been marked as a duplicate of this bug. ***
Comment 7 Oliver Brinzing 2018-10-03 07:30:12 UTC
export to pdf is broken too:
https://bugs.documentfoundation.org/show_bug.cgi?id=120268
Comment 8 Thorsten Behrens (allotropia) 2018-10-10 16:44:58 UTC
That commit in Comment 5 is:

commit 5217a2a0bf27e496cc429ee45dff7c239b466ae6
Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Date:   Tue Dec 12 22:22:32 2017 +0900

    tdf#114256 add cache criterium when to recalculate page range size
    
    Page range size can only be valid for the input parameters, which
    includes the document size, which was not taken into account at all
    before. Now we look at all this parameters to decide if we need to
    recalculate or not.
    
    Change-Id: Ic52ad7516189b395c66f59aabc374c3da85f6a89
    Reviewed-on: https://gerrit.libreoffice.org/46300
    Tested-by: Jenkins <ci@libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Comment 9 Thorsten Behrens (allotropia) 2018-10-10 16:47:02 UTC
*** Bug 119189 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2018-10-29 16:52:14 UTC
Adding Cc: to Tomaž Vajngerl
Comment 11 raal 2018-12-10 16:13:53 UTC
*** Bug 122013 has been marked as a duplicate of this bug. ***
Comment 12 raal 2019-01-08 18:18:16 UTC
*** Bug 122569 has been marked as a duplicate of this bug. ***
Comment 13 Oliver Brinzing 2019-01-26 14:23:16 UTC
*** Bug 122974 has been marked as a duplicate of this bug. ***
Comment 14 Oliver Brinzing 2019-02-06 18:00:11 UTC
*** Bug 123160 has been marked as a duplicate of this bug. ***
Comment 15 Timur 2019-02-12 13:12:54 UTC
As we are approaching EoL for LO 6.1 and this is not fixed, please consider reverting the cause commit. Seems it made mo trouble than benefit.
Comment 16 Xisco Faulí 2019-02-12 13:26:15 UTC
(In reply to Timur from comment #15)
> As we are approaching EoL for LO 6.1 and this is not fixed, please consider
> reverting the cause commit. Seems it made mo trouble than benefit.

It would re-introduced tdf#114256 which is another regression. I'll ping Tomaz
Comment 17 Wojtek 2019-02-12 13:42:30 UTC
Still happening in 6.2

```
Version: 6.2.0.3
Build ID: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
CPU threads: 8; OS: Mac OS X 10.14.2; UI render: default; VCL: osx; 
Locale: pl-PL (es_PL.UTF-8); UI-Language: en-US
Calc: threaded
```
Comment 18 Serge Krot (CIB) 2019-02-25 08:11:16 UTC
Unit test is added:
https://gerrit.libreoffice.org/#/c/68299/

With ".uno:DefinePrintArea" after making selection of any cells on cross pages, the export works correctly.

To make the same thing (correct export of cross pages cells) in LO:
1. Select cells
2. Click Format/Print Ranges/Define
3. Perform export of selection
Comment 19 Commit Notification 2019-02-26 08:47:07 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/3af17a75409965ab6326902e004f6bf5bc37ac71%5E%21

tdf#120161 calc uitest: print selection on cross pages

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2019-03-10 00:26:59 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/03b6c20c66047af41ed2f78fe5dd229cd06392e8%5E%21

tdf#120161 sc: use selection to set required printed area

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 21 Oliver Brinzing 2019-03-11 18:46:40 UTC
*** Bug 124001 has been marked as a duplicate of this bug. ***
Comment 22 Oliver Brinzing 2019-03-11 18:52:05 UTC
seems to be fixed with my dev build:

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 11ea5fe055ed345154138c814e38e54c6624ee89
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

https://gerrit.libreoffice.org/plugins/gitiles/core/+log/11ea5fe055ed345154138c814e38e54c6624ee89

can this fix be backported to lo 6.1.6?
Comment 23 Commit Notification 2019-03-14 09:18:48 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/f0b71fafd3a2fd6158c5952d601092179cba21e5%5E%21

tdf#120161 sc: use selection to set required printed area

It will be available in 6.2.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 24 Xisco Faulí 2019-03-14 11:57:01 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: c196d70337f6b755cfc4c34beda05554c6fab114
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Serge Krot, thanks for fixing this issue!

Cherry-picked to 6-1 https://gerrit.libreoffice.org/#/c/69263/
Comment 25 Commit Notification 2019-03-19 09:23:48 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/0c70e9ab4713a50fec558d6c4e4dfb2517039fc8%5E%21

tdf#120161 sc: use selection to set required printed area

It will be available in 6.1.6.

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

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2019-03-19 09:54:12 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/87bf5a930a72a12f88a21b450da0dd86348c3077%5E%21

tdf#120161 sc: pdf export unit test

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 27 Commit Notification 2019-03-20 09:42:34 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/b407d93a055eb2875dfaac9836b082230efe4eff%5E%21

tdf#120161 sc: pdf export unit test

It will be available in 6.1.6.

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

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2019-03-20 09:42:44 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/bf50d32a09c39631363181f6c11c93c340504cd4%5E%21

tdf#120161 sc: pdf export unit test

It will be available in 6.2.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 29 Xisco Faulí 2019-03-27 16:37:39 UTC
*** Bug 124372 has been marked as a duplicate of this bug. ***
Comment 30 Oliver Brinzing 2019-04-11 17:06:20 UTC
*** Bug 124576 has been marked as a duplicate of this bug. ***
Comment 31 Commit Notification 2021-02-05 19:31:48 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94314c0f2e0bee5bcb994b0cbfbfd9af9053eef8

tdf#120161: sc: Move UItest to CppUnitTest

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.