From 88fa511a7748ff920546bd28ac9e15f5e0ba2fb0 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Thu, 20 Jan 2011 11:23:45 +0100 Subject: Replace suitable equalsAscii calls with equalsAsciiL. Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'. --- framework/source/accelerators/keymapping.cxx | 2 +- framework/source/classes/fwktabwindow.cxx | 12 ++++++------ framework/source/dispatch/closedispatcher.cxx | 2 +- framework/source/helper/uielementwrapperbase.cxx | 4 ++-- framework/source/services/sessionlistener.cxx | 10 +++++----- framework/source/uielement/addonstoolbarwrapper.cxx | 2 +- .../source/uielement/buttontoolbarcontroller.cxx | 6 +++--- framework/source/uielement/constitemcontainer.cxx | 4 ++-- .../source/uielement/fontsizemenucontroller.cxx | 2 +- framework/source/uielement/itemcontainer.cxx | 4 ++-- .../source/uielement/langselectionmenucontroller.cxx | 6 +++--- framework/source/uielement/newmenucontroller.cxx | 4 ++-- framework/source/uielement/rootitemcontainer.cxx | 4 ++-- .../source/uielement/toolbarsmenucontroller.cxx | 20 ++++++++++---------- framework/source/uifactory/addonstoolboxfactory.cxx | 6 +++--- .../source/uifactory/windowcontentfactorymanager.cxx | 4 ++-- 16 files changed, 46 insertions(+), 46 deletions(-) (limited to 'framework') diff --git a/framework/source/accelerators/keymapping.cxx b/framework/source/accelerators/keymapping.cxx index 9efacdfccee1..e10b062d9af3 100644 --- a/framework/source/accelerators/keymapping.cxx +++ b/framework/source/accelerators/keymapping.cxx @@ -227,7 +227,7 @@ sal_Bool KeyMapping::impl_st_interpretIdentifierAsPureKeyCode(const ::rtl::OUStr // 0 is normaly an error of the called method toInt32() ... // But we must be aware, that the identifier is "0"! rCode = 0; - return sIdentifier.equalsAscii("0"); + return sIdentifier.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0")); } } // namespace framework diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index d5e2e602b445..245a9f3de7ba 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -352,17 +352,17 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea beans::NamedValue aValue = rProperties[i]; ::rtl::OUString sName = aValue.Name; - if ( sName.equalsAscii("Title") ) + if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")) ) aValue.Value >>= sTitle; - else if ( sName.equalsAscii("ToolTip") ) + else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ToolTip")) ) aValue.Value >>= sToolTip; - else if ( sName.equalsAscii("PageURL") ) + else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PageURL")) ) aValue.Value >>= sPageURL; - else if ( sName.equalsAscii("EventHdl") ) + else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EventHdl")) ) aValue.Value >>= xEventHdl; - else if ( sName.equalsAscii("Image") ) + else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Image")) ) aValue.Value >>= xImage; - else if ( sName.equalsAscii("Disabled") ) + else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Disabled")) ) aValue.Value >>= bDisabled; } diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 38546c1640d3..15b44aad0430 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -238,7 +238,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& sal_Bool bIsSynchron = sal_False; for (sal_Int32 nArgs=0; nArgs>= bIsSynchron; break; diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index d2a890104b73..87c730b69eb3 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -137,9 +137,9 @@ throw ( Exception, RuntimeException ) PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "ResourceURL" )) + if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResourceURL" ) )) aPropValue.Value >>= m_aResourceURL; - else if ( aPropValue.Name.equalsAscii( "Frame" )) + else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) { Reference< XFrame > xFrame; aPropValue.Value >>= xFrame; diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index 181cda0b0df4..9a5d2a24a185 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -224,11 +224,11 @@ void SAL_CALL SessionListener::initialize(const Sequence< Any >& args) { if (args[i] >>= v) { - if (v.Name.equalsAscii("SessionManagerName")) + if (v.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SessionManagerName"))) v.Value >>= aSMgr; - else if (v.Name.equalsAscii("SessionManager")) + else if (v.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SessionManager"))) v.Value >>= m_rSessionManager; - else if (v.Name.equalsAscii("AllowUserInteractionOnQuit")) + else if (v.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AllowUserInteractionOnQuit"))) v.Value >>= m_bAllowUserInteractionOnQuit; } } @@ -246,14 +246,14 @@ void SAL_CALL SessionListener::initialize(const Sequence< Any >& args) void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event) throw (css::uno::RuntimeException) { - if (event.FeatureURL.Complete.equalsAscii("vnd.sun.star.autorecovery:/doSessionRestore")) + if (event.FeatureURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.autorecovery:/doSessionRestore"))) { if (event.FeatureDescriptor.compareToAscii("update")==0) m_bRestored = sal_True; // a document was restored // if (event.FeatureDescriptor.compareToAscii("stop")==0) } - else if (event.FeatureURL.Complete.equalsAscii("vnd.sun.star.autorecovery:/doSessionSave")) + else if (event.FeatureURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.autorecovery:/doSessionSave"))) { if (event.FeatureDescriptor.compareToAscii("stop")==0) { diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 5db482745950..ab42096f6143 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -124,7 +124,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "ConfigurationData" )) + if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ConfigurationData" ) )) aPropValue.Value >>= m_aConfigData; } } diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx index 05c567251a45..c4d4f7b6c8fc 100644 --- a/framework/source/uielement/buttontoolbarcontroller.cxx +++ b/framework/source/uielement/buttontoolbarcontroller.cxx @@ -152,11 +152,11 @@ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException { if ( aArguments[i] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "Frame" )) + if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) m_xFrame.set(aPropValue.Value,UNO_QUERY); - else if ( aPropValue.Name.equalsAscii( "CommandURL" )) + else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandURL" ) )) aPropValue.Value >>= m_aCommandURL; - else if ( aPropValue.Name.equalsAscii( "ServiceManager" )) + else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ServiceManager" ) )) m_xServiceManager.set(aPropValue.Value,UNO_QUERY); } } diff --git a/framework/source/uielement/constitemcontainer.cxx b/framework/source/uielement/constitemcontainer.cxx index 15da189acb0b..c90d0580ea1b 100644 --- a/framework/source/uielement/constitemcontainer.cxx +++ b/framework/source/uielement/constitemcontainer.cxx @@ -220,7 +220,7 @@ ConstItemContainer::ConstItemContainer( const Reference< XIndexAccess >& rSource Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAscii( "ItemDescriptorContainer" )) + if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; @@ -257,7 +257,7 @@ void ConstItemContainer::copyItemContainer( const std::vector< Sequence< Propert Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAscii( "ItemDescriptorContainer" )) + if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index b72dde21e33c..08b370ca796b 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -111,7 +111,7 @@ rtl::OUString FontSizeMenuController::retrievePrinterName( com::sun::star::uno:: Sequence< PropertyValue > aPrinterSeq = xPrintable->getPrinter(); for ( int i = 0; i < aPrinterSeq.getLength(); i++ ) { - if ( aPrinterSeq[i].Name.equalsAscii( "Name" )) + if ( aPrinterSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) )) { aPrinterSeq[i].Value >>= aPrinterName; break; diff --git a/framework/source/uielement/itemcontainer.cxx b/framework/source/uielement/itemcontainer.cxx index 9b25bdbe8179..dca5d23da86d 100644 --- a/framework/source/uielement/itemcontainer.cxx +++ b/framework/source/uielement/itemcontainer.cxx @@ -82,7 +82,7 @@ ItemContainer::ItemContainer( const Reference< XIndexAccess >& rSourceContainer, Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAscii( "ItemDescriptorContainer" )) + if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; @@ -118,7 +118,7 @@ void ItemContainer::copyItemContainer( const std::vector< Sequence< PropertyValu Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAscii( "ItemDescriptorContainer" )) + if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index c6cd2943a628..ba695c163abe 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -335,15 +335,15 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com:: // TODO: Fill menu with the information retrieved by the status update - if( m_aCommandURL.equalsAscii( ".uno:SetLanguageSelectionMenu" )) + if( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SetLanguageSelectionMenu" ) )) { fillPopupMenu(m_xPopupMenu, MODE_SetLanguageSelectionMenu ); } - else if( m_aCommandURL.equalsAscii( ".uno:SetLanguageParagraphMenu" )) + else if( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SetLanguageParagraphMenu" ) )) { fillPopupMenu(m_xPopupMenu, MODE_SetLanguageParagraphMenu ); } - else if( m_aCommandURL.equalsAscii( ".uno:SetLanguageAllTextMenu" )) + else if( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SetLanguageAllTextMenu" ) )) { fillPopupMenu(m_xPopupMenu, MODE_SetLanguageAllTextMenu ); } diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 3c6404ae081b..e391ead2f04d 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -521,7 +521,7 @@ void NewMenuController::impl_setPopupMenu() { for ( sal_Int32 y = 0; y < aSeq.getLength(); y++ ) { - if ( aSeq[y].Name.equalsAscii("ooSetupFactoryEmptyDocumentURL") ) + if ( aSeq[y].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooSetupFactoryEmptyDocumentURL")) ) { aSeq[y].Value >>= m_aEmptyDocURL; break; @@ -555,7 +555,7 @@ void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments ) const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_bShowImages = rSettings.GetUseImagesInMenus(); - m_bNewMenu = m_aCommandURL.equalsAscii( ".uno:AddDirect" ); + m_bNewMenu = m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:AddDirect" ) ); } } } diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx index fb0eee07a64f..445419cf0edd 100644 --- a/framework/source/uielement/rootitemcontainer.cxx +++ b/framework/source/uielement/rootitemcontainer.cxx @@ -145,7 +145,7 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAscii( "ItemDescriptorContainer" )) + if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; @@ -182,7 +182,7 @@ void RootItemContainer::copyItemContainer( const std::vector< Sequence< Property Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAscii( "ItemDescriptorContainer" )) + if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index f4288dc529f6..9371ea007f92 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -270,7 +270,7 @@ rtl::OUString ToolbarsMenuController::getUINameFromCommand( const rtl::OUString& { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAscii( "Label" )) + if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) )) { aPropSeq[i].Value >>= aStr; break; @@ -499,18 +499,18 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r } // Create commands for non-toolbars - if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.text.TextDocument" ) || - m_aModuleIdentifier.equalsAscii( "com.sun.star.text.WebDocument" ) || - m_aModuleIdentifier.equalsAscii( "com.sun.star.text.GlobalDocument" ) || - m_aModuleIdentifier.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) || - m_aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) || - m_aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) + if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) || + m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) || + m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) || + m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) || + m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) || + m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) { addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), 10360, aEmptyString ); - if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) || - m_aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" )) + if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) || + m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), 10417, aEmptyString ); - else if ( m_aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" )) + else if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), 26241, aEmptyString ); else addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), 20128, aEmptyString ); diff --git a/framework/source/uifactory/addonstoolboxfactory.cxx b/framework/source/uifactory/addonstoolboxfactory.cxx index 652bb2f62909..f72372fafe2b 100644 --- a/framework/source/uifactory/addonstoolboxfactory.cxx +++ b/framework/source/uifactory/addonstoolboxfactory.cxx @@ -177,11 +177,11 @@ throw ( ::com::sun::star::container::NoSuchElementException, for ( sal_Int32 n = 0; n < Args.getLength(); n++ ) { - if ( Args[n].Name.equalsAscii( "ConfigurationData" )) + if ( Args[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ConfigurationData" ) )) Args[n].Value >>= aConfigData; - else if ( Args[n].Name.equalsAscii( "Frame" )) + else if ( Args[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) Args[n].Value >>= xFrame; - else if ( Args[n].Name.equalsAscii( "ResourceURL" )) + else if ( Args[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResourceURL" ) )) Args[n].Value >>= aResourceURL; } diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx index d68319f6d5cb..cd76f81b3f9a 100644 --- a/framework/source/uifactory/windowcontentfactorymanager.cxx +++ b/framework/source/uifactory/windowcontentfactorymanager.cxx @@ -178,9 +178,9 @@ throw (uno::Exception, uno::RuntimeException) beans::PropertyValue aPropValue; if ( Arguments[i] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "Frame" )) + if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) aPropValue.Value >>= xFrame; - else if ( aPropValue.Name.equalsAscii( "ResourceURL" )) + else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResourceURL" ) )) aPropValue.Value >>= aResourceURL; } } -- cgit