diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-02-12 14:47:52 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-02-12 14:48:04 +0100 |
commit | 2ce2fafa1b19f3eaad89ec57ac312ce2f33fbf20 (patch) | |
tree | 98c0ddb2a496a1b43c154c48a45a1fed8f7b3501 /svx | |
parent | 2bfccd148958ff8b3af49854b611649839028c97 (diff) |
Some cppcheck cleaning
Change-Id: Idb380dbb7470dbdb371778ba0c486392cc55380e
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 6b8ed1c925cc..2111eed07173 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -107,18 +107,19 @@ void GalleryBackgroundPopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, if ( ( nSID == SID_GALLERY_BG_BRUSH ) && pItem && ( eState != SFX_ITEM_DISABLED ) ) { SfxStringListItem* pStrLstItem; - SfxStringItem* pStrItem; PopupMenu::Clear(); - if( ( pStrLstItem = PTR_CAST( SfxStringListItem, pItem ) ) != NULL ) + if ( ( pStrLstItem = PTR_CAST( SfxStringListItem, pItem ) ) != NULL ) { const std::vector<String> &aList = pStrLstItem->GetList(); for ( sal_uIntPtr i = 0, nCount = aList.size(); i < nCount; i++ ) InsertItem( (sal_uInt16) i + 1, aList[i]); + return; } - else if( ( pStrItem = PTR_CAST( SfxStringItem, pItem ) ) != NULL ) + SfxStringItem* pStrItem = PTR_CAST( SfxStringItem, pItem ); + if (pStrItem) InsertItem( 1, pStrItem->GetValue() ); else { |