From 00f2787a4a68633206635743298926bf2e65a8fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Feb 2015 14:42:23 +0200 Subject: vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx --- sw/source/ui/frmdlg/cption.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sw/source/ui/frmdlg') diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index b30f2be25e94..89b798c8d7b7 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -284,17 +284,17 @@ IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton ) OUString sFldTypeName = m_pCategoryBox->GetText(); if(sFldTypeName == m_sNone) sFldTypeName = OUString(); - SwSequenceOptionDialog aDlg( pButton, rView, sFldTypeName ); - aDlg.SetApplyBorderAndShadow(bCopyAttributes); - aDlg.SetCharacterStyle( sCharacterStyle ); - aDlg.SetOrderNumberingFirst( bOrderNumberingFirst ); - aDlg.Execute(); - bCopyAttributes = aDlg.IsApplyBorderAndShadow(); - sCharacterStyle = aDlg.GetCharacterStyle(); + VclPtr aDlg( pButton, rView, sFldTypeName ); + aDlg->SetApplyBorderAndShadow(bCopyAttributes); + aDlg->SetCharacterStyle( sCharacterStyle ); + aDlg->SetOrderNumberingFirst( bOrderNumberingFirst ); + aDlg->Execute(); + bCopyAttributes = aDlg->IsApplyBorderAndShadow(); + sCharacterStyle = aDlg->GetCharacterStyle(); //#i61007# order of captions - if( bOrderNumberingFirst != aDlg.IsOrderNumberingFirst() ) + if( bOrderNumberingFirst != aDlg->IsOrderNumberingFirst() ) { - bOrderNumberingFirst = aDlg.IsOrderNumberingFirst(); + bOrderNumberingFirst = aDlg->IsOrderNumberingFirst(); SW_MOD()->GetModuleConfig()->SetCaptionOrderNumberingFirst(bOrderNumberingFirst); ApplyCaptionOrder(); } @@ -338,8 +338,8 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl) IMPL_LINK_NOARG(SwCaptionDialog, CaptionHdl) { SfxItemSet aSet( rView.GetDocShell()->GetDoc()->GetAttrPool() ); - SwCaptionOptDlg aDlg( this, aSet ); - aDlg.Execute(); + VclPtr aDlg(new SwCaptionOptDlg( this, aSet ) ); + aDlg->Execute(); return 0; } -- cgit