remove unnecessary use of OUString constructor in equalsIgnoreAsciiCase
Convert code like:
sType.equalsIgnoreAsciiCase(OUString("VIEW"));
to:
sType.equalsIgnoreAsciiCase("VIEW");
Change-Id: I6fb47e6a83b561c7e5a25da76b63606a3174858d
This commit is contained in:
@@ -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 >() );
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() );
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user