From 6d7536ce4e6b51f499ccdd6aa0e749bda2d63d46 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 16 Jan 2011 14:12:57 +0000 Subject: equalsAsciiL faster than equalsAscii & comparetoAscii(const sal_Char*) --- .../accelerators/acceleratorconfiguration.cxx | 24 +++++------ framework/source/dispatch/dispatchprovider.cxx | 6 +-- framework/source/helper/titlebarupdate.cxx | 30 +++++++------- framework/source/layoutmanager/layoutmanager.cxx | 18 ++++----- .../source/uiconfiguration/imagemanagerimpl.cxx | 6 +-- framework/source/uielement/menubarwrapper.cxx | 2 +- framework/source/uielement/toolbarmanager.cxx | 47 +++++++++++----------- 7 files changed, 66 insertions(+), 67 deletions(-) (limited to 'framework') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 8dd1160d864f..8cf49ba0f422 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1190,14 +1190,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.equalsAscii("Global") ) + if ( sConfig.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("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.equalsAscii("Modules") ) + else if ( sConfig.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Modules")) ) { m_xCfg = css::uno::Reference< css::container::XNameAccess > ( ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), @@ -1283,9 +1283,9 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const { AcceleratorCache aReadCache = AcceleratorCache(); css::uno::Reference< css::container::XNameAccess > xAccess; - if (m_sGlobalOrModules.equalsAscii("Global")) + if (m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Global"))) xCfg->getByName(CFG_ENTRY_GLOBAL) >>= xAccess; - else if (m_sGlobalOrModules.equalsAscii("Modules")) + else if (m_sGlobalOrModules.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Modules"))) { css::uno::Reference< css::container::XNameAccess > xModules; xCfg->getByName(CFG_ENTRY_MODULES) >>= xModules; @@ -1362,13 +1362,13 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const break; } - if (sToken[k].equalsAscii("SHIFT")) + if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SHIFT"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::SHIFT; - else if (sToken[k].equalsAscii("MOD1")) + else if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD1"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1; - else if (sToken[k].equalsAscii("MOD2")) + else if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD2"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2; - else if (sToken[k].equalsAscii("MOD3")) + else if (sToken[k].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD3"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; else { @@ -1587,13 +1587,13 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPr break; sToken[i] = sKey.getToken(0, '_', nIndex); - if (sToken[i].equalsAscii("SHIFT")) + if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SHIFT"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::SHIFT; - else if (sToken[i].equalsAscii("MOD1")) + else if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD1"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1; - else if (sToken[i].equalsAscii("MOD2")) + else if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD2"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2; - else if (sToken[i].equalsAscii("MOD3")) + else if (sToken[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MOD3"))) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; } diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index 9fd99761e9ef..86c52fb15b52 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -477,8 +477,8 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame { // There exist a hard coded interception for special URLs. if ( - (aURL.Complete.equalsAscii(".uno:CloseDoc" )) || - (aURL.Complete.equalsAscii(".uno:CloseWin" )) + (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CloseDoc"))) || + (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CloseWin"))) ) { css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY ); @@ -494,7 +494,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame else xDispatcher = implts_getOrCreateDispatchHelper( E_CLOSEDISPATCHER, xFrame ); } - else if (aURL.Complete.equalsAscii(".uno:CloseFrame")) + else if (aURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CloseFrame"))) xDispatcher = implts_getOrCreateDispatchHelper( E_CLOSEDISPATCHER, xFrame ); if ( ! xDispatcher.is()) diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 6cb4ed5adcc2..a7e61256f988 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -231,27 +231,27 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr rtl::OUString aModuleId = xModuleManager->identify(xFrame); rtl::OUString sDesktopName; - if ( aModuleId.equalsAscii( "com.sun.star.text.TextDocument" ) || - aModuleId.equalsAscii( "com.sun.star.text.GlobalDocument" ) || - aModuleId.equalsAscii( "com.sun.star.text.WebDocument" ) || - aModuleId.equalsAscii( "com.sun.star.xforms.XMLFormDocument" ) ) + if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.GlobalDocument")) || + 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.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sheet.SpreadsheetDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc")); - else if ( aModuleId.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.PresentationDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("impress")); - else if ( aModuleId.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DrawingDocument")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("draw")); - else if ( aModuleId.equalsAscii( "com.sun.star.formula.FormulaProperties" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.formula.FormulaProperties")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("math")); - else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DatabaseDocument" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.OfficeDatabaseDocument" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.RelationDesign" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.QueryDesign" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.TableDesign" ) || - aModuleId.equalsAscii( "com.sun.star.sdb.DataSourceBrowser" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DatabaseDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.RelationDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.QueryDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.TableDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DataSourceBrowser")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("base")); - else if ( aModuleId.equalsAscii( "com.sun.star.frame.StartModule" ) ) + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.StartModule")) ) sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("startcenter")); else sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("startcenter")); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index cc1fb77da0f9..33adc3361448 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -844,9 +844,9 @@ void LayoutManager::implts_createCustomToolBars( ::rtl::OUString aTbxTitle; for ( sal_Int32 j = 0; j < rTbxSeq.getLength(); j++ ) { - if ( rTbxSeq[j].Name.equalsAscii( "ResourceURL" )) + if ( rTbxSeq[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ResourceURL")) ) rTbxSeq[j].Value >>= aTbxResName; - else if ( rTbxSeq[j].Name.equalsAscii( "UIName" )) + else if ( rTbxSeq[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UIName")) ) rTbxSeq[j].Value >>= aTbxTitle; } @@ -1332,7 +1332,7 @@ void LayoutManager::implts_refreshContextToolbarsVisibility() UIElementVector::iterator pIter; for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { - if ( pIter->m_aType.equalsAsciiL( "toolbar", 7 )) + if ( pIter->m_aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("toolbar")) ) { aUIElementVisible.aName = pIter->m_aName; aUIElementVisible.bVisible = pIter->m_bVisible; @@ -1449,22 +1449,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.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXT )) + else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_CONTEXT))) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bContextSensitive = bValue; } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_NOCLOSE )) + else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_NOCLOSE))) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bNoClose = bValue; } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXTACTIVE )) + else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_CONTEXTACTIVE))) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bContextActive = bValue; } - else if ( aWindowState[n].Name.equalsAscii( WINDOWSTATE_PROPERTY_SOFTCLOSE )) + else if ( aWindowState[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(WINDOWSTATE_PROPERTY_SOFTCLOSE))) { if ( aWindowState[n].Value >>= bValue ) rElementData.m_bSoftClose = bValue; @@ -4022,7 +4022,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && + if ( pIter->m_aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("toolbar")) && pIter->m_xUIElement.is() ) { css::uno::Reference< css::ui::XUIFunctionListener > xListener( pIter->m_xUIElement, UNO_QUERY ); @@ -4945,7 +4945,7 @@ throw (RuntimeException) UIElementVector::iterator pIter; for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { - if ( pIter->m_aType.equalsAscii( "toolbar" ) && + if ( pIter->m_aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("toolbar")) && pIter->m_xUIElement.is() && pIter->m_bFloating && pIter->m_bVisible ) diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index ad9a9cba1bbf..818ef14fc043 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -786,15 +786,15 @@ void ImageManagerImpl::initialize( const Sequence< Any >& aArguments ) PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "UserConfigStorage" )) + if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserConfigStorage")) ) { aPropValue.Value >>= m_xUserConfigStorage; } - else if ( aPropValue.Name.equalsAscii( "ModuleIdentifier" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ModuleIdentifier")) ) { aPropValue.Value >>= m_aModuleIdentifier; } - else if ( aPropValue.Name.equalsAscii( "UserRootCommit" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserRootCommit")) ) { aPropValue.Value >>= m_xUserRootCommit; } diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index c5a661990e36..2b771ac5d50d 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -196,7 +196,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "MenuOnly" )) + if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MenuOnly")) ) aPropValue.Value >>= bMenuOnly; } } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index edfbee532561..02120e10afbe 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -123,19 +123,18 @@ static const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible"; static const char ITEM_DESCRIPTOR_WIDTH[] = "Width"; static const char ITEM_DESCRIPTOR_STYLE[] = "Style"; -static const sal_Int32 ITEM_DESCRIPTOR_COMMANDURL_LEN = 10; -static const sal_Int32 ITEM_DESCRIPTOR_HELPURL_LEN = 7; -static const sal_Int32 ITEM_DESCRIPTOR_TOOLTIP_LEN = 7; -static const sal_Int32 ITEM_DESCRIPTOR_CONTAINER_LEN = 23; -static const sal_Int32 ITEM_DESCRIPTOR_LABEL_LEN = 5; -static const sal_Int32 ITEM_DESCRIPTOR_TYPE_LEN = 4; -static const sal_Int32 ITEM_DESCRIPTOR_VISIBLE_LEN = 9; -static const sal_Int32 ITEM_DESCRIPTOR_WIDTH_LEN = 5; -static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = 5; +static const sal_Int32 ITEM_DESCRIPTOR_COMMANDURL_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_COMMANDURL); +static const sal_Int32 ITEM_DESCRIPTOR_HELPURL_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_HELPURL); +static const sal_Int32 ITEM_DESCRIPTOR_TOOLTIP_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_TOOLTIP); +static const sal_Int32 ITEM_DESCRIPTOR_CONTAINER_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_CONTAINER); +static const sal_Int32 ITEM_DESCRIPTOR_LABEL_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_LABEL); +static const sal_Int32 ITEM_DESCRIPTOR_TYPE_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_TYPE); +static const sal_Int32 ITEM_DESCRIPTOR_VISIBLE_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_VISIBLE); +static const sal_Int32 ITEM_DESCRIPTOR_WIDTH_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_WIDTH); +static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_STYLE); static const char HELPID_PREFIX[] = "helpid:"; static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:"; -//static sal_Int32 HELPID_PREFIX_LENGTH = 7; static const USHORT STARTID_CUSTOMIZE_POPUPMENU = 1000; #define MENUPREFIX "private:resource/menubar/" @@ -564,7 +563,7 @@ throw ( ::com::sun::star::uno::RuntimeException ) if ( m_bDisposed ) return; - if ( Event.FeatureURL.Complete.equalsAscii( ".uno:ImageOrientation" )) + if ( Event.FeatureURL.Complete.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ImageOrientation")) ) { SfxImageItem aItem( 1, 0 ); aItem.PutValue( Event.State ); @@ -889,7 +888,7 @@ uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const aPropSeq = GetPropsForCommand( aCmdURL ); 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 >>= aLabel; break; @@ -907,7 +906,7 @@ sal_Int32 ToolBarManager::RetrievePropertiesFromCommand( const ::rtl::OUString& aPropSeq = GetPropsForCommand( aCmdURL ); for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAscii( "Properties" )) + if ( aPropSeq[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Properties")) ) { aPropSeq[i].Value >>= nProperties; break; @@ -1300,7 +1299,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine { for ( int i = 0; i < aProp.getLength(); i++ ) { - if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_COMMANDURL, ITEM_DESCRIPTOR_COMMANDURL_LEN )) + if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) { aProp[i].Value >>= aCommandURL; if ( aCommandURL.compareToAscii(MENUPREFIX, RTL_CONSTASCII_LENGTH(MENUPREFIX) ) == 0 ) @@ -1321,7 +1320,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine xMenuContainer->getByIndex(0) >>= aProps; for ( sal_Int32 index=0; index>= aMenuDesc; @@ -1335,19 +1334,19 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine } } } - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_HELPURL, ITEM_DESCRIPTOR_HELPURL_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_HELPURL)) ) aProp[i].Value >>= aHelpURL; - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_TOOLTIP, ITEM_DESCRIPTOR_TOOLTIP_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TOOLTIP)) ) aProp[i].Value >>= aTooltip; - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_LABEL, ITEM_DESCRIPTOR_LABEL_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_LABEL)) ) aProp[i].Value >>= aLabel; - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_TYPE, ITEM_DESCRIPTOR_TYPE_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TYPE)) ) aProp[i].Value >>= nType; - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_VISIBLE, ITEM_DESCRIPTOR_VISIBLE_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_VISIBLE)) ) aProp[i].Value >>= bIsVisible; - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_WIDTH, ITEM_DESCRIPTOR_WIDTH_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_WIDTH)) ) aProp[i].Value >>= nWidth; - else if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_STYLE, ITEM_DESCRIPTOR_STYLE_LEN )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_STYLE)) ) aProp[i].Value >>= nStyle; } @@ -2021,11 +2020,11 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) { for ( sal_Int32 j = 0; j < aProp.getLength(); j++ ) { - if ( aProp[j].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) + if ( aProp[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) { aProp[j].Value >>= aCommandURL; } - else if ( aProp[j].Name.equalsAscii( ITEM_DESCRIPTOR_VISIBLE )) + else if ( aProp[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_VISIBLE)) ) { aProp[j].Value >>= bVisible; nVisibleIndex = j; -- cgit