Kaydet (Commit) 80b3c852 authored tarafından Noel Grandin's avatar Noel Grandin

simplify code using ScopedVclPtr

Change-Id: I71db7422ab8ad83455cc61df5314cf214a4d388c
üst 0a825b9a
...@@ -104,17 +104,7 @@ IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl); ...@@ -104,17 +104,7 @@ IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl); IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl) IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl)
IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl) IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl)
IMPL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl)
AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl()
{
pDlg.disposeAndClear();
}
short AbstractSvxZoomDialog_Impl::Execute()
{
return pDlg->Execute();
}
IMPL_ABSTDLG_BASE(AbstractSearchProgress_Impl); IMPL_ABSTDLG_BASE(AbstractSearchProgress_Impl);
IMPL_ABSTDLG_BASE(AbstractTakeProgress_Impl); IMPL_ABSTDLG_BASE(AbstractTakeProgress_Impl);
IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl); IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl);
......
...@@ -62,19 +62,14 @@ class HangulHanjaConversionDialog; ...@@ -62,19 +62,14 @@ class HangulHanjaConversionDialog;
using namespace svx; using namespace svx;
#define DECL_ABSTDLG_BASE(Class,DialogClass) \ #define DECL_ABSTDLG_BASE(Class,DialogClass) \
VclPtr<DialogClass> pDlg; \ ScopedVclPtr<DialogClass> pDlg; \
public: \ public: \
Class( DialogClass* p) \ Class( DialogClass* p) \
: pDlg(p) \ : pDlg(p) \
{} \ {} \
virtual ~Class(); \
virtual short Execute() SAL_OVERRIDE ; virtual short Execute() SAL_OVERRIDE ;
#define IMPL_ABSTDLG_BASE(Class) \ #define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
{ \
pDlg.disposeAndClear(); \
} \
short Class::Execute() \ short Class::Execute() \
{ \ { \
return pDlg->Execute(); \ return pDlg->Execute(); \
......
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