diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-03-22 16:46:55 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-04-05 13:31:41 +0200 |
commit | 8ea1e24b66b64bdcb4b9ac7640cdbe2a484d2800 (patch) | |
tree | c157be5ecd40a33507796410bf07a7115727a270 | |
parent | tdf#147641 default font size for captions always reset (diff) | |
download | core-8ea1e24b66b64bdcb4b9ac7640cdbe2a484d2800.tar.gz core-8ea1e24b66b64bdcb4b9ac7640cdbe2a484d2800.zip |
warn on too many rows/column when loading ODS
There's a warning when loading XLSX, but not when loading ODS.
Now that 7.4 is going to support 16k columns, that would be a useful
warning, either if we raise the limits again, or backported to
7.2/7.3 .
Change-Id: I204bca32e1ff37332b86361d3d81d3fee29c15ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131945
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 6068fd901905..f17e1a231672 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -1189,7 +1189,10 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos, // it makes no sense to import data after the last supported column // fdo#58539 & gnome#627150 if(rCurrentPos.Col() > pDoc->MaxCol()) + { + rXMLImport.SetRangeOverflowType(SCWARN_IMPORT_COLUMN_OVERFLOW); break; + } if (i > 0) rTables.AddColumn(false); @@ -1202,7 +1205,10 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos, // it makes no sense to import data after last supported row // fdo#58539 & gnome#627150 if(rCurrentPos.Row() > pDoc->MaxRow()) + { + rXMLImport.SetRangeOverflowType(SCWARN_IMPORT_ROW_OVERFLOW); break; + } if( (rCurrentPos.Col() == 0) && (j > 0) ) { |