diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp index f8a35e3287..10013b96b5 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp @@ -698,9 +698,9 @@ void SheetTableView::copySelection() void SheetTableView::_copySelection(const std::vector& ranges, bool copy) { - int minRow = INT_MAX; + int minRow = std::numeric_limits::max(); int maxRow = 0; - int minCol = INT_MAX; + int minCol = std::numeric_limits::max(); int maxCol = 0; for (auto& range : ranges) { minRow = std::min(minRow, range.from().row());