Bug 66613 - EDITING: sheet copied to another document does not retain a defined print range
Summary: EDITING: sheet copied to another document does not retain a defined print range
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: Andreas Heinisch
URL:
Whiteboard: BSA target:7.6.0 target:7.5.3
Keywords:
Depends on:
Blocks: Print-Range
  Show dependency treegraph
 
Reported: 2013-07-05 09:24 UTC by rpr
Modified: 2023-10-23 18:01 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
a test ODS file (7.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-07-05 09:24 UTC, rpr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rpr 2013-07-05 09:24:20 UTC
Created attachment 82070 [details]
a test ODS file

Problem description: 

In LO Calc if you have a print range defined on a sheet and you copy the sheet to a new sheet inside the same document then the print rage is also defined on the new sheet.

But if you copy the sheet to another document then the print range is not retained on the new sheet and it has the default print range.

Steps to reproduce:

1. Open the test ODS file which has a print range defined ($A$1:$C$3) on the first sheet. Check the print range with Page Preview or Format > Print Ranges > Edit.

2. Copy the sheet to a new sheet in the same document. The new sheet also has the print range defined as $A$1:$C$3.

3. Copy the sheet to a new sheet on a new document. The new sheet has the default print range (entire sheet).

The expected behavior:
The new sheet on a new document also has the defined print range.
Operating System: All
Version: 4.1.0.1 rc
Comment 1 Jacques Guilleron 2013-07-05 20:19:55 UTC
Hi rpr,

Without opening anything, I can get a copy of a document which will have all the settings of the old one. Don't you think so?

Jacques
Comment 2 m_a_riosv 2013-07-05 21:19:17 UTC
Reproducible with:
Win7x64 Ultimate
Version 4.0.4.2 (Build ID: 9e9821abd0ffdbc09cd8c52eaa574fa09eb08f2)

Verified with a new spreadsheet and no difference the spreadsheet is saved once or not before the copy is done.
Comment 3 rpr 2013-07-05 21:51:08 UTC
(In reply to comment #1)
Jacques, there are occasions when it is necessary to copy sheets from one spreadsheet document to a new one or existing one:

(1) The existing spreadsheet has many sheets and you want only one or a couple of the sheets in the new spreadsheet. (This is faster than copying entire spreadsheet and then removing many sheets you don't need.)

(2) You want to copy one or a couple of sheets from one spreadsheet to another spreadsheet which already contains some sheets.

Ever done any of these?
Comment 4 Jacques Guilleron 2013-07-05 22:00:24 UTC
Hi rpr,

Sure. You are quite right.

regards,

Jacques
Comment 5 Cor Nouws 2013-07-11 08:22:55 UTC
@rpr
I see the same behaviour / problem in 4.0.0 and 3.6.6.
Do you have any idea when / if it worked before?
Thanks,
Cor
Comment 6 m_a_riosv 2013-07-11 20:39:23 UTC
Same happens with 3.5.7.2, 3.3.4, and Aoo 3.4.1
Comment 7 Cor Nouws 2013-07-12 19:16:43 UTC
thanks Mariosv. I see the problem in 3.3.0 too, so it never worked as far as our history goes.

Prolly Markus will be interested in this, sooner or later ;)
Comment 8 QA Administrators 2015-04-01 14:42:32 UTC Comment hidden (noise)
Comment 9 rpr 2015-04-27 17:45:51 UTC
The issue can be reproduced in LO 4.4.2.2 (MS Windows 7 SP1 64-bit).
Comment 10 rpr 2016-08-21 15:30:20 UTC Comment hidden (no-value)
Comment 11 rpr 2016-11-25 11:28:08 UTC
I still see this issue in LO 5.3.0Beta1 - tested on MS Windows 10 Pro.
Comment 12 QA Administrators 2018-07-14 02:44:44 UTC Comment hidden (noise)
Comment 13 rpr 2018-07-14 21:12:22 UTC
This five-year-old bug is still present in LO 6.1.0.1. 

I hope the bug won't outlive the person who reported it ;-)
Comment 14 QA Administrators 2019-07-15 02:48:16 UTC Comment hidden (noise)
Comment 15 rpr 2019-07-20 09:41:27 UTC
This six-year-old bug also exists in LO 6.2.5.2.
Comment 16 Cor Nouws 2019-07-25 19:26:59 UTC
(In reply to rpr from comment #10)
> It seems I'm the only one interested in fixing this.
You know it's always 'dangereous' to make such statements ? ;)
Comment 17 QA Administrators 2021-07-25 03:31:33 UTC Comment hidden (noise)
Comment 18 rpr 2021-08-03 15:43:10 UTC
This eight-year-old bug also exists in LibreOffice 7.2.0.2.
Comment 19 Commit Notification 2023-03-08 17:48:21 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c1af1b9c555480305862336954ceefe14865e27d

tdf#66613 - Transfer tab: preserve print ranges and col/row repetitions

It will be available in 7.6.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 2023-03-16 09:47:44 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/07f95ee7c043702c2dde2af2fc02228a0c5273d3

tdf#66613 - Transfer tab: preserve print ranges and col/row repetitions

It will be available in 7.5.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 21 BogdanB 2023-03-23 18:42:34 UTC
Thanks Andreas, solved.

Verified with
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f92721bf182952be88b0349a17e46b684d630c29
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded