diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:53:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-21 15:54:52 +0100 |
commit | a3f32769fc4bb23c64168b412dd10ec769a3854d (patch) | |
tree | 92bb435946dcfc422c9816bc05c150069a2da3c3 /framework/source/fwe | |
parent | 35539318cecddc9ccb2904573a894ea05adc432c (diff) |
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.
Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Diffstat (limited to 'framework/source/fwe')
-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 b8d7a8bc6ed4..3b81cbad5a9d 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.startsWith( ELEMENT_MENUBAR )) + if ( aName != 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.startsWith( ELEMENT_MENU )) + if ( aName != 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.startsWith( ELEMENT_MENUPOPUP )) + if ( aName != 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.startsWith( ELEMENT_MENU )) + if ( aName != 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.startsWith( ELEMENT_MENUITEM )) + if ( aName != 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.startsWith( ELEMENT_MENUSEPARATOR )) + if ( aName != 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.startsWith(ADDDIRECT_CMD) || - aCommandURL.startsWith(AUTOPILOTMENU_CMD) ) + if ( aCommandURL == ADDDIRECT_CMD || + aCommandURL == 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 ).startsWith(CMD_PROTOCOL)) ) + if ( aCommandURL.copy( CMD_PROTOCOL_SIZE ) != 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 ).startsWith(CMD_PROTOCOL) ) + if ( !aLabel.isEmpty() && aCommandURL.copy( CMD_PROTOCOL_SIZE ) != CMD_PROTOCOL ) { pList->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), m_aAttributeType, aLabel ); } - if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL) )) + if (( nStyle > 0 ) && aCommandURL.copy( CMD_PROTOCOL_SIZE ) != CMD_PROTOCOL ) { OUString aValue; MenuStyleItem* pStyle = MenuItemStyles; |