Kaydet (Commit) 8c77b567 authored tarafından Noel Grandin's avatar Noel Grandin

use OString::operator== in preference to ::equals

Change-Id: Ib291521963a791a9c6175964571e9d9895072acf
Reviewed-on: https://gerrit.libreoffice.org/39646Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1dea7fb6
......@@ -422,7 +422,7 @@ void ODbaseIndex::createINFEntry()
for (sal_uInt16 i = 0; i < aInfFile.GetKeyCount(); i++)
{
aKeyName = aInfFile.GetKeyName(i);
if (bCase ? aKeyName.equals(aNewEntry) : aKeyName.equalsIgnoreAsciiCase(aNewEntry))
if (bCase ? aKeyName == aNewEntry : aKeyName.equalsIgnoreAsciiCase(aNewEntry))
{
aNewEntry.clear();
break;
......
......@@ -670,7 +670,7 @@ void ODbaseTable::refreshIndexes()
// Refences the key an index-file?
aKeyName = aInfFile.GetKeyName( nKey );
//...if yes, add the index list of the table
if (aKeyName.copy(0,3).equals("NDX"))
if (aKeyName.startsWith("NDX"))
{
OString aIndexName = aInfFile.ReadKey(aKeyName);
aURL.setName(OStringToOUString(aIndexName, m_eEncoding));
......
......@@ -2874,7 +2874,7 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pTh
{
const FontMetric& rFontMetric = pList->GetFontName(i);
const OUString& aFontName = rFontMetric.GetFamilyName();
if (!aSearchedFontName.equals(aFontName.toUtf8().getStr()))
if (aSearchedFontName != aFontName.toUtf8())
continue;
if (aText.isEmpty())
......
......@@ -296,7 +296,7 @@ bool Sane::Open( const char* name )
OString aDevice( name );
for( int i = 0; i < nDevices; i++ )
{
if( aDevice.equals( ppDevices[i]->name ) )
if( aDevice == ppDevices[i]->name )
{
mnDevice = i;
break;
......@@ -335,7 +335,7 @@ int Sane::GetOptionByName( const char* rName )
OString aOption( rName );
for( i = 0; i < mnOptions; i++ )
{
if( mppOptions[i]->name && aOption.equals( mppOptions[i]->name ) )
if( mppOptions[i]->name && aOption == mppOptions[i]->name )
return i;
}
return -1;
......
......@@ -1320,7 +1320,7 @@ bool SaneDlg::LoadState()
aConfig.SetGroup( "SANE" );
OString aString = aConfig.ReadKey( "SO_LastSaneDevice" );
for( i = 0; i < Sane::CountDevices() && !aString.equals(OUStringToOString(Sane::GetName(i), osl_getThreadTextEncoding())); i++ ) ;
for( i = 0; i < Sane::CountDevices() && aString != OUStringToOString(Sane::GetName(i), osl_getThreadTextEncoding()); i++ ) ;
if( i == Sane::CountDevices() )
return false;
......
......@@ -1225,7 +1225,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if( pGradAction )
ImplWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), rVDev );
}
else if ( pA->GetComment().equals("XPATHFILL_SEQ_END") )
else if ( pA->GetComment() == "XPATHFILL_SEQ_END" )
{
if ( aFillPath.Count() )
{
......@@ -1242,7 +1242,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
bool bSkipSequence = false;
OString sSeqEnd;
if( pA->GetComment().equals( "XPATHSTROKE_SEQ_BEGIN" ) )
if( pA->GetComment() == "XPATHSTROKE_SEQ_BEGIN" )
{
sSeqEnd = "XPATHSTROKE_SEQ_END";
SvtGraphicStroke aStroke;
......@@ -1277,7 +1277,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
ImplPolyLine( aPath );
}
}
else if (pA->GetComment().equals("XPATHFILL_SEQ_BEGIN"))
else if (pA->GetComment() == "XPATHFILL_SEQ_BEGIN")
{
sSeqEnd = "XPATHFILL_SEQ_END";
SvtGraphicFill aFill;
......@@ -1348,7 +1348,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
break;
case MetaActionType::COMMENT :
{
if (static_cast<const MetaCommentAction*>(pAction)->GetComment().equals("XPATHFILL_SEQ_END"))
if (static_cast<const MetaCommentAction*>(pAction)->GetComment() == "XPATHFILL_SEQ_END")
bOk = false;
}
break;
......@@ -1391,7 +1391,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if ( pMA->GetType() == MetaActionType::COMMENT )
{
OString sComment( static_cast<MetaCommentAction*>(pMA)->GetComment() );
if ( sComment.equals( sSeqEnd ) )
if ( sComment == sSeqEnd )
break;
}
}
......
......@@ -496,31 +496,31 @@ namespace XSLT
// ignore non-string parameters
continue;
}
if (nameUTF8.equals("StylesheetURL"))
if (nameUTF8 == "StylesheetURL")
{
m_styleSheetURL = valueUTF8;
}
else if (nameUTF8.equals("SourceURL"))
else if (nameUTF8 == "SourceURL")
{
m_parameters.insert(pair<const char*, OString> (
PARAM_SOURCE_URL, valueUTF8));
}
else if (nameUTF8.equals("SourceBaseURL"))
else if (nameUTF8 == "SourceBaseURL")
{
m_parameters.insert(pair<const char*, OString> (
PARAM_SOURCE_BASE_URL, valueUTF8));
}
else if (nameUTF8.equals("TargetURL"))
else if (nameUTF8 == "TargetURL")
{
m_parameters.insert(pair<const char*, OString> (
PARAM_TARGET_URL, valueUTF8));
}
else if (nameUTF8.equals("TargetBaseURL"))
else if (nameUTF8 == "TargetBaseURL")
{
m_parameters.insert(pair<const char*, OString> (
PARAM_TARGET_BASE_URL, valueUTF8));
}
else if (nameUTF8.equals("DoctypePublic"))
else if (nameUTF8 == "DoctypePublic")
{
m_parameters.insert(pair<const char*, OString> (
PARAM_DOCTYPE_PUBLIC, valueUTF8));
......
......@@ -1464,11 +1464,11 @@ LanguageType MsLangId::convertUnxByteStringToLanguage(
for (const IsoLangGLIBCModifiersEntry* pGLIBCModifiersEntry = aImplIsoLangGLIBCModifiersEntries;
pGLIBCModifiersEntry->mnLang != LANGUAGE_DONTKNOW; ++pGLIBCModifiersEntry)
{ // avoid embedded \0 warning
if (aLowerLang.equals( static_cast< const char* >( pGLIBCModifiersEntry->maLanguage )) &&
aAtString.equals( static_cast< const char* >( pGLIBCModifiersEntry->maAtString )))
if (aLowerLang == static_cast< const char* >( pGLIBCModifiersEntry->maLanguage ) &&
aAtString == static_cast< const char* >( pGLIBCModifiersEntry->maAtString ))
{
if (aUpperCountry.isEmpty() ||
aUpperCountry.equals( static_cast< const char* >( pGLIBCModifiersEntry->maCountry )))
aUpperCountry == static_cast< const char* >( pGLIBCModifiersEntry->maCountry ))
{
return pGLIBCModifiersEntry->mnLang;
}
......
......@@ -62,7 +62,7 @@ OString SvStringHashTable::GetNearString( const OString& rName ) const
for( auto const & rPair : maInt2EntryMap )
{
SvStringHashEntry * pE = rPair.second.get();
if( pE->GetName().equalsIgnoreAsciiCase( rName ) && !pE->GetName().equals( rName ) )
if( pE->GetName().equalsIgnoreAsciiCase( rName ) && pE->GetName() != rName )
return pE->GetName();
}
return OString();
......
......@@ -367,7 +367,7 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
bool bIn = false;
for( size_t n = 0; n < rList.size(); n++ )
{
if (rList[n]->equals(aMethodName))
if (*rList[n] == aMethodName)
{
bIn = true;
break;
......@@ -392,7 +392,7 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
bool bIn = false;
for ( size_t n=0; n < rList.size(); n++ )
{
if (rList[n]->equals(aMethodName))
if (*rList[n] == aMethodName)
{
bIn = true;
break;
......
......@@ -260,7 +260,7 @@ SvMetaType * SvIdlDataBase::FindType( const SvMetaType * pPType,
SvMetaType * SvIdlDataBase::FindType( const OString& rName )
{
for( SvRefMemberList<SvMetaType *>::const_iterator it = aTypeList.begin(); it != aTypeList.end(); ++it )
if( rName.equals((*it)->GetName()) )
if( rName == (*it)->GetName() )
return *it;
return nullptr;
}
......@@ -275,7 +275,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
OString aName = rTok.GetString();
for( const auto& aType : GetTypeList() )
{
if( aType->GetName().equals(aName) )
if( aType->GetName() == aName )
{
return aType;
}
......@@ -309,7 +309,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
for( sal_uLong i = 0; i < aSlotList.size(); i++ )
{
SvMetaSlot * pSlot = aSlotList[i];
if( pSlot->GetSlotId().getString().equals(rTok.GetString()) )
if( pSlot->GetSlotId().getString() == rTok.GetString() )
return pSlot;
}
}
......
......@@ -596,7 +596,7 @@ javaFrameworkError jfw_getSelectedJRE(std::unique_ptr<JavaInfo> *ppInfo)
// /java/javaInfo/@vendorUpdate != javaSelection/updated (javavendors.xml)
OString sUpdated = jfw::getElementUpdated();
if (!sUpdated.equals(settings.getJavaInfoAttrVendorUpdate()))
if (sUpdated != settings.getJavaInfoAttrVendorUpdate())
{
ppInfo->reset();
return JFW_E_INVALID_SETTINGS;
......
......@@ -311,7 +311,7 @@ MergeDataFile::MergeDataFile(
bFirstLang, bCaseSensitive );
if( bFirstLang && bWithQtz &&
!sEnableReleaseBuild.equals("TRUE") )
sEnableReleaseBuild != "TRUE" )
{
aLanguageSet.insert("qtz");
InsertEntry(
......
......@@ -73,7 +73,7 @@ namespace rtl_OStringBuffer
sal_Int32 nLenStrBuftmp = aStrBuftmp.getLength();
rtl::OString sStr(aStrBuftmp.getStr());
bool res = aStrtmp.equals( sStr );
bool res = aStrtmp == sStr;
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
......@@ -14248,7 +14248,7 @@ namespace rtl_OStringBuffer
aStrBuf.append( input );
bool bRes = expVal.equals( aStrBuf.getStr() );
bool bRes = expVal == aStrBuf.getStr();
CPPUNIT_ASSERT_MESSAGE
(
"input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)",
......
......@@ -365,7 +365,7 @@ inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode)
inline OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "")
{
OString aString;
if (returnVal.equals(rightVal))
if (returnVal == rightVal)
return aString;
aString += msg;
......@@ -707,7 +707,7 @@ namespace osl_FileBase
if (!_sAssumeResultStr.isEmpty())
{
bool bStrAreEqual = _sAssumeResultStr.equals(sStr);
bool bStrAreEqual = _sAssumeResultStr == sStr;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Assumption is wrong",
_nAssumeError, nError);
CPPUNIT_ASSERT_MESSAGE("Assumption is wrong",
......
......@@ -199,7 +199,7 @@ public:
OString aSum2 = getDigest(aMsg2, rtl_Digest_AlgorithmMD5);
CPPUNIT_ASSERT_MESSAGE("md5sum must have a length", aSum1.getLength() == 32 && aSum2.getLength() == 32 );
CPPUNIT_ASSERT_MESSAGE("source is the same, dest must be also the same", aSum1.equals(aSum2));
CPPUNIT_ASSERT_EQUAL_MESSAGE("source is the same, dest must be also the same", aSum1, aSum2);
}
{
......@@ -210,7 +210,7 @@ public:
OString aSum2 = getDigest(aMsg2, rtl_Digest_AlgorithmMD5);
CPPUNIT_ASSERT_MESSAGE("md5sum must have a length", aSum1.getLength() == 32 && aSum2.getLength() == 32 );
CPPUNIT_ASSERT_MESSAGE("differ only in one char", !aSum1.equals(aSum2));
CPPUNIT_ASSERT_MESSAGE("differ only in one char", aSum1 != aSum2);
}
}
......
......@@ -79,7 +79,7 @@ void testConvertToString(TestConvertToString const & rTest)
if (bSuccess)
{
if (rTest.pStrict == nullptr || !aStrict.equals(rTest.pStrict))
if (rTest.pStrict == nullptr || aStrict != rTest.pStrict)
{
rtl::OStringBuffer aMessage(aPrefix);
aMessage.append("strict = \"");
......@@ -90,7 +90,7 @@ void testConvertToString(TestConvertToString const & rTest)
}
else
{
if (!aStrict.equals(rtl::OString(RTL_CONSTASCII_STRINGPARAM("12345"))))
if (aStrict != rtl::OString(RTL_CONSTASCII_STRINGPARAM("12345")))
{
rtl::OStringBuffer aMessage(aPrefix);
aMessage.append("modified output");
......@@ -103,7 +103,7 @@ void testConvertToString(TestConvertToString const & rTest)
CPPUNIT_ASSERT_MESSAGE(aMessage.getStr(), false);
}
}
if (!aRelaxed.equals(rTest.pRelaxed))
if (aRelaxed != rTest.pRelaxed)
{
rtl::OStringBuffer aMessage(aPrefix);
aMessage.append("relaxed = \"");
......
......@@ -887,13 +887,13 @@ DBusHandlerResult ProfileMessageFunction
{
SAL_INFO("sdremote.bluetooth", "ProfileMessageFunction||" << dbus_message_get_interface(pMessage) << "||" << dbus_message_get_member(pMessage));
if (OString(dbus_message_get_interface(pMessage)).equals("org.bluez.Profile1"))
if (OString(dbus_message_get_interface(pMessage)) == "org.bluez.Profile1")
{
if (OString(dbus_message_get_member(pMessage)).equals("Release"))
if (OString(dbus_message_get_member(pMessage)) == "Release")
{
return DBUS_HANDLER_RESULT_HANDLED;
}
else if (OString(dbus_message_get_member(pMessage)).equals("NewConnection"))
else if (OString(dbus_message_get_member(pMessage)) == "NewConnection")
{
if (!dbus_message_has_signature(pMessage, "oha{sv}"))
{
......@@ -944,7 +944,7 @@ DBusHandlerResult ProfileMessageFunction
return DBUS_HANDLER_RESULT_HANDLED;
}
}
else if (OString(dbus_message_get_member(pMessage)).equals("RequestDisconnection"))
else if (OString(dbus_message_get_member(pMessage)) == "RequestDisconnection")
{
return DBUS_HANDLER_RESULT_HANDLED;
}
......
......@@ -81,17 +81,17 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
{
}
if ( aCommand[0].equals( "transition_next" ) )
if ( aCommand[0] == "transition_next" )
{
if ( xSlideShowController.is() )
xSlideShowController->gotoNextEffect();
}
else if ( aCommand[0].equals( "transition_previous" ) )
else if ( aCommand[0] == "transition_previous" )
{
if ( xSlideShowController.is() )
xSlideShowController->gotoPreviousEffect();
}
else if ( aCommand[0].equals( "goto_slide" ) )
else if ( aCommand[0] == "goto_slide" )
{
// FIXME: if 0 returned, then not a valid number
sal_Int32 aSlide = aCommand[1].toInt32();
......@@ -101,17 +101,17 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
xSlideShowController->gotoSlideIndex( aSlide );
}
}
else if ( aCommand[0].equals( "presentation_start" ) )
else if ( aCommand[0] == "presentation_start" )
{
if ( xPresentation.is() )
xPresentation->start();
}
else if ( aCommand[0].equals( "presentation_stop" ) )
else if ( aCommand[0] == "presentation_stop" )
{
if ( xPresentation.is() )
xPresentation->end();
}
else if ( aCommand[0].equals( "presentation_blank_screen" ) )
else if ( aCommand[0] == "presentation_blank_screen" )
{
if ( aCommand.size() > 1 )
{
......@@ -123,7 +123,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
xSlideShowController->blankScreen( 0 ); // Default is black
}
}
else if (aCommand[0].equals( "pointer_started" ))
else if (aCommand[0] == "pointer_started" )
{
// std::cerr << "pointer_started" << std::endl;
float x = aCommand[1].toFloat();
......@@ -164,7 +164,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
SAL_INFO( "sdremote", "Pointer started, we display the pointer on screen" );
}
else if (aCommand[0].equals( "pointer_dismissed" ))
else if (aCommand[0] == "pointer_dismissed" )
{
SolarMutexGuard aSolarGuard;
if (xSlideShow.is()) try
......@@ -183,7 +183,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
SAL_INFO( "sdremote", "Pointer dismissed, we hide the pointer on screen" );
}
else if (aCommand[0].equals( "pointer_coordination" ))
else if (aCommand[0] == "pointer_coordination" )
{
float x = aCommand[1].toFloat();
float y = aCommand[2].toFloat();
......@@ -206,7 +206,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
"exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
}
}
else if ( aCommand[0].equals( "presentation_resume" ) )
else if ( aCommand[0] == "presentation_resume" )
{
if ( xSlideShowController.is() )
{
......
......@@ -110,8 +110,8 @@ void RemoteServer::execute()
BufferedStreamSocket *pSocket = new BufferedStreamSocket( aSocket);
OString aLine;
if ( pSocket->readLine( aLine)
&& aLine.equals( "LO_SERVER_CLIENT_PAIR" ) &&
pSocket->readLine( aLine ) )
&& aLine == "LO_SERVER_CLIENT_PAIR"
&& pSocket->readLine( aLine ) )
{
OString aName( aLine );
......
......@@ -552,7 +552,7 @@ void PDFDict::eraseValue( const OString& rName )
for( unsigned int i = 0; i < nEle; i++ )
{
PDFName* pName = dynamic_cast<PDFName*>(m_aSubElements[i]);
if( pName && pName->m_aName.equals( rName ) )
if( pName && pName->m_aName == rName )
{
for( unsigned int j = i+1; j < nEle; j++ )
{
......
......@@ -331,7 +331,7 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF
PDFName* pName = dynamic_cast<PDFName*>(map_it->second);
if( ! pName )
continue;
if( ! pName->m_aName.equals( "FontDescriptor" ) )
if( pName->m_aName != "FontDescriptor" )
continue;
// the font name will be helpful, also there must be one in
......
......@@ -215,7 +215,7 @@ void StyleContainer::emit( EmitContext& rContext,
{
if( ! it->second.IsSubStyle )
{
if( it->second.Name.equals( "style:master-page" ) )
if( it->second.Name == "style:master-page" )
aMasterPageSection.push_back( it->first );
else if( getStyleName( it->first ) == "standard" )
aOfficeStyleSection.push_back( it->first );
......
......@@ -839,7 +839,7 @@ long FontSizeNames::Name2Size( const OUString& rName ) const
// linear search is sufficient for this rare case
for( long i = mnElem; --i >= 0; )
if ( aName.equals(mpArray[i].mszUtf8Name) )
if ( aName == mpArray[i].mszUtf8Name )
return mpArray[i].mnSize;
}
......
......@@ -353,7 +353,7 @@ void printSetPropertyMixinBody(
OString s(fieldtype.getToken(0, '<', nPos));
OString t = s.copy(s.lastIndexOf('/')+1);
if (t.equals("Optional")) {
if (t == "Optional") {
optional=true;
if (single) {
single=false;
......@@ -429,7 +429,7 @@ void printMethods(std::ostream & o,
static OString sd("_");
bool body = !delegate.isEmpty();
bool defaultbody = delegate.equals(sd);
bool defaultbody = delegate == sd;
if (body && propertyhelper.getLength() > 1) {
if (name == "com.sun.star.beans.XPropertySet") {
......
......@@ -351,7 +351,7 @@ void printSetPropertyMixinBody(
buffer.append(')');
OString t = buffer.makeStringAndClear();
if ( t.equals("((Optional)") ) {
if ( t == "((Optional)" ) {
optional=true;
if (single) {
single=false;
......@@ -441,7 +441,7 @@ void printMethods(std::ostream & o,
static OString sd("_");
bool body = !delegate.isEmpty();
bool defaultbody = delegate.equals(sd);
bool defaultbody = delegate == sd;
generated.add(u2b(name));
rtl::Reference< unoidl::Entity > ent;
......
......@@ -63,7 +63,7 @@ bool getOutputStream(ProgramOptions const & options,
OString & tmpSourceFileName)
{
bool bStandardout = false;
if ( options.outputpath.equals("stdout") )
if ( options.outputpath == "stdout" )
{
bStandardout = true;
*ppOutputStream = &std::cout;
......
......@@ -277,7 +277,7 @@ handleCertificateValidationRequest_(
{
uno::Reference< security::XCertificateExtension >element = extensions[i];
OString aId ( reinterpret_cast<const char *>(element->getExtensionId().getConstArray()), element->getExtensionId().getLength());
if (aId.equals(OID_SUBJECT_ALTERNATIVE_NAME))
if (aId == OID_SUBJECT_ALTERNATIVE_NAME)
{
sanExtension = uno::Reference<security::XSanExtension>(element, uno::UNO_QUERY);
break;
......
......@@ -1860,7 +1860,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString
{
VclPtr<vcl::Window> pCurrentChild;
if (m_pParent && !isConsideredGtkPseudo(m_pParent) && !m_sID.isEmpty() && rID.equals(m_sID))
if (m_pParent && !isConsideredGtkPseudo(m_pParent) && !m_sID.isEmpty() && rID == m_sID)
{
pCurrentChild = m_pParent;
......@@ -2105,7 +2105,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
}
}
if (sType.equals("tab"))
if (sType == "tab")
{
handleTabChild(pParent, reader);
return;
......@@ -2145,7 +2145,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
// We want to sort labels before contents of frames
// for keyboard traversal, especially if there
// are multiple widgets using the same mnemonic
if (sType.equals("label"))
if (sType == "label")
{
if (VclFrame *pFrameParent = dynamic_cast<VclFrame*>(pParent))
pFrameParent->designate_label(pCurrentChild);
......@@ -3309,7 +3309,7 @@ vcl::Window *VclBuilder::get_by_name(const OString& sID)
for (std::vector<WinAndId>::iterator aI = m_aChildren.begin(),
aEnd = m_aChildren.end(); aI != aEnd; ++aI)
{
if (aI->m_sID.equals(sID))
if (aI->m_sID == sID)
return aI->m_pWindow;
}
......@@ -3321,7 +3321,7 @@ PopupMenu *VclBuilder::get_menu(const OString& sID)
for (std::vector<MenuAndId>::iterator aI = m_aMenus.begin(),
aEnd = m_aMenus.end(); aI != aEnd; ++aI)
{
if (aI->m_sID.equals(sID))
if (aI->m_sID == sID)
return aI->m_pMenu;
}
......@@ -3349,7 +3349,7 @@ void VclBuilder::set_response(const OString& sID, short nResponse)
for (std::vector<WinAndId>::iterator aI = m_aChildren.begin(),
aEnd = m_aChildren.end(); aI != aEnd; ++aI)
{
if (aI->m_sID.equals(sID))
if (aI->m_sID == sID)
{
aI->m_nResponseId = nResponse;
return;
......@@ -3365,7 +3365,7 @@ void VclBuilder::delete_by_name(const OString& sID)
for (std::vector<WinAndId>::iterator aI = m_aChildren.begin(),
aEnd = m_aChildren.end(); aI != aEnd; ++aI)
{
if (aI->m_sID.equals(sID))
if (aI->m_sID == sID)
{
aI->m_pWindow.disposeAndClear();
m_aChildren.erase(aI);
......
......@@ -259,8 +259,8 @@ void PrinterInfoManager::initialize()
{
m_aGlobalDefaults.m_aContext.
setValue( pKey,
aValue.equals("*nil") ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
aValue == "*nil" ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
}
}
}
......@@ -388,7 +388,7 @@ void PrinterInfoManager::initialize()
// override the settings in m_aGlobalDefaults if keys exist
aValue = aConfig.ReadKey( "DefaultPrinter" );
if (!aValue.equals("0") && !aValue.equalsIgnoreAsciiCase("false"))
if (aValue != "0" && !aValue.equalsIgnoreAsciiCase("false"))
aDefaultPrinter = aPrinterName;
aValue = aConfig.ReadKey( "Location" );
......@@ -443,8 +443,8 @@ void PrinterInfoManager::initialize()
{
aPrinter.m_aInfo.m_aContext.
setValue( pKey,
aValue.equals("*nil") ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
aValue == "*nil" ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
}
}
}
......
......@@ -285,7 +285,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
}
Strm().Seek(nCurrent);
OString aKeyword = aBuf.makeStringAndClear();
if (aKeyword.equals("\\ftnalt"))
if (aKeyword == "\\ftnalt")
nId = NS_ooxml::LN_endnote;
if (m_aStates.top().pCurrentBuffer == &m_aSuperBuffer)
......
......@@ -278,7 +278,7 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
{
// skip binary data explicitly, to not trip over rtf markup
// control characters
if (rKeyword.equals("bin") && nParam > 0)
if (rKeyword == "bin" && nParam > 0)
Strm().SeekRel(nParam);
return RTFError::OK;
}
......
......@@ -207,7 +207,7 @@ css::uno::Sequence< css::uno::Reference< css::security::XCertificateExtension >
unsigned char* objid = reinterpret_cast<unsigned char *>(const_cast<char *>(objID.getStr()));
unsigned int objidlen = objID.getLength();
if (objID.equals("2.5.29.17"))
if (objID == "2.5.29.17")
{
SanExtensionImpl* pExtn = new SanExtensionImpl;
pExtn->setCertExtn(value, vlen, objid, objidlen, crit);
......@@ -252,7 +252,7 @@ css::uno::Reference< css::security::XCertificateExtension > SAL_CALL X509Certifi
unsigned char* objid = (*extns)->id.data;
unsigned int objidlen = (*extns)->id.len;
if ( objId.equals("OID.2.5.29.17") )
if ( objId == "OID.2.5.29.17" )
{
rtl::Reference<SanExtensionImpl> xSanImpl(
new SanExtensionImpl);
......
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