From 7c89e643b1152383ffa1a51e4a3b911ac1d1d36e Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Thu, 20 Jan 2011 10:30:44 +0100 Subject: Replace suitable equalsAscii calls with equalsAsciiL. Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'. --- basctl/source/basicide/baside3.cxx | 4 +- cui/source/customize/acccfg.cxx | 2 +- cui/source/customize/cfg.cxx | 32 +++++------ cui/source/customize/selector.cxx | 10 ++-- cui/source/dialogs/hldocntp.cxx | 2 +- cui/source/options/treeopt.cxx | 16 +++--- embedserv/source/embed/docholder.cxx | 6 +-- embedserv/source/embed/guid.cxx | 2 +- embedserv/source/embed/intercept.cxx | 2 +- extensions/source/bibliography/framectr.cxx | 6 +-- extensions/source/logging/loggerconfig.cxx | 2 +- extensions/source/plugin/aqua/macmgr.cxx | 4 +- extensions/source/propctrlr/eventhandler.cxx | 2 +- .../source/propctrlr/formgeometryhandler.cxx | 4 +- extensions/source/propctrlr/propcontroller.cxx | 2 +- extensions/source/resource/resource.cxx | 54 +++++++++---------- extensions/source/update/check/updatecheckjob.cxx | 6 +-- forms/source/component/Filter.cxx | 4 +- forms/source/richtext/richtextcontrol.cxx | 6 +-- forms/source/richtext/specialdispatchers.cxx | 2 +- forms/source/xforms/xpathlib/extension.cxx | 4 +- package/source/xstor/ocompinstream.cxx | 4 +- package/source/xstor/owriteablestream.cxx | 40 +++++++------- package/source/xstor/xfactory.cxx | 12 ++--- package/source/xstor/xstorage.cxx | 62 +++++++++++----------- package/source/zippackage/ZipPackage.cxx | 10 ++-- xmlsecurity/tools/standalone/csfit/helper.cxx | 2 +- xmlsecurity/tools/standalone/mscsfit/helper.cxx | 2 +- 28 files changed, 152 insertions(+), 152 deletions(-) diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 224be1723349..704da8350c33 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -806,8 +806,8 @@ BOOL DialogWindow::SaveDialog() aExtension = aCompleteName.copy( iDot + 1 ); } - if( aExtension.equalsAscii( "properties" ) || - aExtension.equalsAscii( "default" ) ) + if( aExtension.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "properties" ) ) || + aExtension.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "default" ) ) ) { if( aPureName.indexOf( aDialogName_ ) == 0 ) { diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 2e54ad117ba8..b3bd5ef01a89 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1431,7 +1431,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); ++i ) { - if ( aPropSeq[i].Name.equalsAscii( "Name" )) + if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) )) { aPropSeq[i].Value >>= aStr; break; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 4c886adc3601..14087c3c5659 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -406,8 +406,8 @@ SvxConfigPage::CanConfig( const OUString& aModuleId ) { OSL_TRACE("SupportsDocumentConfig: %s", PRTSTR(aModuleId)); - if ( aModuleId.equalsAscii( "com.sun.star.script.BasicIDE" ) - || aModuleId.equalsAscii( "com.sun.star.frame.Bibliography" ) + if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.script.BasicIDE" ) ) + || aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.frame.Bibliography" ) ) ) { return FALSE; @@ -417,30 +417,30 @@ SvxConfigPage::CanConfig( const OUString& aModuleId ) OUString GetModuleName( const OUString& aModuleId ) { - if ( aModuleId.equalsAscii( "com.sun.star.text.TextDocument" ) || - aModuleId.equalsAscii( "com.sun.star.text.GlobalDocument" ) ) + if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) || + aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Writer")); - else if ( aModuleId.equalsAscii( "com.sun.star.text.WebDocument" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Writer/Web")); - else if ( aModuleId.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Draw")); - else if ( aModuleId.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Impress")); - else if ( aModuleId.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Calc")); - else if ( aModuleId.equalsAscii( "com.sun.star.script.BasicIDE" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.script.BasicIDE" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Basic")); - else if ( aModuleId.equalsAscii( "com.sun.star.formula.FormulaProperties" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.formula.FormulaProperties" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Math")); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.RelationDesign" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.RelationDesign" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Relation Design")); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.QueryDesign" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.QueryDesign" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Query Design")); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.TableDesign" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.TableDesign" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Table Design")); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DataSourceBrowser" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.DataSourceBrowser" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Data Source Browser" )); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DatabaseDocument" ) ) + else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.DatabaseDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Database" )); return ::rtl::OUString(); @@ -465,7 +465,7 @@ OUString GetUIModuleName( const OUString& aModuleId, const uno::Reference< css:: OUString aUIName; for ( sal_Int32 i = 0; i < aSeq.getLength(); ++i ) { - if ( aSeq[i].Name.equalsAscii( "ooSetupFactoryUIName" )) + if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ooSetupFactoryUIName" ) )) { aSeq[i].Value >>= aModuleUIName; break; diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 97d37d3688ed..28a3d42cb35e 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -355,7 +355,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows Sequence< Reference< browse::XBrowseNode > > children = _rxRootNode->getChildNodes(); - BOOL bIsRootNode = _rxRootNode->getName().equalsAscii("Root"); + BOOL bIsRootNode = _rxRootNode->getName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Root")); /* To mimic current starbasic behaviour we need to make sure that only the current document @@ -385,12 +385,12 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows // then the user & share are added at depth=1 ) { - if ( sUIName.equalsAscii( "user" ) ) + if ( sUIName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "user" ) ) ) { sUIName = m_sMyMacros; bIsRootNode = sal_True; } - else if ( sUIName.equalsAscii( "share" ) ) + else if ( sUIName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "share" ) ) ) { sUIName = m_sProdMacros; bIsRootNode = sal_True; @@ -626,7 +626,7 @@ Image SvxConfigGroupListBox_Impl::GetImage( Image aImage; if ( bIsRootNode ) { - if ( node->getName().equalsAscii( "user" ) || node->getName().equalsAscii( "share" ) ) + if ( node->getName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "user" ) ) || node->getName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "share" ) ) ) { aImage = m_hdImage; } @@ -783,7 +783,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() { for ( sal_Int32 k = 0; k < aPropSeq.getLength(); ++k ) { - if ( aPropSeq[k].Name.equalsAscii( "Name" ) ) + if ( aPropSeq[k].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) ) ) { aPropSeq[k].Value >>= aLabel; break; diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 22075863e2da..b3983caf9596 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -237,7 +237,7 @@ void SvxHyperlinkNewDocTp::FillDocumentList () // Insert into listbox if ( aDocumentUrl.getLength() ) { - if ( aDocumentUrl.equalsAscii( "private:factory/simpress?slot=6686" ) ) // SJ: #106216# do not start + if ( aDocumentUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:factory/simpress?slot=6686" ) ) ) // SJ: #106216# do not start aDocumentUrl = String( RTL_CONSTASCII_USTRINGPARAM( "private:factory/simpress" ) ); // the AutoPilot for impress // insert private-url and default-extension as user-data diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 38140a1c0a3f..a731536e1b20 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1956,14 +1956,14 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Textdokument bHasAnyFilter = sal_True; ResStringArray& rTextArray = aDlgResource.GetTextArray(); - if ( aFactory.equalsAscii( "com.sun.star.text.TextDocument" ) - || aFactory.equalsAscii( "com.sun.star.text.WebDocument" ) - || aFactory.equalsAscii( "com.sun.star.text.GlobalDocument" ) ) + if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) + || aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) + || aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) ) { SfxModule* pSwMod = (*(SfxModule**) GetAppData(SHL_WRITER)); if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) ) { - if ( aFactory.equalsAscii( "com.sun.star.text.WebDocument" ) ) + if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) setGroupName( C2U("WriterWeb"), rTextArray.GetString(0) ); else setGroupName( C2U("Writer"), rTextArray.GetString(0) ); @@ -2005,7 +2005,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) ) { bHasAnyFilter = sal_True; - if ( aFactory.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) + if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) { if ( !lcl_isOptionHidden( SID_SC_EDITOPTIONS, aOptionsDlgOpt ) ) { @@ -2033,7 +2033,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ) { bHasAnyFilter = sal_True; - if ( aFactory.equalsAscii( "com.sun.star.presentation.PresentationDocument" )) + if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) { if ( !lcl_isOptionHidden( SID_SD_EDITOPTIONS, aOptionsDlgOpt ) ) { @@ -2057,7 +2057,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Draw options if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) ) { - if ( aFactory.equalsAscii( "com.sun.star.drawing.DrawingDocument" )) + if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) )) { if ( !lcl_isOptionHidden( SID_SD_GRAPHIC_OPTIONS, aOptionsDlgOpt ) ) { @@ -2081,7 +2081,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Math options if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) ) { - if ( aFactory.equalsAscii( "com.sun.star.formula.FormulaProperties" )) + if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.formula.FormulaProperties" ) )) { if ( !lcl_isOptionHidden( SID_SM_EDITOPTIONS, aOptionsDlgOpt ) ) { diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index db918fdc0dcf..4efa9f6db750 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -1169,7 +1169,7 @@ HRESULT DocumentHolder::SetVisArea( const RECTL *pRect ) { uno::Sequence< beans::PropertyValue > aArgs = m_xDocument->getArgs(); for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAscii( "WinExtent" ) ) + if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WinExtent" ) ) ) { // should allways be there uno::Sequence< sal_Int32 > aRect(4); @@ -1197,7 +1197,7 @@ HRESULT DocumentHolder::GetVisArea( RECTL *pRect ) { uno::Sequence< beans::PropertyValue > aArgs = m_xDocument->getArgs(); for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAscii( "WinExtent" ) ) + if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WinExtent" ) ) ) { uno::Sequence< sal_Int32 > aRect; if ( ( aArgs[nInd].Value >>= aRect ) && aRect.getLength() == 4 ) @@ -1224,7 +1224,7 @@ HRESULT DocumentHolder::GetDocumentBorder( RECT *pRect ) { uno::Sequence< beans::PropertyValue > aArgs = m_xDocument->getArgs(); for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAscii( "DocumentBorder" ) ) + if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentBorder" ) ) ) { uno::Sequence< sal_Int32 > aRect; if ( ( aArgs[nInd].Value >>= aRect ) && aRect.getLength() == 4 ) diff --git a/embedserv/source/embed/guid.cxx b/embedserv/source/embed/guid.cxx index 90122776df9c..52d39f72122c 100644 --- a/embedserv/source/embed/guid.cxx +++ b/embedserv/source/embed/guid.cxx @@ -193,7 +193,7 @@ if ( aAnyProp >>= aProperties ) ) { for ( sal_Int32 nInd = 0; nInd < aProperties.getLength; nInd++ ) - if ( aProperties[nInd].Name.equalsAscii( "UIName" ) + if ( aProperties[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) ) { aProperties[nInd].Value >>= aResult; break; diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx index 0d0856c0a2cb..f620857c44cf 100644 --- a/embedserv/source/embed/intercept.cxx +++ b/embedserv/source/embed/intercept.cxx @@ -213,7 +213,7 @@ Interceptor::dispatch( while( nInd < aNewArgs.getLength() ) { - if ( aNewArgs[nInd].Name.equalsAscii( "SaveTo" ) ) + if ( aNewArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveTo" ) ) ) { aNewArgs[nInd].Value <<= sal_True; break; diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index f8306b13d419..39b6e30660c2 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -224,8 +224,8 @@ BibFrameController_Impl::~BibFrameController_Impl() sal_Bool SAL_CALL BibFrameController_Impl::supportsService( const ::rtl::OUString& sServiceName ) throw (::com::sun::star::uno::RuntimeException) { return ( - sServiceName.equalsAscii("com.sun.star.frame.Bibliography") || - sServiceName.equalsAscii("com.sun.star.frame.Controller") + sServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.Bibliography")) || + sServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.Controller")) ); } @@ -748,7 +748,7 @@ void BibFrameController_Impl::addStatusListener( else if(aURL.Path == C2U("Bib/sdbsource") || aURL.Path == C2U("Bib/Mapping") || aURL.Path == C2U("Bib/autoFilter") || - aURL.Path.equalsAscii("Bib/standardFilter")) + aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bib/standardFilter"))) { aEvent.IsEnabled = sal_True; } diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index 048ede71a41e..a8d216162677 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -134,7 +134,7 @@ namespace logging //---------------------------------------------------------------- void lcl_transformFileHandlerSettings_nothrow( const Reference< XLogger >& _rxLogger, const ::rtl::OUString& _rSettingName, Any& _inout_rSettingValue ) { - if ( !_rSettingName.equalsAscii( "FileURL" ) ) + if ( !_rSettingName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileURL" ) ) ) // not interested in this setting return; diff --git a/extensions/source/plugin/aqua/macmgr.cxx b/extensions/source/plugin/aqua/macmgr.cxx index f1d0e3a3c99b..2d7d87c93fd0 100644 --- a/extensions/source/plugin/aqua/macmgr.cxx +++ b/extensions/source/plugin/aqua/macmgr.cxx @@ -413,7 +413,7 @@ static bool checkBlackList( CFBundleRef i_xBundle ) bool bReject = false; // #i102735# VLC plugin prior to 1.0 tends to crash - if( aBundleName.equalsAscii( "VLC Plug-in" ) ) + if( aBundleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VLC Plug-in" ) ) ) { sal_Int32 nIndex = 0; rtl::OUString aMajor( aBundleVersion.getToken( 0, '.', nIndex ) ); @@ -423,7 +423,7 @@ static bool checkBlackList( CFBundleRef i_xBundle ) } } // #i103674# Garmin Communicator Plugin crashes - else if( aBundleName.equalsAscii( "Garmin Communicator Plugin" ) ) + else if( aBundleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Garmin Communicator Plugin" ) ) ) { bReject = true; } diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index bf1a44bdecbc..5f1df02469e1 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -271,7 +271,7 @@ namespace pcr aScriptEvent = *pAssignedEvent; - if ( !aScriptEvent.ScriptType.equalsAscii( "StarBasic" ) ) + if ( !aScriptEvent.ScriptType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarBasic" ) ) ) continue; // this is an old-style macro specification: diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 0af7c29b7f80..209b466cfe9f 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -742,13 +742,13 @@ namespace pcr ::std::vector< EventTranslation > aEventTranslations; aEventTranslations.reserve(2); - if ( _event.PropertyName.equalsAscii( "Position" ) ) + if ( _event.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Position" ) ) ) { AwtPoint aPos = m_xShape->getPosition(); aEventTranslations.push_back( EventTranslation( PROPERTY_POSITIONX, makeAny( aPos.X ) ) ); aEventTranslations.push_back( EventTranslation( PROPERTY_POSITIONY, makeAny( aPos.Y ) ) ); } - else if ( _event.PropertyName.equalsAscii( "Size" ) ) + else if ( _event.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) { AwtSize aSize = m_xShape->getSize(); aEventTranslations.push_back( EventTranslation( PROPERTY_WIDTH, makeAny( aSize.Width ) ) ); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 657b1f2e9955..efd52a54ccdb 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -748,7 +748,7 @@ namespace pcr { if ( _rEvent.Source == m_xModel ) { - if ( _rEvent.PropertyName.equalsAscii( "IsReadOnly" ) ) + if ( _rEvent.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) impl_updateReadOnlyView_nothrow(); return; } diff --git a/extensions/source/resource/resource.cxx b/extensions/source/resource/resource.cxx index 8ebea6dc85d3..7c0a0fd60616 100644 --- a/extensions/source/resource/resource.cxx +++ b/extensions/source/resource/resource.cxx @@ -191,19 +191,19 @@ OUString SAL_CALL ResourceService::getExactName( const OUString & Approximate { OUString aName( ApproximateName ); aName = aName.toAsciiLowerCase(); - if( aName.equalsAscii("filename") ) + if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("filename")) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")); - else if( aName.equalsAscii("getstring" )) + else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getstring" ) )) return OUString(RTL_CONSTASCII_USTRINGPARAM("getString")); - else if( aName.equalsAscii("getstrings" )) + else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getstrings" ) )) return OUString(RTL_CONSTASCII_USTRINGPARAM("getStrings")); - else if( aName.equalsAscii("hasstring") ) + else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasstring")) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("hasString")); - else if( aName.equalsAscii("hasstrings") ) + else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasstrings")) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("hasStrings")); - else if( aName.equalsAscii("getstringlist") ) + else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getstringlist")) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("getStringList")); - else if( aName.equalsAscii("hasStringList") ) + else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasStringList")) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("hasStringList")); Reference< XExactName > xEN( getDefaultInvocation(), UNO_QUERY ); if( xEN.is() ) @@ -232,16 +232,16 @@ Any SAL_CALL ResourceService::invoke throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException) { Any aRet; - if( FunctionName.equalsAscii("getString") - || FunctionName.equalsAscii("getStrings" ) - || FunctionName.equalsAscii("hasString" ) - || FunctionName.equalsAscii("hasStrings" ) + if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) + || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getStrings" ) ) + || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasString" ) ) + || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasStrings" ) ) ) { sal_Int32 nElements = Params.getLength(); if( nElements < 1 ) throw IllegalArgumentException(); - if( nElements > 1 && (FunctionName.equalsAscii("getString") || FunctionName.equalsAscii("hasString") ) ) + if( nElements > 1 && (FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) || FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasString")) ) ) throw IllegalArgumentException(); if( !pResMgr ) throw IllegalArgumentException(); @@ -253,7 +253,7 @@ Any SAL_CALL ResourceService::invoke sal_Bool* pOutBool = aBools.getArray(); Reference< XTypeConverter > xC = getTypeConverter(); - bool bGetBranch = FunctionName.equalsAscii( "getString" ) || FunctionName.equalsAscii( "getStrings" ); + bool bGetBranch = FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getString" ) ) || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getStrings" ) ); SolarMutexGuard aGuard; for( sal_Int32 n = 0; n < nElements; n++ ) @@ -295,16 +295,16 @@ Any SAL_CALL ResourceService::invoke pOutBool[n] = bRet; } } - if( FunctionName.equalsAscii("getString") ) + if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) ) aRet <<= pOutString[0]; - else if( FunctionName.equalsAscii("getStrings" ) ) + else if( FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getStrings" ) ) ) aRet <<= aStrings; - else if( FunctionName.equalsAscii("hasString" ) ) + else if( FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasString" ) ) ) aRet <<= pOutBool[0]; else aRet <<= aBools; } - else if( FunctionName.equalsAscii("getStringList") || FunctionName.equalsAscii("hasStringList" ) ) + else if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStringList")) || FunctionName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hasStringList" ) ) ) { if( Params.getLength() != 1 ) throw IllegalArgumentException(); @@ -322,7 +322,7 @@ Any SAL_CALL ResourceService::invoke throw CannotConvertException(); } - if( FunctionName.equalsAscii("getStringList") ) + if( FunctionName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStringList")) ) { ResId aId( (USHORT)nId, *pResMgr ); aId.SetRT( RSC_STRINGARRAY ); @@ -371,7 +371,7 @@ Any SAL_CALL ResourceService::invoke void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any& Value) throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException) { - if( PropertyName.equalsAscii("FileName") ) + if( PropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")) ) { OUString aName; if( !(Value >>= aName) ) @@ -409,7 +409,7 @@ Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) throw(UnknownPropertyException, RuntimeException) { SolarMutexGuard aGuard; - if( PropertyName.equalsAscii("FileName" )) + if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName" ) )) return makeAny( aFileName ); Reference< XInvocation > xI = getDefaultInvocation(); @@ -423,12 +423,12 @@ Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) throw(RuntimeException) { - if( Name.equalsAscii("getString") || - Name.equalsAscii("getStrings") || - Name.equalsAscii("hasString") || - Name.equalsAscii("hasStrings") || - Name.equalsAscii("getStringList") || - Name.equalsAscii("hasStringList") + if( Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getString")) || + Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStrings")) || + Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasString")) || + Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasStrings")) || + Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getStringList")) || + Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hasStringList")) ) return TRUE; else @@ -445,7 +445,7 @@ BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) BOOL SAL_CALL ResourceService::hasProperty(const OUString& Name) throw(RuntimeException) { - if( Name.equalsAscii("FileName") ) + if( Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")) ) return TRUE; else { diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index ede63876737b..d223220490b1 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -201,14 +201,14 @@ UpdateCheckJob::execute(const uno::Sequence& namedValues) { for ( sal_Int32 n=namedValues.getLength(); n-- > 0; ) { - if ( namedValues[ n ].Name.equalsAscii( "DynamicData" ) ) + if ( namedValues[ n ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DynamicData" ) ) ) { uno::Sequence aListProp; if ( namedValues[n].Value >>= aListProp ) { for ( sal_Int32 i=aListProp.getLength(); i-- > 0; ) { - if ( aListProp[ i ].Name.equalsAscii( "updateList" ) ) + if ( aListProp[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "updateList" ) ) ) { handleExtensionUpdates( aListProp ); return uno::Any(); @@ -233,7 +233,7 @@ UpdateCheckJob::execute(const uno::Sequence& namedValues) m_pInitThread.reset( new InitUpdateCheckJobThread( m_xContext, aConfig, - !aEventName.equalsAscii("onFirstVisibleTask"))); + !aEventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("onFirstVisibleTask")))); return uno::Any(); } diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index ca75f26b0e03..07e964bf5c43 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -573,14 +573,14 @@ namespace frm if (xVclWindow.is()) { Any aValue; - if ( aText.equalsAscii( "1" ) + if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ) || aText.equalsIgnoreAsciiCaseAscii( "TRUE" ) || aText.equalsIgnoreAsciiCaseAscii( "IS TRUE" ) ) { aValue <<= (sal_Int32)STATE_CHECK; } - else if ( aText.equalsAscii( "0" ) + else if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "0" ) ) || aText.equalsIgnoreAsciiCaseAscii( "FALSE" ) ) { diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 527e20cc75f3..7dec30b86c63 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -683,11 +683,11 @@ namespace frm // some hard-coded slots, which do not have a UNO name at SFX level, but which // we nevertheless need to transport via UNO mechanisms, so we need a name - if ( _rUnoSlotName.equalsAscii( "AllowHangingPunctuation" ) ) + if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AllowHangingPunctuation" ) ) ) return SID_ATTR_PARA_HANGPUNCTUATION; - if ( _rUnoSlotName.equalsAscii( "ApplyForbiddenCharacterRules" ) ) + if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ApplyForbiddenCharacterRules" ) ) ) return SID_ATTR_PARA_FORBIDDEN_RULES; - if ( _rUnoSlotName.equalsAscii( "UseScriptSpacing" ) ) + if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseScriptSpacing" ) ) ) return SID_ATTR_PARA_SCRIPTSPACE; OSL_ENSURE( pSlot, "lcl_getSlotFromUnoName: unknown UNO slot name!" ); diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index 1cbd2520ee3b..aeb4427b5aaf 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -176,7 +176,7 @@ namespace frm const PropertyValue* pLookupEnd = _rArguments.getConstArray() + _rArguments.getLength(); while ( pLookup != pLookupEnd ) { - if ( pLookup->Name.equalsAscii( "Enable" ) ) + if ( pLookup->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enable" ) ) ) break; ++pLookup; } diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx index 28ff7941996c..ca75c23e31de 100644 --- a/forms/source/xforms/xpathlib/extension.cxx +++ b/forms/source/xforms/xpathlib/extension.cxx @@ -79,9 +79,9 @@ void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequen { if (! (aSequence[i] >>= aValue)) throw RuntimeException(); - if (aValue.Name.equalsAscii("Model")) + if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model"))) aValue.Value >>= m_aModel; - else if (aValue.Name.equalsAscii("ContextNode")) + else if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContextNode"))) aValue.Value >>= m_aContextNode; } } diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx index 50333b0d4982..1a95d186e7be 100644 --- a/package/source/xstor/ocompinstream.cxx +++ b/package/source/xstor/ocompinstream.cxx @@ -657,12 +657,12 @@ uno::Any SAL_CALL OInputCompStream::getPropertyValue( const ::rtl::OUString& aPr } ::rtl::OUString aPropertyName; - if ( aProp.equalsAscii( "IsEncrypted" ) ) + if ( aProp.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsEncrypted" ) ) ) aPropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) ); else aPropertyName = aProp; - if ( aPropertyName.equalsAscii( "RelationsInfo" ) ) + if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) throw beans::UnknownPropertyException(); // TODO // all the provided properties are accessible diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 54394eacce76..c4aa0647f3b1 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -388,7 +388,7 @@ sal_Bool OWriteStream_Impl::IsEncrypted() sal_Bool bToBeEncr = sal_False; for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAscii( "Encrypted" ) ) + if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) { if ( !( m_aProps[nInd].Value >>= bToBeEncr ) ) { @@ -439,7 +439,7 @@ void OWriteStream_Impl::SetDecrypted() for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAscii( "Encrypted" ) ) + if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) m_aProps[nInd].Value <<= sal_False; } } @@ -460,7 +460,7 @@ void OWriteStream_Impl::SetEncryptedWithPass( const ::rtl::OUString& aPass ) // introduce encryption info for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAscii( "Encrypted" ) ) + if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) m_aProps[nInd].Value <<= sal_True; } @@ -797,7 +797,7 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt { xPropertySet->setPropertyValue( aProps[nInd].Name, aProps[nInd].Value ); } - else if ( m_nStorageType == embed::StorageFormats::PACKAGE && aProps[nInd].Name.equalsAscii( "UseCommonStoragePasswordEncryption" ) ) + else if ( m_nStorageType == embed::StorageFormats::PACKAGE && aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) ) ) aProps[nInd].Value >>= m_bUseCommonPass; else throw lang::IllegalArgumentException(); @@ -904,7 +904,7 @@ void OWriteStream_Impl::Commit() for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAscii( "Size" ) ) + if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) { if ( m_pAntiImpl && !m_bHasInsertedStreamOptimization && m_pAntiImpl->m_xSeekable.is() ) { @@ -1017,7 +1017,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps( if ( m_nStorageType == embed::StorageFormats::PACKAGE ) { for ( sal_Int32 nInd = 0; nInd < nLen; nInd++ ) - if ( aResult[nInd].Name.equalsAscii( "UseCommonStoragePasswordEncryption" ) ) + if ( aResult[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) ) ) { aResult[nInd].Value <<= bUseCommonPass; return aResult; @@ -1041,7 +1041,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps( uno::Reference< uno::XInterface >() ); for ( sal_Int32 nInd = 0; nInd < nLen; nInd++ ) - if ( aResult[nInd].Name.equalsAscii( "RelationsInfo" ) ) + if ( aResult[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) { aResult[nInd].Value = aValue; return aResult; @@ -2458,7 +2458,7 @@ void OWriteStream::CloseOutput_Impl() for ( sal_Int32 nInd = 0; nInd < m_pImpl->m_aProps.getLength(); nInd++ ) { - if ( m_pImpl->m_aProps[nInd].Name.equalsAscii( "Size" ) ) + if ( m_pImpl->m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) m_pImpl->m_aProps[nInd].Value <<= ((sal_Int32)m_xSeekable->getLength()); } } @@ -3170,7 +3170,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa } } else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE - && aPropertyName.equalsAscii( "UseCommonStoragePasswordEncryption" ) ) + && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) ) ) { sal_Bool bUseCommonPass = sal_False; if ( aValue >>= bUseCommonPass ) @@ -3202,7 +3202,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa m_pImpl->m_aProps[nInd].Value = aValue; } } - else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aPropertyName.equalsAscii( "RelationsInfoStream" ) ) + else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfoStream" ) ) ) { uno::Reference< io::XInputStream > xInRelStream; if ( ( aValue >>= xInRelStream ) && xInRelStream.is() ) @@ -3223,7 +3223,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa else throw lang::IllegalArgumentException(); // TODO } - else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aPropertyName.equalsAscii( "RelationsInfo" ) ) + else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) { if ( aValue >>= m_pImpl->m_aNewRelInfo ) { @@ -3231,10 +3231,10 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa else throw lang::IllegalArgumentException(); // TODO } - else if ( aPropertyName.equalsAscii( "Size" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) throw beans::PropertyVetoException(); // TODO else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE - && ( aPropertyName.equalsAscii( "IsEncrypted" ) || aPropertyName.equalsAscii( "Encrypted" ) ) ) + && ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsEncrypted" ) ) || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) ) throw beans::PropertyVetoException(); // TODO else throw beans::UnknownPropertyException(); // TODO @@ -3258,21 +3258,21 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) throw lang::DisposedException(); } - if ( aProp.equalsAscii( "RelId" ) ) + if ( aProp.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelId" ) ) ) { return uno::makeAny( m_pImpl->GetNewRelId() ); } ::rtl::OUString aPropertyName; - if ( aProp.equalsAscii( "IsEncrypted" ) ) + if ( aProp.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsEncrypted" ) ) ) aPropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) ); else aPropertyName = aProp; if ( ( ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE || m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) - && aPropertyName.equalsAscii( "MediaType" ) ) - || ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAscii( "Encrypted" ) ) - || aPropertyName.equalsAscii( "Compressed" ) ) + && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + || ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Compressed" ) ) ) { m_pImpl->GetStreamProperties(); @@ -3283,9 +3283,9 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) } } else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE - && aPropertyName.equalsAscii( "UseCommonStoragePasswordEncryption" ) ) + && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) ) ) return uno::makeAny( m_pImpl->m_bUseCommonPass ); - else if ( aPropertyName.equalsAscii( "Size" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) { CheckInitOnDemand(); diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index c7bc364ec674..e0e1ce8148e4 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -202,17 +202,17 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr for ( sal_Int32 nInd = 0, nNumArgs = 1; nInd < aDescr.getLength(); nInd++ ) { - if ( aDescr[nInd].Name.equalsAscii( "InteractionHandler" ) - || aDescr[nInd].Name.equalsAscii( "Password" ) - || aDescr[nInd].Name.equalsAscii( "RepairPackage" ) - || aDescr[nInd].Name.equalsAscii( "StatusIndicator" ) ) - // || aDescr[nInd].Name.equalsAscii( "Unpacked" ) // TODO: + if ( aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) + || aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) + || aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) + || aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + // || aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Unpacked" ) ) // TODO: { aPropsToSet.realloc( ++nNumArgs ); aPropsToSet[nNumArgs-1].Name = aDescr[nInd].Name; aPropsToSet[nNumArgs-1].Value = aDescr[nInd].Value; } - else if ( aDescr[nInd].Name.equalsAscii( "StorageFormat" ) ) + else if ( aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StorageFormat" ) ) ) { ::rtl::OUString aFormatName; sal_Int32 nFormatID = 0; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index a99170749a0d..e89eeb480fa7 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -488,15 +488,15 @@ void OStorage_Impl::OpenOwnPackage() sal_Int32 nArgNum = 2; for ( sal_Int32 aInd = 0; aInd < m_xProperties.getLength(); aInd++ ) { - if ( m_xProperties[aInd].Name.equalsAscii( "RepairPackage" ) - || m_xProperties[aInd].Name.equalsAscii( "ProgressHandler" ) ) + if ( m_xProperties[aInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) + || m_xProperties[aInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ProgressHandler" ) ) ) { beans::NamedValue aNamedValue( m_xProperties[aInd].Name, m_xProperties[aInd].Value ); aArguments.realloc( ++nArgNum ); aArguments[nArgNum-1] <<= aNamedValue; } - else if ( m_xProperties[aInd].Name.equalsAscii( "Password" ) ) + else if ( m_xProperties[aInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) { // TODO: implement password setting for documents // the password entry must be removed after setting @@ -4779,7 +4779,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { - if ( aPropertyName.equalsAscii( "MediaType" ) ) + if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) { aValue >>= m_pImpl->m_aMediaType; m_pImpl->m_bControlMediaType = sal_True; @@ -4787,7 +4787,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, m_pImpl->m_bBroadcastModified = sal_True; m_pImpl->m_bIsModified = sal_True; } - else if ( aPropertyName.equalsAscii( "Version" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Version" ) ) ) { aValue >>= m_pImpl->m_aVersion; m_pImpl->m_bControlVersion = sal_True; @@ -4799,20 +4799,20 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, m_pImpl->m_bIsModified = sal_True; } } - else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) - || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) - || aPropertyName.equalsAscii( "IsInconsistent" ) - || aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) ) - || aPropertyName.equalsAscii( "IsRoot" ) - || aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) ) + else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HasEncryptedEntries" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HasNonEncryptedEntries" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsInconsistent" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsRoot" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaTypeFallbackUsed" ) ) ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); else throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { - if ( aPropertyName.equalsAscii( "RelationsInfoStream" ) ) + if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfoStream" ) ) ) { uno::Reference< io::XInputStream > xInRelStream; if ( ( aValue >>= xInRelStream ) && xInRelStream.is() ) @@ -4835,7 +4835,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, else throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); } - else if ( aPropertyName.equalsAscii( "RelationsInfo" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) { if ( aValue >>= m_pImpl->m_aRelInfo ) { @@ -4847,9 +4847,9 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, else throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); } - else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) ) - || aPropertyName.equalsAscii( "IsRoot" ) ) + else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsRoot" ) ) ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); else throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -4878,9 +4878,9 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa } if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE - && ( aPropertyName.equalsAscii( "MediaType" ) - || aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) - || aPropertyName.equalsAscii( "Version" ) ) ) + && ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaTypeFallbackUsed" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Version" ) ) ) ) { try { @@ -4904,25 +4904,25 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa aCaught ); } - if ( aPropertyName.equalsAscii( "MediaType" ) ) + if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) return uno::makeAny( m_pImpl->m_aMediaType ); - else if ( aPropertyName.equalsAscii( "Version" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Version" ) ) ) return uno::makeAny( m_pImpl->m_aVersion ); else return uno::makeAny( m_pImpl->m_bMTFallbackUsed ); } - else if ( aPropertyName.equalsAscii( "IsRoot" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsRoot" ) ) ) { return uno::makeAny( m_pData->m_bIsRoot ); } - else if ( aPropertyName.equalsAscii( "OpenMode" ) ) + else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenMode" ) ) ) { return uno::makeAny( m_pImpl->m_nStorageMode ); } else if ( m_pData->m_bIsRoot ) { - if ( aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) + if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) ) { for ( sal_Int32 aInd = 0; aInd < m_pImpl->m_xProperties.getLength(); aInd++ ) { @@ -4930,15 +4930,15 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa return m_pImpl->m_xProperties[aInd].Value; } - if ( aPropertyName.equalsAscii( "URL" ) ) + if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) return uno::makeAny( ::rtl::OUString() ); return uno::makeAny( sal_False ); // RepairPackage } else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE - && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) - || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) - || aPropertyName.equalsAscii( "IsInconsistent" ) ) ) + && ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HasEncryptedEntries" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HasNonEncryptedEntries" ) ) + || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsInconsistent" ) ) ) ) { try { m_pImpl->ReadContents(); @@ -5843,7 +5843,7 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const ::rtl::OUString& aEle throw container::NoSuchElementException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); // TODO/LATER: Currently it is only implemented for MediaType property of substorages, might be changed in future - if ( !pElement->m_bIsStorage || m_pData->m_nStorageType != embed::StorageFormats::PACKAGE || !aPropertyName.equalsAscii( "MediaType" ) ) + if ( !pElement->m_bIsStorage || m_pData->m_nStorageType != embed::StorageFormats::PACKAGE || !aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); if ( !pElement->m_pStorage ) diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index b8072bf12bba..b18f32140244 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -654,9 +654,9 @@ void SAL_CALL ZipPackage::initialize( const Sequence< Any >& aArguments ) } else if ( ( aArguments[ind] >>= aNamedValue ) ) { - if ( aNamedValue.Name.equalsAscii( "RepairPackage" ) ) + if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) ) aNamedValue.Value >>= m_bForceRecovery; - else if ( aNamedValue.Name.equalsAscii( "PackageFormat" ) ) + else if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PackageFormat" ) ) ) { // setting this argument to true means Package format // setting it to false means plain Zip format @@ -668,7 +668,7 @@ void SAL_CALL ZipPackage::initialize( const Sequence< Any >& aArguments ) m_pRootFolder->setPackageFormat_Impl( m_nFormat ); } - else if ( aNamedValue.Name.equalsAscii( "StorageFormat" ) ) + else if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StorageFormat" ) ) ) { ::rtl::OUString aFormatName; sal_Int32 nFormatID = 0; @@ -697,14 +697,14 @@ void SAL_CALL ZipPackage::initialize( const Sequence< Any >& aArguments ) m_pRootFolder->setPackageFormat_Impl( m_nFormat ); } - else if ( aNamedValue.Name.equalsAscii( "AllowRemoveOnInsert" ) ) + else if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AllowRemoveOnInsert" ) ) ) { aNamedValue.Value >>= m_bAllowRemoveOnInsert; m_pRootFolder->setRemoveOnInsertMode_Impl( m_bAllowRemoveOnInsert ); } // for now the progress handler is not used, probably it will never be - // if ( aNamedValue.Name.equalsAscii( "ProgressHandler" ) + // if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ProgressHandler" ) ) } else { diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx index b4de94d46b91..18772a5d68f9 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.cxx +++ b/xmlsecurity/tools/standalone/csfit/helper.cxx @@ -102,7 +102,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "No rdb URI specified" ) ; - if( sUnoUrl.equalsAscii( "local" ) ) { + if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); OSL_ENSURE( xSimpleRegistry.is() , "serviceManager - " diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx index 0be21ed3bf68..261972221ee8 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx @@ -70,7 +70,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "No rdb URI specified" ) ; - if( sUnoUrl.equalsAscii( "local" ) ) { + if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); OSL_ENSURE( xSimpleRegistry.is() , "serviceManager - " -- cgit v1.2.3