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 /embeddedobj | |
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 'embeddedobj')
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 10 | ||||
-rw-r--r-- | embeddedobj/source/msole/ownview.cxx | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 8bd51d6679be..bbd2a5696b35 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -1183,11 +1183,11 @@ void SAL_CALL DocumentHolder::notifyEvent( const document::EventObject& Event ) if( m_pEmbedObj && Event.Source == m_xComponent ) { // for now the ignored events are not forwarded, but sent by the object itself - if ( !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSave" ) ) - && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveDone" ) ) - && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAs" ) ) - && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) ) - && !( Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnVisAreaChanged" ) ) && m_nNoResizeReact ) ) + if ( !Event.EventName.startsWith( "OnSave" ) + && !Event.EventName.startsWith( "OnSaveDone" ) + && !Event.EventName.startsWith( "OnSaveAs" ) + && !Event.EventName.startsWith( "OnSaveAsDone" ) + && !( Event.EventName.startsWith( "OnVisAreaChanged" ) && m_nNoResizeReact ) ) m_pEmbedObj->PostEvent_Impl( Event.EventName ); } } diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 90814fb3dd46..d28f30b8ed36 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -242,7 +242,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( { for ( sal_Int32 nInd = 0; nInd < aTypes.getLength(); nInd++ ) { - if ( aTypes[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aTypes[nInd].Value >>= aFilterName ) ) + if ( aTypes[nInd].Name.startsWith( "PreferredFilter" ) && ( aTypes[nInd].Value >>= aFilterName ) ) { aTypes[nInd].Value >>= aFilterName; break; @@ -589,7 +589,7 @@ void SAL_CALL OwnView_Impl::notifyEvent( const document::EventObject& aEvent ) { ::osl::MutexGuard aGuard( m_aMutex ); - if ( aEvent.Source == m_xModel && aEvent.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) ) ) + if ( aEvent.Source == m_xModel && aEvent.EventName.startsWith( "OnSaveAsDone" ) ) { // SaveAs operation took place, so just forget the model and deregister listeners xModel = m_xModel; |