summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xehelper.cxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-02-02 22:16:48 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-02-03 07:44:28 +0000
commit3cbfcee36dd16e451d76c561eaaaee0ff29b01a5 (patch)
tree7377a9e1d8cd56279104429abce73aec334569d5 /sc/source/filter/excel/xehelper.cxx
parent5c39b6b997ddc85e6848efc230a427a124b97264 (diff)
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 <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sc/source/filter/excel/xehelper.cxx')
-rw-r--r--sc/source/filter/excel/xehelper.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index efdc6d80c15c..b46c5fe243fe 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -388,7 +388,7 @@ XclExpStringRef lclCreateFormattedString(
SvxFont aFont( XclExpFontHelper::GetFontFromItemSet( rRoot, rItemSet, nScript ) );
// Excel start position of this portion
- sal_uInt16 nXclPortionStart = xString->Len();
+ sal_Int32 nXclPortionStart = xString->Len();
// add portion text to Excel string
XclExpStringHelper::AppendString( *xString, rRoot, aOUText.copy( nPortionPos, nPortionEnd - nPortionPos ) );
if( nXclPortionStart < xString->Len() )
@@ -446,13 +446,13 @@ XclExpStringRef lclCreateFormattedString(
ESelection aSel( nPara, 0 );
OUString aParaText( rEE.GetText( nPara ) );
- std::vector<sal_uInt16> aPosList;
+ std::vector<sal_Int32> aPosList;
rEE.GetPortions( nPara, aPosList );
// process all portions in the paragraph
- for( std::vector<sal_uInt16>::const_iterator it(aPosList.begin()); it != aPosList.end(); ++it )
+ for( std::vector<sal_Int32>::const_iterator it(aPosList.begin()); it != aPosList.end(); ++it )
{
- aSel.nEndPos = static_cast< xub_StrLen >( *it );
+ aSel.nEndPos = *it;
OUString aXclPortionText = aParaText.copy( aSel.nStartPos, aSel.nEndPos - aSel.nStartPos );
aItemSet.ClearItem();
@@ -488,7 +488,7 @@ XclExpStringRef lclCreateFormattedString(
}
// Excel start position of this portion
- sal_uInt16 nXclPortionStart = xString->Len();
+ sal_Int32 nXclPortionStart = xString->Len();
// add portion text to Excel string
XclExpStringHelper::AppendString( *xString, rRoot, aXclPortionText );
if( (nXclPortionStart < xString->Len()) || (aParaText.isEmpty()) )
@@ -719,12 +719,12 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
ESelection aSel( nPara, 0 );
OUString aParaText;
sal_Int32 nParaHeight = 0;
- std::vector<sal_uInt16> aPosList;
+ std::vector<sal_Int32> aPosList;
mrEE.GetPortions( nPara, aPosList );
- for( std::vector<sal_uInt16>::const_iterator it( aPosList.begin() ); it != aPosList.end(); ++it )
+ for( std::vector<sal_Int32>::const_iterator it( aPosList.begin() ); it != aPosList.end(); ++it )
{
- aSel.nEndPos = static_cast< xub_StrLen >( *it );
+ aSel.nEndPos = *it;
if( aSel.nStartPos < aSel.nEndPos )
{