summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-13 09:55:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-13 11:03:14 +0200
commita394d67f374e1b253f288a58113a3cfc8d301743 (patch)
tree91190e8212fc72b1c91a0e629c3504f59095d71b /cui/source
parent8a75aa52ef572655db261679da431aff84f52348 (diff)
use more OUString::operator== comphelper..cui
Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa Reviewed-on: https://gerrit.libreoffice.org/39888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/cfg.cxx14
-rw-r--r--cui/source/customize/cfgutil.cxx10
-rw-r--r--cui/source/dialogs/SpellAttrib.hxx14
-rw-r--r--cui/source/dialogs/SpellDialog.cxx8
-rw-r--r--cui/source/dialogs/colorpicker.cxx4
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx2
-rw-r--r--cui/source/dialogs/scriptdlg.cxx8
-rw-r--r--cui/source/options/certpath.cxx2
-rw-r--r--cui/source/options/connpoolconfig.cxx2
-rw-r--r--cui/source/options/optaboutconfig.cxx12
-rw-r--r--cui/source/options/optgdlg.cxx4
-rw-r--r--cui/source/options/optupdt.cxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx4
13 files changed, 43 insertions, 43 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index d4788d7bf6ed..af75d2a2af30 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -273,7 +273,7 @@ generateCustomName(
{
SvxConfigEntry* pEntry = *iter;
- if ( name.equals( pEntry->GetName() ) )
+ if ( name == pEntry->GetName() )
{
break;
}
@@ -311,7 +311,7 @@ generateCustomURL(
{
SvxConfigEntry* pEntry = *iter;
- if ( url.equals( pEntry->GetCommand() ) )
+ if ( url == pEntry->GetCommand() )
{
break;
}
@@ -343,7 +343,7 @@ generateCustomMenuURL(
{
SvxConfigEntry* pEntry = *iter;
- if ( url.equals( pEntry->GetCommand() ) )
+ if ( url == pEntry->GetCommand() )
{
break;
}
@@ -1894,7 +1894,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
} catch(const uno::Exception&)
{ aCheckId.clear(); }
- if ( aModuleId.equals( aCheckId ) )
+ if ( aModuleId == aCheckId )
{
// try to get the document based ui configuration manager
OUString aTitle2;
@@ -3355,7 +3355,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
OUString aSystemName =
pSaveInData->GetSystemUIName( pEntry->GetCommand() );
- if ( !pEntry->GetName().equals( aSystemName ) )
+ if ( pEntry->GetName() != aSystemName )
{
pEntry->SetName( aSystemName );
m_pContentsListBox->SetEntryText(
@@ -3550,7 +3550,7 @@ void SvxToolbarConfigPage::Init()
SvxConfigEntry* pData =
static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( i ));
- if ( pData->GetCommand().equals( m_aURLToSelect ) )
+ if ( pData->GetCommand() == m_aURLToSelect )
{
nPos = i;
break;
@@ -3980,7 +3980,7 @@ ToolbarSaveInData::HasURL( const OUString& rURL )
{
SvxConfigEntry* pEntry = *iter;
- if ( pEntry->GetCommand().equals( rURL ) )
+ if ( pEntry->GetCommand() == rURL )
{
return !pEntry->IsParentData();
}
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 17c445d672e8..399db0ae57de 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -576,18 +576,18 @@ void SfxConfigGroupListBox::FillScriptList(const css::uno::Reference< css::scrip
OUString uiName = theChild->getName();
if ( bIsRootNode )
{
- if ( ! (theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
- theChild->getName().equals( currentDocTitle ) ) )
+ if ( ! (theChild->getName() == user || theChild->getName() == share ||
+ theChild->getName() == currentDocTitle ) )
{
bDisplay=false;
}
else
{
- if ( uiName.equals( user ) )
+ if ( uiName == user )
{
uiName = xImp->m_sMyMacros;
}
- else if ( uiName.equals( share ) )
+ else if ( uiName == share )
{
uiName = xImp->m_sProdMacros;
}
@@ -816,7 +816,7 @@ SfxConfigGroupListBox::getDocumentModel( Reference< XComponentContext > const &
{
OUString sTdocUrl =
::comphelper::DocumentInfo::getDocumentTitle( model );
- if( sTdocUrl.equals( docName ) )
+ if( sTdocUrl == docName )
{
xModel = model;
break;
diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx
index 092fdc5e46d2..3ce4048d4021 100644
--- a/cui/source/dialogs/SpellAttrib.hxx
+++ b/cui/source/dialogs/SpellAttrib.hxx
@@ -75,15 +75,15 @@ struct SpellErrorDescription
bool operator==( const SpellErrorDescription& rDesc ) const
{
return bIsGrammarError == rDesc.bIsGrammarError &&
- sErrorText.equals( rDesc.sErrorText ) &&
- aLocale.Language.equals( rDesc.aLocale.Language ) &&
- aLocale.Country.equals( rDesc.aLocale.Country ) &&
- aLocale.Variant.equals( rDesc.aLocale.Variant ) &&
+ sErrorText == rDesc.sErrorText &&
+ aLocale.Language == rDesc.aLocale.Language &&
+ aLocale.Country == rDesc.aLocale.Country &&
+ aLocale.Variant == rDesc.aLocale.Variant &&
aSuggestions == rDesc.aSuggestions &&
xGrammarChecker == rDesc.xGrammarChecker &&
- sDialogTitle.equals( rDesc.sDialogTitle ) &&
- sExplanation.equals( rDesc.sExplanation ) &&
- sExplanationURL.equals( rDesc.sExplanationURL ) &&
+ sDialogTitle == rDesc.sDialogTitle &&
+ sExplanation == rDesc.sExplanation &&
+ sExplanationURL == rDesc.sExplanationURL &&
sRuleId == rDesc.sRuleId;
}
};
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 1fb06ab73da0..d36cd93a4fed 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -467,7 +467,7 @@ IMPL_LINK( SpellDialog, ExtClickHdl, Button *, pBtn, void )
//if it's not the 'no suggestions' entry
if(sWrong == sCurrentErrorText &&
m_pSuggestionLB->IsEnabled() && m_pSuggestionLB->GetSelectEntryCount() > 0 &&
- !m_sNoSuggestionsST.equals(m_pSuggestionLB->GetSelectEntry()))
+ m_sNoSuggestionsST != m_pSuggestionLB->GetSelectEntry())
{
sCurrentErrorText = m_pSuggestionLB->GetSelectEntry();
}
@@ -538,7 +538,7 @@ OUString SpellDialog::getReplacementString() const
if(m_pSuggestionLB->IsEnabled() &&
m_pSuggestionLB->GetSelectEntryCount()>0 &&
- !m_sNoSuggestionsST.equals(m_pSuggestionLB->GetSelectEntry()))
+ m_sNoSuggestionsST != m_pSuggestionLB->GetSelectEntry())
sReplacement = m_pSuggestionLB->GetSelectEntry();
return getDotReplacementString(sOrigString, sReplacement);
@@ -711,7 +711,7 @@ void SpellDialog::Impl_Restore(bool bUseSavedSentence)
IMPL_LINK_NOARG(SpellDialog, IgnoreHdl, Button*, void)
{
- if (m_sResumeST.equals(m_pIgnorePB->GetText()))
+ if (m_sResumeST == m_pIgnorePB->GetText())
{
Impl_Restore(false);
}
@@ -1727,7 +1727,7 @@ void SentenceEditWindow_Impl::RestoreCurrentError()
if( pAttrib )
{
const SpellErrorDescription& rDesc = pAttrib->GetErrorDescription();
- if( !rDesc.sErrorText.equals( GetErrorText() ) )
+ if( rDesc.sErrorText != GetErrorText() )
ChangeMarkedWord(rDesc.sErrorText, LanguageTag::convertToLanguageType( rDesc.aLocale ));
}
}
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 44c3d21c742b..1b07b528665f 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1468,11 +1468,11 @@ void SAL_CALL ColorPicker::setPropertyValues( const Sequence< PropertyValue >& a
{
for( sal_Int32 n = 0; n < aProps.getLength(); n++ )
{
- if( aProps[n].Name.equals( msColorKey ) )
+ if( aProps[n].Name == msColorKey )
{
aProps[n].Value >>= mnColor;
}
- else if( aProps[n].Name.equals( msModeKey ) )
+ else if( aProps[n].Name == msModeKey )
{
aProps[n].Value >>= mnMode;
}
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 82c3000d21f2..fd3d9b3ba8df 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -262,7 +262,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni
// control characters, as can be the case with memo fields), I use
// an empty OUString.
OUString sRealSetText = m_pcmbSearchText->GetText();
- if (!sRealSetText.equals(sInitialText))
+ if (sRealSetText != sInitialText)
m_pcmbSearchText->SetText(OUString());
LINK(this, FmSearchDialog, OnSearchTextModified).Call(*m_pcmbSearchText);
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 1e3860d71456..ec0f4e4c1f1e 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -192,10 +192,10 @@ void SFTreeListBox::Init( const OUString& language )
bool app = false;
OUString uiName = children[ n ]->getName();
OUString factoryURL;
- if ( uiName.equals( userStr ) || uiName.equals( shareStr ) )
+ if ( uiName == userStr || uiName == shareStr )
{
app = true;
- if ( uiName.equals( userStr ) )
+ if ( uiName == userStr )
{
uiName = m_sMyMacros;
}
@@ -261,7 +261,7 @@ SFTreeListBox::getDocumentModel( Reference< XComponentContext >& xCtx, OUString&
if ( model.is() )
{
OUString sTdocUrl = ::comphelper::DocumentInfo::getDocumentTitle( model );
- if( sTdocUrl.equals( docName ) )
+ if( sTdocUrl == docName )
{
xModel = model;
break;
@@ -281,7 +281,7 @@ SFTreeListBox::getLangNodeFromRootNode( Reference< browse::XBrowseNode >& rootNo
Sequence < Reference< browse::XBrowseNode > > children = rootNode->getChildNodes();
for ( sal_Int32 n = 0; n < children.getLength(); n++ )
{
- if ( children[ n ]->getName().equals( language ) )
+ if ( children[ n ]->getName() == language )
{
langNode = children[ n ];
break;
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index a19e075ad6f9..9ea41a5161c7 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -194,7 +194,7 @@ void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath
{
OUString* pCertPath = static_cast<OUString*>(pEntry->GetUserData());
//already exists, just select the original one
- if (pCertPath->equals(rPath))
+ if (*pCertPath == rPath)
{
m_pCertPathList->SetCheckButtonState(pEntry, SvButtonState::Checked);
HandleCheckEntry(pEntry);
diff --git a/cui/source/options/connpoolconfig.cxx b/cui/source/options/connpoolconfig.cxx
index 925c8468c325..ffe935acee68 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -116,7 +116,7 @@ namespace offapp
aLookup != aSettings.end();
++aLookup
)
- if (sThisDriverName.equals(aLookup->sName))
+ if (sThisDriverName == aLookup->sName)
break;
if (aLookup == aSettings.end())
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index ce4aa9d409b0..2514d8a40622 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -303,8 +303,8 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces
SvTreeListEntries::iterator it = std::find_if(m_modifiedPrefBoxEntries.begin(), m_modifiedPrefBoxEntries.end(),
[&sPath, &sPropertyName](std::unique_ptr<SvTreeListEntry> const& pEntry) -> bool
{
- return static_cast<UserData*>(pEntry->GetUserData())->sPropertyPath.equals(sPath)
- && static_cast<SvLBoxString&>(pEntry->GetItem(2)).GetText().equals(sPropertyName);
+ return static_cast<UserData*>(pEntry->GetUserData())->sPropertyPath == sPath
+ && static_cast<SvLBoxString&>(pEntry->GetItem(2)).GetText() == sPropertyName;
}
);
@@ -771,8 +771,8 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
SvTreeListEntries::iterator it = std::find_if(m_prefBoxEntries.begin(), m_prefBoxEntries.end(),
[&pUserData, &sPropertyName](std::unique_ptr<SvTreeListEntry> const& rpEntry) -> bool
{
- return static_cast<UserData*>(rpEntry->GetUserData())->sPropertyPath.equals(pUserData->sPropertyPath)
- && static_cast<SvLBoxString&>(rpEntry->GetItem(2)).GetText().equals(sPropertyName);
+ return static_cast<UserData*>(rpEntry->GetUserData())->sPropertyPath == pUserData->sPropertyPath
+ && static_cast<SvLBoxString&>(rpEntry->GetItem(2)).GetText() == sPropertyName;
}
);
if (it != m_prefBoxEntries.end())
@@ -783,8 +783,8 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
m_modifiedPrefBoxEntries.begin(), m_modifiedPrefBoxEntries.end(),
[&pUserData, &sPropertyName](std::unique_ptr<SvTreeListEntry> const& rpEntry) -> bool
{
- return static_cast<UserData*>(rpEntry->GetUserData())->sPropertyPath.equals(pUserData->sPropertyPath)
- && static_cast<SvLBoxString&>(rpEntry->GetItem(2)).GetText().equals(sPropertyName);
+ return static_cast<UserData*>(rpEntry->GetUserData())->sPropertyPath == pUserData->sPropertyPath
+ && static_cast<SvLBoxString&>(rpEntry->GetItem(2)).GetText() == sPropertyName;
}
);
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 2f798cc5cf25..180f6f185bfa 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1198,7 +1198,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
for (sal_Int32 i=0; i < m_pUserInterfaceLB->GetEntryCount(); i++)
{
d = (sal_Int32)reinterpret_cast<sal_IntPtr>(m_pUserInterfaceLB->GetEntryData(i));
- if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1].equals(m_sUserLocaleValue))
+ if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1] == m_sUserLocaleValue)
m_pUserInterfaceLB->SelectEntryPos(i);
}
}
@@ -1370,7 +1370,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
theArgs[0] <<= NamedValue("nodepath", Any(OUString(sUserLocalePath)));
Reference< XPropertySet >xProp(
theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW );
- if ( !m_sUserLocaleValue.equals(aLangString))
+ if ( m_sUserLocaleValue != aLangString)
{
// OSL_FAIL("UserInterface language was changed, restart.");
// write new value
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index d64ca5d5d6bb..d229fef9f242 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -253,7 +253,7 @@ bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet* )
m_xUpdateAccess->getByName( "DownloadDestination" ) >>= sValue;
if( ( osl::FileBase::E_None == osl::FileBase::getFileURLFromSystemPath(m_pDestPath->GetText(), aURL) ) &&
- ( ! aURL.equals( sValue ) ) )
+ ( aURL != sValue ) )
{
m_xUpdateAccess->replaceByName( "DownloadDestination", uno::Any( aURL ) );
bModified = true;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 0c7713894636..3b6a24608690 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1366,7 +1366,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit&, rEdt, void)
{
for(std::set<OUString>::iterator i = aFormatText.begin(); i != aFormatText.end(); ++i)
{
- if((*i).equals(rShortTxt))
+ if((*i) == rShortTxt)
{
bEnableNew = false;
break;
@@ -1380,7 +1380,7 @@ static bool lcl_FindInArray(std::vector<OUString>& rStrings, const OUString& rSt
{
for(std::vector<OUString>::iterator i = rStrings.begin(); i != rStrings.end(); ++i)
{
- if((*i).equals(rString))
+ if((*i) == rString)
{
return true;
}