diff options
Diffstat (limited to 'svx/source/tbxctrls/tbunocontroller.cxx')
-rw-r--r-- | svx/source/tbxctrls/tbunocontroller.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 0344ed8f9837..eb25ce945b3f 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -78,7 +78,7 @@ class FontHeightToolBoxControl : public svt::ToolboxController, using svt::ToolboxController::dispatchCommand; private: - SvxFontSizeBox_Impl* m_pBox; + VclPtr<SvxFontSizeBox_Impl> m_pBox; ::com::sun::star::awt::FontDescriptor m_aCurrentFont; }; @@ -334,8 +334,7 @@ throw (uno::RuntimeException, std::exception) svt::ToolboxController::dispose(); SolarMutexGuard aSolarMutexGuard; - delete m_pBox; - m_pBox = 0; + m_pBox.disposeAndClear(); } // XStatusListener @@ -401,7 +400,8 @@ uno::Reference< awt::XWindow > SAL_CALL FontHeightToolBoxControl::createItemWind if ( pParent ) { SolarMutexGuard aSolarMutexGuard; - m_pBox = new SvxFontSizeBox_Impl( + m_pBox = VclPtr<SvxFontSizeBox_Impl>::Create( + pParent, uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), m_xFrame, |