summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-02-17 08:48:28 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-02-17 10:11:26 +0100
commitaf0a0777584825035dbf5ba0ec48d7a6412010c2 (patch)
treef2fb00a599db8bd9e601733e5bc006bb31085e56 /sc
parent4e9a52c7f5ed12e4bb2a716d992edff7aa6c2a7d (diff)
fix maxrow/maxcol mixup
In 5e402bac39dc4245844efbde442bdb3bd993a157 I accidentally converted a couple of MAXCOLCOUNT to GetMaxRowCount(). Change-Id: I2f22e614fb79b8e651308bd4dbddcd7e04651903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130057 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx2
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx2
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 55116658215d..2a843e7f75f6 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -179,7 +179,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
break;
case XML_ELEMENT( TABLE, XML_NUMBER_COLUMNS_REPEATED ):
nColsRepeated = static_cast<SCCOL>(
- std::min<sal_Int32>( rImport.GetDocument()->GetSheetLimits().GetMaxRowCount(),
+ std::min<sal_Int32>( rImport.GetDocument()->GetSheetLimits().GetMaxColCount(),
std::max( it.toInt32(), static_cast<sal_Int32>(1) ) ));
break;
case XML_ELEMENT( OFFICE, XML_VALUE_TYPE ):
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index c50ece581ac6..00514f830305 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -53,7 +53,7 @@ ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport,
case XML_ELEMENT( TABLE, XML_NUMBER_COLUMNS_REPEATED ):
{
nColCount = std::max<sal_Int32>(aIter.toInt32(), 1);
- nColCount = std::min<sal_Int32>(nColCount, rImport.GetDocument()->GetSheetLimits().GetMaxRowCount() );
+ nColCount = std::min<sal_Int32>(nColCount, rImport.GetDocument()->GetSheetLimits().GetMaxColCount() );
}
break;
case XML_ELEMENT( TABLE, XML_STYLE_NAME ):
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 0120501b46ec..a20b74a328a2 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -210,9 +210,9 @@ void ScMyTables::AddColStyle(const sal_Int32 nRepeat, const OUString& rCellStyle
{
rImport.GetStylesImportHelper()->AddColumnStyle(rCellStyleName, nCurrentColCount, nRepeat);
nCurrentColCount += nRepeat;
- SAL_WARN_IF(nCurrentColCount > rImport.GetDocument()->GetSheetLimits().GetMaxRowCount(),
+ SAL_WARN_IF(nCurrentColCount > rImport.GetDocument()->GetSheetLimits().GetMaxColCount(),
"sc", "more columns than fit into SCCOL");
- nCurrentColCount = std::min<sal_Int32>( nCurrentColCount, rImport.GetDocument()->GetSheetLimits().GetMaxRowCount() );
+ nCurrentColCount = std::min<sal_Int32>( nCurrentColCount, rImport.GetDocument()->GetSheetLimits().GetMaxColCount() );
}
uno::Reference< drawing::XDrawPage > const & ScMyTables::GetCurrentXDrawPage()