summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-05 10:41:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-05 11:52:40 +0100
commitcb92e6440cebbdf307e5740325d04d9656440fd8 (patch)
treea56bf907c81133cd7336c05619b6417a9317267b /sfx2/source
parentf58cf57213a300ced1369b17daebc2e9e8251c06 (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')
-rw-r--r--sfx2/source/appl/appdde.cxx6
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx3
3 files changed, 6 insertions, 7 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;
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index 40044ab99f19..fc0568808f42 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -235,8 +235,8 @@ Sequence< OUString > SAL_CALL HelpInterceptor_Impl::getInterceptedURLs()
void SAL_CALL HelpInterceptor_Impl::dispatch(
const URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue >& ) throw( RuntimeException )
{
- sal_Bool bBack = ( OUString( ".uno:Backward" ) == OUString( aURL.Complete ) );
- if ( bBack || OUString( ".uno:Forward" ) == OUString( aURL.Complete ) )
+ sal_Bool bBack = ( OUString( ".uno:Backward" ) == aURL.Complete );
+ if ( bBack || OUString( ".uno:Forward" ) == aURL.Complete )
{
if ( m_pHistory )
{
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 5b09cdbb3353..1b231fc9d126 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1615,7 +1615,8 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
{
OUString* pFactory = (OUString*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
- if ( pFactory->toAsciiLowerCase() == pIPage->GetFactory() )
+ *pFactory = pFactory->toAsciiLowerCase();
+ if ( *pFactory == pIPage->GetFactory() )
{
if ( aActiveLB.GetSelectEntryPos() != i )
{