lotuswordpro/source/filter/lwpfilter.cxx | 16 ++++++++-------- sw/source/filter/ww8/rtfimportfilter.cxx | 2 +- writerfilter/source/filter/WriterFilterDetection.cxx | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit 39c2a52d198f513c2f5afbd38dd9b14bff388d6e Author: Julien Nabet <serval2...@yahoo.fr> Date: Sat Mar 3 14:56:17 2012 +0100 Avoid temporary rtl::OUString diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index 1f66f94..dc2bfee 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -114,7 +114,7 @@ sal_Bool LWPFilterReader::filter( const Sequence< PropertyValue >& aDescriptor ) for( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ ) { //Note we should attempt to use "InputStream" if it exists first! - if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) + if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) ) aDescriptor[i].Value >>= sURL; } @@ -218,11 +218,11 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro sal_Int32 nPropertyCount = aDescriptor.getLength(); for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty ) { - if( aDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) ) + if( aDescriptor[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TypeName")) ) { aDescriptor[nProperty].Value >>= aTypeName; } - else if( aDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")) ) + else if( aDescriptor[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AsTemplate")) ) { bOpenAsTemplate = sal_True; } @@ -232,17 +232,17 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro { OUString strTemp; aDescriptor[i].Value >>= strTemp; - if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) ) + if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InputStream")) ) { uno::Reference< XInputStream> rInputStream; aDescriptor[i].Value >>= rInputStream; // - // TRANSFORM IMPLEMENTATION HERE!!!!!! + // TODO TRANSFORM IMPLEMENTATION HERE!!!!!! // and call m_DocumentHandler's SAX mDochods // if( IsWordproFile(rInputStream) ) { - if( aTypeName == OUString(RTL_CONSTASCII_USTRINGPARAM("wordpro_template")) ) + if( aTypeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("wordpro_template")) ) { if(!bOpenAsTemplate) { @@ -259,7 +259,7 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro } return ret; } - else if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) + else if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) ) { OUString sURL; OUString sFileName; @@ -277,7 +277,7 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro //end with .lwp: if( IsWordproFile(sURL) ) { - if( aTypeName == OUString(RTL_CONSTASCII_USTRINGPARAM("wordpro_template")) ) + if( aTypeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("wordpro_template")) ) { if(!bOpenAsTemplate) { diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx index 25f0a78..e3b553b 100644 --- a/sw/source/filter/ww8/rtfimportfilter.cxx +++ b/sw/source/filter/ww8/rtfimportfilter.cxx @@ -84,7 +84,7 @@ sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& a OUString sTemp; for ( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ ) { - if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) + if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) ) { aDescriptor[i].Value >>= sTemp; aURL = sTemp; diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx index ff2e22e..f9d9ca4 100644 --- a/writerfilter/source/filter/WriterFilterDetection.cxx +++ b/writerfilter/source/filter/WriterFilterDetection.cxx @@ -71,7 +71,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r uno::Reference < io::XInputStream > xInputStream; for( sal_Int32 nProperty = 0; nProperty < nPropertyCount; ++nProperty ) { - if( pValues[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) ) + if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TypeName")) ) rDescriptor[nProperty].Value >>= sTypeName; else if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "URL" )) ) pValues[nProperty].Value >>= sURL; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits