From 3cbfcee36dd16e451d76c561eaaaee0ff29b01a5 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sun, 2 Feb 2014 22:16:48 -0600 Subject: xub_StrLen and tools/string.hxx final straw Thre is still some 0xffff limit left and possibly some less than gracefully handled overflow/error cases Change-Id: I00957ee3a30b02f73918ea49d7353056263dc638 Reviewed-on: https://gerrit.libreoffice.org/7787 Reviewed-by: Norbert Thiebaud Tested-by: Norbert Thiebaud --- chart2/source/view/axes/VCartesianAxis.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'chart2') diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index be3922b2572c..71a816d41ca1 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -348,14 +348,15 @@ bool lcl_hasWordBreak( const Reference< drawing::XShape >& rxShape ) sal_Int32 nParaCount = pTextForwarder->GetParagraphCount(); for ( sal_Int32 nPara = 0; nPara < nParaCount; ++nPara ) { - sal_uInt16 nLineCount = pTextForwarder->GetLineCount( nPara ); - for ( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine ) + sal_Int32 nLineCount = pTextForwarder->GetLineCount( nPara ); + for ( sal_Int32 nLine = 0; nLine < nLineCount; ++nLine ) { - sal_uInt16 nLineStart = 0; - sal_uInt16 nLineEnd = 0; + sal_Int32 nLineStart = 0; + sal_Int32 nLineEnd = 0; pTextForwarder->GetLineBoundaries( nLineStart, nLineEnd, nPara, nLine ); - sal_uInt16 nWordStart = 0; - sal_uInt16 nWordEnd = 0; + assert(nLineStart >= 0); + sal_Int32 nWordStart = 0; + sal_Int32 nWordEnd = 0; if ( pTextForwarder->GetWordIndices( nPara, nLineStart, nWordStart, nWordEnd ) && ( nWordStart != nLineStart ) ) { -- cgit