summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xestring.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/excel/xestring.cxx')
-rw-r--r--sc/source/filter/excel/xestring.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index 80a89af7a25d..45be12cbbcbf 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -20,6 +20,7 @@
#include <algorithm>
#include <cassert>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <tools/solar.h>
#include <xlstyle.hxx>
@@ -458,7 +459,7 @@ void XclExpString::SetStrLen( sal_Int32 nNewLen )
void XclExpString::CharsToBuffer( const sal_Unicode* pcSource, sal_Int32 nBegin, sal_Int32 nLen )
{
- OSL_ENSURE( maUniBuffer.size() >= static_cast< size_t >( nBegin + nLen ),
+ OSL_ENSURE( maUniBuffer.size() >= o3tl::make_unsigned( nBegin + nLen ),
"XclExpString::CharsToBuffer - char buffer invalid" );
ScfUInt16Vec::iterator aBeg = maUniBuffer.begin() + nBegin;
ScfUInt16Vec::iterator aEnd = aBeg + nLen;
@@ -475,7 +476,7 @@ void XclExpString::CharsToBuffer( const sal_Unicode* pcSource, sal_Int32 nBegin,
void XclExpString::CharsToBuffer( const char* pcSource, sal_Int32 nBegin, sal_Int32 nLen )
{
- OSL_ENSURE( maCharBuffer.size() >= static_cast< size_t >( nBegin + nLen ),
+ OSL_ENSURE( maCharBuffer.size() >= o3tl::make_unsigned( nBegin + nLen ),
"XclExpString::CharsToBuffer - char buffer invalid" );
ScfUInt8Vec::iterator aBeg = maCharBuffer.begin() + nBegin;
ScfUInt8Vec::iterator aEnd = aBeg + nLen;