starmath/qa/cppunit/test_starmath.cxx | 4 ++-- starmath/source/dialog.cxx | 2 +- starmath/source/symbol.cxx | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit 0f2104cd745329852e6a6d9c93f6af7c5a8c646a Author: Takeshi Abe <t...@fixedpoint.jp> Date: Tue Jan 9 18:45:59 2018 +0900 starmath: getLength() > 0 -> !isEmpty() Change-Id: I72e56e8e8cad77084bf771df8d85cb7d85712437 Reviewed-on: https://gerrit.libreoffice.org/47640 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Takeshi Abe <t...@fixedpoint.jp> diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index e2ee4afeadd9..41fcf3d75f88 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -363,7 +363,7 @@ void Test::editUndoRedo() m_xDocShRef->Execute(aUndo); m_xDocShRef->UpdateText(); OUString sFinalText = m_xDocShRef->GetText(); - CPPUNIT_ASSERT_MESSAGE("Must now be empty", !sFinalText.getLength()); + CPPUNIT_ASSERT_MESSAGE("Must now be empty", sFinalText.isEmpty()); } SfxRequest aRedo(SID_REDO, SfxCallMode::SYNCHRON, SmDocShell::GetPool()); @@ -379,7 +379,7 @@ void Test::editUndoRedo() m_xDocShRef->UpdateText(); rEditEngine.ClearModifyFlag(); OUString sFinalText = m_xDocShRef->GetText(); - CPPUNIT_ASSERT_MESSAGE("Must be empty", !sFinalText.getLength()); + CPPUNIT_ASSERT_MESSAGE("Must be empty", sFinalText.isEmpty()); } } 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits