[Libreoffice] [PUSHED] [PATCH] Removing uses of OUString::setCharAt

Thorsten Behrens thb at documentfoundation.org
Thu Dec 1 02:16:26 PST 2011


Hi August,

great cleanup, and nicer error handling for sure - pushed as-is, one
question though:

> --- a/dbaccess/source/filter/xml/xmlExport.cxx
> +++ b/dbaccess/source/filter/xml/xmlExport.cxx
> @@ -565,8 +565,8 @@ void ODBExport::exportConnectionData()
>                  {
>                      ::svt::OFileNotation aTransformer( sFileName );
>                      ::rtl::OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) );
> -                    if ( sURL.charAt(sURL.getLength()-1) != '/' )
> -                        sURL.append(sal_Unicode('/'));
> +                    if (sURL[sURL.getLength() - 1] != '/')
> +                        sURL.append('/');
>  
>                      AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));
>                  }
That one does not seem to check for sURL.getLength() being > 0
before - or is that ensured externally?

Cheers,

-- Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111201/bf86f1a8/attachment.pgp>


More information about the LibreOffice mailing list