diff options
94 files changed, 286 insertions, 375 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 47eb85c3303b..f20c119b3ab5 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -314,7 +314,7 @@ SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType ) { // some type names available in VBA can not be directly used in COM ::rtl::OUString aOLEType = aType; - if ( aOLEType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SAXXMLReader30" ) ) ) ) + if ( aOLEType == "SAXXMLReader30" ) aOLEType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Msxml2.SAXXMLReader.3.0" ) ); Reference< XInterface > xOLEObject = xOLEFactory->createInstance( aOLEType ); @@ -1778,7 +1778,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass ) break; } ::rtl::OUString aInterfaceName = xClass->getName(); - if ( aInterfaceName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.oleautomation.XAutomationObject" ) ) ) ) + if ( aInterfaceName == "com.sun.star.bridge.oleautomation.XAutomationObject" ) { // there is a hack in the extensions/source/ole/oleobj.cxx to return the typename of the automation object, lets check if it // matches @@ -1787,7 +1787,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass ) { rtl::OUString sTypeName; xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName; - if ( sTypeName.isEmpty() || sTypeName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) ) + if ( sTypeName.isEmpty() || sTypeName == "IDispatch" ) // can't check type, leave it pass result = true; else diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 675c27f380eb..9ffb643657b2 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -190,7 +190,7 @@ void SbiStream::MapError() ::rtl::OUString right = INetURLObject::decode( token.copy(eindex + 1).trim(), '%', INetURLObject::DECODE_WITH_CHARSET ); - if(left.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")))) + if( left == "user" ) { user = right; break; diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 18bf9739440e..c6ff1ba2fe48 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -488,7 +488,7 @@ sal_Bool SfxLibraryContainer::isModified() throw (RuntimeException) SfxLibrary* pImplLib = getImplLib( aName ); if( pImplLib->isModified() ) { - if ( aName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ) ) ) + if ( aName == "Standard" ) { // this is a workaround that has to be implemented because // empty standard library should stay marked as modified diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index bdfbab50ae4d..c04ac9308e3c 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -826,8 +826,7 @@ namespace cairocanvas uno::Reference< lang::XServiceInfo > xRef( aTexture.Gradient, uno::UNO_QUERY ); OSL_TRACE( "gradient fill" ); - if( xRef.is() && - xRef->getImplementationName().equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME ) ) ) ) + if( xRef.is() && xRef->getImplementationName() == PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME ) { // TODO(Q1): Maybe use dynamic_cast here diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx index db9b1003b2ce..7573e0e15d17 100644 --- a/comphelper/source/compare/AnyCompareFactory.cxx +++ b/comphelper/source/compare/AnyCompareFactory.cxx @@ -132,7 +132,7 @@ Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( con // for now only OUString properties compare is implemented // so no check for the property name is done - if( aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) ) + if( aPropertyName == "Title" ) return m_rAnyCompare; return Reference< XAnyCompare >(); diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 3619b2846a45..2be579e43086 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -116,18 +116,17 @@ sal_Bool DocPasswordHelper::IsModifyPasswordCorrect( const ::rtl::OUString& aPas for ( sal_Int32 nInd = 0; nInd < aInfo.getLength(); nInd++ ) { - if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "algorithm-name" ) ) ) ) + if ( aInfo[nInd].Name == "algorithm-name" ) aInfo[nInd].Value >>= sAlgorithm; - else if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "salt" ) ) ) ) + else if ( aInfo[nInd].Name == "salt" ) aInfo[nInd].Value >>= aSalt; - else if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "iteration-count" ) ) ) ) + else if ( aInfo[nInd].Name == "iteration-count" ) aInfo[nInd].Value >>= nCount; - else if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hash" ) ) ) ) + else if ( aInfo[nInd].Name == "hash" ) aInfo[nInd].Value >>= aHash; } - if ( sAlgorithm.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PBKDF2" ) ) ) - && aSalt.getLength() && nCount > 0 && aHash.getLength() ) + if ( sAlgorithm == "PBKDF2" && aSalt.getLength() && nCount > 0 && aHash.getLength() ) { uno::Sequence< sal_Int8 > aNewHash = GeneratePBKDF2Hash( aPassword, aSalt, nCount, aHash.getLength() ); for ( sal_Int32 nInd = 0; nInd < aNewHash.getLength() && nInd < aHash.getLength() && aNewHash[nInd] == aHash[nInd]; nInd ++ ) diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx index c05895a19cc3..fa444d65a278 100644 --- a/connectivity/source/drivers/mozab/MServices.cxx +++ b/connectivity/source/drivers/mozab/MServices.cxx @@ -137,7 +137,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( MozabDriver::getSupportedServiceNames_Static(), MozabDriver_CreateInstance, ::cppu::createSingleFactory); } - else if (aImplName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.mozilla.MozillaBootstrap")) )) + else if ( aImplName == "com.sun.star.comp.mozilla.MozillaBootstrap" ) { Sequence< ::rtl::OUString > aSNS( 1 ); aSNS[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")); diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index d12c2e253bdc..0d7d3af913fd 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -257,7 +257,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( { ::rtl::OUString aImplName( ::rtl::OUString::createFromAscii( pImplementationName ) ); Reference< XSingleServiceFactory > xFactory; - if (aImplName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.mozilla.MozillaBootstrap")) )) + if ( aImplName == "com.sun.star.comp.mozilla.MozillaBootstrap" ) { Sequence< ::rtl::OUString > aSNS( 1 ); aSNS[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index 8f28db88edaa..959896a0c426 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -184,19 +184,19 @@ namespace connectivity ++itor) { struct ini_NameValue * aValue = &(*itor); - if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")))) + if ( aValue->sName == "Name" ) { profileName = aValue->sValue; } - else if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRelative")))) + else if ( aValue->sName == "IsRelative" ) { sIsRelative = aValue->sValue; } - else if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Path")))) + else if ( aValue->sName == "Path" ) { profilePath = aValue->sValue; } - else if (aValue->sName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Default")))) + else if ( aValue->sName == "Default" ) { sIsDefault = aValue->sValue; } diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index f626d9e6992b..9b0cf6782a5e 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -657,7 +657,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul ::rtl::OUString user( RTL_CONSTASCII_USTRINGPARAM("user") ); ::rtl::OUString share( RTL_CONSTASCII_USTRINGPARAM("share") ); - if ( rootNode->getName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root") ) ) ) + if ( rootNode->getName() == "Root" ) { bIsRootNode = sal_True; } @@ -1085,7 +1085,7 @@ void SfxConfigGroupListBox_Impl::RequestingChildren( SvLBoxEntry *pEntry ) ::rtl::OUString user( RTL_CONSTASCII_USTRINGPARAM("user") ); ::rtl::OUString share( RTL_CONSTASCII_USTRINGPARAM("share" )); - if ( rootNode->getName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root") ) ) ) + if ( rootNode->getName() == "Root" ) { bIsRootNode = sal_True; } diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index c85443fa7cef..5216b00f0c90 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -277,11 +277,11 @@ short SvInsertOleDlg::Execute() OSL_ENSURE( aNewInf.Object.is(), "The object must be created or an exception must be thrown!" ); m_xObj = aNewInf.Object; for ( sal_Int32 nInd = 0; nInd < aNewInf.Options.getLength(); nInd++ ) - if ( aNewInf.Options[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Icon" ) ) ) ) + if ( aNewInf.Options[nInd].Name == "Icon" ) { aNewInf.Options[nInd].Value >>= m_aIconMetaFile; } - else if ( aNewInf.Options[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IconFormat" ) ) ) ) + else if ( aNewInf.Options[nInd].Name == "IconFormat" ) { datatransfer::DataFlavor aFlavor; if ( aNewInf.Options[nInd].Value >>= aFlavor ) diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index f23898fd83d9..9667757c342a 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -153,7 +153,7 @@ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObjec void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException) { const ::com::sun::star::beans::PropertyValue* pArguments = aArgs.getConstArray(); - if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AddGridColumn")))) + if ( aURL.Complete == ".uno:FormSlots/AddGridColumn" ) { // search the argument describing the column to create ::rtl::OUString sControlType; @@ -162,21 +162,21 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U sal_uInt16 i; for ( i = 0; i < aArgs.getLength(); ++i, ++pArguments ) { - if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnType")))) + if ( pArguments->Name == "ColumnType" ) { sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const ::rtl::OUString*)0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnType\" !"); if (bCorrectType) sControlType = ::comphelper::getString(pArguments->Value); } - else if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnPosition")))) + else if ( pArguments->Name == "ColumnPosition" ) { sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnPosition\" !"); if (bCorrectType) nControlPos = ::comphelper::getINT16(pArguments->Value); } - else if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnProperties")))) + else if ( pArguments->Name == "ColumnProperties" ) { sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnProperties\" !"); @@ -228,11 +228,11 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U // append the column xColContainer->insertByIndex(nControlPos, makeAny(xNewCol)); } - else if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/ClearView")))) + else if ( aURL.Complete == ".uno:FormSlots/ClearView" ) { ClearView(); } - else if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AttachToForm")))) + else if ( aURL.Complete == ".uno:FormSlots/AttachToForm" ) { if (!m_pDataSourceImpl) return; @@ -241,7 +241,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U // search the arguments for the master form for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArguments) { - if ((pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MasterForm")))) && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE)) + if ( (pArguments->Name == "MasterForm") && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE) ) { xMasterForm = Reference< XRowSet > (*(Reference< XInterface > *)pArguments->Value.getValue(), UNO_QUERY); break; @@ -268,22 +268,19 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows m_bInQueryDispatch = sal_True; - if ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AttachToForm")))) + if ( ( aURL.Complete == ".uno:FormSlots/AttachToForm" ) // attach a new external form - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AddGridColumn")))) + || ( aURL.Complete == ".uno:FormSlots/AddGridColumn" ) // add a column to the grid - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/ClearView")))) + || ( aURL.Complete == ".uno:FormSlots/ClearView" ) // clear the grid ) xReturn = (::com::sun::star::frame::XDispatch*)this; if ( !xReturn.is() - && ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToFirst")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToPrev")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToNext")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToLast")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToNew")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/undoRecord")))) + && ( (aURL.Complete == ".uno:FormSlots/moveToFirst" ) || (aURL.Complete == ".uno:FormSlots/moveToPrev" ) + || (aURL.Complete == ".uno:FormSlots/moveToNext" ) || (aURL.Complete == ".uno:FormSlots/moveToLast" ) + || (aURL.Complete == ".uno:FormSlots/moveToNew" ) || (aURL.Complete == ".uno:FormSlots/undoRecord" ) ) ) { diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 63178832aa47..63cbc0f858ec 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -407,10 +407,8 @@ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeExce //--------------------------------------------------------------------------------------- Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { - if ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/BrowserAttribs")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/RowHeight")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/ColumnAttribs")))) - || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:GridSlots/ColumnWidth")))) + if ( ( aURL.Complete == ".uno:GridSlots/BrowserAttribs" ) || ( aURL.Complete == ".uno:GridSlots/RowHeight" ) + || ( aURL.Complete == ".uno:GridSlots/ColumnAttribs" ) || ( aURL.Complete == ".uno:GridSlots/ColumnWidth" ) ) { return (::com::sun::star::frame::XDispatch*)this; diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 286a16c1fc42..14cf7b198e42 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -795,7 +795,7 @@ DescriptionInfoset::getChildWithDefaultLocale(css::uno::Reference< css::xml::dom const & xParent) const { OSL_ASSERT(xParent.is()); - if (xParent->getNodeName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("simple-license")))) + if ( xParent->getNodeName() == "simple-license" ) { css::uno::Reference<css::xml::dom::XNode> nodeDefault; try { diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index d88faea0c969..eb4e6dc4720d 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -219,7 +219,7 @@ bool needToSyncRepostitory(OUString const & name) { OUString folder; OUString file; - if (name.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")))) + if ( name == "bundled" ) { folder = OUString( RTL_CONSTASCII_USTRINGPARAM("$BUNDLED_EXTENSIONS")); @@ -227,7 +227,7 @@ bool needToSyncRepostitory(OUString const & name) RTL_CONSTASCII_USTRINGPARAM( "$BUNDLED_EXTENSIONS_USER/lastsynchronized")); } - else if (name.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("shared")))) + else if ( name == "shared" ) { folder = OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -375,18 +375,13 @@ bool office_is_running() sFile = sFile.copy(sFile.lastIndexOf('/') + 1); if ( #if defined UNIX - sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SOFFICE2))) + sFile == SOFFICE2 #elif defined WNT //osl_getExecutableFile should deliver "soffice.bin" on windows //even if swriter.exe, scalc.exe etc. was started. This is a bug //in osl_getExecutableFile - sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SOFFICE1))) - || sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SOFFICE2))) - || sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SBASE))) - || sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SCALC))) - || sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SDRAW))) - || sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SIMPRESS))) - || sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SWRITER))) + sFile == SOFFICE1 || sFile == SOFFICE2 || sFile == SBASE || sFile == SCALC + || sFile == SDRAW || sFile == SIMPRESS || sFile == SWRITER #else #error "Unsupported platform" #endif diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx index 095bb7e46e1d..b7a36380a363 100644 --- a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx @@ -97,7 +97,7 @@ ParcelDescDocHandler::startElement( const OUString& aName, aName + OUSTR("\n")); if ( !skipIndex ) { - if ( aName.equals( OUString(RTL_CONSTASCII_USTRINGPARAM( "parcel" )) ) ) + if ( aName == "parcel" ) { m_sLang = xAttribs->getValueByName( OUString(RTL_CONSTASCII_USTRINGPARAM( "language" )) ); } diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index eca75099bd58..bb4d6e80570e 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -135,43 +135,43 @@ static const char XDG_CONFIG_PART[] = "/.config"; { ::rtl::OUString sIdentifier; - if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartModule")))) + if ( sShortName == "StartModule" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("swriter")))) + else if ( sShortName == "swriter" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("scalc")))) + else if ( sShortName == "scalc" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdraw")))) + else if ( sShortName == "sdraw" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("simpress")))) + else if ( sShortName == "simpress" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smath")))) + else if ( sShortName == "smath" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.formula.FormulaProperties")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("schart")))) + else if ( sShortName == "schart" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BasicIDE")))) + else if ( sShortName == "BasicIDE" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.BasicIDE")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbapp")))) + else if ( sShortName == "dbapp" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sglobal")))) + else if ( sShortName == "sglobal" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sweb")))) + else if ( sShortName == "sweb" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.WebDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("swxform")))) + else if ( sShortName == "swxform" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xforms.XMLFormDocument")); - else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sbibliography")))) + else if ( sShortName == "sbibliography" ) sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Bibliography")); return sIdentifier; diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 64b4a6e12d1b..af86e840c07c 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -246,8 +246,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const ::rtl::OUString& sDescript if ( xDoc.is() ) { uno::Reference< xml::dom::XElement > xRoot = xDoc->getDocumentElement(); - if ( xRoot.is() && - xRoot->getTagName().equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("description"))) ) + if ( xRoot.is() && xRoot->getTagName() == "description" ) { uno::Reference< xml::xpath::XXPathAPI > xPath( m_ctx->getServiceManager()->createInstanceWithContext( diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx index 91860d7a8f63..b0f5df7bdab5 100644 --- a/dtrans/source/win32/dnd/source.cxx +++ b/dtrans/source/win32/dnd/source.cxx @@ -344,7 +344,7 @@ OUString SAL_CALL DragSource::getImplementationName( ) throw (RuntimeException) // XServiceInfo sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - if( ServiceName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(DNDSOURCE_SERVICE_NAME )))) + if( ServiceName == DNDSOURCE_SERVICE_NAME ) return sal_True; return sal_False; } diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index 42fec627fe0f..7dc85318e259 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -270,7 +270,7 @@ OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException) // XServiceInfo sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - if( ServiceName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(DNDTARGET_SERVICE_NAME )))) + if( ServiceName == DNDTARGET_SERVICE_NAME ) return sal_True; return sal_False; } diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 165c3c395463..91b68e8240c5 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -61,10 +61,9 @@ CharSet lcl_GetDefaultTextEncodingForRTF() aLocale = Application::GetSettings().GetLocale(); aLangString = aLocale.Language; - if ( aLangString.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ru" )) ) - || aLangString.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "uk" )) ) ) + if ( aLangString == "ru" || aLangString == "uk" ) return RTL_TEXTENCODING_MS_1251; - if ( aLangString.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "tr" )) ) ) + if ( aLangString == "tr" ) return RTL_TEXTENCODING_MS_1254; else return RTL_TEXTENCODING_MS_1252; 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" ) )), diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 67afa0324809..306c7aaeb965 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -197,7 +197,7 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode ) uno::Sequence< beans::PropertyValue > aResArgs = m_xDocument->getArgs(); for ( int nInd = 0; nInd < aResArgs.getLength(); nInd++ ) - if ( aResArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MacroExecutionMode" ) ) ) ) + if ( aResArgs[nInd].Name == "MacroExecutionMode" ) { aResArgs[nInd].Value >>= m_nMacroExecMode; break; diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index de7abc0f0c31..7c79ceb86980 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -498,7 +498,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName ) // Instead here I chose a name that should be illegal both in COM and // UNO ( from an IDL point of view ) therefore I think this is a safe // hack - if ( aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$GetTypeName")) )) + if ( aPropertyName == "$GetTypeName" ) { if ( pInfo && m_sTypeName.getLength() == 0 ) { diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 6c7d554f706c..cbd7d5a2a226 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -310,7 +310,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect rtl::OUString sCommand; for ( std::vector< css::beans::PropertyValue >::iterator it = props.begin(); it != props.end(); ++it ) { - if ( it->Name.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CommandURL") ) ) ) + if ( it->Name == "CommandURL" ) it->Value >>= sCommand; } if ( TBCBitMap* pIcon = pSpecificInfo->getIcon() ) diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index 078b62cb774b..b5a7139e99e0 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -102,8 +102,7 @@ static OUString encodeZipUri( const OUString& rURI ) static Reference< XInterface > addFolder( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, const OUString& rName ) throw( Exception ) { - if ( rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) ) - || rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) ) + if ( rName == ".." || rName == "." ) throw lang::IllegalArgumentException(); Sequence< Any > aArgs(1); diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 0459c3014d54..f07649fd1215 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -94,7 +94,7 @@ lcl_hasVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) const ScriptEventDescriptor* pEnd = ( pDesc + sEvents.getLength() ); for ( ; pDesc != pEnd; ++pDesc ) { - if ( pDesc->ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop") ) ) ) + if ( pDesc->ScriptType == "VBAInterop" ) return true; } return false; @@ -110,7 +110,7 @@ lcl_stripVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) sal_Int32 nCopied = 0; for ( ; pDesc != pEnd; ++pDesc ) { - if ( !pDesc->ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop") ) ) ) + if ( pDesc->ScriptType != "VBAInterop" ) { sStripped[ nCopied++ ] = *pDesc; } diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index d500b2fa42d6..565964f90ef2 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -1071,7 +1071,7 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments ) if (aArguments[i] >>= namedValue ) { - if ( namedValue.Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StandardDir" ) ) ) ) + if ( namedValue.Name == "StandardDir" ) { ::rtl::OUString sStandardDir; @@ -1083,7 +1083,7 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments ) m_aStandardDir = sStandardDir; } } - else if ( namedValue.Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BlackList" ) ) ) ) + else if ( namedValue.Name == "BlackList" ) { namedValue.Value >>= m_aBlackList; } diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx index 1d39e9df2ba6..7de75889810a 100644 --- a/framework/source/lomenubar/FrameHelper.cxx +++ b/framework/source/lomenubar/FrameHelper.cxx @@ -482,7 +482,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu, continue; // We drop the WindowList, doesn't work properly and it's useless anyhow - if (oUCommand.equals (OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:WindowList")))) + if ( oUCommand == ".uno:WindowList" ) continue; //We set the default properties (in case it was not visible or a separator) @@ -721,7 +721,7 @@ FrameHelper::dispatchCommand (OUString command) // This is a special case, we don't want the helper to be disconnected from the frame // when PrintPreview dettaches. See the frameAction method. - if (command.equals (OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:PrintPreview")))) + if ( command == ".uno:PrintPreview" ) { m_blockDetach = TRUE; } @@ -854,7 +854,7 @@ FrameHelper::findShortcutForCommand (OUString command) {} //NOTE: For some reason this item does not return its shortcut. Setting manually: - if (command.equals (OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:HelpIndex")))) + if ( command == ".uno:HelpIndex" ) { kev.KeyCode = awt::Key::F1; } diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index f254d95257dc..ff7a112e5bff 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -3161,25 +3161,25 @@ void HwpReader::makeFieldCode(FieldCode *hbox) /* 문서요약 */ else if( hbox->type[0] == 3 && hbox->type[1] == 0 ) { - if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("title")))) + if( hconv( hbox->str3, gstr ) == "title" ) { rstartEl( ascii("text:title"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:title") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("subject")))) + else if( hconv( hbox->str3, gstr ) == "subject" ) { rstartEl( ascii("text:subject"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:subject") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("author")))) + else if( hconv( hbox->str3, gstr ) == "author" ) { rstartEl( ascii("text:author-name"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:author-name") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("keywords")))) + else if( hconv( hbox->str3, gstr ) == "keywords" ) { rstartEl( ascii("text:keywords"), rList ); rchars( hconv(hbox->str2, gstr) ); @@ -3189,61 +3189,61 @@ void HwpReader::makeFieldCode(FieldCode *hbox) /* 개인정보 */ else if( hbox->type[0] == 3 && hbox->type[1] == 1 ) { - if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("User")))) + if( hconv( hbox->str3, gstr ) == "User" ) { rstartEl( ascii("text:sender-lastname"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-lastname") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Company")))) + else if( hconv( hbox->str3, gstr ) == "Company" ) { rstartEl( ascii("text:sender-company"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-company") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Position")))) + else if( hconv( hbox->str3, gstr ) == "Position" ) { rstartEl( ascii("text:sender-title"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-title") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Division")))) + else if( hconv( hbox->str3, gstr ) == "Division" ) { rstartEl( ascii("text:sender-position"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-position") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Fax")))) + else if( hconv( hbox->str3, gstr ) == "Fax" ) { rstartEl( ascii("text:sender-fax"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-fax") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Pager")))) + else if( hconv( hbox->str3, gstr ) == "Pager" ) { rstartEl( ascii("text:phone-private"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:phone-private") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("E-mail")))) + else if( hconv( hbox->str3, gstr ) == "E-mail" ) { rstartEl( ascii("text:sender-email"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-email") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Zipcode(office)")))) + else if( hconv( hbox->str3, gstr ) == "Zipcode(office)" ) { rstartEl( ascii("text:sender-postal-code"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-postal-code") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Phone(office)")))) + else if( hconv( hbox->str3, gstr ) == "Phone(office)" ) { rstartEl( ascii("text:sender-phone-work"), rList ); rchars( hconv(hbox->str2, gstr) ); rendEl( ascii("text:sender-phone-work") ); } - else if( hconv( hbox->str3, gstr ).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Address(office)")))) + else if( hconv( hbox->str3, gstr ) == "Address(office)" ) { rstartEl( ascii("text:sender-street"), rList ); rchars( hconv(hbox->str2, gstr) ); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index f28882186ba9..a4b9a1d3260a 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -99,7 +99,7 @@ OString getPluginJarPath( OUString sName1(RTL_CONSTASCII_USTRINGPARAM("javaplugin.jar")); OUString sName2(RTL_CONSTASCII_USTRINGPARAM("plugin.jar")); OUString sPath; - if (sVendor.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SUN_MICRO)))) + if ( sVendor == SUN_MICRO ) { SunVersion ver142("1.4.2-ea"); SunVersion ver150("1.5.0-ea"); diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 928588aab4ad..670898cc65a7 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -69,8 +69,7 @@ bool isAccessibilitySupportDesired() { OUString sValue; if ((sal_True == ::rtl::Bootstrap::get( - OUString(RTL_CONSTASCII_USTRINGPARAM("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY")), sValue)) - && sValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("1"))) + OUString(RTL_CONSTASCII_USTRINGPARAM("JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY")), sValue)) && sValue == "1" ) return false; diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx index 572312237086..509c1217b2e3 100644 --- a/oox/source/export/SchXMLSeriesHelper.cxx +++ b/oox/source/export/SchXMLSeriesHelper.cxx @@ -179,7 +179,7 @@ bool SchXMLSeriesHelper::isCandleStickSeries( if( xChartType.is() ) { rtl::OUString aServiceName( xChartType->getChartType() ); - if( aServiceName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.CandleStickChartType" ) ) ) ) + if( aServiceName == "com.sun.star.chart2.CandleStickChartType" ) bRet = true; } } diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx index 749050802276..40786dbd21ad 100644 --- a/package/source/manifest/ManifestExport.cxx +++ b/package/source/manifest/ManifestExport.cxx @@ -131,7 +131,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa break; } - if ( aPath.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ) ) + if ( aPath == "/" ) { aDocMediaType = aMediaType; aDocVersion = aVersion; @@ -144,22 +144,21 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa sal_Bool bStoreStartKeyGeneration = sal_False; if ( !aDocMediaType.isEmpty() ) { - if ( aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) ) ) - - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII ) ) ) - || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII ) ) ) ) + if ( aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII + || aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII ) { // oasis format diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx index 01cf6a5136c7..977a454b144f 100644 --- a/package/source/manifest/ManifestImport.cxx +++ b/package/source/manifest/ManifestImport.cxx @@ -403,8 +403,7 @@ void SAL_CALL ManifestImport::setDocumentLocator( const uno::Reference< xml::sax StringHashMap::const_iterator aIter = aNamespaces.find( aNsAlias ); if ( aIter != aNamespaces.end() - && ( aIter->second.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MANIFEST_NAMESPACE ) ) ) - || aIter->second.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MANIFEST_OASIS_NAMESPACE ) ) ) ) ) + && ( aIter->second == MANIFEST_NAMESPACE || aIter->second == MANIFEST_OASIS_NAMESPACE ) ) { // no check for manifest.xml consistency currently since the old versions have supported inconsistent documents as well aResult = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MANIFEST_NSPREFIX ) ); diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 697b988a0144..114a2ff2226a 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -3178,9 +3178,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa if ( !m_pImpl->m_bCompressedSetExplicit ) { - if ( aType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/jpeg" ) ) ) - || aType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/png" ) ) ) - || aType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/gif" ) ) ) ) + if ( aType == "image/jpeg" || aType == "image/png" || aType == "image/gif" ) bCompressedValueFromType = sal_False; } diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 579392bc7c73..0950ec491fe4 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -664,7 +664,7 @@ void OStorage_Impl::ReadContents() uno::Reference< container::XNameContainer > xNameContainer( xNamed, uno::UNO_QUERY ); SotElement_Impl* pNewElement = new SotElement_Impl( aName, xNameContainer.is(), sal_False ); - if ( m_nStorageType == embed::StorageFormats::OFOPXML && aName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" ) { if ( !pNewElement->m_bIsStorage ) throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); // TODO: Unexpected format @@ -850,8 +850,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, sal_Int32 nNum = 0; for ( int ind = 0; ind < aSrcPkgProps.getLength(); ind++ ) { - if ( aSrcPkgProps[ind].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) ) ) - || aSrcPkgProps[ind].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "Compressed" ) ) ) ) + if ( aSrcPkgProps[ind].Name == "MediaType" || aSrcPkgProps[ind].Name == "Compressed" ) { aStrProps.realloc( ++nNum ); aStrProps[nNum-1].Name = aSrcPkgProps[ind].Name; @@ -2497,8 +2496,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement( if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aStreamName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap ) @@ -2615,8 +2613,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aStorName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStorName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name if ( ( nStorageMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap ) @@ -2770,8 +2767,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const ::rtl if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aStreamName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name try @@ -2936,8 +2932,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aStorName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStorName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name // it's allways possible to read written storage in this implementation @@ -3030,8 +3025,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const ::rtl::OUString& aElementName if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable name SotElement_Impl* pElement = NULL; @@ -3099,8 +3093,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const ::rtl::OUString& aElementNam if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); SotElement_Impl* pElement = NULL; @@ -3172,8 +3165,7 @@ void SAL_CALL OStorage::removeElement( const ::rtl::OUString& aElementName ) if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) @@ -3267,9 +3259,7 @@ void SAL_CALL OStorage::renameElement( const ::rtl::OUString& aElementName, cons || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && ( aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) - || aNewName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); // TODO: unacceptable element name if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) @@ -3378,9 +3368,7 @@ void SAL_CALL OStorage::copyElementTo( const ::rtl::OUString& aElementName, // || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 2 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && ( aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) - || aNewName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name try @@ -3482,9 +3470,7 @@ void SAL_CALL OStorage::moveElementTo( const ::rtl::OUString& aElementName, if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 2 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && ( aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) - || aNewName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) @@ -4387,8 +4373,7 @@ uno::Any SAL_CALL OStorage::getByName( const ::rtl::OUString& aName ) if ( aName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name uno::Any aResult; @@ -4492,8 +4477,7 @@ sal_Bool SAL_CALL OStorage::hasByName( const ::rtl::OUString& aName ) if ( aName.isEmpty() ) return sal_False; - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" ) return sal_False; SotElement_Impl* pElement = NULL; @@ -5000,7 +4984,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, // WORKAROUND: // The old document might have no version in the manifest.xml, so we have to allow to set the version // even for readonly storages, so that the version from content.xml can be used. - if ( m_pData->m_bReadOnlyWrap && !aPropertyName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) ) + if ( m_pData->m_bReadOnlyWrap && aPropertyName != "Version" ) throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); // TODO: Access denied if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) @@ -5704,8 +5688,7 @@ void SAL_CALL OStorage::insertStreamElementDirect( if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aStreamName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name if ( m_pData->m_bReadOnlyWrap ) @@ -5801,9 +5784,7 @@ void SAL_CALL OStorage::copyElementDirectlyTo( if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 2 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && ( aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) - || aNewName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); // unacceptable name try @@ -6057,8 +6038,7 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const ::rtl::OUString& aEle if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aElementName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name try @@ -6160,8 +6140,7 @@ void SAL_CALL OStorage::copyStreamElementData( const ::rtl::OUString& aStreamNam if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected entry name syntax." ) ), uno::Reference< uno::XInterface >(), 1 ); - if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML - && aStreamName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_rels" ) ) ) ) + if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); // unacceptable name if ( !xTargetStream.is() ) diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index c6bbff940b29..799f2bf00002 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -349,8 +349,7 @@ void ZipPackage::parseManifest() pStream->SetToBeCompressed ( sal_True ); pStream->SetToBeEncrypted ( sal_True ); pStream->SetIsEncrypted ( sal_True ); - if ( !m_bHasEncryptedEntries - && pStream->getName().equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ) ) ) ) + if ( !m_bHasEncryptedEntries && pStream->getName() == "content.xml" ) { m_bHasEncryptedEntries = sal_True; m_nStartKeyGenerationID = nStartKeyAlg; @@ -633,18 +632,18 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) do { ::rtl::OUString aCommand = aParam.getToken( 0, '&', nIndex ); - if ( aCommand.equals( OUString(RTL_CONSTASCII_USTRINGPARAM( "repairpackage" )) ) ) + if ( aCommand == "repairpackage" ) { m_bForceRecovery = sal_True; break; } - else if ( aCommand.equals( OUString(RTL_CONSTASCII_USTRINGPARAM( "purezip" )) ) ) + else if ( aCommand == "purezip" ) { m_nFormat = embed::StorageFormats::ZIP; m_pRootFolder->setPackageFormat_Impl( m_nFormat ); break; } - else if ( aCommand.equals( OUString(RTL_CONSTASCII_USTRINGPARAM( "ofopxml" )) ) ) + else if ( aCommand == "ofopxml" ) { m_nFormat = embed::StorageFormats::OFOPXML; m_pRootFolder->setPackageFormat_Impl( m_nFormat ); diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index b8811b5f61cf..54b79139bd7a 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -101,7 +101,7 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const ::rtl::OUString& if ( rInfo.bFolder ) { - if ( aPath.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF/" ) ) ) ) + if ( aPath == "META-INF/" ) { // META-INF is not allowed to contain subfolders bHasUnexpected = sal_True; @@ -114,9 +114,9 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const ::rtl::OUString& } else { - if ( aPath.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF/" ) ) ) ) + if ( aPath == "META-INF/" ) { - if ( !rShortName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "manifest.xml" ) ) ) + if ( rShortName != "manifest.xml" && rShortName.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "signatures" ) ) ) == -1 ) { // a stream from META-INF with unexpected name @@ -129,8 +129,7 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const ::rtl::OUString& { // the stream is not in META-INF and ist notregistered in manifest.xml, // check whether it is an internal part of the package format - if ( !aPath.isEmpty() - || !rShortName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "mimetype" ) ) ) ) + if ( !aPath.isEmpty() || rShortName != "mimetype" ) { // if it is not "mimetype" from the root it is not a part of the package bHasUnexpected = sal_True; diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index d49c0b3a0029..c4fbbe380ceb 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -720,7 +720,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, if ( !sMediaType.isEmpty() ) { if ( sMediaType.indexOf ( OUString( RTL_CONSTASCII_USTRINGPARAM ( "text" ) ) ) != -1 - || sMediaType.equals( OUString( RTL_CONSTASCII_USTRINGPARAM ( "application/vnd.sun.star.oleobject" ) ) ) ) + || sMediaType == "application/vnd.sun.star.oleobject" ) bToBeCompressed = sal_True; else if ( !m_bCompressedIsSetFromOutside ) bToBeCompressed = sal_False; diff --git a/registry/test/testmerge.cxx b/registry/test/testmerge.cxx index fb648881de19..f1940c07cd70 100644 --- a/registry/test/testmerge.cxx +++ b/registry/test/testmerge.cxx @@ -189,7 +189,7 @@ void test_merge() RegistryKey rootKey, key1, mkey1, key2, mkey2, key1u2, mkey1u2; REG_ENSURE(!myRegistry->create(OUString(RTL_CONSTASCII_USTRINGPARAM("mergetest.rdb"))), "testMerge error 1"); - REG_ENSURE(myRegistry->getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("mergetest.rdb"))), "testMerge error 1.a)"); + REG_ENSURE(myRegistry->getName() == "mergetest.rdb", "testMerge error 1.a)"); REG_ENSURE(!myRegistry->openRootKey(rootKey), "testMerge error 2"); REG_ENSURE(!myRegistry->loadKey(rootKey, OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv/IchbineinMergeKey")), OUString(RTL_CONSTASCII_USTRINGPARAM("merge1.rdb"))), "testMerge error 3"); diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx index a9cd97186419..0517e3bb42b2 100644 --- a/registry/test/testregcpp.cxx +++ b/registry/test/testregcpp.cxx @@ -152,7 +152,7 @@ void test_coreReflection() if (reader.isValid()) { - REG_ENSURE(reader.getTypeName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA"))), "testCoreReflection error 9a2"); + REG_ENSURE(reader.getTypeName() == "ModuleA", "testCoreReflection error 9a2"); RTConstValue aReadConst = reader.getFieldConstValue(4); REG_ENSURE( aReadConst.m_type == RT_TYPE_INT32, "testCoreReflection error 9a3"); @@ -267,7 +267,7 @@ void test_coreReflection() if (reader.isValid()) { - REG_ENSURE(reader.getTypeName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/XInterfaceA"))), "testCoreReflection error 9c2"); + REG_ENSURE(reader.getTypeName() == "ModuleA/XInterfaceA", "testCoreReflection error 9c2"); RTUik retUik; reader.getUik(retUik); @@ -332,13 +332,13 @@ void test_coreReflection() if (reader.isValid()) { - REG_ENSURE(reader.getTypeName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/ServiceA"))), "testCoreReflection error 9e3"); + REG_ENSURE(reader.getTypeName() == "ModuleA/ServiceA", "testCoreReflection error 9e3"); sal_uInt32 referenceCount = reader.getReferenceCount(); REG_ENSURE( referenceCount == 4, "testCoreReflection error 9e4"); OUString refName = reader.getReferenceName(0); - REG_ENSURE(refName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleA/XInterfaceA"))), "testCoreReflection error 9e5"); + REG_ENSURE(refName == "ModuleA/XInterfaceA", "testCoreReflection error 9e5"); } } @@ -402,7 +402,7 @@ void test_registry_CppApi() REG_ENSURE(!key4.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("2")), key3), "test_registry_CppApi error 6c"); REG_ENSURE(!key5.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("1")), key4), "test_registry_CppApi error 6d"); REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myThirdKey/1")), key4), "test_registry_CppApi error 6e"); - REG_ENSURE(key4.getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myThirdKey/1"))), "test_registry_CppApi error 6f"); + REG_ENSURE(key4.getName() == "/myThirdKey/1", "test_registry_CppApi error 6f"); REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFourthKey")), key6), "test_registry_CppApi error 7"); REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFifthKey")), key6), "test_registry_CppApi error 7a"); @@ -417,7 +417,7 @@ void test_registry_CppApi() OUString linkTarget; REG_ENSURE(!key6.getLinkTarget(OUString(RTL_CONSTASCII_USTRINGPARAM("myFirstLink")), linkTarget), "test_registry_CppApi error 7f"); - REG_ENSURE(linkTarget.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X"))), "test_registry_CppApi error 7g"); + REG_ENSURE(linkTarget == "/myFourthKey/X", "test_registry_CppApi error 7g"); RegistryKeyNames* pSubKeyNames = new RegistryKeyNames(); sal_uInt32 nSubKeys=0; @@ -427,7 +427,7 @@ void test_registry_CppApi() for (sal_uInt32 i=0; i < pSubKeyNames->getLength(); i++) { - if (pSubKeyNames->getElement(i).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/myFirstLink")))) + if ( pSubKeyNames->getElement(i) == "/mySixthKey/myFirstLink" ) { RegKeyType keyType; REG_ENSURE(!rootKey.getKeyType(pSubKeyNames->getElement(i), &keyType), "test_registry_CppApi error 7j"); @@ -439,22 +439,22 @@ void test_registry_CppApi() delete pSubKeyNames; REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/myFirstLink")), key6), "test_registry_CppApi error 7l"); -// REG_ENSURE(key6.getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X"))), "test_registry_CppApi error 7m"); +// REG_ENSURE(key6.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m"); REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("myFifthKey")), key6), "test_registry_CppApi error 7m1"); REG_ENSURE(!key6.createLink(OUString(RTL_CONSTASCII_USTRINGPARAM("mySecondLink")), OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/myFirstLink"))), "test_registry_CppApi error 7m2"); REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink")), key6), "test_registry_CppApi error 7m3"); -// REG_ENSURE(key6.getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X"))), "test_registry_CppApi error 7m4"); +// REG_ENSURE(key6.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m4"); REG_ENSURE(!rootKey.createKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink/myFirstLinkSubKey")), key7), "test_registry_CppApi error 7m5"); - REG_ENSURE(key7.getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X/myFirstLinkSubKey"))), "test_registry_CppApi error 7m6"); + REG_ENSURE(key7.getName() == "/myFourthKey/X/myFirstLinkSubKey", "test_registry_CppApi error 7m6"); REG_ENSURE(!key7.createLink(OUString(RTL_CONSTASCII_USTRINGPARAM("myThirdLink")), OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink"))), "test_registry_CppApi error 7m7"); REG_ENSURE(!rootKey.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X/myFirstLinkSubKey/myThirdLink")), key7), "test_registry_CppApi error 7m8"); // REG_ENSURE(!key7.openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFirstLinkSubKey/myThirdLink/myFirstLinkSubKey/myThirdLink")), key6), "test_registry_CppApi error 7m9"); -// REG_ENSURE(key7.getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFourthKey/X"))), "test_registry_CppApi error 7m10"); +// REG_ENSURE(key7.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m10"); REG_ENSURE(!key7.closeKey(), "test_registry_CppApi error 7m11"); REG_ENSURE(!rootKey.deleteLink(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFifthKey/mySecondLink"))), "test_registry_CppApi error 7m12"); @@ -475,8 +475,8 @@ void test_registry_CppApi() nSubKeys = subKeyNames.getLength(); REG_ENSURE(nSubKeys == 2, "test_registry_CppApi error 7n1"); - REG_ENSURE(subKeyNames.getElement(0).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/myFirstLink"))), "test_registry_CppApi error 7p1)"); - REG_ENSURE(subKeyNames.getElement(1).equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/mySixthKey/mySixthSubKey"))), "test_registry_CppApi error 7p2"); + REG_ENSURE(subKeyNames.getElement(0) == "/mySixthKey/myFirstLink", "test_registry_CppApi error 7p1)"); + REG_ENSURE(subKeyNames.getElement(1) =="/mySixthKey/mySixthSubKey", "test_registry_CppApi error 7p2"); RegistryKeyArray subKeys; @@ -486,8 +486,8 @@ void test_registry_CppApi() nSubKeys = subKeys.getLength(); REG_ENSURE(nSubKeys == 2, "test_registry_CppApi error 7o1"); - REG_ENSURE(subKeys.getElement(0).getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFirstKey/mySecondSubKey"))), "test_registry_CppApi error 7p1)"); - REG_ENSURE(subKeys.getElement(1).getName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("/myFirstKey/X"))), "test_registry_CppApi error 7p2"); + REG_ENSURE(subKeys.getElement(0).getName() == "/myFirstKey/mySecondSubKey", "test_registry_CppApi error 7p1)"); + REG_ENSURE(subKeys.getElement(1).getName() == "/myFirstKey/X", "test_registry_CppApi error 7p2"); REG_ENSURE(!rootKey.closeSubKeys(subKeys), "test_registry_CppApi error 7q)"); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index d81654971b38..45e061192c19 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2896,7 +2896,7 @@ uno::Sequence< datatransfer::DataFlavor > SAL_CALL OReportDefinition::getTransfe // ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OReportDefinition::isDataFlavorSupported( const datatransfer::DataFlavor& aFlavor ) throw (uno::RuntimeException) { - return aFlavor.MimeType.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/png"))); + return aFlavor.MimeType == "image/png"; } // ----------------------------------------------------------------------------- diff --git a/sal/qa/osl/socket/osl_Socket.cxx b/sal/qa/osl/socket/osl_Socket.cxx index fac6c3128ebc..92c4a37691c0 100644 --- a/sal/qa/osl/socket/osl_Socket.cxx +++ b/sal/qa/osl/socket/osl_Socket.cxx @@ -1382,7 +1382,7 @@ namespace osl_SocketAddr // LLA: IMHO localhost, or hostname by itself should be ok. rtl::OUString suThisHost = getThisHostname( ); bool bOk = false; - if (suThisHost.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("localhost")))) + if ( suThisHost == "localhost" ) { bOk = true; } diff --git a/sal/qa/osl/socket/osl_SocketAddr.cxx b/sal/qa/osl/socket/osl_SocketAddr.cxx index cbc1ca63bf21..7b8c2c9f1eb0 100644 --- a/sal/qa/osl/socket/osl_SocketAddr.cxx +++ b/sal/qa/osl/socket/osl_SocketAddr.cxx @@ -731,7 +731,7 @@ namespace osl_SocketAddr // LLA: IMHO localhost, or hostname by itself should be ok. rtl::OUString suThisHost = getThisHostname( ); bool bOk = false; - if (suThisHost.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("localhost")))) + if ( suThisHost == "localhost" ) { bOk = true; } diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx index 71aa8da979b2..38ffcd44026f 100644 --- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx +++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx @@ -490,7 +490,7 @@ namespace rtl_Bootstrap rtl_bootstrap_get_from_handle(bsHandle, suKeyName.pData, &suValue.pData, NULL); printUString( suValue); - CPPUNIT_ASSERT_MESSAGE("Can not use the handle which is returned by getHandle!", suValue.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("be pseudo")) ) == sal_True ); + CPPUNIT_ASSERT_MESSAGE( "Can not use the handle which is returned by getHandle!", suValue == "be pseudo" ); } CPPUNIT_TEST_SUITE(getHandle); @@ -645,13 +645,13 @@ namespace rtl_Bootstrap t_print("SOFROMVALUE3:"); printUString( suMacro ); - if (suMacro.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("testshl2_file")) ) == sal_True) + if ( suMacro == "testshl2_file" ) { CPPUNIT_ASSERT_MESSAGE("Value 'SOFROMVALUE3' is read from the wrong ini file.", 0 ); } else { - CPPUNIT_ASSERT_MESSAGE("SOFROMVALUE3 should contain 'rtlfile'.", suMacro.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rtlfile")) ) == sal_True ); + CPPUNIT_ASSERT_MESSAGE( "SOFROMVALUE3 should contain 'rtlfile'.", suMacro == "rtlfile" ); } } void expandMacrosFrom_003() diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx index 40e505c07d29..2cc938701e36 100644 --- a/sal/qa/rtl/locale/rtl_locale.cxx +++ b/sal/qa/rtl/locale/rtl_locale.cxx @@ -143,13 +143,13 @@ public: { rtl::OLocale aLocale = ::rtl::OLocale::getDefault(); rtl::OUString suLanguage = aLocale.getLanguage(); - CPPUNIT_ASSERT_MESSAGE("locale language must be 'de'", suLanguage.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")))); + CPPUNIT_ASSERT_MESSAGE( "locale language must be 'de'", suLanguage == "de" ); } void getLanguage_002() { rtl::OLocale aLocale = ::rtl::OLocale::getDefault(); rtl::OUString suLanguage(rtl_locale_getLanguage(aLocale.getData()), SAL_NO_ACQUIRE); - CPPUNIT_ASSERT_MESSAGE("locale language must be 'de'", suLanguage.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de")))); + CPPUNIT_ASSERT_MESSAGE( "locale language must be 'de'", suLanguage == "de" ); } // Change the following lines only, if you add, remove or rename @@ -182,13 +182,13 @@ public: { rtl::OLocale aLocale = ::rtl::OLocale::getDefault(); rtl::OUString suCountry = aLocale.getCountry(); - CPPUNIT_ASSERT_MESSAGE("locale country must be 'DE'", suCountry.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE")))); + CPPUNIT_ASSERT_MESSAGE( "locale country must be 'DE'", suCountry == "DE" ); } void getCountry_002() { rtl::OLocale aLocale = ::rtl::OLocale::getDefault(); rtl::OUString suCountry(rtl_locale_getCountry(aLocale.getData()), SAL_NO_ACQUIRE); - CPPUNIT_ASSERT_MESSAGE("locale country must be 'DE'", suCountry.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE")))); + CPPUNIT_ASSERT_MESSAGE( "locale country must be 'DE'", suCountry == "DE" ); } // Change the following lines only, if you add, remove or rename @@ -221,13 +221,13 @@ public: { rtl::OLocale aLocale = ::rtl::OLocale::getDefault(); rtl::OUString suVariant = aLocale.getVariant(); - CPPUNIT_ASSERT_MESSAGE("locale variant must be 'hochdeutsch'", suVariant.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hochdeutsch")))); + CPPUNIT_ASSERT_MESSAGE( "locale variant must be 'hochdeutsch'", suVariant == "hochdeutsch" ); } void getVariant_002() { rtl::OLocale aLocale = ::rtl::OLocale::getDefault(); rtl::OUString suVariant(rtl_locale_getVariant(aLocale.getData()), SAL_NO_ACQUIRE); - CPPUNIT_ASSERT_MESSAGE("locale variant must be 'hochdeutsch'", suVariant.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hochdeutsch")))); + CPPUNIT_ASSERT_MESSAGE( "locale variant must be 'hochdeutsch'", suVariant == "hochdeutsch" ); } // Change the following lines only, if you add, remove or rename diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index 37711cf0dad4..aca03781bc3e 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -67,7 +67,7 @@ namespace rtl_OUString memset(pBuffer, 0, 2 * 8); free(pBuffer); - sal_Bool bResult = aStrToTest.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a String"))); + sal_Bool bResult = aStrToTest == "a String"; CPPUNIT_ASSERT_MESSAGE("String must not be empty", bResult == sal_True); } @@ -889,10 +889,10 @@ public: sal_Int32 nIndex = 0; rtl::OUString suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'a'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'a'", suToken == "a" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'b'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("b"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'b'", suToken == "b" ); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } @@ -903,13 +903,13 @@ public: sal_Int32 nIndex = 0; rtl::OUString suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'a'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'a'", suToken == "a" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'b'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("b"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'b'", suToken == "b" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'c'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("c"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'c'", suToken == "c" ); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } @@ -920,13 +920,13 @@ public: sal_Int32 nIndex = 0; rtl::OUString suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'a'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'a'", suToken == "a" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.getLength() == 0); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be a 'b'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("b"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be a 'b'", suToken == "b" ); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } @@ -937,13 +937,13 @@ public: sal_Int32 nIndex = 0; rtl::OUString suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be 'longer'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("longer"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be 'longer'", suToken == "longer" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be 'then'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("then"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be 'then'", suToken == "then" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be 'ever'", suToken.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ever"))) == sal_True); + CPPUNIT_ASSERT_MESSAGE( "Token should be 'ever'", suToken == "ever" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.getLength() == 0); diff --git a/sal/qa/rtl_strings/rtl_old_testowstring.cxx b/sal/qa/rtl_strings/rtl_old_testowstring.cxx index 0b99361dcb49..4d4eb686dda4 100644 --- a/sal/qa/rtl_strings/rtl_old_testowstring.cxx +++ b/sal/qa/rtl_strings/rtl_old_testowstring.cxx @@ -282,13 +282,13 @@ void oldtests::test_OString2OUStringAndViceVersa() { OString s1("Hallo jetzt komm ich"); OUString u1 = OStringToOUString(s1, RTL_TEXTENCODING_MS_1252); - TEST_ENSURE( u1.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo jetzt komm ich"))), "test_OString2OWStringAndViceVersa error 1" ); + TEST_ENSURE( u1 == "Hallo jetzt komm ich", "test_OString2OWStringAndViceVersa error 1" ); u1 = OStringToOUString(s1, RTL_TEXTENCODING_IBM_850); - TEST_ENSURE( u1.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo jetzt komm ich"))), "test_OString2OWStringAndViceVersa error 2" ); + TEST_ENSURE( u1 == "Hallo jetzt komm ich", "test_OString2OWStringAndViceVersa error 2" ); u1 = OStringToOUString(s1, RTL_TEXTENCODING_ISO_8859_15); - TEST_ENSURE( u1.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo jetzt komm ich"))), "test_OString2OWStringAndViceVersa error 3" ); + TEST_ENSURE( u1 == "Hallo jetzt komm ich", "test_OString2OWStringAndViceVersa error 3" ); u1 = OStringToOUString(s1, RTL_TEXTENCODING_ASCII_US); - TEST_ENSURE( u1.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("Hallo jetzt komm ich"))), "test_OString2OWStringAndViceVersa error 4" ); + TEST_ENSURE( u1 == "Hallo jetzt komm ich", "test_OString2OWStringAndViceVersa error 4" ); OString s2 = OUStringToOString(u1, RTL_TEXTENCODING_MS_1252); TEST_ENSURE( s2.equals("Hallo jetzt komm ich"), "test_OString2OWStringAndViceVersa error 5" ); diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index 9a68b7706fa2..c5aa5a2e002a 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -158,7 +158,7 @@ void ScMacrosTest::testVba() rtl::OUString aStringRes; aRet >>= aStringRes; std::cout << "value of Ret " << rtl::OUStringToOString( aStringRes, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl; - CPPUNIT_ASSERT_MESSAGE("script reported failure",aStringRes.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OK") )) ); + CPPUNIT_ASSERT_MESSAGE( "script reported failure",aStringRes == "OK" ); pFoundShell->DoClose(); } } diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 911cd406488e..f1f8a4053afe 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1003,7 +1003,7 @@ void XclObjAny::SaveXml( XclExpXmlStream& rStrm ) { // ignore group shapes at the moment, we don't process them correctly // leading to ms2010 rejecting the content - if( !mxShape.is() || mxShape->getShapeType().equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape") ) ) ) + if( !mxShape.is() || mxShape->getShapeType() == "com.sun.star.drawing.GroupShape" ) return; sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream(); diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index e2b121672ec5..1b58d21bd153 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -66,7 +66,7 @@ XMLTableShapeImportHelper::~XMLTableShapeImportHelper() void XMLTableShapeImportHelper::SetLayer(uno::Reference<drawing::XShape>& rShape, sal_Int16 nLayerID, const rtl::OUString& sType) const { - if (sType.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")))) + if ( sType == "com.sun.star.drawing.ControlShape" ) nLayerID = SC_LAYER_CONTROLS; if (nLayerID != -1) { diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index f706b3cd66b2..7c0c93345f54 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -115,7 +115,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce try { rtl::OUString sDiagramType = mxChartDocument->getDiagram()->getDiagramType(); - if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.AreaDiagram" )))) + if ( sDiagramType == "com.sun.star.chart.AreaDiagram" ) { if (is3D()) { @@ -126,14 +126,14 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce nChartType = getStackedType(xlAreaStacked, xlAreaStacked100, xlArea); } } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.PieDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.PieDiagram" ) { if (is3D()) nChartType = xl3DPie; else nChartType = xlPie; /*TODO XlChartType xlPieExploded, XlChartType xlPieOfPie */ } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.BarDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.BarDiagram" ) { sal_Int32 nSolidType = chart::ChartSolidType::RECTANGULAR_SOLID; if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(SOLIDTYPE)) @@ -164,7 +164,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce break; } } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.StockDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.StockDiagram" ) { sal_Bool bVolume = false; mxDiagramPropertySet->getPropertyValue(VOLUME) >>= bVolume; @@ -177,7 +177,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce nChartType = getStockUpDownValue(xlStockOHLC, xlStockHLC); } } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.XYDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.XYDiagram" ) { sal_Bool bHasLines = false; mxDiagramPropertySet->getPropertyValue(LINES) >>= bHasLines; @@ -196,7 +196,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce nChartType = xlXYScatter; } } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.LineDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.LineDiagram" ) { if (is3D()) { @@ -211,11 +211,11 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce nChartType = getStackedType(xlLineStacked, xlLineStacked100, xlLine); } } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.DonutDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.DonutDiagram" ) { nChartType = xlDoughnut; // TODO DoughnutExploded ?? } - else if (sDiagramType.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.NetDiagram")))) + else if ( sDiagramType == "com.sun.star.chart.NetDiagram" ) { nChartType = getMarkerType(xlRadarMarkers, xlRadar); } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index dda593ca8f78..27de1e8bf5da 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -808,9 +808,9 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< { rtl::OUString sFormula = xCell->getFormula(); - if ( sFormula.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("=TRUE()") ) ) ) + if ( sFormula == "=TRUE()" ) aValue <<= sal_True; - else if ( sFormula.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("=FALSE()") ) ) ) + else if ( sFormula == "=FALSE()" ) aValue <<= false; else { diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index cbcc6d777950..953c362648bf 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -372,11 +372,11 @@ namespace basprov // apparantly illegal '.' in it ( in imported VBA ) BasicManager* pBasicMgr = NULL; - if ( aLocation.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("document")) ) ) + if ( aLocation == "document" ) { pBasicMgr = m_pDocBasicManager; } - else if ( aLocation.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application")) ) ) + else if ( aLocation == "application" ) { pBasicMgr = m_pAppBasicManager; } diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index 43b6477582c8..789bd3802231 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -142,7 +142,7 @@ namespace dlgprov void DialogVBAScriptListenerImpl::firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* ) { - if ( aScriptEvent.ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop")) ) && mxListener.is() ) + if ( aScriptEvent.ScriptType == "VBAInterop" && mxListener.is() ) { ScriptEvent aScriptEventCopy( aScriptEvent ); aScriptEventCopy.ScriptCode = msDialogLibName.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ).concat( msDialogCodeName ); @@ -244,7 +244,7 @@ namespace dlgprov Any aElement = xEventCont->getByName( pNames[ j ] ); aElement >>= aDesc; rtl::OUString sKey = aDesc.ScriptType; - if ( aDesc.ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Script")) ) || aDesc.ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNO")) ) ) + if ( aDesc.ScriptType == "Script" || aDesc.ScriptType == "UNO" ) { sal_Int32 nIndex = aDesc.ScriptCode.indexOf( ':' ); sKey = aDesc.ScriptCode.copy( 0, nIndex ); diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index a1a646426bdc..2c80650d8804 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -263,7 +263,7 @@ private: for ( sal_Int32 i = 0; i < langNodes.getLength(); i++ ) { Reference< browse::XBrowseNode > xbn; - if ( langNodes[ i ]->getName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno_packages"))) ) + if ( langNodes[ i ]->getName() == "uno_packages" ) { xbn.set( new LocationBrowseNode( langNodes[ i ] ) ); } diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx index 2d4e7bc39b1c..2ea10f749569 100644 --- a/sd/source/filter/ppt/ppt97animations.cxx +++ b/sd/source/filter/ppt/ppt97animations.cxx @@ -218,10 +218,10 @@ void Ppt97Animation::SetAnimateAssociatedShape( bool bAnimate ) if( !bAnimate ) { //the appear effect cannot be animated without text - if( this->GetPresetId().equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-appear")) ) ) + if( this->GetPresetId() == "ooo-entrance-appear" ) return; //the random effect may be the appear effect and than has the same problem - if( this->GetPresetId().equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo-entrance-random")) ) ) + if( this->GetPresetId() == "ooo-entrance-random" ) { //this case is not 100% correct -> feel free to complete //i consider this case as seldom and not that problematic and a simple correct fix is not in sight diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 73723b4b2bdd..5e2e869429f0 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -213,7 +213,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( sal_Int32 nPropertyCount = aProps.getLength(); for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty ) { - if( aProps[nProperty].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent"))) ) + if( aProps[nProperty].Name == "UIComponent" ) { ::rtl::OUString aServiceName; aProps[nProperty].Value >>= aServiceName; @@ -260,7 +260,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( //add them to the args for ( sal_Int32 nInd = 0; nInd < aPropsFromDialog.getLength(); nInd++ ) { - if( aPropsFromDialog[ nInd ].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterData")) ) ) + if( aPropsFromDialog[ nInd ].Name == "FilterData" ) { //found the filterdata, add to the storing argument rArgs.realloc( ++rNumArgs ); diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 8a9fac81949d..4009639e8a9c 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -552,7 +552,7 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const ::rtl::OUString& aFilte { sal_Int32 nPropertyCount = aProps.getLength(); for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty ) - if( aProps[nProperty].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent"))) ) + if( aProps[nProperty].Name == "UIComponent" ) { ::rtl::OUString aServiceName; aProps[nProperty].Value >>= aServiceName; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index b258ed83ea99..e42df415e2b1 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -863,7 +863,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo { sal_Int32 nPropertyCount = aProps.getLength(); for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty ) - if( aProps[nProperty].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent"))) ) + if( aProps[nProperty].Name == "UIComponent" ) { ::rtl::OUString aServiceName; aProps[nProperty].Value >>= aServiceName; @@ -3340,7 +3340,7 @@ sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< e uno::Sequence< ::rtl::OUString > aSubElements = xSource->getElementNames(); for ( sal_Int32 nInd = 0; nInd < aSubElements.getLength(); nInd++ ) { - if ( aSubElements[nInd].equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Configurations" ) ) ) ) + if ( aSubElements[nInd] == "Configurations" ) { // The workaround for compatibility with SO7, "Configurations" substorage must be preserved if ( xSource->isStorageElement( aSubElements[nInd] ) ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 2a30dad35305..5ec029ee60e5 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1646,10 +1646,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const uno::Sequence< beans::PropertyVa for ( sal_Int32 nInd = 0; nInd < aSeqArgs.getLength(); nInd++ ) { // check that only acceptable parameters are provided here - if ( !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VersionComment" ) ) ) - && !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Author" ) ) ) - && !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) ) ) - && !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) ) ) ) + if ( aSeqArgs[nInd].Name != "VersionComment" && aSeqArgs[nInd].Name != "Author" + && aSeqArgs[nInd].Name != "InteractionHandler" && aSeqArgs[nInd].Name != "StatusIndicator" ) { m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "unexpected parameter for storeSelf, might be no problem if SaveAs is executed." ) ) ); m_pData->m_pObjectShell->StoreLog(); diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index 3d9542b1f23f..9771b5d82824 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -272,9 +272,9 @@ uno::Any translateToOOo( const ConfigurationValue &rValue, GConfValue *pGconfVal uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue ); aOriginalValue >>= aProxyMode; - if( aProxyMode.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("manual")) ) ) + if( aProxyMode == "manual" ) return uno::makeAny( (sal_Int32) 1 ); - else if( aProxyMode.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("none")) ) ) + else if( aProxyMode == "none" ) return uno::makeAny( (sal_Int32) 0 ); } break; diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 227f4c8cce50..d90fa8e1dc1f 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -464,7 +464,7 @@ bool ShapeImporter::isSkip( bool const bRet = (a >>= layerName); if(bRet) { - if( layerName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DrawnInSlideshow")))) + if( layerName == "DrawnInSlideshow" ) { //Transform shapes into PolyPolygons importPolygons(xPropSet); diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index a1242463a8b8..cc73ee1b2664 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -1257,16 +1257,8 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( // remove the property if it does not have a value ( user left the dialog field empty) // or if the port is set to 0 aPropertyValue= aPropertyValue.trim(); - if( - aPropertyValue.isEmpty() || - ( - ( - aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp.proxyPort"))) || - aPropertyName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http.proxyPort"))) /*|| - aPropertyName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM("socksProxyPort")))*/ - ) && - aPropertyValue.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0"))) - ) + if( aPropertyValue.isEmpty() || + ( ( aPropertyName == "ftp.proxyPort" || aPropertyName == "http.proxyPort" /*|| aPropertyName == "socksProxyPort"*/ ) && aPropertyValue == "0" ) ) { // call java.lang.System.getProperties diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 7eda0e251ea4..9fa709ab4246 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -92,7 +92,7 @@ void ShareControlFile::OpenStream() ::ucbhelper::Content aContent = ::ucbhelper::Content( m_aURL, xDummyEnv ); uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : 0 ); - if ( !xContId.is() || !xContId->getContentProviderScheme().equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "file" ) ) ) ) + if ( !xContId.is() || xContId->getContentProviderScheme() != "file" ) throw io::IOException(); // the implementation supports only local files for now uno::Reference< io::XStream > xStream; diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 7602e3942ffc..e2faac874b80 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -1464,19 +1464,19 @@ void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeE ::com::sun::star::uno::Any rVal = evt.NewValue; evt.NewValue >>= rVal; ::rtl::OUString sPropertyName = evt.PropertyName; - if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" )) ) ) + if ( sPropertyName == "Enabled" ) { sal_Bool bEnable = false; evt.NewValue >>= bEnable; pField->EnableRoadmapItem( (RoadmapTypes::ItemId)nID , bEnable ); } - else if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" )) ) ) + else if ( sPropertyName == "Label" ) { ::rtl::OUString sLabel; evt.NewValue >>= sLabel; pField->ChangeRoadmapItemLabel( (RoadmapTypes::ItemId)nID , sLabel ); } - else if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" )) ) ) + else if ( sPropertyName == "ID" ) { sal_Int32 nNewID = 0; evt.NewValue >>= nNewID; diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index b0f66b91409e..3f9262eb486c 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -157,7 +157,7 @@ void SwMacrosTest::testVba() rtl::OUString aStringRes; aRet >>= aStringRes; std::cout << "value of Ret " << rtl::OUStringToOString( aStringRes, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl; - //CPPUNIT_ASSERT_MESSAGE("script reported failure",aStringRes.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OK") )) ); + //CPPUNIT_ASSERT_MESSAGE( "script reported failure",aStringRes == "OK" ); pFoundShell->DoClose(); } } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index f54775e48d83..d20a5f38a0e6 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -704,7 +704,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, uno::RuntimeException) { SolarMutexGuard g; - if ( PropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Checked") ) ) ) + if ( PropertyName == "Checked" ) { ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); sal_Bool bChecked( sal_False ); @@ -726,7 +726,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { SolarMutexGuard g; - if ( rPropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Checked") ) ) ) + if ( rPropertyName == "Checked" ) { ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); if ( pCheckboxFm ) diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index a8c34d6ace35..1aa58f0ecb98 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -258,7 +258,7 @@ public: { // #FIXME #TODO we really need to be checking against the codename for // ThisDocument - if ( aName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisDocument" ) ) ) ) + if ( aName == "ThisDocument" ) return sal_True; return sal_False; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index ea498424276a..662a8ff7756e 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1440,8 +1440,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A // Thus, keep the position, before the caption point is set and // restore it afterwards. awt::Point aKeepedPosition( 0, 0 ); - if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CaptionPoint"))) && - getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))) ) + if ( rPropertyName == "CaptionPoint" && getShapeType() == "com.sun.star.drawing.CaptionShape" ) { aKeepedPosition = getPosition(); } @@ -1453,8 +1452,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A else xPrSet->setPropertyValue(rPropertyName, aValue); // #i31698# - restore object position, if caption point is set. - if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CaptionPoint"))) && - getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))) ) + if ( rPropertyName == "CaptionPoint" && getShapeType() == "com.sun.star.drawing.CaptionShape" ) { setPosition( aKeepedPosition ); } @@ -1649,21 +1647,21 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) // #i31698# - convert the position (translation) // of the drawing object in the transformation - if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))) ) + if ( rPropertyName == "Transformation" ) { drawing::HomogenMatrix3 aMatrix; aRet >>= aMatrix; aRet <<= _ConvertTransformationToLayoutDir( aMatrix ); } // #i36248# - else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) ) + else if ( rPropertyName == "StartPosition" ) { awt::Point aStartPos; aRet >>= aStartPos; // #i59051# aRet <<= _ConvertStartOrEndPosToLayoutDir( aStartPos ); } - else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) ) + else if ( rPropertyName == "EndPosition" ) { awt::Point aEndPos; aRet >>= aEndPos; @@ -1671,7 +1669,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName) aRet <<= _ConvertStartOrEndPosToLayoutDir( aEndPos ); } // #i59051# - else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier"))) ) + else if ( rPropertyName == "PolyPolygonBezier" ) { drawing::PolyPolygonBezierCoords aPath; aRet >>= aPath; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index cf02450203a5..b8ce6f3f751f 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1047,7 +1047,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV if(IsValid()) { // Hack to support hidden property to transfer textDirection - if ( rPropertyName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FRMDirection") ) ) ) + if ( rPropertyName == "FRMDirection" ) { SvxFrameDirection eDir = FRMDIR_ENVIRONMENT; sal_Int16 nNum = 0; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index fe1395e5f700..ec13da0a2a09 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -365,9 +365,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, if ( xModule.is() ) { ::rtl::OUString aModuleID = xModule->getIdentifier(); - bStoreMeta = ( !aModuleID.isEmpty() - && ( aModuleID.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.FormDesign" ) ) ) - || aModuleID.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.TextReportDesign" ) ) ) ) ); + bStoreMeta = ( !aModuleID.isEmpty() && ( aModuleID == "com.sun.star.sdb.FormDesign" || aModuleID == "com.sun.star.sdb.TextReportDesign" ) ); } } catch( uno::Exception& ) diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 6dfcc14b99bb..b934aacdd638 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -95,7 +95,7 @@ public: } virtual uno::Any getPropertyValue( const rtl::OUString& rPropName ) { - if ( rPropName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("EditingDuration" ) ) ) ) + if ( rPropName == "EditingDuration" ) { sal_Int32 nSecs = 0; mxProps->getPropertyValue( rPropName ) >>= nSecs; @@ -143,7 +143,7 @@ public: OSL_TRACE("Got exception"); } uno::Any aReturn; - if ( rPropName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineCount")) ) ) // special processing needed + if ( rPropName == "LineCount" ) // special processing needed { if ( mpDocShell ) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 9a5c32a242e2..f460c3ebe775 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1375,7 +1375,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( return mxClipboard; } - else if( clipboardName.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Selection")) ) ) + else if( clipboardName == "Selection" ) { return mxSelection; } diff --git a/toolkit/source/controls/roadmapentry.cxx b/toolkit/source/controls/roadmapentry.cxx index 1090f8ff4015..15556a457642 100644 --- a/toolkit/source/controls/roadmapentry.cxx +++ b/toolkit/source/controls/roadmapentry.cxx @@ -95,7 +95,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORoadmapEntry, ORoadmapEntry_Base, ::comphelpe sal_Bool SAL_CALL ORoadmapEntry::supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) { - return ServiceName.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.RoadmapItem")) ); + return ServiceName == "com.sun.star.awt.RoadmapItem"; } ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx index 456f7b2408a9..3609798cb543 100644 --- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx +++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx @@ -165,16 +165,16 @@ SAL_IMPLEMENT_MAIN() // check command rtl_getAppCommandArg(nPos++, &arg.pData); - if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("dump"))) ) { + if ( arg == "dump" ) { options.dump = true; - } else if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("component"))) ) { + } else if ( arg == "component" ) { options.dump = false; options.shortnames = true; - } else if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("calc-add-in"))) ) { + } else if ( arg == "calc-add-in" ) { options.dump = false; options.shortnames = true; options.componenttype = 2; - } else if ( arg.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("add-on"))) ) { + } else if ( arg == "add-on" ) { options.dump = false; options.shortnames = true; options.componenttype = 3; diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx index b0302f34597a..0c8ab87c8369 100644 --- a/vbahelper/source/vbahelper/vbalineformat.cxx +++ b/vbahelper/source/vbahelper/vbalineformat.cxx @@ -48,39 +48,28 @@ sal_Int32 ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName ) { sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone; - if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Small Arrow"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Arrow"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowEnd"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Double Arrow")))) + if ( sLineName == "Small Arrow" || sLineName == "Arrow" || sLineName == "msArrowEnd" || sLineName == "Double Arrow") { // msoArrowheadTriangle nLineType = office::MsoArrowheadStyle::msoArrowheadTriangle; } - else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Square 45"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Square"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowDiamondEnd")))) + else if ( sLineName == "Square 45" || sLineName == "Square" || sLineName == "msArrowDiamondEnd") { // msoArrowheadDiamond nLineType = office::MsoArrowheadStyle::msoArrowheadDiamond; } - else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Circle"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowOvalEnd"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Dimension Lines"))) ) + else if (sLineName == "Circle" || sLineName == "msArrowOvalEnd" || sLineName == "Dimension Lines" ) { // msoArrowheadOval nLineType = office::MsoArrowheadStyle::msoArrowheadOval; } - else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Arrow concave"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowStealthEnd")))) + else if ( sLineName == "Arrow concave" || sLineName == "msArrowStealthEnd" ) { // msoArrowheadStealth nLineType = office::MsoArrowheadStyle::msoArrowheadStealth; } - else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rounded short Arrow"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rounded large Arrow"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Symmetric Arrow"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowOpenEnd"))) || - sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Line Arrow")))) + else if ( sLineName == "Rounded short Arrow" || sLineName == "Rounded large Arrow" || sLineName == "Symmetric Arrow" + || sLineName == "msArrowOpenEnd" || sLineName == "Line Arrow" ) { // msoArrowheadOpen nLineType = office::MsoArrowheadStyle::msoArrowheadOpen; diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index 70b539f748cd..8642427c2e29 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -136,18 +136,17 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw sShapeType = xShapeDescriptor->getShapeType(); OSL_TRACE("ScVbaShape::getType: %s", rtl::OUStringToOString( sShapeType, RTL_TEXTENCODING_UTF8 ).getStr() ); // office::MsoShapeType::msoDiagram to "com.sun.star.drawing.GroupShape" - if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape")) ) ) + if( sShapeType == "com.sun.star.drawing.GroupShape" ) return office::MsoShapeType::msoGroup; - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) ) ) + else if( sShapeType == "com.sun.star.drawing.GraphicObjectShape" ) return office::MsoShapeType::msoPicture; - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")) ) || - sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameShape")) ) ) + else if( sShapeType == "com.sun.star.drawing.ControlShape" || sShapeType == "FrameShape" ) return office::MsoShapeType::msoOLEControlObject; // OOo don't support office::MsoShapeType::msoComment as a Shape. - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) ) ) + else if( sShapeType == "com.sun.star.drawing.OLE2Shape" ) return office::MsoShapeType::msoChart; // Art characters office::MsoShapeType::msoTextEffect, in OOo corresponding to "com.sun.star.drawing.CustomShape" - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape")) ) ) + else if( sShapeType == "com.sun.star.drawing.ConnectorShape" ) { enum drawing::ConnectorType connectorType; uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW ); @@ -159,12 +158,11 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw else return office::MsoShapeType::msoAutoShape; } - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) ) ) + else if( sShapeType == "com.sun.star.drawing.LineShape" ) return office::MsoShapeType::msoLine; - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")) ) || - sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape")) ) ) + else if( sShapeType == "com.sun.star.drawing.CustomShape" || sShapeType == "com.sun.star.drawing.RectangleShape" ) return office::MsoShapeType::msoAutoShape; - else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TextShape")) ) ) + else if( sShapeType == "com.sun.star.drawing.TextShape" ) return office::MsoShapeType::msoTextBox; else throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("the shape type do not be supported: ")) + sShapeType, uno::Reference< uno::XInterface >() ); diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index a33e577a83ba..2cf2722d6001 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -368,7 +368,7 @@ OUString SAL_CALL DragSource::getImplementationName( ) throw (RuntimeException) sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return ServiceName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.dnd.OleDragSource"))); + return ServiceName == "com.sun.star.datatransfer.dnd.OleDragSource"; } diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 75269a0b71b2..1a25ab75849b 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -593,7 +593,7 @@ void DropTarget::concludeDragOperation(id /*sender*/) sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return ServiceName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.dnd.OleDropTarget"))); + return ServiceName == "com.sun.star.datatransfer.dnd.OleDropTarget"; } diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 55be54011e99..31f507c2f91b 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -315,7 +315,7 @@ void ImplImageTree::resetZips() { u.GetMainURL(INetURLObject::NO_DECODE), css::uno::Reference< css::container::XNameAccess >())); } - if ( m_style.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("default"))) ) + if ( m_style == "default" ) { rtl::OUString url( RTL_CONSTASCII_USTRINGPARAM( diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx index 6014adbb4c5b..b01702da8378 100644 --- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx +++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx @@ -272,7 +272,7 @@ sal_Int32 SAL_CALL AnalyzeService::run sal_Bool SAL_CALL AnalyzeService_supportsService( const ::rtl::OUString& ServiceName ) { - return ServiceName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( AnalyzeService::SERVICE_NAME )) ); + return ServiceName == AnalyzeService::SERVICE_NAME; } uno::Sequence< rtl::OUString > SAL_CALL AnalyzeService_getSupportedServiceNames( ) throw (uno::RuntimeException) { diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx index a72729340f5c..229ef036ed8a 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx @@ -270,7 +270,7 @@ sal_Int32 SAL_CALL AnalyzeService::run sal_Bool SAL_CALL AnalyzeService_supportsService( const ::rtl::OUString& ServiceName ) { - return ServiceName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( AnalyzeService::SERVICE_NAME )) ); + return ServiceName == AnalyzeService::SERVICE_NAME; } uno::Sequence< rtl::OUString > SAL_CALL AnalyzeService_getSupportedServiceNames( ) throw (uno::RuntimeException) { diff --git a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx index f6d399024433..8f3e73e2a34a 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx +++ b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx @@ -408,7 +408,7 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString > sal_Bool SAL_CALL ScannerTestService_supportsService( const ::rtl::OUString& ServiceName ) { - return ServiceName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ScannerTestService::SERVICE_NAME )) ); + return ServiceName == ScannerTestService::SERVICE_NAME; } uno::Sequence< rtl::OUString > SAL_CALL ScannerTestService_getSupportedServiceNames( ) throw (uno::RuntimeException) { diff --git a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx index 1b3480b6e374..d0d1ca515c97 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx +++ b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx @@ -315,7 +315,7 @@ sal_Int32 SAL_CALL XMLScanner::run( const uno::Sequence< rtl::OUString >& aArgum sal_Bool SAL_CALL XMLScanner_supportsService( const ::rtl::OUString& ServiceName ) { - return ServiceName.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLScanner::SERVICE_NAME )) ); + return ServiceName == XMLScanner::SERVICE_NAME; } uno::Sequence< rtl::OUString > SAL_CALL XMLScanner_getSupportedServiceNames( ) throw (uno::RuntimeException) { diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index 0b7b042c1d2b..2722a1163bc8 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -180,7 +180,7 @@ bool SchXMLSeriesHelper::isCandleStickSeries( if( xChartType.is() ) { rtl::OUString aServiceName( xChartType->getChartType() ); - if( aServiceName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.CandleStickChartType" ) ) ) ) + if( aServiceName == "com.sun.star.chart2.CandleStickChartType" ) bRet = true; } } diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index c014771bd285..67fdd8398f1a 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -584,8 +584,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, mpImpl->aODFVersion = xAttrList->getValueByIndex( i ); // the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2 - if ( mpImpl->mStreamName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ) ) ) - && !IsODFVersionConsistent( mpImpl->aODFVersion ) ) + if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( mpImpl->aODFVersion ) ) { throw xml::sax::SAXException( ::rtl::OUString( diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index d07302cd9b0e..264510fcaafb 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -293,7 +293,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { OUString aFamilyName; xStylePropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Family"))) >>= aFamilyName; - if(!aFamilyName.isEmpty() && !aFamilyName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("graphics")))) + if( !aFamilyName.isEmpty() && aFamilyName != "graphics" ) aShapeInfo.mnFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID; } } diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 780917fe2e62..2bfca5fcd0dd 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -549,7 +549,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() if( !maList.empty() ) { SdXMLPresentationPlaceholderContext* pObj0 = maList[ 0 ]; - if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("handout")))) + if( pObj0->GetName() == "handout" ) { switch( maList.size() ) { @@ -578,7 +578,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() { case 1: { - if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("title")))) + if( pObj0->GetName() == "title" ) { mnTypeId = 19; // AUTOLAYOUT_ONLY_TITLE } @@ -592,35 +592,29 @@ void SdXMLPresentationPageLayoutContext::EndElement() { SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; - if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle")))) + if( pObj1->GetName() == "subtitle" ) { mnTypeId = 0; // AUTOLAYOUT_TITLE } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("outline")))) + else if( pObj1->GetName() == "outline" ) { mnTypeId = 1; // AUTOLAYOUT_ENUM } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("chart")))) + else if( pObj1->GetName() == "chart" ) { mnTypeId = 2; // AUTOLAYOUT_CHART } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("table")))) + else if( pObj1->GetName() == "table" ) { mnTypeId = 8; // AUTOLAYOUT_TAB } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("object")))) + else if( pObj1->GetName() == "object" ) { mnTypeId = 11; // AUTOLAYOUT_OBJ } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("vertical_outline")))) + else if( pObj1->GetName() == "vertical_outline" ) { - if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("vertical_title")))) + if( pObj0->GetName() == "vertical_title" ) { // AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE mnTypeId = 28; @@ -642,21 +636,17 @@ void SdXMLPresentationPageLayoutContext::EndElement() SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ]; - if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("outline")))) + if( pObj1->GetName() == "outline" ) { - if(pObj2->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("outline")))) + if( pObj2->GetName() == "outline" ) { mnTypeId = 3; // AUTOLAYOUT_2TEXT } - else if(pObj2->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("chart")))) + else if( pObj2->GetName() == "chart" ) { mnTypeId = 4; // AUTOLAYOUT_TEXTCHART } - else if(pObj2->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("graphic")))) + else if( pObj2->GetName() == "graphic" ) { mnTypeId = 6; // AUTOLAYOUT_TEXTCLIP } @@ -672,15 +662,13 @@ void SdXMLPresentationPageLayoutContext::EndElement() } } } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("chart")))) + else if( pObj1->GetName() == "chart" ) { mnTypeId = 7; // AUTOLAYOUT_CHARTTEXT } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("graphic")))) + else if( pObj1->GetName() == "graphic" ) { - if(pObj2->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("vertical_outline")))) + if( pObj2->GetName() == "vertical_outline" ) { // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART mnTypeId = 30; @@ -690,8 +678,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() mnTypeId = 9; // AUTOLAYOUT_CLIPTEXT } } - else if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("vertical_outline")))) + else if( pObj1->GetName() == "vertical_outline" ) { // AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART mnTypeId = 27; @@ -714,8 +701,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ]; - if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("object")))) + if( pObj1->GetName() == "object" ) { if(pObj1->GetX() < pObj2->GetX()) { @@ -736,8 +722,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() { SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; - if(pObj1->GetName().equals( - OUString(RTL_CONSTASCII_USTRINGPARAM("object")))) + if( pObj1->GetName() == "object" ) { mnTypeId = 18; // AUTOLAYOUT_4OBJ } diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 7f053db5c507..bbfc4eb1bcae 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -1263,7 +1263,7 @@ void ElementDescriptor::readEvents() descr.AddListenerParam ); } } - if ( descr.ScriptType.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "StarBasic" ) ) ) ) + if ( descr.ScriptType == "StarBasic" ) { // separate optional location sal_Int32 nIndex = descr.ScriptCode.indexOf( (sal_Unicode)':' ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index 17678702b92a..ff5ceb587421 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -1569,7 +1569,7 @@ void ImportContext::importEvents( "attribute(s) of event!") ), Reference< XInterface >(), Any() ); } - if ( descr.ScriptType.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "StarBasic" ) ) ) ) + if ( descr.ScriptType == "StarBasic" ) { OUString aLocation; if (getStringAttr( &aLocation, @@ -1586,7 +1586,7 @@ void ImportContext::importEvents( descr.ScriptCode = buf.makeStringAndClear(); } } - else if ( descr.ScriptType.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "Script" ) ) ) ) + else if ( descr.ScriptType == "Script" ) { // Check if there is a protocol, if not assume // this is an early scripting framework url ( without |