diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-10-23 23:13:51 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-10-26 18:41:49 +0200 |
commit | 96b91357fb93028d35d70bdb52b4bac3ecbfbf57 (patch) | |
tree | 51a978a8d02918f3d01d193b5bc1a5f97ccf5aa9 /sc/source | |
parent | 69b50eee1cf103229d4d774fd54b46d0ff767472 (diff) |
tdf#157897 - Clear print ranges before adding additional ones
Otherwise, additional print ranges will be added for linked files after
the external link will be updated.
Change-Id: I0556fda6609d3e18f1ca992dc6a0399be01bc841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158365
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/documen2.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 4b07b0d33ff5..c53dc6b3e305 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1040,6 +1040,8 @@ sal_uLong ScDocument::TransferTab( ScDocument& rSrcDoc, SCTAB nSrcPos, maTabs[nDestPos]->SetPrintEntireSheet(); else { + // tdf#157897 - clear print ranges before adding additional ones + maTabs[nDestPos]->ClearPrintRanges(); const auto nPrintRangeCount = rSrcDoc.maTabs[nSrcPos]->GetPrintRangeCount(); for (auto nPos = 0; nPos < nPrintRangeCount; nPos++) { |