Kaydet (Commit) 98a537c4 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

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
üst f0835373
...@@ -92,13 +92,9 @@ ...@@ -92,13 +92,9 @@
#include <svx/xfillit0.hxx> #include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx> #include <svx/xflclit.hxx>
#define MAX_MRU_FONTNAME_ENTRIES 5 #define MAX_MRU_FONTNAME_ENTRIES 5
#define LOGICAL_EDIT_HEIGHT 12 #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 // don't make more than 15 entries visible at once
#define MAX_STYLES_ENTRIES static_cast< sal_uInt16 >( 15 ) #define MAX_STYLES_ENTRIES static_cast< sal_uInt16 >( 15 )
...@@ -2028,7 +2024,7 @@ throw ( Exception, RuntimeException, std::exception) ...@@ -2028,7 +2024,7 @@ throw ( Exception, RuntimeException, std::exception)
// XComponent // XComponent
void SAL_CALL SvxStyleToolBoxControl::dispose() void SAL_CALL SvxStyleToolBoxControl::dispose()
throw (::com::sun::star::uno::RuntimeException, std::exception) throw (css::uno::RuntimeException, std::exception)
{ {
SfxToolBoxControl::dispose(); SfxToolBoxControl::dispose();
...@@ -2047,7 +2043,8 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) ...@@ -2047,7 +2043,8 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
m_xBoundItems[i].clear(); m_xBoundItems[i].clear();
pBoundItems[i] = 0; pBoundItems[i] = 0;
} }
DELETEZ( pFamilyState[i] ); delete pFamilyState[i];
pFamilyState[i] = NULL;
} }
pStyleSheetPool = NULL; pStyleSheetPool = NULL;
pImpl.reset(); pImpl.reset();
...@@ -2269,7 +2266,8 @@ void SvxStyleToolBoxControl::Update() ...@@ -2269,7 +2266,8 @@ void SvxStyleToolBoxControl::Update()
void SvxStyleToolBoxControl::SetFamilyState( sal_uInt16 nIdx, void SvxStyleToolBoxControl::SetFamilyState( sal_uInt16 nIdx,
const SfxTemplateItem* pItem ) const SfxTemplateItem* pItem )
{ {
DELETEZ( pFamilyState[nIdx] ); delete pFamilyState[nIdx];
pFamilyState[nIdx] = NULL;
if ( pItem ) if ( pItem )
pFamilyState[nIdx] = new SfxTemplateItem( *pItem ); pFamilyState[nIdx] = new SfxTemplateItem( *pItem );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment