summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docfunc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b65edc73a8c0..ae76b44f9551 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -20,6 +20,7 @@
#include <scitems.hxx>
#include <comphelper/lok.hxx>
+#include <o3tl/safeint.hxx>
#include <sfx2/app.hxx>
#include <editeng/editobj.hxx>
#include <editeng/justifyitem.hxx>
@@ -1028,7 +1029,7 @@ bool ScDocFunc::SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCel
ScDocument& rDoc = rDocShell.GetDocument();
const size_t nLength = rCells.size();
- if (rPos.Row() + nLength - 1 > static_cast<size_t>(rDoc.MaxRow()))
+ if (rPos.Row() + nLength - 1 > o3tl::make_unsigned(rDoc.MaxRow()))
// out of bound
return false;