summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-07 12:14:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-14 12:39:20 +0200
commitdaf177f703081d7afaa9b1701cf187c9a3e93ee5 (patch)
tree32e5bc14b5707777795ac26089c402cc3e93c2e3 /xmloff
parent3ef7e85deb7afde6c9453c30be0a7893528a90a1 (diff)
use more OUString::operator== in test..xmlsecurity
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/ColorPropertySet.cxx8
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx6
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx2
-rw-r--r--xmloff/source/chart/SchXMLParagraphContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx6
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx12
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx2
-rw-r--r--xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx6
-rw-r--r--xmloff/source/core/nmspmap.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx8
-rw-r--r--xmloff/source/draw/ximpbody.cxx2
-rw-r--r--xmloff/source/meta/xmlmetae.cxx4
-rw-r--r--xmloff/source/script/XMLEventExport.cxx2
-rw-r--r--xmloff/source/script/XMLScriptExportHandler.cxx2
-rw-r--r--xmloff/source/script/XMLStarBasicExportHandler.cxx4
-rw-r--r--xmloff/source/style/xmlexppr.cxx2
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
-rw-r--r--xmloff/source/style/xmlprmap.cxx2
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx26
-rw-r--r--xmloff/source/text/txtparai.cxx5
-rw-r--r--xmloff/source/transform/DlgOASISTContext.cxx6
27 files changed, 63 insertions, 64 deletions
diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx
index abaabc83b04d..c0f0011ceb6d 100644
--- a/xmloff/source/chart/ColorPropertySet.cxx
+++ b/xmloff/source/chart/ColorPropertySet.cxx
@@ -63,14 +63,14 @@ Sequence< Property > SAL_CALL lcl_ColorPropertySetInfo::getProperties()
Property SAL_CALL lcl_ColorPropertySetInfo::getPropertyByName( const OUString& aName )
{
- if( aName.equals( m_aColorPropName ))
+ if( aName == m_aColorPropName )
return m_aColorProp;
throw UnknownPropertyException( m_aColorPropName, static_cast< uno::XWeak * >( this ));
}
sal_Bool SAL_CALL lcl_ColorPropertySetInfo::hasPropertyByName( const OUString& Name )
{
- return Name.equals( m_aColorPropName );
+ return Name == m_aColorPropName;
}
} // anonymous namespace
@@ -144,13 +144,13 @@ Sequence< PropertyState > SAL_CALL ColorPropertySet::getPropertyStates( const Se
void SAL_CALL ColorPropertySet::setPropertyToDefault( const OUString& PropertyName )
{
- if( PropertyName.equals( m_aColorPropName ))
+ if( PropertyName == m_aColorPropName )
m_nColor = m_nDefaultColor;
}
uno::Any SAL_CALL ColorPropertySet::getPropertyDefault( const OUString& aPropertyName )
{
- if( aPropertyName.equals( m_aColorPropName ))
+ if( aPropertyName == m_aColorPropName )
return uno::makeAny( m_nDefaultColor );
return uno::Any();
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index aad2d6539569..92b53cafbc0d 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -289,7 +289,7 @@ public:
return ( xProp.is() &&
(xProp->getPropertyValue( "Role" ) >>= aRole ) &&
- m_aRole.equals( aRole ));
+ m_aRole == aRole );
}
private:
@@ -939,7 +939,7 @@ bool lcl_exportDomainForThisSequence( const Reference< chart2::data::XDataSequen
OUString aRange( lcl_ConvertRange( rValues->getSourceRangeRepresentation(), xNewDoc ) );
//work around error in OOo 2.0 (problems with multiple series having a domain element)
- if( rFirstRangeForThisDomainIndex.isEmpty() || !aRange.equals(rFirstRangeForThisDomainIndex) )
+ if( rFirstRangeForThisDomainIndex.isEmpty() || aRange != rFirstRangeForThisDomainIndex )
{
rExport.AddAttribute( XML_NAMESPACE_TABLE, XML_CELL_RANGE_ADDRESS, aRange);
SvXMLElementExport aDomain( rExport, XML_NAMESPACE_CHART, XML_DOMAIN, true, true );
@@ -2601,7 +2601,7 @@ void SchXMLExportHelper_Impl::exportSeries(
if( xSeqProp.is())
xSeqProp->getPropertyValue("Role") >>= aRole;
// "main" sequence
- if( aRole.equals( aLabelRole ))
+ if( aRole == aLabelRole )
{
xValuesSeq.set( xTempValueSeq );
xLabelSeq.set( aSeqCnt[nSeqIdx]->getLabel());
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 8c44d3f65702..21f9864b0cea 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -70,7 +70,7 @@ public:
bool operator () ( const Reference< chart2::XChartType > & xChartType ) const
{
return (xChartType.is() &&
- xChartType->getChartType().equals( m_aChartTypeName ));
+ xChartType->getChartType() == m_aChartTypeName );
}
private:
diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx
index 6637254f6a7b..5fa8ecf4b053 100644
--- a/xmloff/source/chart/SchXMLParagraphContext.cxx
+++ b/xmloff/source/chart/SchXMLParagraphContext.cxx
@@ -87,11 +87,11 @@ SvXMLImportContext* SchXMLParagraphContext::CreateChildContext(
{
if( nPrefix == XML_NAMESPACE_TEXT )
{
- if( rLocalName.equals( ::xmloff::token::GetXMLToken( ::xmloff::token::XML_TAB_STOP )))
+ if( rLocalName == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_TAB_STOP ))
{
maBuffer.append( u'\x0009'); // tabulator
}
- else if( rLocalName.equals( ::xmloff::token::GetXMLToken( ::xmloff::token::XML_LINE_BREAK )))
+ else if( rLocalName == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_LINE_BREAK ))
{
maBuffer.append( u'\x000A'); // linefeed
}
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index ba69c3a50456..74141afbc526 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -248,11 +248,11 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
break;
case XML_TOK_PA_DS_HAS_LABELS:
{
- if( aValue.equals( ::xmloff::token::GetXMLToken( ::xmloff::token::XML_BOTH )))
+ if( aValue == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_BOTH ))
mrColHasLabels = mrRowHasLabels = true;
- else if( aValue.equals( ::xmloff::token::GetXMLToken( ::xmloff::token::XML_ROW )))
+ else if( aValue == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_ROW ))
mrRowHasLabels = true;
- else if( aValue.equals( ::xmloff::token::GetXMLToken( ::xmloff::token::XML_COLUMN )))
+ else if( aValue == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_COLUMN ))
mrColHasLabels = true;
}
break;
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index a2e9069629b5..ee6a10c447f7 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -322,7 +322,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
sal_Int32 nNumOfAxes = mrAxes.size();
for( sal_Int32 nCurrent = 0; nCurrent < nNumOfAxes; nCurrent++ )
{
- if( aValue.equals( mrAxes[ nCurrent ].aName ) &&
+ if( aValue == mrAxes[ nCurrent ].aName &&
mrAxes[ nCurrent ].eDimension == SCH_XML_AXIS_Y )
{
mpAttachedAxis = &( mrAxes[ nCurrent ] );
@@ -384,7 +384,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
}
}
if( ! mrGlobalChartTypeUsedBySeries )
- mrGlobalChartTypeUsedBySeries = (maSeriesChartTypeName.equals( maGlobalChartTypeName ));
+ mrGlobalChartTypeUsedBySeries = (maSeriesChartTypeName == maGlobalChartTypeName);
sal_Int32 const nCoordinateSystemIndex = 0;//so far we can only import one coordinate system
m_xSeries.set(
SchXMLImportHelper::GetNewDataSeries( mxNewDoc, nCoordinateSystemIndex, maSeriesChartTypeName, ! mrGlobalChartTypeUsedBySeries ));
@@ -811,7 +811,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
if( !(iStyle->msStyleName).isEmpty())
{
- if( ! rCurrStyleName.equals( iStyle->msStyleName ))
+ if( rCurrStyleName != iStyle->msStyleName )
{
rCurrStyleName = iStyle->msStyleName;
rpStyle = pStylesCtxt->FindStyleChildContext(
@@ -975,7 +975,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
if( !(iStyle->msStyleName).isEmpty())
{
- if( ! rCurrStyleName.equals( iStyle->msStyleName ))
+ if( rCurrStyleName != iStyle->msStyleName )
{
rCurrStyleName = iStyle->msStyleName;
rpStyle = pStylesCtxt->FindStyleChildContext(
@@ -1058,7 +1058,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
if( bIsDonutChart )
{
//set special series styles for donut charts first
- if( !rCurrStyleName.equals( iStyle->msSeriesStyleNameForDonuts ) )
+ if( rCurrStyleName != iStyle->msSeriesStyleNameForDonuts )
{
rCurrStyleName = iStyle->msSeriesStyleNameForDonuts;
rpStyle = pStylesCtxt->FindStyleChildContext(
@@ -1083,7 +1083,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
{
}
- if( !rCurrStyleName.equals( iStyle->msStyleName ) )
+ if( rCurrStyleName != iStyle->msStyleName )
{
rCurrStyleName = iStyle->msStyleName;
rpStyle = pStylesCtxt->FindStyleChildContext(
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 0d42dcebc3a9..32c7ee0ecad4 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -473,7 +473,7 @@ void SchXMLTableColumnContext::StartElement( const uno::Reference< xml::sax::XAt
IsXMLToken( aLocalName, XML_VISIBILITY ) )
{
OUString aVisibility = xAttrList->getValueByIndex( i );
- bHidden = aVisibility.equals( GetXMLToken( XML_COLLAPSE ) );
+ bHidden = aVisibility == GetXMLToken( XML_COLLAPSE );
}
}
@@ -1039,7 +1039,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
{
aRange = xValues->getSourceRangeRepresentation();
sal_Int32 nIndex = aRange.toInt32();
- if( nIndex!=0 || !aRange.equals(lcl_aCategoriesRange) )
+ if( nIndex!=0 || aRange != lcl_aCategoriesRange )
aUsageMap[nIndex] = true;
}
Reference< chart2::data::XDataSequence > xLabel( xLabeledSequence->getLabel() );
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index b301a1ed7961..13ef728160d2 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -546,7 +546,7 @@ uno::Any getPropertyFromContext( const OUString& rPropertyName, const XMLPropSty
if( nIdx == -1 )
continue;
OUString aPropName = rMapper->GetEntryAPIName( nIdx );
- if(rPropertyName.equals(aPropName))
+ if(rPropertyName == aPropName)
return aPropIter->maValue;
}
return aRet;
diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
index 2f876e9dc8c5..6508031bad93 100644
--- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
+++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
@@ -46,7 +46,7 @@ bool XMLAxisPositionPropertyHdl::importXML( const OUString& rStrImpValue,
{
bool bResult = false;
- if( rStrImpValue.equals( GetXMLToken(XML_START) ) )
+ if( rStrImpValue == GetXMLToken(XML_START) )
{
if( !m_bCrossingValue )
{
@@ -54,7 +54,7 @@ bool XMLAxisPositionPropertyHdl::importXML( const OUString& rStrImpValue,
bResult = true;
}
}
- else if( rStrImpValue.equals( GetXMLToken(XML_END) ) )
+ else if( rStrImpValue == GetXMLToken(XML_END) )
{
if( !m_bCrossingValue )
{
@@ -62,7 +62,7 @@ bool XMLAxisPositionPropertyHdl::importXML( const OUString& rStrImpValue,
bResult = true;
}
}
- else if( rStrImpValue.equals( GetXMLToken(XML_0) ) )
+ else if( rStrImpValue == GetXMLToken(XML_0) )
{
if( !m_bCrossingValue )
{
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 3edd65c43090..e20363ee67ab 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -462,7 +462,7 @@ bool SvXMLNamespaceMap::NormalizeW3URI( OUString& rName )
{
const OUString& sURISuffix = GetXMLToken( XML_URI_XFORMS_SUFFIX );
sal_Int32 nCompareFrom = rName.getLength() - sURISuffix.getLength();
- if( rName.copy( nCompareFrom ).equals( sURISuffix ) )
+ if( rName.copy( nCompareFrom ) == sURISuffix )
{
// found W3 prefix, and xforms suffix
rName = GetXMLToken( XML_N_XFORMS_1_0 );
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index c331d833a72c..89fe990f6d11 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2379,7 +2379,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
const OUString streamName = mpImpl->mStreamName;
if ( !streamName.isEmpty() )
{
- if ( streamName.equals(mdref.First) )
+ if ( streamName == mdref.First )
{
AddAttribute( XML_NAMESPACE_XML, XML_ID, mdref.Second );
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 91e2a97148a3..16fcb5791baf 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1695,7 +1695,7 @@ bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
// This workaround is not nice, but I see no other way to handle it, since there are
// ODF1.2 documents without version in manifest.xml
if ( !aStorVersion.isEmpty() )
- bResult = aODFVersion.equals( aStorVersion );
+ bResult = aODFVersion == aStorVersion;
else
xStorProps->setPropertyValue( "Version",
uno::makeAny( aODFVersion ) );
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 44926530d47a..3172188a747b 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1357,7 +1357,7 @@ ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString&
{
if(pInfo)
{
- if(!pInfo->GetMasterPageName().isEmpty() && rName.equals(pInfo->GetMasterPageName()))
+ if(!pInfo->GetMasterPageName().isEmpty() && rName == pInfo->GetMasterPageName())
{
return pInfo;
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 947c4d9bb42f..e49451f686e8 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1126,12 +1126,12 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
OUString sCLSID;
if(xPropSet->getPropertyValue("CLSID") >>= sCLSID)
{
- if (sCLSID.equals(mrExport.GetChartExport()->getChartCLSID()) ||
- sCLSID.equals( SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName() ))
+ if (sCLSID == mrExport.GetChartExport()->getChartCLSID() ||
+ sCLSID == SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName() )
{
eShapeType = XmlShapeTypeDrawChartShape;
}
- else if (sCLSID.equals( SvGlobalName( SO3_SC_CLASSID ).GetHexName() ))
+ else if (sCLSID == SvGlobalName( SO3_SC_CLASSID ).GetHexName() )
{
eShapeType = XmlShapeTypeDrawSheetShape;
}
@@ -1177,7 +1177,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
OUString sCLSID;
if(xPropSet->getPropertyValue("CLSID") >>= sCLSID)
{
- if( sCLSID.equals( SvGlobalName( SO3_SC_CLASSID ).GetHexName() ) )
+ if( sCLSID == SvGlobalName( SO3_SC_CLASSID ).GetHexName() )
{
eShapeType = XmlShapeTypePresSheetShape;
}
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 920d287bb7a5..f6be2889a974 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -168,7 +168,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
{
OUString sMasterPageName = xMasterNamed->getName();
- if(!sMasterPageName.isEmpty() && sMasterPageName.equals(sDisplayName))
+ if(!sMasterPageName.isEmpty() && sMasterPageName == sDisplayName)
{
xDrawPage->setMasterPage(xMasterPage);
bDone = true;
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
index d655520c6bea..c0c10e0247a8 100644
--- a/xmloff/source/meta/xmlmetae.cxx
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -375,7 +375,7 @@ SvXMLMetaExport::startElement(const OUString & i_rName,
const SvXMLNamespaceMap & rNsMap(mrExport.GetNamespaceMap());
for (sal_uInt16 key = rNsMap.GetFirstKey();
key != USHRT_MAX; key = rNsMap.GetNextKey(key)) {
- if (name.equals(rNsMap.GetAttrNameByKey(key))) {
+ if (name == rNsMap.GetAttrNameByKey(key)) {
found = true;
break;
}
@@ -401,7 +401,7 @@ SvXMLMetaExport::startElement(const OUString & i_rName,
const sal_Int16 nCount = i_xAttribs->getLength();
for (sal_Int16 i = 0; i < nCount; ++i) {
const OUString name(i_xAttribs->getNameByIndex(i));
- if (ns.equals(name)) {
+ if (ns == name) {
found = true;
break;
}
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 0bc2297e05db..19d23e47f2ac 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -204,7 +204,7 @@ void XMLEventExport::ExportEvent(
for(sal_Int32 nVal = 0; nVal < nValues; nVal++)
{
- if (sEventType.equals(pValues[nVal].Name))
+ if (sEventType == pValues[nVal].Name)
{
// found! Now find handler and delegate
OUString sType;
diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx
index ab43ab281356..5e6ca3196aa6 100644
--- a/xmloff/source/script/XMLScriptExportHandler.cxx
+++ b/xmloff/source/script/XMLScriptExportHandler.cxx
@@ -56,7 +56,7 @@ void XMLScriptExportHandler::Export(
sal_Int32 nCount = rValues.getLength();
for(sal_Int32 i = 0; i < nCount; i++)
{
- if (sURL.equals(rValues[i].Name))
+ if (sURL == rValues[i].Name)
{
OUString sTmp;
rValues[i].Value >>= sTmp;
diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx
index 3e18bbd40128..d0c05bfa846d 100644
--- a/xmloff/source/script/XMLStarBasicExportHandler.cxx
+++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx
@@ -60,7 +60,7 @@ void XMLStarBasicExportHandler::Export(
sal_Int32 nCount = rValues.getLength();
for(sal_Int32 i = 0; i < nCount; i++)
{
- if (sLibrary.equals(rValues[i].Name))
+ if (sLibrary == rValues[i].Name)
{
OUString sTmp;
rValues[i].Value >>= sTmp;
@@ -69,7 +69,7 @@ void XMLStarBasicExportHandler::Export(
sTmp.equalsIgnoreAsciiCase(sStarOffice) ) ? XML_APPLICATION
: XML_DOCUMENT );
}
- else if (sMacroName.equals(rValues[i].Name))
+ else if (sMacroName == rValues[i].Name)
{
rValues[i].Value >>= sName;
}
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 3e9571195719..d11b5ed37fef 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -238,7 +238,7 @@ const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames()
while ( aCurrent != aEnd )
{
// equal to next element?
- if ( aOld->GetApiName().equals( aCurrent->GetApiName() ) )
+ if ( aOld->GetApiName() == aCurrent->GetApiName() )
{
// if equal: merge index lists
aOld->GetIndexes().merge( aCurrent->GetIndexes() );
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 6f4ba5d86949..f6f1574e0136 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1117,7 +1117,7 @@ void SvXMLNumFmtElementContext::EndElement()
{
case XML_TOK_STYLE_TEXT:
if ( rParent.HasLongDoW() &&
- aContent.toString().equals(rParent.GetLocaleData().getLongDateDayOfWeekSep()) )
+ aContent.toString() == rParent.GetLocaleData().getLongDateDayOfWeekSep() )
{
// skip separator constant after long day of week
// (NF_KEY_NNNN contains the separator)
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index a287408f00d2..634e50afcf7f 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -303,7 +303,7 @@ sal_Int32 XMLPropertySetMapper::FindEntryIndex(
{
const XMLPropertySetMapperEntry_Impl& rEntry = mpImpl->maMapEntries[nIndex];
if( rEntry.nXMLNameSpace == nNameSpace &&
- rEntry.sXMLAttributeName.equals( sXMLName ) &&
+ rEntry.sXMLAttributeName == sXMLName &&
rEntry.sAPIPropertyName.equalsAscii( sApiName ) )
return nIndex;
else
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index b0b6cce5817a..7bd55721731d 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -227,7 +227,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
sal_Int32 nServiceCount(aServices.getLength());
while (i < nServiceCount && !bFound)
{
- if (aServices[i].equals(sFieldMaster_Bibliography))
+ if (aServices[i] == sFieldMaster_Bibliography)
// here we should use a method which compares in reverse order if available
bFound = true;
else
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 0bc0c9617473..8bd34398caea 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2708,7 +2708,7 @@ void XMLTextImportHelper::ConnectFrameChains(
{
for(std::vector<OUString>::iterator i = m_xImpl->m_xPrevFrmNames->begin(), j = m_xImpl->m_xNextFrmNames->begin(); i != m_xImpl->m_xPrevFrmNames->end() && j != m_xImpl->m_xNextFrmNames->end(); ++i, ++j)
{
- if((*j).equals(rFrmName))
+ if((*j) == rFrmName)
{
// The previous frame must exist, because it existing than
// inserting the entry
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index fabf67802046..05cb915e31c9 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2158,12 +2158,12 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
OUString sType;
xPropSet->getPropertyValue(sTextPortionType) >>= sType;
- if( sType.equals(sText))
+ if( sType == sText)
{
exportTextRange( xTxtRange, bAutoStyles,
rPrevCharIsSpace, openFieldMark);
}
- else if( sType.equals(sTextField))
+ else if( sType == sTextField)
{
exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
}
@@ -2184,7 +2184,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE, XML_ANNOTATION_END, false, false );
}
}
- else if( sType.equals( sFrame ) )
+ else if( sType == sFrame )
{
Reference < XEnumeration> xContentEnum;
Reference < XContentEnumerationAccess > xCEA( xTxtRange,
@@ -2201,36 +2201,36 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
&xPropSet );
}
- else if (sType.equals(sFootnote))
+ else if (sType == sFootnote)
{
exportTextFootnote(xPropSet,
xTxtRange->getString(),
bAutoStyles, bIsProgress );
}
- else if (sType.equals(sBookmark))
+ else if (sType == sBookmark)
{
exportTextMark(xPropSet,
sBookmark,
lcl_XmlBookmarkElements,
bAutoStyles);
}
- else if (sType.equals(sReferenceMark))
+ else if (sType == sReferenceMark)
{
exportTextMark(xPropSet,
sReferenceMark,
lcl_XmlReferenceElements,
bAutoStyles);
}
- else if (sType.equals(sDocumentIndexMark))
+ else if (sType == sDocumentIndexMark)
{
pIndexMarkExport->ExportIndexMark(xPropSet, bAutoStyles);
}
- else if (sType.equals(sRedline))
+ else if (sType == sRedline)
{
if (nullptr != pRedlineExport)
pRedlineExport->ExportChange(xPropSet, bAutoStyles);
}
- else if (sType.equals(sRuby))
+ else if (sType == sRuby)
{
exportRuby(xPropSet, bAutoStyles);
}
@@ -2238,7 +2238,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
exportMeta(xPropSet, bAutoStyles, bIsProgress, rPrevCharIsSpace);
}
- else if (sType.equals(sTextFieldStart))
+ else if (sType == sTextFieldStart)
{
Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(sBookmark), UNO_QUERY);
@@ -2305,7 +2305,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType.equals(sTextFieldEnd))
+ else if (sType == sTextFieldEnd)
{
if (!bAutoStyles)
{
@@ -2343,7 +2343,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType.equals(sTextFieldStartEnd))
+ else if (sType == sTextFieldStartEnd)
{
if (!bAutoStyles)
{
@@ -2379,7 +2379,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
}
}
}
- else if (sType.equals(sSoftPageBreak))
+ else if (sType == sSoftPageBreak)
{
exportSoftPageBreak();
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 6f1b920fd7af..433c148e61dd 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -278,7 +278,7 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl(
{
XMLHint_Impl *const pHint = rHints.GetHints()[nPos].get();
if ( pHint->IsReference() &&
- sName.equals( static_cast<XMLReferenceHint_Impl *>(pHint)->GetRefName()) )
+ sName == static_cast<XMLReferenceHint_Impl *>(pHint)->GetRefName() )
{
// set end and stop searching
pHint->SetEnd(GetImport().GetTextImport()->
@@ -1102,8 +1102,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
{
XMLHint_Impl *const pHint = m_rHints.GetHints()[nPos].get();
if ( pHint->IsIndexMark() &&
- sID.equals(
- static_cast<XMLIndexMarkHint_Impl *>(pHint)->GetID()) )
+ sID == static_cast<XMLIndexMarkHint_Impl *>(pHint)->GetID() )
{
// set end and stop searching
pHint->SetEnd(xPos);
diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx
index 0397c3746cb7..31e9400c9bfc 100644
--- a/xmloff/source/transform/DlgOASISTContext.cxx
+++ b/xmloff/source/transform/DlgOASISTContext.cxx
@@ -77,9 +77,9 @@ void XMLDlgOASISTransformerContext::StartElement(
{
case XML_ATACTION_DLG_BORDER:
{
- if ( !rAttrValue.equals( GetXMLToken( XML_NONE ) ) &&
- !rAttrValue.equals( GetXMLToken( XML_SIMPLE ) ) &&
- !rAttrValue.equals( GetXMLToken( XML_3D ) ) )
+ if ( rAttrValue != GetXMLToken( XML_NONE ) &&
+ rAttrValue != GetXMLToken( XML_SIMPLE ) &&
+ rAttrValue != GetXMLToken( XML_3D ) )
{
pMutableAttrList->SetValueByIndex(
i, GetXMLToken( XML_NONE ) );