From 743f22045c4ec08c46c259fc0ba240194a391457 Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 15:05:52 +0200 Subject: Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \; --- .../accelerators/acceleratorconfiguration.cxx | 42 +++++++++++----------- framework/source/classes/fwktabwindow.cxx | 12 +++---- framework/source/dispatch/closedispatcher.cxx | 8 ++--- framework/source/dispatch/dispatchprovider.cxx | 2 +- .../source/dispatch/startmoduledispatcher.cxx | 2 +- framework/source/fwe/xml/menudocumenthandler.cxx | 12 +++---- .../source/fwi/uielement/constitemcontainer.cxx | 2 +- framework/source/helper/titlebarupdate.cxx | 8 ++--- .../source/helper/uiconfigelementwrapperbase.cxx | 14 ++++---- framework/source/layoutmanager/layoutmanager.cxx | 8 ++--- .../source/layoutmanager/toolbarlayoutmanager.cxx | 4 +-- framework/source/lomenubar/FrameJob.cxx | 4 +-- framework/source/services/autorecovery.cxx | 32 ++++++++--------- framework/source/services/sessionlistener.cxx | 10 +++--- .../source/uiconfiguration/imagemanagerimpl.cxx | 6 ++-- .../source/uiconfiguration/moduleuicfgsupplier.cxx | 2 +- .../uiconfiguration/windowstateconfiguration.cxx | 2 +- framework/source/uielement/menubarmanager.cxx | 4 +-- framework/source/uielement/menubarwrapper.cxx | 2 +- framework/source/uielement/newmenucontroller.cxx | 2 +- framework/source/uielement/statusbarmanager.cxx | 12 +++---- framework/source/uielement/toolbarmanager.cxx | 28 +++++++-------- framework/source/uifactory/menubarfactory.cxx | 8 ++--- 23 files changed, 113 insertions(+), 113 deletions(-) (limited to 'framework') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index ca210b89260e..ed3d0ca721fd 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1179,14 +1179,14 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reset() { css::uno::Reference< css::container::XNamed > xNamed(m_xCfg, css::uno::UNO_QUERY); ::rtl::OUString sConfig = xNamed->getName(); - if ( sConfig.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Global")) ) + if ( sConfig == "Global" ) { m_xCfg = css::uno::Reference< css::container::XNameAccess > ( ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), css::uno::UNO_QUERY ); XCUBasedAcceleratorConfiguration::reload(); } - else if ( sConfig.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Modules")) ) + else if ( sConfig == "Modules" ) { m_xCfg = css::uno::Reference< css::container::XNameAccess > ( ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), @@ -1241,14 +1241,14 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); - if ( sGlobalModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_GLOBAL)) ) + if ( sGlobalModules == CFG_ENTRY_GLOBAL ) { ::rtl::OUString sModule; sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); if ( !sKey.isEmpty() && !sPath.isEmpty() ) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } - else if ( sGlobalModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_MODULES)) ) + else if ( sGlobalModules == CFG_ENTRY_MODULES ) { ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); @@ -1272,9 +1272,9 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const { AcceleratorCache aReadCache = AcceleratorCache(); css::uno::Reference< css::container::XNameAccess > xAccess; - if (m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Global"))) + if ( m_sGlobalOrModules == "Global" ) xCfg->getByName(CFG_ENTRY_GLOBAL) >>= xAccess; - else if (m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Modules"))) + else if ( m_sGlobalOrModules == "Modules" ) { css::uno::Reference< css::container::XNameAccess > xModules; xCfg->getByName(CFG_ENTRY_MODULES) >>= xModules; @@ -1351,13 +1351,13 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const break; } - if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SHIFT"))) + if ( sToken[k] == "SHIFT" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::SHIFT; - else if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD1"))) + else if ( sToken[k] == "MOD1" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1; - else if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD2"))) + else if ( sToken[k] == "MOD2" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2; - else if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD3"))) + else if ( sToken[k] == "MOD3" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; else { @@ -1483,9 +1483,9 @@ void XCUBasedAcceleratorConfiguration::insertKeyToConfiguration( const css::awt: else m_xCfg->getByName(CFG_ENTRY_SECONDARY) >>= xAccess; - if ( m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_GLOBAL)) ) + if ( m_sGlobalOrModules == CFG_ENTRY_GLOBAL ) xAccess->getByName(CFG_ENTRY_GLOBAL) >>= xContainer; - else if ( m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_MODULES)) ) + else if ( m_sGlobalOrModules == CFG_ENTRY_MODULES ) { css::uno::Reference< css::container::XNameContainer > xModules; xAccess->getByName(CFG_ENTRY_MODULES) >>= xModules; @@ -1528,9 +1528,9 @@ void XCUBasedAcceleratorConfiguration::removeKeyFromConfiguration( const css::aw else m_xCfg->getByName(CFG_ENTRY_SECONDARY) >>= xAccess; - if ( m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_GLOBAL)) ) + if ( m_sGlobalOrModules == CFG_ENTRY_GLOBAL ) xAccess->getByName(CFG_ENTRY_GLOBAL) >>= xContainer; - else if ( m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_MODULES)) ) + else if ( m_sGlobalOrModules == CFG_ENTRY_MODULES ) { css::uno::Reference< css::container::XNameAccess > xModules; xAccess->getByName(CFG_ENTRY_MODULES) >>= xModules; @@ -1550,7 +1550,7 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPr css::uno::Reference< css::container::XNameContainer > xContainer; m_xCfg->getByName(sPrimarySecondary) >>= xAccess; - if ( sGlobalModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_GLOBAL)) ) + if ( sGlobalModules == CFG_ENTRY_GLOBAL ) xAccess->getByName(CFG_ENTRY_GLOBAL) >>= xContainer; else { @@ -1576,13 +1576,13 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPr break; sToken[i] = sKey.getToken(0, '_', nIndex); - if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SHIFT"))) + if ( sToken[i] == "SHIFT" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::SHIFT; - else if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD1"))) + else if ( sToken[i] == "MOD1" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1; - else if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD2"))) + else if ( sToken[i] == "MOD2" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2; - else if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD3"))) + else if ( sToken[i] == "MOD3" ) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; } @@ -1598,14 +1598,14 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPr xCommand->getByName(sLocale) >>= sCommand; } - if (sPrimarySecondary.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_PRIMARY))) + if ( sPrimarySecondary == CFG_ENTRY_PRIMARY ) { if (sCommand.isEmpty()) m_aPrimaryReadCache.removeKey(aKeyEvent); else m_aPrimaryReadCache.setKeyCommandPair(aKeyEvent, sCommand); } - else if (sPrimarySecondary.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_SECONDARY))) + else if ( sPrimarySecondary == CFG_ENTRY_SECONDARY ) { if (sCommand.isEmpty()) m_aSecondaryReadCache.removeKey(aKeyEvent); diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index f008fb215cdc..159739a6df26 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -341,17 +341,17 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea beans::NamedValue aValue = rProperties[i]; ::rtl::OUString sName = aValue.Name; - if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")) ) + if ( sName == "Title" ) aValue.Value >>= sTitle; - else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ToolTip")) ) + else if ( sName == "ToolTip" ) aValue.Value >>= sToolTip; - else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PageURL")) ) + else if ( sName == "PageURL" ) aValue.Value >>= sPageURL; - else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EventHdl")) ) + else if ( sName == "EventHdl" ) aValue.Value >>= xEventHdl; - else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Image")) ) + else if ( sName == "Image" ) aValue.Value >>= xImage; - else if ( sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Disabled")) ) + else if ( sName == "Disabled" ) aValue.Value >>= bDisabled; } diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 43756fb36b23..cf81fa5d1554 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -193,11 +193,11 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& // If not - we have to break this operation. But an optional listener must be informed. // BTW: We save the information about the requested operation. Because // we need it later. - if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(URL_CLOSEDOC))) + if ( aURL.Complete == URL_CLOSEDOC ) m_eOperation = E_CLOSE_DOC; - else if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(URL_CLOSEWIN))) + else if ( aURL.Complete == URL_CLOSEWIN ) m_eOperation = E_CLOSE_WIN; - else if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(URL_CLOSEFRAME))) + else if ( aURL.Complete == URL_CLOSEFRAME ) m_eOperation = E_CLOSE_FRAME; else { @@ -230,7 +230,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/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index 562dd744ce47..eead1818dcfd 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -430,7 +430,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame else xDispatcher = implts_getOrCreateDispatchHelper( E_CLOSEDISPATCHER, xFrame ); } - else if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CloseFrame"))) + else if ( aURL.Complete == ".uno:CloseFrame" ) xDispatcher = implts_getOrCreateDispatchHelper( E_CLOSEDISPATCHER, xFrame ); if ( ! xDispatcher.is()) diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx index bee51f791184..90e0eefcfb8c 100644 --- a/framework/source/dispatch/startmoduledispatcher.cxx +++ b/framework/source/dispatch/startmoduledispatcher.cxx @@ -118,7 +118,7 @@ void SAL_CALL StartModuleDispatcher::dispatchWithNotification(const css::util::U throw(css::uno::RuntimeException) { ::sal_Int16 nResult = css::frame::DispatchResultState::DONTKNOW; - if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_UNO_SHOWSTARTMODULE))) + if ( aURL.Complete == CMD_UNO_SHOWSTARTMODULE ) { nResult = css::frame::DispatchResultState::FAILURE; if (implts_isBackingModePossible ()) diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index e280b304a8b9..d80fcfb88db5 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -138,28 +138,28 @@ static void ExtractMenuParameters( const Sequence< PropertyValue > rProp, { for ( sal_Int32 i = 0; i < rProp.getLength(); i++ ) { - if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) + if ( rProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL ) { rProp[i].Value >>= rCommandURL; rCommandURL = rCommandURL.intern(); } - else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_HELPURL)) ) + else if ( rProp[i].Name == ITEM_DESCRIPTOR_HELPURL ) { rProp[i].Value >>= rHelpURL; } - else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)) ) + else if ( rProp[i].Name == ITEM_DESCRIPTOR_CONTAINER ) { rProp[i].Value >>= rSubMenu; } - else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_LABEL)) ) + else if ( rProp[i].Name == ITEM_DESCRIPTOR_LABEL ) { rProp[i].Value >>= rLabel; } - else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TYPE)) ) + else if ( rProp[i].Name == ITEM_DESCRIPTOR_TYPE ) { rProp[i].Value >>= rType; } - else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_STYLE)) ) + else if ( rProp[i].Name == ITEM_DESCRIPTOR_STYLE ) { rProp[i].Value >>= rStyle; } diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 6ead1feee3f3..070799e371ff 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -350,7 +350,7 @@ throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::bean Any SAL_CALL ConstItemContainer::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - if (PropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROPNAME_UINAME))) + if ( PropertyName == PROPNAME_UINAME ) return makeAny( m_aUIName ); throw UnknownPropertyException(); diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 4c1659ba0976..c14fd5814148 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -207,13 +207,13 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument")) || aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.xforms.XMLFormDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer")); - else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sheet.SpreadsheetDocument")) ) + else if ( aModuleId == "com.sun.star.sheet.SpreadsheetDocument" ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc")); - else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.PresentationDocument")) ) + else if ( aModuleId == "com.sun.star.presentation.PresentationDocument" ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("impress")); - else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocument")) ) + else if ( aModuleId == "com.sun.star.drawing.DrawingDocument" ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("draw")); - else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.formula.FormulaProperties")) ) + else if ( aModuleId == "com.sun.star.formula.FormulaProperties" ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("math")); else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DatabaseDocument")) || aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")) || diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 92b5f7f65859..185008b6bbca 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -161,19 +161,19 @@ throw ( Exception, RuntimeException ) PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_CONFIGSOURCE))) + if ( aPropValue.Name == UIELEMENT_PROPNAME_CONFIGSOURCE ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGSOURCE, aPropValue.Value ); - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_FRAME))) + else if ( aPropValue.Name == UIELEMENT_PROPNAME_FRAME ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_FRAME, aPropValue.Value ); - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_PERSISTENT))) + else if ( aPropValue.Name == UIELEMENT_PROPNAME_PERSISTENT ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_PERSISTENT, aPropValue.Value ); - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_RESOURCEURL))) + else if ( aPropValue.Name == UIELEMENT_PROPNAME_RESOURCEURL ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_RESOURCEURL, aPropValue.Value ); - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_TYPE))) + else if ( aPropValue.Name == UIELEMENT_PROPNAME_TYPE ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_TYPE, aPropValue.Value ); - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_CONFIGLISTENER))) + else if ( aPropValue.Name == UIELEMENT_PROPNAME_CONFIGLISTENER ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGLISTENER, aPropValue.Value ); - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_NOCLOSE))) + else if ( aPropValue.Name == UIELEMENT_PROPNAME_NOCLOSE ) setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_NOCLOSE, aPropValue.Value ); } } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 3b4774ca2948..7d5e6a580cdc 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -580,22 +580,22 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName, if ( aWindowState[n].Value >>= bValue ) rElementData.m_aDockedData.m_bLocked = bValue; } - else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_CONTEXT))) + else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_CONTEXT ) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bContextSensitive = bValue; } - else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_NOCLOSE))) + else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_NOCLOSE ) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bNoClose = bValue; } - else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_CONTEXTACTIVE))) + else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_CONTEXTACTIVE ) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bContextActive = bValue; } - else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_SOFTCLOSE))) + else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_SOFTCLOSE ) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bSoftClose = bValue; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 0c0a241a9fcd..ff6ea0b04513 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1192,9 +1192,9 @@ void ToolbarLayoutManager::implts_createCustomToolBars( const uno::Sequence< uno ::rtl::OUString aTbxTitle; for ( sal_Int32 j = 0; j < rTbxSeq.getLength(); j++ ) { - if ( rTbxSeq[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ResourceURL"))) + if ( rTbxSeq[j].Name == "ResourceURL" ) rTbxSeq[j].Value >>= aTbxResName; - else if ( rTbxSeq[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UIName"))) + else if ( rTbxSeq[j].Name == "UIName" ) rTbxSeq[j].Value >>= aTbxTitle; } diff --git a/framework/source/lomenubar/FrameJob.cxx b/framework/source/lomenubar/FrameJob.cxx index f31fde0ced83..d96d8fc4879b 100644 --- a/framework/source/lomenubar/FrameJob.cxx +++ b/framework/source/lomenubar/FrameJob.cxx @@ -225,7 +225,7 @@ Any SAL_CALL FrameJob::execute( const Sequence< NamedValue >& aArguments ) for (int i = 0; i>= lEnv; break; @@ -235,7 +235,7 @@ Any SAL_CALL FrameJob::execute( const Sequence< NamedValue >& aArguments ) len = lEnv.getLength (); for (int i = 0; i>= xModel; } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 28d2734a44c8..fecbf6a5202c 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -776,7 +776,7 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent implts_registerDocument(xDocument); } // document modified => set its modify state new (means modified against the original file!) - else if (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_MODIFYCHANGED))) + else if ( aEvent.EventName == EVENT_ON_MODIFYCHANGED ) { implts_updateModifiedState(xDocument); } @@ -807,7 +807,7 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent Dont remove temp. files or change the modified state of the document! It was not realy saved to the original file ... */ - else if (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVETODONE))) + else if ( aEvent.EventName == EVENT_ON_SAVETODONE ) { implts_updateDocumentUsedForSavingState(xDocument, SAVE_FINISHED); } @@ -824,7 +824,7 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent implts_updateDocumentUsedForSavingState(xDocument, SAVE_FINISHED); } // document closed => remove temp. files and configuration entries - else if (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_UNLOAD))) + else if ( aEvent.EventName == EVENT_ON_UNLOAD ) { implts_deregisterDocument(xDocument, sal_True); // sal_True => stop listening for disposing() ! } @@ -854,7 +854,7 @@ void SAL_CALL AutoRecovery::changesOccurred(const css::util::ChangesEvent& aEven ::rtl::OUString sPath; pChanges[i].Accessor >>= sPath; - if (sPath.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_AUTOSAVE_ENABLED))) + if ( sPath == CFG_ENTRY_AUTOSAVE_ENABLED ) { sal_Bool bEnabled = sal_False; if (pChanges[i].Element >>= bEnabled) @@ -872,7 +872,7 @@ void SAL_CALL AutoRecovery::changesOccurred(const css::util::ChangesEvent& aEven } } else - if (sPath.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CFG_ENTRY_AUTOSAVE_TIMEINTERVALL))) + if ( sPath == CFG_ENTRY_AUTOSAVE_TIMEINTERVALL ) pChanges[i].Element >>= m_nAutoSaveTimeIntervall; } @@ -2878,27 +2878,27 @@ void AutoRecovery::implts_informListener( sal_Int32 eJ //----------------------------------------------- sal_Int32 AutoRecovery::implst_classifyJob(const css::util::URL& aURL) { - if (aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL))) + if ( aURL.Protocol == CMD_PROTOCOL ) { - if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_PREPARE_EMERGENCY_SAVE))) + if ( aURL.Path == CMD_DO_PREPARE_EMERGENCY_SAVE ) return AutoRecovery::E_PREPARE_EMERGENCY_SAVE; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_EMERGENCY_SAVE))) + else if ( aURL.Path == CMD_DO_EMERGENCY_SAVE ) return AutoRecovery::E_EMERGENCY_SAVE; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_RECOVERY))) + else if ( aURL.Path == CMD_DO_RECOVERY ) return AutoRecovery::E_RECOVERY; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_ENTRY_BACKUP))) + else if ( aURL.Path == CMD_DO_ENTRY_BACKUP ) return AutoRecovery::E_ENTRY_BACKUP; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_ENTRY_CLEANUP))) + else if ( aURL.Path == CMD_DO_ENTRY_CLEANUP ) return AutoRecovery::E_ENTRY_CLEANUP; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_SAVE))) + else if ( aURL.Path == CMD_DO_SESSION_SAVE ) return AutoRecovery::E_SESSION_SAVE; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_QUIET_QUIT))) + else if ( aURL.Path == CMD_DO_SESSION_QUIET_QUIT ) return AutoRecovery::E_SESSION_QUIET_QUIT; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_RESTORE))) + else if ( aURL.Path == CMD_DO_SESSION_RESTORE ) return AutoRecovery::E_SESSION_RESTORE; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_DISABLE_RECOVERY))) + else if ( aURL.Path == CMD_DO_DISABLE_RECOVERY ) return AutoRecovery::E_DISABLE_AUTORECOVERY; - else if (aURL.Path.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SET_AUTOSAVE_STATE))) + else if ( aURL.Path == CMD_DO_SET_AUTOSAVE_STATE ) return AutoRecovery::E_SET_AUTOSAVE_STATE; } diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index 92b479d1bcff..55bed9b4b9dc 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -227,11 +227,11 @@ void SAL_CALL SessionListener::initialize(const Sequence< Any >& args) { if (args[i] >>= v) { - if (v.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SessionManagerName"))) + if ( v.Name == "SessionManagerName" ) v.Value >>= aSMgr; - else if (v.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SessionManager"))) + else if ( v.Name == "SessionManager" ) v.Value >>= m_rSessionManager; - else if (v.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AllowUserInteractionOnQuit"))) + else if ( v.Name == "AllowUserInteractionOnQuit" ) v.Value >>= m_bAllowUserInteractionOnQuit; } } @@ -250,13 +250,13 @@ void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event) throw (css::uno::RuntimeException) { SAL_INFO("fwk.session", "SessionListener::statusChanged"); - if (event.FeatureURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.autorecovery:/doSessionRestore"))) + if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionRestore" ) { if (event.FeatureDescriptor.compareToAscii("update")==0) m_bRestored = sal_True; // a document was restored } - else if (event.FeatureURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.autorecovery:/doSessionSave"))) + else if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionSave" ) { if (event.FeatureDescriptor.compareToAscii("stop")==0) { diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 7426360fa27b..0abb42bb6539 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -770,15 +770,15 @@ void ImageManagerImpl::initialize( const Sequence< Any >& aArguments ) PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserConfigStorage")) ) + if ( aPropValue.Name == "UserConfigStorage" ) { aPropValue.Value >>= m_xUserConfigStorage; } - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ModuleIdentifier")) ) + else if ( aPropValue.Name == "ModuleIdentifier" ) { aPropValue.Value >>= m_aModuleIdentifier; } - else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserRootCommit")) ) + else if ( aPropValue.Name == "UserRootCommit" ) { aPropValue.Value >>= m_xUserRootCommit; } diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index 241a3d5874ce..773b1cebfa15 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -215,7 +215,7 @@ throw ( NoSuchElementException, RuntimeException) xCont->getByName(ModuleIdentifier) >>= lProps; for (sal_Int32 i=0; i>= sShort; break; diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 1f0974282d3f..bc68f637add3 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1396,7 +1396,7 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XMultiServi ::rtl::OUString aWindowStateFileStr; for ( sal_Int32 y = 0; y < aSeq.getLength(); y++ ) { - if ( aSeq[y].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooSetupFactoryWindowStateConfigRef")) ) + if ( aSeq[y].Name == "ooSetupFactoryWindowStateConfigRef" ) { aSeq[y].Value >>= aWindowStateFileStr; break; diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 0ff34d6d097b..38b14b1d8114 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -883,7 +883,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) // Set key code, workaround for hard-coded shortcut F1 mapped to .uno:HelpIndex // Only non-popup menu items can have a short-cut - if ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aCmdHelpIndex)) ) + if ( pMenuItemHandler->aMenuItemURL == aCmdHelpIndex ) { KeyCode aKeyCode( KEY_F1 ); pMenu->SetAccelKey( pMenuItemHandler->nItemId, aKeyCode ); @@ -1481,7 +1481,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF // Set key code, workaround for hard-coded shortcut F1 mapped to .uno:HelpIndex // Only non-popup menu items can have a short-cut - if ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aCmdHelpIndex)) ) + if ( pMenuItemHandler->aMenuItemURL == aCmdHelpIndex ) { KeyCode aKeyCode( KEY_F1 ); pMenu->SetAccelKey( pMenuItemHandler->nItemId, aKeyCode ); diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index a89ca7e8653f..45d5bf849ad6 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -193,7 +193,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MenuOnly")) ) + if ( aPropValue.Name == "MenuOnly" ) aPropValue.Value >>= bMenuOnly; } } diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index d2731962f4c2..d82be5a8629a 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -514,7 +514,7 @@ void NewMenuController::impl_setPopupMenu() { for ( sal_Int32 y = 0; y < aSeq.getLength(); y++ ) { - if ( aSeq[y].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooSetupFactoryEmptyDocumentURL")) ) + if ( aSeq[y].Name == "ooSetupFactoryEmptyDocumentURL" ) { aSeq[y].Value >>= m_aEmptyDocURL; break; diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 3093ec77ad0e..ef15fe75c06d 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -490,27 +490,27 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc { for ( int i = 0; i < aProp.getLength(); i++ ) { - if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) + if ( aProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL ) { aProp[i].Value >>= aCommandURL; } - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_HELPURL)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_HELPURL ) { aProp[i].Value >>= aHelpURL; } - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_STYLE)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_STYLE ) { aProp[i].Value >>= nStyle; } - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TYPE)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_TYPE ) { aProp[i].Value >>= nType; } - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_WIDTH)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_WIDTH ) { aProp[i].Value >>= nWidth; } - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_OFFSET)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_OFFSET ) { aProp[i].Value >>= nOffset; } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 067dbe4eacb1..80adbd735883 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -547,7 +547,7 @@ throw ( ::com::sun::star::uno::RuntimeException ) if ( m_bDisposed ) return; - if ( Event.FeatureURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ImageOrientation")) ) + if ( Event.FeatureURL.Complete == ".uno:ImageOrientation" ) { SfxImageItem aItem( 1, 0 ); aItem.PutValue( Event.State ); @@ -872,7 +872,7 @@ uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const aPropSeq = GetPropsForCommand( aCmdURL ); for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Name")) ) + if ( aPropSeq[i].Name == "Name" ) { aPropSeq[i].Value >>= aLabel; break; @@ -890,7 +890,7 @@ sal_Int32 ToolBarManager::RetrievePropertiesFromCommand( const ::rtl::OUString& aPropSeq = GetPropsForCommand( aCmdURL ); for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Properties")) ) + if ( aPropSeq[i].Name == "Properties" ) { aPropSeq[i].Value >>= nProperties; break; @@ -1282,7 +1282,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine { for ( int i = 0; i < aProp.getLength(); i++ ) { - if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) + if ( aProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL ) { aProp[i].Value >>= aCommandURL; if ( aCommandURL.compareToAscii(MENUPREFIX, RTL_CONSTASCII_LENGTH(MENUPREFIX) ) == 0 ) @@ -1303,7 +1303,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine xMenuContainer->getByIndex(0) >>= aProps; for ( sal_Int32 index=0; index>= aMenuDesc; @@ -1317,19 +1317,19 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine } } } - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_HELPURL)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_HELPURL ) aProp[i].Value >>= aHelpURL; - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TOOLTIP)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_TOOLTIP ) aProp[i].Value >>= aTooltip; - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_LABEL)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_LABEL ) aProp[i].Value >>= aLabel; - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TYPE)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_TYPE ) aProp[i].Value >>= nType; - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_VISIBLE)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_VISIBLE ) aProp[i].Value >>= bIsVisible; - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_WIDTH)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_WIDTH ) aProp[i].Value >>= nWidth; - else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_STYLE)) ) + else if ( aProp[i].Name == ITEM_DESCRIPTOR_STYLE ) aProp[i].Value >>= nStyle; } @@ -2005,11 +2005,11 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) { for ( sal_Int32 j = 0; j < aProp.getLength(); j++ ) { - if ( aProp[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) + if ( aProp[j].Name == ITEM_DESCRIPTOR_COMMANDURL ) { aProp[j].Value >>= aCommandURL; } - else if ( aProp[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_VISIBLE)) ) + else if ( aProp[j].Name == ITEM_DESCRIPTOR_VISIBLE ) { aProp[j].Value >>= bVisible; nVisibleIndex = j; diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx index 55581665916c..7686b9535089 100644 --- a/framework/source/uifactory/menubarfactory.cxx +++ b/framework/source/uifactory/menubarfactory.cxx @@ -129,13 +129,13 @@ void MenuBarFactory::CreateUIElement(const ::rtl::OUString& ResourceURL for ( sal_Int32 n = 0; n < Args.getLength(); n++ ) { - if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ConfigurationSource")) ) + if ( Args[n].Name == "ConfigurationSource" ) Args[n].Value >>= xConfigSource; - else if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")) ) + else if ( Args[n].Name == "Frame" ) Args[n].Value >>= xFrame; - else if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ResourceURL")) ) + else if ( Args[n].Name == "ResourceURL" ) Args[n].Value >>= aResourceURL; - else if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Persistent")) ) + else if ( Args[n].Name == "Persistent" ) Args[n].Value >>= bPersistent; else if ( _pExtraMode && Args[n].Name.equalsAscii( _pExtraMode )) Args[n].Value >>= bExtraMode; -- cgit v1.2.3