summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /writerfilter
parentI suspect the logic is supposed to be the other way around. (diff)
downloadcore-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.tar.gz
core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.zip
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx8
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx4
-rw-r--r--writerfilter/source/filter/ImportFilter.cxx14
-rw-r--r--writerfilter/source/filter/RtfFilter.cxx3
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx3
6 files changed, 14 insertions, 20 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 5b1f4d2839eb..de03396973c1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2786,7 +2786,7 @@ void DomainMapper_Impl::CloseFieldCommand()
while (aPartIt != aItEnd)
{
- if (aPartIt->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\l")))
+ if ( *aPartIt == "\\l" )
{
++aPartIt;
@@ -2796,12 +2796,10 @@ void DomainMapper_Impl::CloseFieldCommand()
sURL = OUString('#');
sURL += *aPartIt;
}
- else if (aPartIt->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\m")) ||
- aPartIt->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\n")))
+ else if ( *aPartIt == "\\m" || *aPartIt == "\\n" )
{
}
- else if (aPartIt->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\o")) ||
- aPartIt->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\t")))
+ else if ( *aPartIt == "\\o" || *aPartIt == "\\t" )
{
++aPartIt;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 07d6591d2a55..cdfecdbfeda9 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -849,8 +849,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
for( sal_Int32 nProp = 0; nProp < aPropValues.getLength(); ++nProp)
{
// Don't add the style name properties
- bool bIsParaStyleName = aPropValues[nProp].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ParaStyleName" ) );
- bool bIsCharStyleName = aPropValues[nProp].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharStyleName" ) );
+ bool bIsParaStyleName = aPropValues[nProp].Name == "ParaStyleName";
+ bool bIsCharStyleName = aPropValues[nProp].Name == "CharStyleName";
if ( !bIsParaStyleName && !bIsCharStyleName )
{
aSortedPropVals.Insert( aPropValues[nProp] );
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index 5ac315c02d52..85303f7883f2 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -106,11 +106,10 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
#endif
writerfilter::dmapper::SourceDocumentType eType =
- (m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "writer_MS_Word_2007" ) ) ||
- m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "writer_MS_Word_2007_Template" ) ) ||
- m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "writer_OOXML" ) ) ||
- m_sFilterName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "writer_OOXML_Text_Template" ) )) ?
- writerfilter::dmapper::DOCUMENT_OOXML : writerfilter::dmapper::DOCUMENT_DOC;
+ (m_sFilterName == "writer_MS_Word_2007" || m_sFilterName == "writer_MS_Word_2007_Template" ||
+ m_sFilterName == "writer_OOXML" || m_sFilterName == "writer_OOXML_Text_Template" ) ?
+ writerfilter::dmapper::DOCUMENT_OOXML : writerfilter::dmapper::DOCUMENT_DOC;
+
writerfilter::Stream::Pointer_t pStream(new writerfilter::dmapper::DomainMapper(m_xContext, xInputStream, m_xDstDoc, eType));
//create the tokenizer and domain mapper
if( eType == writerfilter::dmapper::DOCUMENT_OOXML )
@@ -204,7 +203,7 @@ void WriterFilter::initialize( const uno::Sequence< uno::Any >& aArguments ) thr
nLength = aAnySeq.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "Type" ) ) )
+ if ( pValue[i].Name == "Type" )
{
pValue[i].Value >>= m_sFilterName;
break;
@@ -225,8 +224,7 @@ OUString WriterFilter_getImplementationName () throw (uno::RuntimeException)
sal_Bool WriterFilter_supportsService( const OUString& ServiceName ) throw (uno::RuntimeException)
{
- return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ));
+ return (ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME1 );
}
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index 2f549d0f3a9e..b57207f589f2 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -142,8 +142,7 @@ OUString RtfFilter::getImplementationName( ) throw (uno::RuntimeException)
#define SERVICE_NAME2 "com.sun.star.document.ExportFilter"
sal_Bool RtfFilter::supportsService( const OUString& rServiceName ) throw (uno::RuntimeException)
{
- return (rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ));
+ return ( rServiceName == SERVICE_NAME1 || rServiceName == SERVICE_NAME2 );
}
uno::Sequence< OUString > RtfFilter::getSupportedServiceNames( ) throw (uno::RuntimeException)
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 31b7b8a5e15b..8475dab99551 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -148,7 +148,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
sal_Bool WriterFilterDetection_supportsService( const OUString& ServiceName ) throw (uno::RuntimeException)
{
- return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) );
+ return ServiceName == SERVICE_NAME1;
}
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index c2447466b741..627700426c83 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -898,8 +898,7 @@ void RTFDocumentImpl::text(OUString& rString)
m_aStates.top().aDestinationText.append(rString);
break;
case DESTINATION_EQINSTRUCTION:
- if (rString.copy(0, 2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("do"))
- && rString.copy(2).toInt32() > 0)
+ if ( rString.copy(0, 2) == "do" && rString.copy(2).toInt32() > 0 )
dispatchFlag(RTF_SUB);
break;
default: bRet = false; break;