diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-03-04 18:27:13 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-03-23 09:09:07 +0100 |
commit | 52ce03c8e27a36f21cf2e70bc335f10fc3251ffd (patch) | |
tree | 7ecbdec83aa0a79fc35b1bc579e4c2bae1a1718b /sc/inc/attarray.hxx | |
parent | a5c5034f048926d7cb5eb6c99bce2e5aab8a8775 (diff) |
remove more hardcoded MAXROW
Change-Id: Ica57f18d3fd1bf9ec06f05869f4a956d7d1097b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131036
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/inc/attarray.hxx')
-rw-r--r-- | sc/inc/attarray.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx index 52c2793c3f3c..f55a4ee8206e 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -21,6 +21,7 @@ #include "global.hxx" #include "attrib.hxx" +#include "document.hxx" #include "patattr.hxx" #include <algorithm> @@ -114,6 +115,7 @@ public: ~ScAttrArray(); ScDocument& GetDoc() { return rDocument; } + const ScDocument& GetDoc() const { return rDocument; } void SetTab(SCTAB nNewTab) { nTab = nNewTab; } void SetCol(SCCOL nNewCol) { nCol = nNewCol; } #if DEBUG_SC_TESTATTRARRAY @@ -266,10 +268,10 @@ inline const ScPatternAttr* ScAttrIterator::Next( SCROW& rTop, SCROW& rBottom ) if ( !nPos ) { ++nPos; - if ( nRow > MAXROW ) + if ( nRow > pArray->GetDoc().MaxRow()) return nullptr; rTop = nRow; - rBottom = std::min( nEndRow, MAXROW ); + rBottom = std::min( nEndRow, pArray->GetDoc().MaxRow()); nRow = rBottom + 1; return pDefPattern; } |