From 52ce03c8e27a36f21cf2e70bc335f10fc3251ffd Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 4 Mar 2022 18:27:13 +0100 Subject: remove more hardcoded MAXROW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ica57f18d3fd1bf9ec06f05869f4a956d7d1097b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131036 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- sc/inc/attarray.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sc/inc/attarray.hxx') 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 @@ -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; } -- cgit