summaryrefslogtreecommitdiff
path: root/sc/inc/address.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-14 12:05:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-14 13:34:41 +0100
commitf6064b13586aa8681907b69e4f43643251f9b803 (patch)
tree3aad0584727cf24503213d12c2a25029961d79c6 /sc/inc/address.hxx
parent9c90c5e4740763d116d1354d1e4315d338a92140 (diff)
sc: rowcol: convert mark data
with this patch I can finally load a 3201 column document Change-Id: I880d485b3f628836e7aed92c276e660466a3b19c Reviewed-on: https://gerrit.libreoffice.org/85139 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/address.hxx')
-rw-r--r--sc/inc/address.hxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 2109d582f67b..79af2eab6ca8 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -70,6 +70,8 @@ const SCROW MAXROW = MAXROWCOUNT - 1;
const SCCOL MAXCOL = MAXCOLCOUNT - 1;
const SCTAB MAXTAB = MAXTABCOUNT - 1;
const SCCOLROW MAXCOLROW = MAXROW;
+const SCROW MAXROW_JUMBO = 16 * 1000 * 1000;
+const SCCOL MAXCOL_JUMBO = 16384;
// Maximum tiled rendering values
const SCROW MAXTILEDROW = 500000;
// Limit the initial tab count to prevent users to set the count too high,
@@ -90,13 +92,13 @@ const SCROW MAXROW_30 = 8191;
[[nodiscard]] inline bool ValidCol( SCCOL nCol, SCCOL nMaxCol )
{
- assert(nMaxCol == MAXCOL); // temporary to debug jumbo sheets work
+ assert(nMaxCol == MAXCOL || nMaxCol == MAXCOL_JUMBO); // temporary to debug jumbo sheets work
return nCol >= 0 && nCol <= nMaxCol;
}
[[nodiscard]] inline bool ValidRow( SCROW nRow, SCROW nMaxRow)
{
- assert(nMaxRow == MAXROW); // temporary to debug jumbo sheets work
+ assert(nMaxRow == MAXROW || nMaxRow == MAXROW_JUMBO); // temporary to debug jumbo sheets work
return nRow >= 0 && nRow <= nMaxRow;
}
@@ -112,25 +114,25 @@ const SCROW MAXROW_30 = 8191;
[[nodiscard]] inline bool ValidColRow( SCCOL nCol, SCROW nRow, SCCOL nMaxCol, SCROW nMaxRow )
{
- assert(nMaxRow == MAXROW); // temporary to debug jumbo sheets work
+ assert(nMaxRow == MAXROW || nMaxRow == MAXROW_JUMBO); // temporary to debug jumbo sheets work
return ValidCol(nCol,nMaxCol) && ValidRow(nRow,nMaxRow);
}
[[nodiscard]] inline bool ValidColRowTab( SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nMaxCol, SCROW nMaxRow )
{
- assert(nMaxRow == MAXROW); // temporary to debug jumbo sheets work
+ assert(nMaxRow == MAXROW || nMaxRow == MAXROW_JUMBO); // temporary to debug jumbo sheets work
return ValidCol(nCol,nMaxCol) && ValidRow(nRow,nMaxRow) && ValidTab( nTab);
}
[[nodiscard]] inline SCCOL SanitizeCol( SCCOL nCol, SCCOL nMaxCol )
{
- assert(nMaxCol == MAXCOL); // temporary to debug jumbo sheets work
+ assert(nMaxCol == MAXCOL || nMaxCol == MAXCOL_JUMBO); // temporary to debug jumbo sheets work
return nCol < 0 ? 0 : (nCol > nMaxCol ? nMaxCol : nCol);
}
[[nodiscard]] inline SCROW SanitizeRow( SCROW nRow, SCROW nMaxRow )
{
- assert(nMaxRow == MAXROW); // temporary to debug jumbo sheets work
+ assert(nMaxRow == MAXROW || nMaxRow == MAXROW_JUMBO); // temporary to debug jumbo sheets work
return nRow < 0 ? 0 : (nRow > nMaxRow ? nMaxRow : nRow);
}