sw/source/filter/ww8/ww8par5.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit 6f2daecc5453cea0fa930d178e11328313961d08 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 7 17:08:27 2013 +0000 safe STRING_NOTFOUND -> -1 conversion Change-Id: I1afd5f4ef3b0001e28a6c0ce86f2fe927515fcf4 diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 837bf7b..666a0e9 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -262,8 +262,8 @@ static void lcl_ConvertSequenceName(OUString& rSequenceName) } // FindParaStart() finds 1st Parameter that follows '\' and cToken -// and returns start of this parameter or STRING_NOT_FOUND. -xub_StrLen FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 ) +// and returns start of this parameter or -1 +sal_Int32 FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 ) { bool bStr = false; // ignore inside a string @@ -283,10 +283,10 @@ xub_StrLen FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode && rStr[ nBuf ] == ' ' ) nBuf++; // return start of parameters - return nBuf < rStr.getLength() ? nBuf : STRING_NOTFOUND; + return nBuf < rStr.getLength() ? nBuf : -1; } } - return STRING_NOTFOUND; + return -1; } // FindPara() findet den ersten Parameter mit '\' und cToken. Es wird @@ -294,10 +294,10 @@ xub_StrLen FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode // und alles, was zum Parameter gehoert, wird in ihm zurueckgeliefert. OUString FindPara( const OUString& rStr, sal_Unicode cToken, sal_Unicode cToken2 ) { - xub_StrLen n2; // end - xub_StrLen n = FindParaStart( rStr, cToken, cToken2 ); // start - if( STRING_NOTFOUND == n ) - return aEmptyOUStr; + sal_Int32 n2; // end + sal_Int32 n = FindParaStart( rStr, cToken, cToken2 ); // start + if( n == -1) + return OUString(); if( rStr[ n ] == '"' || rStr[ n ] == 132 )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits