diff options
Diffstat (limited to 'sw/source/core/unocore/unoredlines.cxx')
-rw-r--r-- | sw/source/core/unocore/unoredlines.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx index 9e1db2b8e637..bbab06ed6a13 100644 --- a/sw/source/core/unocore/unoredlines.cxx +++ b/sw/source/core/unocore/unoredlines.cxx @@ -22,6 +22,7 @@ #include <cppuhelper/supportsservice.hxx> #include <vcl/svapp.hxx> +#include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <unoredlines.hxx> @@ -59,7 +60,7 @@ uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex) if(!IsValid()) throw uno::RuntimeException(); const SwRedlineTable& rRedTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable(); - if ((rRedTable.size() <= static_cast<size_t>(nIndex)) || (nIndex < 0)) + if ((nIndex < 0) || (rRedTable.size() <= o3tl::make_unsigned(nIndex))) throw lang::IndexOutOfBoundsException(); uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTable[nIndex], *GetDoc() ); |