diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-05 10:29:04 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-09 09:53:46 +0900 |
commit | 98a537c49fc196e463911142063fc8c1309734ed (patch) | |
tree | 670b8b3c874ecbe43adcf71afb7227496b2556b9 /svx | |
parent | use std::unique_ptr for Impl in SvxStyleToolBoxControl (diff) | |
download | core-98a537c49fc196e463911142063fc8c1309734ed.tar.gz core-98a537c49fc196e463911142063fc8c1309734ed.zip |
remove DELETEZ in tbcontrl
DELETEZ is redefined here and used just 2 times in the code. Better
to just delete it - it doesn't really make the code more readable.
Change-Id: I094a7d41fa9e86d3f20cce357bc13e9fc04df3df
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 324c5c1e9b6f..8782e769deef 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -92,13 +92,9 @@ #include <svx/xfillit0.hxx> #include <svx/xflclit.hxx> - #define MAX_MRU_FONTNAME_ENTRIES 5 #define LOGICAL_EDIT_HEIGHT 12 -#ifndef DELETEZ -#define DELETEZ(p) (delete (p), (p)=NULL) -#endif // don't make more than 15 entries visible at once #define MAX_STYLES_ENTRIES static_cast< sal_uInt16 >( 15 ) @@ -2028,7 +2024,7 @@ throw ( Exception, RuntimeException, std::exception) // XComponent void SAL_CALL SvxStyleToolBoxControl::dispose() -throw (::com::sun::star::uno::RuntimeException, std::exception) + throw (css::uno::RuntimeException, std::exception) { SfxToolBoxControl::dispose(); @@ -2047,7 +2043,8 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) m_xBoundItems[i].clear(); pBoundItems[i] = 0; } - DELETEZ( pFamilyState[i] ); + delete pFamilyState[i]; + pFamilyState[i] = NULL; } pStyleSheetPool = NULL; pImpl.reset(); @@ -2269,7 +2266,8 @@ void SvxStyleToolBoxControl::Update() void SvxStyleToolBoxControl::SetFamilyState( sal_uInt16 nIdx, const SfxTemplateItem* pItem ) { - DELETEZ( pFamilyState[nIdx] ); + delete pFamilyState[nIdx]; + pFamilyState[nIdx] = NULL; if ( pItem ) pFamilyState[nIdx] = new SfxTemplateItem( *pItem ); |