diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2018-01-09 18:45:59 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2018-01-11 12:54:11 +0100 |
commit | 0f2104cd745329852e6a6d9c93f6af7c5a8c646a (patch) | |
tree | 6cc47282098f2379c0f13ab0246269db530425cb /starmath/source | |
parent | e57a036939e27ecd173ace691689e26a6a33df8e (diff) |
starmath: getLength() > 0 -> !isEmpty()
Change-Id: I72e56e8e8cad77084bf771df8d85cb7d85712437
Reviewed-on: https://gerrit.libreoffice.org/47640
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/dialog.cxx | 2 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 3a92349c82f1..ca70ff1626c8 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1929,7 +1929,7 @@ void SmSymDefineDialog::UpdateButtons() OUString aTmpSymbolName (pSymbols->GetText()), aTmpSymbolSetName (pSymbolSets->GetText()); - if (aTmpSymbolName.getLength() > 0 && aTmpSymbolSetName.getLength() > 0) + if (!aTmpSymbolName.isEmpty() && !aTmpSymbolSetName.isEmpty()) { // are all settings equal? //! (Font-, Style- and SymbolSet name comparison is not case sensitive) diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 92c799d90411..d989595cc14e 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -137,7 +137,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang bool bAdded = false; const OUString& aSymbolName( rSymbol.GetName() ); - if (aSymbolName.getLength() > 0 && rSymbol.GetSymbolSetName().getLength() > 0) + if (!aSymbolName.isEmpty() && !rSymbol.GetSymbolSetName().isEmpty()) { const SmSym *pFound = GetSymbolByName( aSymbolName ); const bool bSymbolConflict = pFound && !pFound->IsEqualInUI( rSymbol ); @@ -170,7 +170,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang void SmSymbolManager::RemoveSymbol( const OUString & rSymbolName ) { - if (rSymbolName.getLength() > 0) + if (!rSymbolName.isEmpty()) { size_t nOldSize = m_aSymbols.size(); m_aSymbols.erase( rSymbolName ); @@ -192,7 +192,7 @@ std::set< OUString > SmSymbolManager::GetSymbolSetNames() const const SymbolPtrVec_t SmSymbolManager::GetSymbolSet( const OUString& rSymbolSetName ) { SymbolPtrVec_t aRes; - if (rSymbolSetName.getLength() > 0) + if (!rSymbolSetName.isEmpty()) { SymbolMap_t::const_iterator aIt( m_aSymbols.begin() ); for ( ; aIt != m_aSymbols.end(); ++aIt ) @@ -216,8 +216,8 @@ void SmSymbolManager::Load() for (size_t i = 0; i < nSymbolCount; ++i) { const SmSym &rSym = aSymbols[i]; - OSL_ENSURE( rSym.GetName().getLength() > 0, "symbol without name!" ); - if (rSym.GetName().getLength() > 0) + OSL_ENSURE( !rSym.GetName().isEmpty(), "symbol without name!" ); + if (!rSym.GetName().isEmpty()) AddOrReplaceSymbol( rSym ); } m_bModified = true; |