Kaydet (Commit) 0f2104cd authored tarafından Takeshi Abe's avatar Takeshi Abe

starmath: getLength() > 0 -> !isEmpty()

Change-Id: I72e56e8e8cad77084bf771df8d85cb7d85712437
Reviewed-on: https://gerrit.libreoffice.org/47640Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTakeshi Abe <tabe@fixedpoint.jp>
üst e57a0369
......@@ -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());
}
}
......
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment