diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-24 09:53:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-24 10:48:41 +0000 |
commit | a446987352a7b1c952d7425f5930e6c24fd7291a (patch) | |
tree | 9545715230eae61e372d47d28267909a2d1ca004 /cui/source/tabpages/tpbitmap.cxx | |
parent | 2a8d5bddcf6258885ddf3f077079929fcc5ae45c (diff) |
cppcheck: Redundant null pointer check
Diffstat (limited to 'cui/source/tabpages/tpbitmap.cxx')
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 4ee8cea12..5c01a274c 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -968,39 +968,36 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) pBmpList->SetName( aURL.getName() ); if( pBmpList->Load() ) { - if( pBmpList ) - { - // Pruefen, ob Tabelle geloescht werden darf: - if( pBitmapList != ( (SvxAreaTabDialog*) DLGWIN )->GetBitmapList() ) - delete pBitmapList; - - pBitmapList = pBmpList; - ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( pBitmapList ); + // Pruefen, ob Tabelle geloescht werden darf: + if( pBitmapList != ( (SvxAreaTabDialog*) DLGWIN )->GetBitmapList() ) + delete pBitmapList; - aLbBitmaps.Clear(); - aLbBitmaps.Fill( pBitmapList ); - Reset( rOutAttrs ); + pBitmapList = pBmpList; + ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( pBitmapList ); - pBitmapList->SetName( aURL.getName() ); + aLbBitmaps.Clear(); + aLbBitmaps.Fill( pBitmapList ); + Reset( rOutAttrs ); - // Ermitteln (evtl. abschneiden) des Namens und in - // der GroupBox darstellen - String aString( ResId( RID_SVXSTR_TABLE, rMgr ) ); - aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); + pBitmapList->SetName( aURL.getName() ); - if ( aURL.getBase().getLength() > 18 ) - { - aString += String(aURL.getBase()).Copy( 0, 15 ); - aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) ); - } - else - aString += String(aURL.getBase()); + // Ermitteln (evtl. abschneiden) des Namens und in + // der GroupBox darstellen + String aString( ResId( RID_SVXSTR_TABLE, rMgr ) ); + aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); - // Flag fuer gewechselt setzen - *pnBitmapListState |= CT_CHANGED; - // Flag fuer modifiziert entfernen - *pnBitmapListState &= ~CT_MODIFIED; + if ( aURL.getBase().getLength() > 18 ) + { + aString += String(aURL.getBase()).Copy( 0, 15 ); + aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) ); } + else + aString += String(aURL.getBase()); + + // Flag fuer gewechselt setzen + *pnBitmapListState |= CT_CHANGED; + // Flag fuer modifiziert entfernen + *pnBitmapListState &= ~CT_MODIFIED; LeaveWait(); } else |