binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx     |    2 -
 binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx |   26 +++++++++----------
 binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx    |    4 +-
 3 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 43e9388234d6294c67f399be86e6acd308f7b386
Author: August Sodora <aug...@gmail.com>
Date:   Thu Dec 1 18:53:37 2011 -0500

    Remove charAt/setCharAt from binfilter

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx 
b/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx
index 83fef26..4fd84db 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_crypter.cxx
@@ -72,7 +72,7 @@ void Crypter::Encrypt( rtl::OStringBuffer& r ) const
 
     while( nLen-- )
     {
-        r.setCharAt(i, r[i] ^ ( *p ^ (BYTE) ( cBuf[ 0 ] * nCryptPtr ) ));
+        r[i] = r[i] ^ ( *p ^ (BYTE) ( cBuf[ 0 ] * nCryptPtr ) );
         *p += ( nCryptPtr < (PASSWDLEN-1) ) ? *(p+1) : cBuf[ 0 ];
         if( !*p )
             *p += 1;
diff --git a/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx 
b/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
index 3ca6af4..7875e96 100644
--- a/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
+++ b/binfilter/bf_xmloff/source/style/xmloff_xmlnumfi.cxx
@@ -795,10 +795,10 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer& 
rContent, sal_uInt16 nFormat
     sal_Int32 nLength = rContent.getLength();
 
     if ( ( nLength == 1 &&
-            lcl_ValidChar( rContent.charAt(0), nFormatType ) ) ||
+            lcl_ValidChar( rContent[0], nFormatType ) ) ||
          ( nLength == 2 &&
-             lcl_ValidChar( rContent.charAt(0), nFormatType ) &&
-             rContent.charAt(1) == ' ' ) )
+             lcl_ValidChar( rContent[0], nFormatType ) &&
+             rContent[1] == ' ' ) )
     {
         //  don't quote single separator characters like space or percent,
         //  or separator characters followed by space (used in date formats)
@@ -815,7 +815,7 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer& 
rContent, sal_uInt16 nFormat
         {
             if ( nPos + 1 < nLength )
             {
-                if ( nPos + 2 == nLength && lcl_ValidChar( 
rContent.charAt(nPos + 1), nFormatType ) )
+                if ( nPos + 2 == nLength && lcl_ValidChar( rContent[nPos + 1], 
nFormatType ) )
                 {
                     //  single character that doesn't need quoting
                 }
@@ -828,7 +828,7 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer& 
rContent, sal_uInt16 nFormat
             }
             if ( nPos > 0 )
             {
-                if ( nPos == 1 && lcl_ValidChar( rContent.charAt(0), 
nFormatType ) )
+                if ( nPos == 1 && rContent.getLength() > 0 && lcl_ValidChar( 
rContent[0], nFormatType ) )
                 {
                     //  single character that doesn't need quoting
                 }
@@ -858,7 +858,7 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer& 
rContent, sal_uInt16 nFormat
             sal_Int32 nPos = 0;
             while ( nPos < rContent.getLength() )
             {
-                if ( rContent.charAt( nPos ) == (sal_Unicode) '"' )
+                if ( rContent[nPos] == (sal_Unicode) '"' )
                 {
                     rContent.insert( nPos, aInsert );
                     nPos += aInsert.getLength();
@@ -875,8 +875,8 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer& 
rContent, sal_uInt16 nFormat
         if ( bEscape )
         {
             if ( rContent.getLength() > 2 &&
-                 rContent.charAt(0) == (sal_Unicode) '"' &&
-                 rContent.charAt(1) == (sal_Unicode) '"' )
+                 rContent[0] == (sal_Unicode) '"' &&
+                 rContent[1] == (sal_Unicode) '"' )
             {
                 String aTrimmed( rContent.makeStringAndClear().copy(2) );
                 rContent = rtl::OUStringBuffer( aTrimmed );
@@ -884,8 +884,8 @@ void lcl_EnquoteIfNecessary( ::rtl::OUStringBuffer& 
rContent, sal_uInt16 nFormat
 
             sal_Int32 nLen = rContent.getLength();
             if ( nLen > 2 &&
-                 rContent.charAt(nLen-1) == (sal_Unicode) '"' &&
-                 rContent.charAt(nLen-2) == (sal_Unicode) '"' )
+                 rContent[nLen - 1] == (sal_Unicode) '"' &&
+                 rContent[nLen - 2] == (sal_Unicode) '"' )
             {
                 String aTrimmed( rContent.makeStringAndClear().copy( 0, nLen - 
2 ) );
                 rContent = rtl::OUStringBuffer( aTrimmed );
@@ -1827,14 +1827,14 @@ void SvXMLNumFormatContext::AddCurrency( const 
::rtl::OUString& rContent, Langua
         //  otherwise the currency symbol isn't recognized (#94048#)
 
         sal_Int32 nLength = aFormatCode.getLength();
-        if ( nLength > 1 && aFormatCode.charAt( nLength-1 ) == '"' )
+        if ( nLength > 1 && aFormatCode[nLength - 1] == '"' )
         {
             //  find start of quoted string
             //  When SvXMLNumFmtElementContext::EndElement creates escaped 
quotes,
             //  they must be handled here, too.
 
             sal_Int32 nFirst = nLength - 2;
-            while ( nFirst >= 0 && aFormatCode.charAt( nFirst ) != '"' )
+            while ( nFirst >= 0 && nFirst < nLength && aFormatCode[nFirst] != 
'"' )
                 --nFirst;
             if ( nFirst >= 0 )
             {
@@ -1936,7 +1936,7 @@ sal_Bool lcl_IsAtEnd( ::rtl::OUStringBuffer& rBuffer, 
const String& rToken )
 
     sal_Int32 nStartPos = nTokLen - nBufLen;
     for ( xub_StrLen nTokPos = 0; nTokPos < nTokLen; nTokPos++ )
-        if ( rToken.GetChar( nTokPos ) != rBuffer.charAt( nStartPos + nTokPos 
) )
+        if ( rToken.GetChar( nTokPos ) != rBuffer[nStartPos + nTokPos] )
             return sal_False;
 
     return sal_True;
diff --git a/binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx 
b/binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx
index b632d21..6fe1441 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_txtimp.cxx
@@ -794,12 +794,12 @@ OUString XMLTextImportHelper::ConvertStarFonts( const 
OUString& rChars,
             }
             if( (rFlags & CONV_FROM_STAR_BATS ) != 0 )
             {
-                sChars.setCharAt( i, rImport.ConvStarBatsCharToStarSymbol( c ) 
);
+                sChars[i] = rImport.ConvStarBatsCharToStarSymbol( c );
                 bConverted = sal_True;
             }
             else if( (rFlags & CONV_FROM_STAR_MATH ) != 0 )
             {
-                sChars.setCharAt( i, rImport.ConvStarMathCharToStarSymbol( c ) 
);
+                sChars[i] = rImport.ConvStarMathCharToStarSymbol( c );
                 bConverted = sal_True;
             }
         }
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to