Replace empty equalsAscii() with getLength().

This commit is contained in:
Thomas Arnhold 2011-01-28 15:17:24 +01:00
parent 99352eddaf
commit 0787bb32a9
2 changed files with 4 additions and 4 deletions

View file

@ -361,7 +361,7 @@ void ScHTMLExport::WriteHeader()
OUT_LF();
//----------------------------------------------------------
if (!xDocProps->getPrintedBy().equalsAscii(""))
if (xDocProps->getPrintedBy().getLength())
{
OUT_COMMENT( GLOBSTR( STR_DOC_INFO ) );
String aStrOut( GLOBSTR( STR_DOC_PRINTED ) );

View file

@ -1629,10 +1629,10 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
sal_Int32 nSemicolonID = 0;
::rtl::OUString sFirstFilter = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
::rtl::OUString sFileExtension = aURLObj.GetExtension();
if ( sFileExtension.equalsAscii("") )
if ( sFileExtension.getLength() == 0 )
{
sFileExtension = sFirstFilter.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*.*")) ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
aPathStr = sFileExtension.equalsAscii("") ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
aPathStr = sFileExtension.getLength() == 0 ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
else
{
@ -1661,7 +1661,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
{
sFileExtension = sFirstFilter.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*.*")) ? rtl::OUString()
: sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
aPathStr = sFileExtension.equalsAscii("") ? aPathStr
aPathStr = sFileExtension.getLength() == 0 ? aPathStr
: aPathStr + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
}