summaryrefslogtreecommitdiff
path: root/sc/source/core/data/columnspanset.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/columnspanset.cxx')
-rw-r--r--sc/source/core/data/columnspanset.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx
index 849783b5bce5..5d605dc79b2b 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -19,6 +19,8 @@
#include <algorithm>
#include <memory>
+#include <o3tl/safeint.hxx>
+
namespace sc {
namespace {
@@ -64,14 +66,14 @@ ColumnSpanSet::~ColumnSpanSet()
ColumnSpanSet::ColumnType& ColumnSpanSet::getColumn(const ScDocument& rDoc, SCTAB nTab, SCCOL nCol)
{
- if (static_cast<size_t>(nTab) >= maTables.size())
+ if (o3tl::make_unsigned(nTab) >= maTables.size())
maTables.resize(nTab+1);
if (!maTables[nTab])
maTables[nTab].reset(new TableType);
TableType& rTab = *maTables[nTab];
- if (static_cast<size_t>(nCol) >= rTab.size())
+ if (o3tl::make_unsigned(nCol) >= rTab.size())
rTab.resize(nCol+1);
if (!rTab[nCol])