summaryrefslogtreecommitdiff
path: root/writerfilter
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 /writerfilter
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 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/ModelEventListener.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMapHelper.cxx2
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx24
4 files changed, 15 insertions, 15 deletions
diff --git a/writerfilter/source/dmapper/ModelEventListener.cxx b/writerfilter/source/dmapper/ModelEventListener.cxx
index f4fd04adbe39..e0500fcf3e98 100644
--- a/writerfilter/source/dmapper/ModelEventListener.cxx
+++ b/writerfilter/source/dmapper/ModelEventListener.cxx
@@ -57,7 +57,7 @@ ModelEventListener::~ModelEventListener()
void ModelEventListener::notifyEvent( const document::EventObject& rEvent ) throw (uno::RuntimeException)
{
- if( rEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OnFocus")))
+ if ( rEvent.EventName == "OnFocus" )
{
try
{
diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx
index aa4996a5c4a8..b9359162323e 100644
--- a/writerfilter/source/dmapper/PropertyMapHelper.cxx
+++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx
@@ -81,7 +81,7 @@ void lcl_DumpPropertyValues(const TagLogger::Pointer_t pLogger, beans::PropertyV
{
}
- if (pValues[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TableColumnSeparators")))
+ if ( pValues[n].Name == "TableColumnSeparators" )
{
lcl_DumpTableColumnSeparators(pLogger, pValues[n].Value);
}
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 6f30944453f3..31b7b8a5e15b 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -71,7 +71,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
uno::Reference < io::XInputStream > xInputStream;
for( sal_Int32 nProperty = 0; nProperty < nPropertyCount; ++nProperty )
{
- if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TypeName")) )
+ if ( pValues[nProperty].Name == "TypeName" )
rDescriptor[nProperty].Value >>= sTypeName;
else if ( pValues[nProperty].Name == "URL" )
pValues[nProperty].Value >>= sURL;
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 1df7bb3f4942..ca2c3cb86db8 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -97,7 +97,7 @@ void RTFSdrImport::resolve(RTFShape& rShape)
for (std::vector< std::pair<rtl::OUString, rtl::OUString> >::iterator i = rShape.aProperties.begin();
i != rShape.aProperties.end(); ++i)
{
- if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("shapeType")))
+ if ( i->first == "shapeType" )
{
nType = i->second.toInt32();
switch (nType)
@@ -115,17 +115,17 @@ void RTFSdrImport::resolve(RTFShape& rShape)
if (xPropertySet.is())
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), aAny);
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("wzName")))
+ else if ( i->first == "wzName" )
{
RTFValue::Pointer_t pValue(new RTFValue(i->second));
m_rImport.getState().aCharacterAttributes->push_back(make_pair(NS_ooxml::LN_CT_NonVisualDrawingProps_name, pValue));
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("wzDescription")))
+ else if ( i->first == "wzDescription" )
{
RTFValue::Pointer_t pValue(new RTFValue(i->second));
m_rImport.getState().aCharacterAttributes->push_back(make_pair(NS_ooxml::LN_CT_NonVisualDrawingProps_descr, pValue));
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pib")))
+ else if ( i->first == "pib" )
{
m_rImport.setDestinationText(i->second);
bPib = true;
@@ -135,14 +135,14 @@ void RTFSdrImport::resolve(RTFShape& rShape)
aAny <<= lcl_BGRToRGB(i->second.toInt32());
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), aAny);
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fillBackColor")))
+ else if ( i->first == "fillBackColor" )
; // Ignore: complementer of fillColor
else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("lineColor")) && xPropertySet.is())
{
aAny <<= lcl_BGRToRGB(i->second.toInt32());
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("LineColor")), aAny);
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("lineBackColor")))
+ else if ( i->first == "lineBackColor" )
; // Ignore: complementer of lineColor
else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("txflTextFlow")) && xPropertySet.is())
{
@@ -160,7 +160,7 @@ void RTFSdrImport::resolve(RTFShape& rShape)
xPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")), aAny);
}
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pVerticies")))
+ else if ( i->first == "pVerticies" )
{
uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aCoordinates;
sal_Int32 nSize = 0; // Size of a token (it's value is hardwired in the exporter)
@@ -203,7 +203,7 @@ void RTFSdrImport::resolve(RTFShape& rShape)
aPropertyValue.Value <<= aCoordinates;
aPathPropVec.push_back(aPropertyValue);
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pSegmentInfo")))
+ else if ( i->first == "pSegmentInfo" )
{
uno::Sequence<drawing::EnhancedCustomShapeSegment> aSegments;
sal_Int32 nSize = 0;
@@ -261,13 +261,13 @@ void RTFSdrImport::resolve(RTFShape& rShape)
aPropertyValue.Value <<= aSegments;
aPathPropVec.push_back(aPropertyValue);
}
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("geoLeft")))
+ else if ( i->first == "geoLeft" )
aViewBox.X = i->second.toInt32();
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("geoTop")))
+ else if ( i->first == "geoTop" )
aViewBox.Y = i->second.toInt32();
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("geoRight")))
+ else if ( i->first == "geoRight" )
aViewBox.Width = i->second.toInt32();
- else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("geoBottom")))
+ else if ( i->first == "geoBottom" )
aViewBox.Height = i->second.toInt32();
else
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle shape property '" <<