diff options
Diffstat (limited to 'svx/source/gallery2/galbrws1.cxx')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 3704262833ed..0836be979866 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -57,16 +57,21 @@ using namespace ::com::sun::star; // ----------------- // - GalleryButton - // ----------------- +DBG_NAME(GalleryButton) GalleryButton::GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits ) : PushButton( pParent, nWinBits ) { + DBG_CTOR(GalleryButton,NULL); + } // ----------------------------------------------------------------------------- GalleryButton::~GalleryButton() { + + DBG_DTOR(GalleryButton,NULL); } // ----------------------------------------------------------------------------- @@ -80,10 +85,13 @@ void GalleryButton::KeyInput( const KeyEvent& rKEvt ) // ----------------------- // - GalleryThemeListBox - // ----------------------- +DBG_NAME(GalleryThemeListBox) GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits ) : ListBox( pParent, nWinBits ) { + DBG_CTOR(GalleryThemeListBox,NULL); + InitSettings(); } @@ -91,6 +99,8 @@ GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWin GalleryThemeListBox::~GalleryThemeListBox() { + + DBG_DTOR(GalleryThemeListBox,NULL); } // ------------------------------------------------------------------------ @@ -139,6 +149,7 @@ long GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt ) // ------------------- // - GalleryBrowser1 - // ------------------- +DBG_NAME(GalleryBrowser1) GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery ) : Control ( pParent, rResId ), @@ -152,6 +163,8 @@ GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, aImgReadOnly ( GalleryResGetBitmapEx( RID_SVXBMP_THEME_READONLY ) ), aImgImported ( GalleryResGetBitmapEx( RID_SVXBMP_THEME_IMPORTED ) ) { + DBG_CTOR(GalleryBrowser1,NULL); + StartListening( *mpGallery ); maNewTheme.SetHelpId( HID_GALLERY_NEWTHEME ); @@ -183,6 +196,8 @@ GalleryBrowser1::~GalleryBrowser1() mpThemes = NULL; delete mpExchangeData; mpExchangeData = NULL; + + DBG_DTOR(GalleryBrowser1,NULL); } // ----------------------------------------------------------------------------- @@ -258,9 +273,8 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa // ----------------------------------------------------------------------------- -::std::vector< sal_uInt16 > GalleryBrowser1::ImplGetExecuteVector() +void GalleryBrowser1::ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec) { - ::std::vector< sal_uInt16 > aExecVector; GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); if( pTheme ) @@ -284,23 +298,21 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa bUpdateAllowed = bRenameAllowed = bRemoveAllowed = sal_True; if( bUpdateAllowed && pTheme->GetObjectCount() ) - aExecVector.push_back( MN_ACTUALIZE ); + o_aExec.push_back( MN_ACTUALIZE ); if( bRenameAllowed ) - aExecVector.push_back( MN_RENAME ); + o_aExec.push_back( MN_RENAME ); if( bRemoveAllowed ) - aExecVector.push_back( MN_DELETE ); + o_aExec.push_back( MN_DELETE ); if( bIdDialog && !pTheme->IsReadOnly() && !pTheme->IsImported() ) - aExecVector.push_back( MN_ASSIGN_ID ); + o_aExec.push_back( MN_ASSIGN_ID ); - aExecVector.push_back( MN_PROPERTIES ); + o_aExec.push_back( MN_PROPERTIES ); mpGallery->ReleaseTheme( pTheme, *this ); } - - return aExecVector; } // ----------------------------------------------------------------------------- @@ -587,7 +599,8 @@ sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) if( !bRet ) { - ::std::vector< sal_uInt16 > aExecVector( ImplGetExecuteVector() ); + ::std::vector< sal_uInt16 > aExecVector; + ImplGetExecuteVector(aExecVector); sal_uInt16 nExecuteId = 0; sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1(); @@ -651,9 +664,10 @@ sal_Bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) IMPL_LINK( GalleryBrowser1, ShowContextMenuHdl, void*, EMPTYARG ) { - ::std::vector< sal_uInt16 > aExecVector( ImplGetExecuteVector() ); + ::std::vector< sal_uInt16 > aExecVector; + ImplGetExecuteVector(aExecVector); - if( aExecVector.size() ) + if( !aExecVector.empty() ) { PopupMenu aMenu( GAL_RESID( RID_SVXMN_GALLERY1 ) ); |