From e4fb171d3ad15ae9abbc93d9db956674498c9dd5 Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 14:09:04 +0200 Subject: Replaced a few equal calls with == --- embeddedobj/source/commonembedding/persistence.cxx | 7 +++---- embeddedobj/source/general/xcreator.cxx | 2 +- embeddedobj/source/msole/oleembed.cxx | 4 +--- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'embeddedobj') diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 5e62a9376e77..a7780dde30b3 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -426,8 +426,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() uno::Reference< frame::XModel > xModel( xLoadable, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aProps = xModel->getArgs(); for ( sal_Int32 nInd = 0; nInd < aProps.getLength(); nInd++ ) - if ( aProps[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ) ) - && ( aProps[nInd].Value >>= m_aLinkPassword ) ) + if ( aProps[nInd].Name == "Password" && ( aProps[nInd].Value >>= m_aLinkPassword ) ) { m_bLinkHasPassword = sal_True; break; @@ -712,7 +711,7 @@ void OCommonEmbeddedObject::SaveObject_Impl() sal_Int32 nInd = 0; for ( nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" ) ) ) ) + if ( lArguments[nInd].Name == "DocumentBaseURL" ) { lArguments[nInd].Value >>= aBaseURL; break; @@ -721,7 +720,7 @@ void OCommonEmbeddedObject::SaveObject_Impl() if ( aBaseURL.isEmpty() ) { for ( nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) - if ( lObjArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultParentBaseURL" ) ) ) ) + if ( lObjArgs[nInd].Name == "DefaultParentBaseURL" ) { lObjArgs[nInd].Value >>= aBaseURL; break; diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 1a4a5b2f54da..99c265ebe583 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -192,7 +192,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta try { uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); aAny >>= aMediaType; - if ( aMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) ) ) ) + if ( aMediaType == "application/vnd.sun.star.oleobject" ) aEmbedFactory = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ); } catch ( const uno::Exception& ) diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 268b3efa51d4..7b03cdf6ec03 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -279,9 +279,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() // use the solution only for OOXML format currently if ( !aFilterName.isEmpty() - && ( aFilterName.equals( ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "Calc MS Excel 2007 XML" ) ) ) - || aFilterName.equals( ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "Impress MS PowerPoint 2007 XML" ) ) ) - || aFilterName.equals( ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "MS Word 2007 XML" ) ) ) ) ) + && ( aFilterName == "Calc MS Excel 2007 XML" || aFilterName == "Impress MS PowerPoint 2007 XML" || aFilterName == "MS Word 2007 XML" ) ) { uno::Reference< container::XNameAccess > xFilterFactory( m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) )), -- cgit