diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-01-21 19:57:19 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-01-21 19:58:46 +0100 |
commit | 22da27d9ddcdacaef21d667b0777052b7e817b9a (patch) | |
tree | e72e427eb7b6934b796179ed3e49ca4a8c8734a6 /cui | |
parent | cfc2f1919f8cf856c0c884dac7e4eb83bece4a7f (diff) |
Improve checking for emptiness
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 2f66b410919e..a336a4b89658 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1181,7 +1181,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) if(!bUseSavedSentence) m_aSavedSentence = aSentence; bool bHasReplaced = false; - while(aSentence.size()) + while(!aSentence.empty()) { //apply all changes that are already part of the "ChangeAllList" //returns true if the list still contains errors after the changes have been applied @@ -1195,7 +1195,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) break; } - if(aSentence.size()) + if(!aSentence.empty()) { SpellPortions::iterator aStart = aSentence.begin(); rtl::OUString sText; diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 47d3ba82d1a5..ba841629ec99 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -1217,7 +1217,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG ) else aCbxPreview.Disable(); - if( aFoundList.size() ) + if( !aFoundList.empty() ) aBtnTakeAll.Enable(); else aBtnTakeAll.Disable(); @@ -1258,7 +1258,7 @@ IMPL_LINK( TPGalleryThemeProperties, PreviewTimerHdl, void *, EMPTYARG ) IMPL_LINK( TPGalleryThemeProperties, EndSearchProgressHdl, SearchProgress *, EMPTYARG ) { - if( aFoundList.size() ) + if( !aFoundList.empty() ) { aLbxFound.SelectEntryPos( 0 ); aBtnTakeAll.Enable(); |