diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-05 10:41:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-05 11:52:40 +0100 |
commit | cb92e6440cebbdf307e5740325d04d9656440fd8 (patch) | |
tree | a56bf907c81133cd7336c05619b6417a9317267b /sfx2/source/appl/appdde.cxx | |
parent | f58cf57213a300ced1369b17daebc2e9e8251c06 (diff) |
match original intent of String::Erase(String::Search))
the single argument String::Erase erased from the passed in index to the end of
the string
Search returns STRING_NOTFOUND on failure, which results in String::Erase
erasing nothing and so leaving the original string untouched.
Change-Id: I83939fce2a92c38fbfb62196b7248908117c1e69
Diffstat (limited to 'sfx2/source/appl/appdde.cxx')
-rw-r--r-- | sfx2/source/appl/appdde.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index cf9a7394aa58..f3efec169948 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -122,15 +122,13 @@ bool ImplDdeService::MakeTopic( const OUString& rNm ) // First only loop over the ObjectShells to find those // with the specific name: sal_Bool bRet = sal_False; - OUString sNm( rNm ); - sNm = sNm.toAsciiLowerCase(); + OUString sNm( rNm.toAsciiLowerCase() ); TypeId aType( TYPE(SfxObjectShell) ); SfxObjectShell* pShell = SfxObjectShell::GetFirst( &aType ); while( pShell ) { OUString sTmp( pShell->GetTitle(SFX_TITLE_FULLNAME) ); - sTmp = sTmp.toAsciiLowerCase(); - if( sTmp == sNm ) + if( sNm == sTmp.toAsciiLowerCase() ) { SFX_APP()->AddDdeTopic( pShell ); bRet = true; |