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