summaryrefslogtreecommitdiff
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-03-23 09:09:02 +0100
commit047e8bf379d1eb0b0fdcb20088583298a9bb481a (patch)
tree0d8a9e41b308750cefcb2f65be1b5eb91ac8ab92
parent768ec11fe96060d3cf39ac599521c57d70447609 (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>
-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 e4dbc07a9e6b..be34d395d330 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -181,7 +181,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 9cd4fa9f4cff..5e0a39a9cb56 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -212,9 +212,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()