sc/source/ui/dbgui/csvgrid.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 58d3e62455416f4bfa71719f09dd8c3938cd8053 Author: Eike Rathke <er...@redhat.com> Date: Tue Mar 26 20:42:24 2013 +0100 fixed some 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10 brokenness 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10 changed String::GetToken() to expect and return a sal_Int32 and return -1 instead of STRING_NOTFOUND. So far so good though not consistent, but unfortunately it also replaced STRING_NOTFOUND with -1 in a few other places like where String::Search() is called but that still returns STRING_NOTFOUND ... Change-Id: I1ef1891cef220c1f1f9032af173d80f3f0e29e71 diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 74eaac2..428aa75 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -1072,11 +1072,11 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText ) U+0020 may be drawn with a wrong width (from non-fixed-width Asian or Complex font). Now we draw every non-space portion separately. */ xub_StrLen nTokenCount = comphelper::string::getTokenCount(aPlainText, ' '); - sal_Int32 nCharIx = 0; + sal_Int32 nCharIxInt = 0; for( xub_StrLen nToken = 0; nToken < nTokenCount; ++nToken ) { - sal_Int32 nBeginIx = nCharIx; - String aToken = aPlainText.GetToken( 0, ' ', nCharIx ); + sal_Int32 nBeginIx = nCharIxInt; + String aToken = aPlainText.GetToken( 0, ' ', nCharIxInt ); if( aToken.Len() > 0 ) { sal_Int32 nX = rPos.X() + GetCharWidth() * nBeginIx; @@ -1085,8 +1085,8 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText ) } } - nCharIx = 0; - while( (nCharIx = rText.Search( '\t', nCharIx )) != -1 ) + xub_StrLen nCharIx = 0; + while( (nCharIx = rText.Search( '\t', nCharIx )) != STRING_NOTFOUND ) { sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx; sal_Int32 nX2 = nX1 + GetCharWidth() - 2; @@ -1099,7 +1099,7 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText ) ++nCharIx; } nCharIx = 0; - while( (nCharIx = rText.Search( '\n', nCharIx )) != -1 ) + while( (nCharIx = rText.Search( '\n', nCharIx )) != STRING_NOTFOUND ) { sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx; sal_Int32 nX2 = nX1 + GetCharWidth() - 2; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits