diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-21 14:27:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-22 08:07:18 +0200 |
commit | 071c3f3e93c4c00cf57ce3c382325cd717fed511 (patch) | |
tree | e33a2586b719137ba2521675704562673e1d5168 | |
parent | 2241fd5302c1ec83c8cbaa2422a477628a569aab (diff) |
remove unnecessary use of OUString constructor in equalsIgnoreAsciiCase
Convert code like:
sType.equalsIgnoreAsciiCase(OUString("VIEW"));
to:
sType.equalsIgnoreAsciiCase("VIEW");
Change-Id: I6fb47e6a83b561c7e5a25da76b63606a3174858d
-rw-r--r-- | cpputools/source/unoexe/unoexe.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/tablecontainer.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/help/dp_help.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbapagesetup.cxx | 2 | ||||
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 22 | ||||
-rw-r--r-- | svx/source/xml/xmleohlp.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfSession.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_transferable.cxx | 4 |
10 files changed, 27 insertions, 27 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index e02003a995e9..d7dc202b6e8a 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -479,7 +479,7 @@ SAL_IMPLEMENT_MAIN() sal_Int32 nIndex = 0, nTokens = 0; do { aUnoUrl.getToken( 0, ';', nIndex ); nTokens++; } while( nIndex != -1 ); if (nTokens != 3 || aUnoUrl.getLength() < 10 || - !aUnoUrl.copy( 0, 4 ).equalsIgnoreAsciiCase( OUString("uno:") )) + !aUnoUrl.copy( 0, 4 ).equalsIgnoreAsciiCase( "uno:" )) { throw RuntimeException("illegal uno url given!", Reference< XInterface >() ); } diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 32400c8f6b83..219f0dd900d7 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -380,7 +380,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const OUString _sElementName) OUString sType; xTable->getPropertyValue(PROPERTY_TYPE) >>= sType; - bIsView = sType.equalsIgnoreAsciiCase(OUString("VIEW")); + bIsView = sType.equalsIgnoreAsciiCase("VIEW"); } if(sComposedName.isEmpty()) diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index b7978bf7d598..47dfc2dd6c3b 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -590,7 +590,7 @@ void BackendImpl::implCollectXhpFiles( const OUString& aDir, if( nLastDot != -1 ) { OUString aExt = aURL.copy( nLastDot + 1 ); - if( aExt.equalsIgnoreAsciiCase( OUString("xhp" ) ) ) + if( aExt.equalsIgnoreAsciiCase( "xhp" ) ) o_rXhpFileVector.push_back( aURL ); } } diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index a73551223613..d3c1c0e8d676 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -93,7 +93,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const OUString& rAreas ) throw (css: { uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW ); if( rAreas.isEmpty() || - rAreas.equalsIgnoreAsciiCase ( OUString("FALSE") ) ) + rAreas.equalsIgnoreAsciiCase( "FALSE" ) ) { // print the whole sheet uno::Sequence< table::CellRangeAddress > aSeq; diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 57bdff8b933e..b0c01c34e35d 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -751,12 +751,12 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina case TypeClass_STRING: { const OUString & aStr = *(const OUString *)rVal.getValue(); - if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( OUString("false") )) + if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( "false" )) { sal_Bool bFalse = sal_False; aRet.setValue( &bFalse, getCppuBooleanType() ); } - else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( OUString("true") )) + else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( "true" )) { sal_Bool bTrue = sal_True; aRet.setValue( &bTrue, getCppuBooleanType() ); diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 6a8df65566c9..3e3693dc6f40 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -1408,33 +1408,33 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor aFlavorEx.mnSotId = SOT_FORMATSTR_ID_HTML_NO_COMMENT; rDataFlavorExVector.push_back( aFlavorEx ); } - else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/plain" ) ) ) + else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) ) { // add, if it is a UTF-8 byte buffer if( xMimeType->hasParameter( aCharsetStr ) ) { - if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( OUString( "unicode" ) ) || - xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( OUString( "utf-16" ) ) ) + if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( "unicode" ) || + xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( "utf-16" ) ) { rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_STRING; } } } - else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/rtf" ) ) ) + else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/rtf" ) ) { rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_RTF; } - else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/html" ) ) ) + else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/html" ) ) { rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_HTML; } - else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/uri-list" ) ) ) + else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/uri-list" ) ) { rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMAT_FILE_LIST; } - else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( OUString( "application/x-openoffice-objectdescriptor-xml" ) ) ) + else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice-objectdescriptor-xml" ) ) { rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_OBJECTDESCRIPTOR; } @@ -2338,19 +2338,19 @@ sal_Bool TransferableDataHelper::IsEqual( const ::com::sun::star::datatransfer:: { if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( xRequestType2->getFullMediaType() ) ) { - if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( OUString( "text/plain" ) ) ) + if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) ) { // special handling for text/plain media types const OUString aCharsetString( "charset" ); if( !xRequestType2->hasParameter( aCharsetString ) || - xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( OUString( "utf-16" ) ) || - xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( OUString( "unicode" ) ) ) + xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( "utf-16" ) || + xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( "unicode" ) ) { bRet = sal_True; } } - else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( OUString( "application/x-openoffice" ) ) ) + else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice" ) ) { // special handling for application/x-openoffice media types const OUString aFormatString( "windows_formatname" ); diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index 6feddd42a055..757adbb798ca 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -264,7 +264,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames( while( nPos >= 0 && nPos < rURLStr.getLength() ) { OUString aToken = rURLStr.getToken( 0, ',', nPos ); - if ( aToken.equalsIgnoreAsciiCase( OUString( "oasis=false" ) ) ) + if ( aToken.equalsIgnoreAsciiCase( "oasis=false" ) ) { if ( pOasisFormat ) *pOasisFormat = sal_False; diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx index 0df25d3769de..008b6f13d7ff 100644 --- a/ucb/source/ucp/webdav/SerfSession.cxx +++ b/ucb/source/ucp/webdav/SerfSession.cxx @@ -207,7 +207,7 @@ bool SerfSession::isHeadRequestInProgress() bool SerfSession::isSSLNeeded() { - return m_aUri.GetScheme().equalsIgnoreAsciiCase( OUString( "https" ) ); + return m_aUri.GetScheme().equalsIgnoreAsciiCase( "https" ); } char* SerfSession::getHostinfo() diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 572d4b9928d8..5c59a93a6211 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4448,21 +4448,21 @@ we check in the following sequence: { bool bChangeFileExtensionToPDF = false; //examine the file type (.odm .odt. .odp, odg, ods) - if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odm" ) ) ) + if( aFileExtension.equalsIgnoreAsciiCase( "odm" ) ) bChangeFileExtensionToPDF = true; - if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odt" ) ) ) + if( aFileExtension.equalsIgnoreAsciiCase( "odt" ) ) bChangeFileExtensionToPDF = true; - else if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odp" ) ) ) + else if( aFileExtension.equalsIgnoreAsciiCase( "odp" ) ) bChangeFileExtensionToPDF = true; - else if( aFileExtension.equalsIgnoreAsciiCase(OUString( "odg" ) ) ) + else if( aFileExtension.equalsIgnoreAsciiCase( "odg" ) ) bChangeFileExtensionToPDF = true; - else if( aFileExtension.equalsIgnoreAsciiCase(OUString( "ods" ) ) ) + else if( aFileExtension.equalsIgnoreAsciiCase( "ods" ) ) bChangeFileExtensionToPDF = true; if( bChangeFileExtensionToPDF ) aTargetURL.setExtension(OUString( "pdf" ) ); } //check if extension is pdf, see if GoToR should be forced - bTargetHasPDFExtension = aTargetURL.GetFileExtension().equalsIgnoreAsciiCase(OUString( "pdf" ) ); + bTargetHasPDFExtension = aTargetURL.GetFileExtension().equalsIgnoreAsciiCase( "pdf" ); if( m_aContext.ForcePDFAction && bTargetHasPDFExtension ) nSetGoToRMode++; } diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx index bcf54b664d0f..34bdd27a0068 100644 --- a/vcl/unx/generic/dtrans/X11_transferable.cxx +++ b/vcl/unx/generic/dtrans/X11_transferable.cxx @@ -67,7 +67,7 @@ Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor ) { throw UnsupportedFlavorException( rFlavor.MimeType, static_cast < XTransferable * > ( this ) ); } - if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString("text/plain;charset=utf-16") ) ) + if( rFlavor.MimeType.equalsIgnoreAsciiCase( "text/plain;charset=utf-16" ) ) { int nLen = aData.getLength()/2; if( ((sal_Unicode*)aData.getConstArray())[nLen-1] == 0 ) @@ -105,7 +105,7 @@ sal_Bool SAL_CALL X11Transferable::isDataFlavorSupported( const DataFlavor& aFla { if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) ) { - if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString("text/plain;charset=utf-16") ) && + if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( "text/plain;charset=utf-16" ) && aFlavor.DataType == getCppuType( (OUString*)0 ) ) return false; } |