Drop comparison with empty rtl::OUString

This commit is contained in:
Takeshi Abe 2012-02-29 01:15:16 +09:00
parent 51af20c8b4
commit a138709519
4 changed files with 5 additions and 5 deletions

View file

@ -162,7 +162,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
rLangItems.clear();
//1--add current language
if( rCurLang != OUString() &&
if( !rCurLang.isEmpty() &&
LANGUAGE_DONTKNOW != rLanguageTable.GetType( rCurLang ))
rLangItems.insert( rCurLang );
@ -195,7 +195,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
}
//5--keyboard language
if( rKeyboardLang != OUString())
if( !rKeyboardLang.isEmpty() )
{
if ( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rKeyboardLang )))
rLangItems.insert( rKeyboardLang );

View file

@ -1188,7 +1188,7 @@ void createJavaInfoDirScan(vector<rtl::Reference<VendorBase> >& vecInfos)
{
OUString usDir2(usDir1 + arCollectDirs[j]);
// prevent that we scan the whole /usr, /usr/lib, etc directories
if (arCollectDirs[j] != OUString())
if (!arCollectDirs[j].isEmpty())
{
//usr/java/xxx
//Examin every subdirectory

View file

@ -225,7 +225,7 @@ void SwSpellPopup::fillLangPopupMenu(
OUString aKeyboardLang( aSeq[2] );
OUString aGuessedTextLang( aSeq[3] );
if (aCurLang != OUString() &&
if (!aCurLang.isEmpty() &&
LANGUAGE_DONTKNOW != aLanguageTable.GetType( aCurLang ))
aLangItems.insert( aCurLang );

View file

@ -603,7 +603,7 @@ BaseContent::addProperty(
lang::IllegalArgumentException,
RuntimeException)
{
if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name == rtl::OUString() )
if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name.isEmpty() )
{
throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 );
}