diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-10-02 00:13:57 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2023-10-09 16:06:32 +0200 |
commit | 2705c53c9d444eb5a8126d97b3e1fc4ff010b9c0 (patch) | |
tree | 1e230c98f9edbd5cfa9e7df702d254ec942f3eb2 /sc/inc/table.hxx | |
parent | 0918d476c0bbe526cabb159523f35e4ab0bea2f2 (diff) |
tdf#100034 tdf#157318 XLSX export: fix lost named ranges associated to sheets
The original fix for tdf#100034 (see commit [1]) consisted of explicitly not exporting to XLSX named ranges that are not built-in. This has a side-effect that user-defined named ranges associated with sheets are also not exported to XLSX. Hence, if the user creates a named range linked to a sheet and saves the file to XLSX, the named range is not exported (which is the issue reported in tdf#157318).
This patch implements a new fix for tdf#100034, reverting the previous
fix. When the Print Ranges are cleared by the user, the associated named
ranges are also cleared, thus fixing the original problem.
This new fix has the advantage that user-defined named ranges linked to sheets are again exported to XLSX files.
Regression from commit 639519dc2bad058197b6ff73c9e3df622f979f97
"tdf#100034: Fix to persistently remove print-range".
References:
[1] 639519dc2bad058197b6ff73c9e3df622f979f97
Change-Id: Ic3b84365a6086e96f60b222cd6337991ac90f483
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157455
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r-- | sc/inc/table.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 615a2f03e5cd..34e0f9d27784 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -833,6 +833,10 @@ public: void ClearPrintRanges(); /** Adds a new print ranges. */ void AddPrintRange( const ScRange& rNew ); + + // Removes all named ranges used for print ranges + void ClearPrintNamedRanges(); + /** Marks the specified sheet to be printed completely. Deletes old print ranges! */ void SetPrintEntireSheet(); |