diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-19 15:58:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-20 10:07:31 +0200 |
commit | 3af99e4d59d89c343965a928681a30f36b1007d2 (patch) | |
tree | 2389765131bdb92817e98bc922ffecbf0184d69b /framework/source/fwe/xml | |
parent | d665e058246631c8a838c3a731bdd0c56be27903 (diff) |
convert equalsAsciiL calls to startsWith calls
Convert code like:
aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) )
to
aStr.startsWith( "ActiveConnection" )
which compiles down to the same machine code.
Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
Diffstat (limited to 'framework/source/fwe/xml')
-rw-r--r-- | framework/source/fwe/xml/menudocumenthandler.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 212025822712..b8d7a8bc6ed4 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -294,7 +294,7 @@ void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName ) m_xReader->endDocument(); m_xReader.clear(); m_bMenuBarMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR ))) + if ( !aName.startsWith( ELEMENT_MENUBAR )) { OUString aErrorMessage = getErrorLineString(); aErrorMessage += "closing element menubar expected!"; @@ -442,7 +442,7 @@ void OReadMenuBarHandler::endElement( const OUString& aName ) m_xReader->endDocument(); m_xReader.clear(); m_bMenuMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) + if ( !aName.startsWith( ELEMENT_MENU )) { OUString aErrorMessage = getErrorLineString(); aErrorMessage += "closing element menu expected!"; @@ -528,7 +528,7 @@ void SAL_CALL OReadMenuHandler::endElement( const OUString& aName ) m_xReader->endDocument(); m_xReader.clear(); m_bMenuPopupMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP ))) + if ( !aName.startsWith( ELEMENT_MENUPOPUP )) { OUString aErrorMessage = getErrorLineString(); aErrorMessage += "closing element menupopup expected!"; @@ -732,7 +732,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName ) m_xReader->endDocument(); m_xReader.clear(); m_bMenuMode = sal_False; - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) + if ( !aName.startsWith( ELEMENT_MENU )) { OUString aErrorMessage = getErrorLineString(); aErrorMessage += "closing element menu expected!"; @@ -746,7 +746,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName ) { if ( m_nNextElementExpected == ELEM_CLOSE_MENUITEM ) { - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM ))) + if ( !aName.startsWith( ELEMENT_MENUITEM )) { OUString aErrorMessage = getErrorLineString(); aErrorMessage += "closing element menuitem expected!"; @@ -755,7 +755,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName ) } else if ( m_nNextElementExpected == ELEM_CLOSE_MENUSEPARATOR ) { - if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUSEPARATOR ))) + if ( !aName.startsWith( ELEMENT_MENUSEPARATOR )) { OUString aErrorMessage = getErrorLineString(); aErrorMessage += "closing element menuseparator expected!"; @@ -847,8 +847,8 @@ throw ( SAXException, RuntimeException ) ExtractMenuParameters( aProps, aCommandURL, aLabel, aHelpURL, xSubMenu, nType, nItemBits ); if ( xSubMenu.is() ) { - if ( aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ADDDIRECT_CMD)) || - aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(AUTOPILOTMENU_CMD)) ) + if ( aCommandURL.startsWith(ADDDIRECT_CMD) || + aCommandURL.startsWith(AUTOPILOTMENU_CMD) ) { WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits ); bSeparator = sal_False; @@ -862,7 +862,7 @@ throw ( SAXException, RuntimeException ) m_aAttributeType, aCommandURL ); - if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL))) ) + if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL)) ) pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), m_aAttributeType, aLabel ); @@ -921,13 +921,13 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, cons aHelpURL ); } - if ( !aLabel.isEmpty() && !aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) ) + if ( !aLabel.isEmpty() && !aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL) ) { pList->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), m_aAttributeType, aLabel ); } - if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) )) + if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL) )) { OUString aValue; MenuStyleItem* pStyle = MenuItemStyles; |