diff options
Diffstat (limited to 'sc/source/ui/unoobj/chart2uno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index ab8ae531690e..b1cbba83bb77 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -44,6 +44,7 @@ #include <brdcst.hxx> #include <formula/opcode.hxx> +#include <o3tl/safeint.hxx> #include <svl/sharedstring.hxx> #include <sfx2/objsh.hxx> @@ -164,7 +165,7 @@ struct TokenTable void push_back( std::unique_ptr<FormulaToken> pToken ) { maTokens.push_back( std::move(pToken) ); - OSL_ENSURE( maTokens.size()<= static_cast<sal_uInt32>( mnColCount*mnRowCount ), "too many tokens" ); + OSL_ENSURE( maTokens.size()<= o3tl::make_unsigned( mnColCount*mnRowCount ), "too many tokens" ); } sal_uInt32 getIndex(SCCOL nCol, SCROW nRow) const @@ -172,7 +173,7 @@ struct TokenTable OSL_ENSURE( nCol<mnColCount, "wrong column index" ); OSL_ENSURE( nRow<mnRowCount, "wrong row index" ); sal_uInt32 nRet = static_cast<sal_uInt32>(nCol*mnRowCount + nRow); - OSL_ENSURE( maTokens.size()>= static_cast<sal_uInt32>( mnColCount*mnRowCount ), "too few tokens" ); + OSL_ENSURE( maTokens.size()>= o3tl::make_unsigned( mnColCount*mnRowCount ), "too few tokens" ); return nRet; } |