summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 15:05:52 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 15:07:41 +0200
commit743f22045c4ec08c46c259fc0ba240194a391457 (patch)
treefaed42bb31c4ee767619eb5c3ebd4dec0a41fa03 /xmloff
parent0c6ebe5d225d6a655f078977455cec6d0a3afa6e (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx14
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx4
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx14
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx2
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx8
-rw-r--r--xmloff/source/style/xmlstyle.cxx8
-rw-r--r--xmloff/source/text/txtfldi.cxx8
-rw-r--r--xmloff/source/xforms/xformsexport.cxx6
11 files changed, 35 insertions, 35 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index f412ab05c7a9..60cb7d867bec 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2722,7 +2722,7 @@ void SchXMLExportHelper_Impl::exportSeries(
OUString aLabelRole = aCTSeq[nCTIdx]->getRoleOfSequenceForSeriesLabel();
// special export for stock charts
- if( aChartType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")))
+ if ( aChartType == "com.sun.star.chart2.CandleStickChartType" )
{
sal_Bool bJapaneseCandleSticks = sal_False;
Reference< beans::XPropertySet > xCTProp( aCTSeq[nCTIdx], uno::UNO_QUERY );
@@ -3756,24 +3756,24 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference<
bool bBrokenRangeAvailable = false;
for( sal_Int32 i=0; i<aArgs.getLength(); ++i )
{
- if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("CellRangeRepresentation")))
+ if ( aArgs[i].Name == "CellRangeRepresentation" )
aArgs[i].Value >>= sCellRange;
- else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("BrokenCellRangeForExport")))
+ else if ( aArgs[i].Name == "BrokenCellRangeForExport" )
{
if( aArgs[i].Value >>= sBrokenRange )
bBrokenRangeAvailable = true;
}
- else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DataRowSource")))
+ else if ( aArgs[i].Name == "DataRowSource" )
{
chart::ChartDataRowSource eRowSource;
aArgs[i].Value >>= eRowSource;
mbRowSourceColumns = ( eRowSource == chart::ChartDataRowSource_COLUMNS );
}
- else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FirstCellAsLabel")))
+ else if ( aArgs[i].Name == "FirstCellAsLabel" )
aArgs[i].Value >>= mbHasSeriesLabels;
- else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("SequenceMapping")))
+ else if ( aArgs[i].Name == "SequenceMapping" )
aArgs[i].Value >>= maSequenceMapping;
- else if( aArgs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TableNumberList")))
+ else if ( aArgs[i].Name == "TableNumberList" )
aArgs[i].Value >>= msTableNumberList;
}
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 8aad9438c715..42f9032e3c56 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -409,7 +409,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Color")),
uno::makeAny( sal_Int32( 0x000000 ))); // black
}
- else if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.PieChartType")))
+ else if ( maSeriesChartTypeName == "com.sun.star.chart2.PieChartType" )
{
//@todo: this property should be saved
Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY );
@@ -427,7 +427,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
if( xSeqProp.is())
{
OUString aMainRole(RTL_CONSTASCII_USTRINGPARAM("values-y"));
- if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType") ) )
+ if ( maSeriesChartTypeName == "com.sun.star.chart2.BubbleChartType" )
aMainRole = OUString(RTL_CONSTASCII_USTRINGPARAM( "values-size" ));
xSeqProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "Role" )), uno::makeAny( aMainRole ));
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 106afea65947..c25fba0a4fe8 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -341,25 +341,25 @@ XMLTokenEnum getTokenByChartType(
{
OUString aServiceName( rChartTypeService.copy( nSkip, nTypeLength ));
- if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Line")))
+ if ( aServiceName == "Line" )
eResult = XML_LINE;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Area")))
+ else if ( aServiceName == "Area" )
eResult = XML_AREA;
else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bar")) ||
(!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Column"))))
eResult = XML_BAR;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Pie")))
+ else if ( aServiceName == "Pie" )
eResult = XML_CIRCLE;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Donut")))
+ else if ( aServiceName == "Donut" )
eResult = XML_RING;
else if( (bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("XY"))) ||
(!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Scatter"))))
eResult = XML_SCATTER;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bubble")))
+ else if ( aServiceName == "Bubble" )
eResult = XML_BUBBLE;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Net")))
+ else if ( aServiceName == "Net" )
eResult = XML_RADAR;
- else if( aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FilledNet")))
+ else if ( aServiceName == "FilledNet" )
eResult = XML_FILLED_RADAR;
else if( (bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Stock"))) ||
(!bUseOldNames && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CandleStick"))))
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 691baaf9d11c..3628e1ec2c54 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -703,7 +703,7 @@ void XMLConfigItemContext::ManipulateConfigItem()
{
nTmp = document::PrinterIndependentLayout::LOW_RESOLUTION;
}
- else if( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("disabled")) )
+ else if ( sValue == "disabled" )
{
nTmp = document::PrinterIndependentLayout::DISABLED;
}
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index be466c8c9573..5fe5c9ec13d0 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -192,7 +192,7 @@ RDFaReader::ReadCURIE(::rtl::OUString const & i_rCURIE) const
::rtl::OUString Namespace;
sal_uInt16 nKey( GetImport().GetNamespaceMap()._GetKeyByAttrName(
i_rCURIE, &Prefix, &LocalName, &Namespace) );
- if (Prefix.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("_")))
+ if ( Prefix == "_" )
{
// eeek, it's a bnode!
// "_" is not a valid URI scheme => we can identify bnodes
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index d30585f7a4bf..f40ebea041cc 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2481,7 +2481,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
// a) just omit styles.xml ids -- they are unlikely anyway...
// b) somehow find out whether we are currently exporting styles
// or content, and prefix "s" or "c" => unique
- if ( mdref.First.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("content.xml")) )
+ if ( mdref.First == "content.xml" )
{
AddAttribute( XML_NAMESPACE_XML, XML_ID, mdref.Second );
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index ce41663dbe4a..c014771bd285 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -579,7 +579,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
- if ( rAttrName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:version")) )
+ if ( rAttrName == "office:version" )
{
mpImpl->aODFVersion = xAttrList->getValueByIndex( i );
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index c39d3eef80a1..63d113a2d294 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -874,19 +874,19 @@ void SdXMLImport::SetViewSettings(const com::sun::star::uno::Sequence<com::sun::
const OUString& rName = pValues->Name;
const uno::Any rValue = pValues->Value;
- if( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("VisibleAreaTop") ) )
+ if ( rName == "VisibleAreaTop" )
{
rValue >>= aVisArea.Y;
}
- else if( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("VisibleAreaLeft") ) )
+ else if ( rName == "VisibleAreaLeft" )
{
rValue >>= aVisArea.X;
}
- else if( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("VisibleAreaWidth") ) )
+ else if ( rName == "VisibleAreaWidth" )
{
rValue >>= aVisArea.Width;
}
- else if( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("VisibleAreaHeight") ) )
+ else if ( rName == "VisibleAreaHeight" )
{
rValue >>= aVisArea.Height;
}
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index efcd5140c5d4..d99469d70338 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -614,19 +614,19 @@ sal_uInt16 SvXMLStylesContext::GetFamily(
nFamily = XML_STYLE_FAMILY_TABLE_ROW;
else if( IsXMLToken( rValue, XML_TABLE_CELL ) )
nFamily = XML_STYLE_FAMILY_TABLE_CELL;
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)))
+ else if ( rValue == XML_STYLE_FAMILY_SD_GRAPHICS_NAME )
{
nFamily = XML_STYLE_FAMILY_SD_GRAPHICS_ID;
}
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)))
+ else if ( rValue == XML_STYLE_FAMILY_SD_PRESENTATION_NAME )
{
nFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
}
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_POOL_NAME)))
+ else if ( rValue == XML_STYLE_FAMILY_SD_POOL_NAME )
{
nFamily = XML_STYLE_FAMILY_SD_POOL_ID;
}
- else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME)))
+ else if ( rValue == XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME )
{
nFamily = XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID;
}
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index cd655bfbdf5f..44257c7160e7 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2797,19 +2797,19 @@ void XMLMacroFieldImportContext::PrepareField(
sal_Int32 nLength = aValues.getLength();
for( sal_Int32 i = 0; i < nLength; i++ )
{
- if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ScriptType")) )
+ if ( aValues[i].Name == "ScriptType" )
{
// ignore ScriptType
}
- else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Library")) )
+ else if ( aValues[i].Name == "Library" )
{
aValues[i].Value >>= sLibraryName;
}
- else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MacroName")) )
+ else if ( aValues[i].Name == "MacroName" )
{
aValues[i].Value >>= sMacroName;
}
- if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")) )
+ if ( aValues[i].Name == "Script" )
{
aValues[i].Value >>= sScriptURL;
}
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index e0ce8ceec546..7016f6255ebe 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -246,11 +246,11 @@ void exportXFormsInstance( SvXMLExport& rExport,
{
OUString sName = pInstance[i].Name;
const Any& rAny = pInstance[i].Value;
- if( sName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ID") ) )
+ if ( sName == "ID" )
rAny >>= sId;
- else if( sName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL") ) )
+ else if ( sName == "URL" )
rAny >>= sURL;
- else if( sName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Instance") ))
+ else if ( sName == "Instance" )
rAny >>= xDoc;
}