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

use std::unique_ptr for Impl in SvxStyleToolBoxControl

Change-Id: Ia01755ee617002ef2c234e29b1edd497b031ef8a
üst 0c2245a4
...@@ -155,6 +155,8 @@ namespace svx ...@@ -155,6 +155,8 @@ namespace svx
class SVX_DLLPUBLIC SvxStyleToolBoxControl : public SfxToolBoxControl class SVX_DLLPUBLIC SvxStyleToolBoxControl : public SfxToolBoxControl
{ {
struct Impl; struct Impl;
std::unique_ptr<Impl> pImpl;
public: public:
SFX_DECL_TOOLBOX_CONTROL(); SFX_DECL_TOOLBOX_CONTROL();
...@@ -189,7 +191,6 @@ private: ...@@ -189,7 +191,6 @@ private:
css::uno::Reference<css::lang::XComponent> m_xBoundItems[MAX_FAMILIES]; css::uno::Reference<css::lang::XComponent> m_xBoundItems[MAX_FAMILIES];
SfxTemplateItem* pFamilyState[MAX_FAMILIES]; SfxTemplateItem* pFamilyState[MAX_FAMILIES];
sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1 sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1
Impl* pImpl;
SVX_DLLPRIVATE void Update(); SVX_DLLPRIVATE void Update();
SVX_DLLPRIVATE void FillStyleBox(); SVX_DLLPRIVATE void FillStyleBox();
......
...@@ -1987,9 +1987,9 @@ static const char* StyleSlotToStyleCommand[MAX_FAMILIES] = ...@@ -1987,9 +1987,9 @@ static const char* StyleSlotToStyleCommand[MAX_FAMILIES] =
SvxStyleToolBoxControl::SvxStyleToolBoxControl( SvxStyleToolBoxControl::SvxStyleToolBoxControl(
sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
: SfxToolBoxControl ( nSlotId, nId, rTbx ), : SfxToolBoxControl ( nSlotId, nId, rTbx ),
pImpl ( new Impl ),
pStyleSheetPool ( NULL ), pStyleSheetPool ( NULL ),
nActFamily ( 0xffff ), nActFamily ( 0xffff )
pImpl ( new Impl )
{ {
for ( sal_uInt16 i=0; i<MAX_FAMILIES; i++ ) for ( sal_uInt16 i=0; i<MAX_FAMILIES; i++ )
{ {
...@@ -2001,7 +2001,6 @@ SvxStyleToolBoxControl::SvxStyleToolBoxControl( ...@@ -2001,7 +2001,6 @@ SvxStyleToolBoxControl::SvxStyleToolBoxControl(
SvxStyleToolBoxControl::~SvxStyleToolBoxControl() SvxStyleToolBoxControl::~SvxStyleToolBoxControl()
{ {
delete pImpl;
} }
void SAL_CALL SvxStyleToolBoxControl::initialize( const Sequence< Any >& aArguments ) void SAL_CALL SvxStyleToolBoxControl::initialize( const Sequence< Any >& aArguments )
...@@ -2051,7 +2050,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) ...@@ -2051,7 +2050,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
DELETEZ( pFamilyState[i] ); DELETEZ( pFamilyState[i] );
} }
pStyleSheetPool = NULL; pStyleSheetPool = NULL;
DELETEZ( pImpl ); pImpl.reset();
} }
void SAL_CALL SvxStyleToolBoxControl::update() throw (RuntimeException, std::exception) void SAL_CALL SvxStyleToolBoxControl::update() throw (RuntimeException, std::exception)
......
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