summaryrefslogtreecommitdiff
path: root/sw/source/uibase/misc/redlndlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/misc/redlndlg.cxx')
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx31
1 files changed, 22 insertions, 9 deletions
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 1db1ec86d86b..e0ba28d8874e 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -67,9 +67,9 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( vcl::Window* _pParent,
SfxChildWinInfo* pInfo ) :
SwChildWinWrapper( _pParent, nId )
{
- pWindow = new SwModelessRedlineAcceptDlg( pBindings, this, _pParent);
+ pWindow = VclPtr<SwModelessRedlineAcceptDlg>::Create( pBindings, this, _pParent);
- static_cast<SwModelessRedlineAcceptDlg *>(pWindow)->Initialize(pInfo);
+ static_cast<SwModelessRedlineAcceptDlg *>(pWindow.get())->Initialize(pInfo);
}
// newly initialise dialog after document switch
@@ -137,13 +137,19 @@ void SwModelessRedlineAcceptDlg::FillInfo(SfxChildWinInfo& rInfo) const
SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
{
+ disposeOnce();
+}
+
+void SwModelessRedlineAcceptDlg::dispose()
+{
delete pImplDlg;
+ SfxModelessDialog::dispose();
}
SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer *pBuilder,
vcl::Window *pContentArea, bool bAutoFmt) :
pParentDlg (pParent),
- aTabPagesCTRL (pContentArea, pBuilder),
+ aTabPagesCTRL (VclPtr<SvxAcceptChgCtr>::Create(pContentArea, pBuilder)),
aPopup (SW_RES(MN_REDLINE_POPUP)),
sInserted (SW_RES(STR_REDLINE_INSERTED)),
sDeleted (SW_RES(STR_REDLINE_DELETED)),
@@ -156,8 +162,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
bRedlnAutoFmt (bAutoFmt),
bInhibitActivate( false )
{
- aTabPagesCTRL.SetHelpId(HID_REDLINE_CTRL);
- pTPView = aTabPagesCTRL.GetViewPage();
+ aTabPagesCTRL->SetHelpId(HID_REDLINE_CTRL);
+ pTPView = aTabPagesCTRL->GetViewPage();
pTable = pTPView->GetTableControl();
@@ -173,9 +179,9 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
pTPView->EnableAcceptAll(false);
pTPView->EnableRejectAll(false);
- aTabPagesCTRL.GetFilterPage()->SetReadyHdl(LINK(this, SwRedlineAcceptDlg, FilterChangedHdl));
+ aTabPagesCTRL->GetFilterPage()->SetReadyHdl(LINK(this, SwRedlineAcceptDlg, FilterChangedHdl));
- ListBox *pActLB = aTabPagesCTRL.GetFilterPage()->GetLbAction();
+ ListBox *pActLB = aTabPagesCTRL->GetFilterPage()->GetLbAction();
pActLB->InsertEntry(sInserted);
pActLB->InsertEntry(sDeleted);
pActLB->InsertEntry(sFormated);
@@ -215,6 +221,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
{
+ aTabPagesCTRL.disposeAndClear();
}
void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
@@ -247,7 +254,7 @@ void SwRedlineAcceptDlg::InitAuthors()
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
- SvxTPFilter *pFilterPage = aTabPagesCTRL.GetFilterPage();
+ SvxTPFilter *pFilterPage = aTabPagesCTRL->GetFilterPage();
std::vector<OUString> aStrings;
OUString sOldAuthor(pFilterPage->GetSelectedAuthor());
@@ -911,7 +918,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, UndoHdl)
IMPL_LINK_NOARG(SwRedlineAcceptDlg, FilterChangedHdl)
{
- SvxTPFilter *pFilterTP = aTabPagesCTRL.GetFilterPage();
+ SvxTPFilter *pFilterTP = aTabPagesCTRL->GetFilterPage();
if (pFilterTP->IsAction())
sFilterAction = pFilterTP->GetLbAction()->GetSelectEntry();
@@ -1242,7 +1249,13 @@ SwRedlineAcceptPanel::SwRedlineAcceptPanel(vcl::Window* pParent, const css::uno:
SwRedlineAcceptPanel::~SwRedlineAcceptPanel()
{
+ disposeOnce();
+}
+
+void SwRedlineAcceptPanel::dispose()
+{
delete mpImplDlg;
+ PanelLayout::dispose();
}
void SwRedlineAcceptPanel::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)