diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /cui | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'cui')
30 files changed, 185 insertions, 185 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 05c7796e28d2..7c108a6e28eb 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2355,9 +2355,9 @@ short SvxMenuConfigPage::QueryReset() OUString label = replaceSaveInName( msg, saveInName ); - QueryBox qbox( this, WB_YES_NO, label ); + VclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label )); - return qbox.Execute(); + return qbox->Execute(); } IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) @@ -2996,10 +2996,10 @@ bool SvxToolbarConfigPage::DeleteSelectedContent() if ( m_pContentsListBox->GetEntryCount() == 0 && GetTopLevelSelection()->IsDeletable() ) { - MessageDialog qbox(this, - CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr<MessageDialog> qbox(new MessageDialog(this, + CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if ( qbox.Execute() == RET_YES ) + if ( qbox->Execute() == RET_YES ) { DeleteSelectedTopLevel(); } @@ -3076,10 +3076,10 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) } case ID_DEFAULT_STYLE: { - MessageDialog qbox(this, - CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr<MessageDialog> qbox(new MessageDialog(this, + CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if ( qbox.Execute() == RET_YES ) + if ( qbox->Execute() == RET_YES ) { ToolbarSaveInData* pSaveInData_ = static_cast<ToolbarSaveInData*>(GetSaveInData()); @@ -4307,9 +4307,9 @@ short SvxToolbarConfigPage::QueryReset() OUString label = replaceSaveInName( msg, saveInName ); - QueryBox qbox( this, WB_YES_NO, label ); + VclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label )); - return qbox.Execute(); + return qbox->Execute(); } IMPL_LINK( SvxToolbarConfigPage, SelectToolbar, ListBox *, pBox ) @@ -5226,8 +5226,8 @@ void SvxIconSelectorDialog::ImportGraphics( message += newLine; } - SvxIconChangeDialog aDialog(this, message); - aDialog.Execute(); + VclPtr<SvxIconChangeDialog> aDialog(new SvxIconChangeDialog(this, message)); + aDialog->Execute(); } } diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 9f091c195967..2d130a525741 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -2035,9 +2035,9 @@ IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) uno::Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - MessageDialog aErrorBox(NULL, msg); - aErrorBox.SetText(sTitle); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg)); + aErrorBox->SetText(sTitle); + aErrorBox->Execute(); } return 1; diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index f5761d3093ff..867c8ce281e6 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -126,9 +126,9 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton ) Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - MessageDialog aErrorBox(NULL, msg); - aErrorBox.SetText( GetText() ); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg)); + aErrorBox->SetText( GetText() ); + aErrorBox->Execute(); } return 1; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 4b8c9a3518a5..76619dab9fcd 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -1509,10 +1509,10 @@ void SAL_CALL ColorPicker::setTitle( const OUString& sTitle ) throw (RuntimeExce sal_Int16 SAL_CALL ColorPicker::execute( ) throw (RuntimeException, std::exception) { - ColorPickerDialog aDlg( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode ); - sal_Int16 ret = aDlg.Execute(); + VclPtr<ColorPickerDialog> aDlg(new ColorPickerDialog( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode )); + sal_Int16 ret = aDlg->Execute(); if( ret ) - mnColor = aDlg.GetColor(); + mnColor = aDlg->GetColor(); return ret; } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index d6487fb362ac..27337db42052 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -552,8 +552,8 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl) aStr += pInfo->GetThemeName(); aStr += ")"; - InfoBox aBox( this, aStr ); - aBox.Execute(); + VclPtr<InfoBox> aBox(new InfoBox( this, aStr )); + aBox->Execute(); m_pLbResName->GrabFocus(); bDifferentThemeExists = true; } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index ff425f90c775..46136a9e66ec 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -732,8 +732,8 @@ namespace svx IMPL_LINK_NOARG( HangulHanjaConversionDialog, OnOption ) { - HangulHanjaOptionsDialog aOptDlg( this ); - aOptDlg.Execute(); + VclPtr<HangulHanjaOptionsDialog> aOptDlg( new HangulHanjaOptionsDialog(this) ); + aOptDlg->Execute(); m_aOptionsChangedLink.Call( this ); return 0L; } @@ -1012,9 +1012,9 @@ namespace svx IMPL_LINK_NOARG(HangulHanjaOptionsDialog, NewDictHdl) { OUString aName; - HangulHanjaNewDictDialog aNewDlg( this ); - aNewDlg.Execute(); - if( aNewDlg.GetName( aName ) ) + VclPtr<HangulHanjaNewDictDialog> aNewDlg( new HangulHanjaNewDictDialog(this) ); + aNewDlg->Execute(); + if( aNewDlg->GetName( aName ) ) { if( m_xConversionDictionaryList.is() ) { @@ -1048,8 +1048,8 @@ namespace svx DBG_ASSERT( pEntry, "+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!" ); if( pEntry ) { - HangulHanjaEditDictDialog aEdDlg( this, m_aDictList, m_pDictsLB->GetSelectEntryPos() ); - aEdDlg.Execute(); + VclPtr<HangulHanjaEditDictDialog> aEdDlg( new HangulHanjaEditDictDialog(this, m_aDictList, m_pDictsLB->GetSelectEntryPos()) ); + aEdDlg->Execute(); } return 0L; } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index b415ae3374ab..f1c790045a1b 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -266,8 +266,8 @@ bool SvxHyperlinkNewDocTp::AskApply() bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject ); if ( !bRet ) { - WarningBox aWarning( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ); - aWarning.Execute(); + VclPtr<WarningBox> aWarning(new WarningBox( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ) ); + aWarning->Execute(); } return bRet; } @@ -316,8 +316,8 @@ void SvxHyperlinkNewDocTp::DoApply () if( bOk ) { - WarningBox aWarning( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) ); - bCreate = aWarning.Execute() == RET_YES; + VclPtr<WarningBox> aWarning(new WarningBox( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) )); + bCreate = aWarning->Execute() == RET_YES; } } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index bec31329ed47..62fd0465fa5a 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -325,10 +325,10 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl) bool bIsInputEnabled = GetParent()->IsInputEnabled(); if ( bIsInputEnabled ) GetParent()->EnableInput( false ); - SfxMacroAssignDlg aDlg( this, mxDocumentFrame, *pItemSet ); + VclPtr<SfxMacroAssignDlg> aDlg(new SfxMacroAssignDlg( this, mxDocumentFrame, *pItemSet )); // add events - SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg.GetTabPage() ); + SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg->GetTabPage() ); if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSEOVER_OBJECT ) pMacroPage->AddEvent( OUString( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT1) ), @@ -344,11 +344,11 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl) GetParent()->EnableInput( true ); // execute dlg DisableClose( true ); - short nRet = aDlg.Execute(); + short nRet = aDlg->Execute(); DisableClose( false ); if ( RET_OK == nRet ) { - const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); + const SfxItemSet* pOutSet = aDlg->GetOutputItemSet(); const SfxPoolItem* pItem; if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) { diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 610ea4972c69..95c348d0a364 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -424,9 +424,9 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) if( !xLink.Is() ) return 0; - QueryBox aBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() ); + VclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() )); - if( RET_YES == aBox.Execute() ) + if( RET_YES == aBox->Execute() ) { m_pTbLinks->GetModel()->Remove( m_pTbLinks->GetEntry( nPos ) ); @@ -455,9 +455,9 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) } else { - QueryBox aBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() ); + VclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() )); - if( RET_YES == aBox.Execute() ) + if( RET_YES == aBox->Execute() ) { SvBaseLinkMemberList aLinkList; diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 683d4e15633b..ccba00009552 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -101,9 +101,9 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG m_pPasswdToModifyED->GetText().isEmpty(); if (bInvalidState) { - MessageDialog aErrorBox(m_pParent, - m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent, + m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2)); + aErrorBox->Execute(); } else // check for mismatched passwords... { @@ -112,8 +112,8 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1); if (nMismatch > 0) { - MessageDialog aErrorBox(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch)); + aErrorBox->Execute(); Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED; Edit* pRepeatEdit = !bToOpenMatch? m_pReenterPasswdToOpenED : m_pReenterPasswdToModifyED; diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index adde1bb65f3b..4013f71e6925 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -904,9 +904,9 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) bValid = false; OUString aError( m_createErrStr ); aError += m_createDupStr; - MessageDialog aErrorBox(static_cast<vcl::Window*>(this), aError); - aErrorBox.SetText( m_createErrTitleStr ); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError)); + aErrorBox->SetText( m_createErrTitleStr ); + aErrorBox->Execute(); xNewDlg->SetObjectName( aNewName ); break; } @@ -986,9 +986,9 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) { //ISSUE L10N & message from exception? OUString aError( m_createErrStr ); - MessageDialog aErrorBox(static_cast<vcl::Window*>(this), aError); - aErrorBox.SetText( m_createErrTitleStr ); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError)); + aErrorBox->SetText( m_createErrTitleStr ); + aErrorBox->Execute(); } } @@ -1062,9 +1062,9 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry ) { //ISSUE L10N & message from exception? OUString aError( m_renameErrStr ); - MessageDialog aErrorBox(static_cast<vcl::Window*>(this), aError); - aErrorBox.SetText( m_renameErrTitleStr ); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError)); + aErrorBox->SetText( m_renameErrTitleStr ); + aErrorBox->Execute(); } } void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) @@ -1073,9 +1073,9 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) Reference< browse::XBrowseNode > node = getBrowseNode( pEntry ); // ISSUE L10N string & can we centre list? OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 ); - MessageDialog aQueryBox(static_cast<vcl::Window*>(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - aQueryBox.SetText( m_delQueryTitleStr ); - if ( aQueryBox.Execute() == RET_NO ) + VclPtr<MessageDialog> aQueryBox(new MessageDialog(static_cast<vcl::Window*>(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + aQueryBox->SetText( m_delQueryTitleStr ); + if ( aQueryBox->Execute() == RET_NO ) { return; } @@ -1108,9 +1108,9 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) else { //ISSUE L10N & message from exception? - MessageDialog aErrorBox(static_cast<vcl::Window*>(this), m_delErrStr); - aErrorBox.SetText( m_delErrTitleStr ); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), m_delErrStr)); + aErrorBox->SetText( m_delErrTitleStr ); + aErrorBox->Execute(); } } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 2a48aac686f0..eb2364e981e4 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -274,8 +274,8 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl) SvTreeListEntry* pEntry = pPathBox->FirstSelected(); if ( pEntry ) { - MessageDialog aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aQuery.Execute() == RET_YES ) + VclPtr<MessageDialog> aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( aQuery->Execute() == RET_YES ) pPathBox->GetModel()->Remove(pEntry); } return 0; @@ -410,15 +410,15 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry) { - ODocumentLinkDialog aDlg(this,_pEntry == NULL); + VclPtr<ODocumentLinkDialog> aDlg(new ODocumentLinkDialog(this,_pEntry == NULL)); - aDlg.setLink(_sOldName,_sOldLocation); - aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); + aDlg->setLink(_sOldName,_sOldLocation); + aDlg->setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { OUString sNewName,sNewLocation; - aDlg.getLink(sNewName,sNewLocation); + aDlg->getLink(sNewName,sNewLocation); if ( _pEntry == NULL || sNewName != _sOldName || sNewLocation != _sOldLocation ) { if ( _pEntry ) diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index ffeeb84e33a3..01482292caf4 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -116,8 +116,8 @@ namespace svx { OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); - MessageDialog aError(this, sMsg); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg)); + aError->Execute(); return 0L; } // if (!bFileExists) INetURLObject aURL( sURL ); @@ -125,8 +125,8 @@ namespace svx { OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); - MessageDialog aError(this, sMsg); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg)); + aError->Execute(); return 0L; } @@ -137,8 +137,8 @@ namespace svx { OUString sMsg = CUI_RES(STR_NAME_CONFLICT); sMsg = sMsg.replaceFirst("$file$", sCurrentText); - MessageDialog aError(this, sMsg, VCL_MESSAGE_INFO); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO)); + aError->Execute(); m_pName->SetSelection(Selection(0,sCurrentText.getLength())); m_pName->GrabFocus(); diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index d1aa2104e743..8f8fd9770bac 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -221,9 +221,9 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton ) { OSL_ENSURE(pColorConfig->GetColorList().size() > 1, "don't delete the last chart color"); - MessageDialog aQuery(pButton, "QueryDeleteChartColorDialog", - "cui/ui/querydeletechartcolordialog.ui"); - if (RET_YES == aQuery.Execute()) + VclPtr<MessageDialog> aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog", + "cui/ui/querydeletechartcolordialog.ui")); + if (RET_YES == aQuery->Execute()) { pColorConfig->GetColorList().remove( nIndex ); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 2cb909fea88a..3eb0229d22da 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -545,12 +545,12 @@ void ColorConfigWindow_Impl::CreateEntries() long nCheckBoxLabelOffset = 0; { OUString sSampleText("X"); - CheckBox aCheckBox(this); - FixedText aFixedText(this); - aCheckBox.SetText(sSampleText); - aFixedText.SetText(sSampleText); - Size aCheckSize(aCheckBox.CalcMinimumSize(0x7fffffff)); - Size aFixedSize(aFixedText.CalcMinimumSize(0x7fffffff)); + VclPtr<CheckBox> aCheckBox(new CheckBox(this)); + VclPtr<FixedText> aFixedText(new FixedText(this)); + aCheckBox->SetText(sSampleText); + aFixedText->SetText(sSampleText); + Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff)); + Size aFixedSize(aFixedText->CalcMinimumSize(0x7fffffff)); nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width(); } @@ -620,13 +620,13 @@ void ColorConfigWindow_Impl::SetAppearance () OSL_ENSURE( vEntries.size() >= sizeof vEntryInfo / sizeof vEntryInfo[0], "wrong number of helpIDs for color listboxes" ); // creating a sample color listbox with the color entries - ColorListBox aSampleColorList(this); + VclPtr<ColorListBox> aSampleColorList(new ColorListBox(this)); { XColorListRef const xColorTable = XColorList::CreateStdColorList(); for (sal_Int32 i = 0; i != xColorTable->Count(); ++i) { XColorEntry& rEntry = *xColorTable->GetColor(i); - aSampleColorList.InsertEntry(rEntry.GetColor(), rEntry.GetName()); + aSampleColorList->InsertEntry(rEntry.GetColor(), rEntry.GetName()); } } @@ -634,7 +634,7 @@ void ColorConfigWindow_Impl::SetAppearance () for (size_t i = 0; i != vEntries.size(); ++i) { // appearance - vEntries[i]->SetAppearance(aTransparentWall, aSampleColorList); + vEntries[i]->SetAppearance(aTransparentWall, *aSampleColorList.get()); } } @@ -1187,9 +1187,9 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton ) else { DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme"); - MessageDialog aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - aQuery.SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE)); - if(RET_YES == aQuery.Execute()) + VclPtr<MessageDialog> aQuery(new MessageDialog(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE)); + if(RET_YES == aQuery->Execute()) { OUString sDeleteScheme(m_pColorSchemeLB->GetSelectEntry()); m_pColorSchemeLB->RemoveEntry(m_pColorSchemeLB->GetSelectEntryPos()); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index daf0bbb259c2..fefbbd25ef39 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -446,12 +446,12 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl) if ( nLang != nOldLang ) { - MessageDialog aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - OUString sTxt(aBox.get_primary_text()); + VclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + OUString sTxt(aBox->get_primary_text()); sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() ); - aBox.set_primary_text(sTxt); + aBox->set_primary_text(sTxt); - if ( aBox.Execute() == RET_YES ) + if ( aBox->Execute() == RET_YES ) { xDic->setLocale( LanguageTag::convertToLocale( nLang ) ); bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE; diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 012d7905a4d4..09c74e5a7417 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1298,8 +1298,8 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) xProp->setPropertyValue(sUserLocaleKey, makeAny(aLangString)); Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges(); // display info - MessageDialog aBox(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO); - aBox.Execute(); + VclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO)); + aBox->Execute(); // tell quickstarter to stop being a veto listener diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 5d01c40e2d36..04333b7b8ef6 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -669,8 +669,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) } else { - QueryBox aQuery( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr ); - sal_uInt16 nRet = aQuery.Execute(); + VclPtr<QueryBox> aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr )); + sal_uInt16 nRet = aQuery->Execute(); if( RET_YES == nRet ) { @@ -766,8 +766,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl) if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) ) { - svx::WebConnectionInfoDialog aDlg( this ); - aDlg.Execute(); + VclPtr<svx::WebConnectionInfoDialog> aDlg( new svx::WebConnectionInfoDialog(this) ); + aDlg->Execute(); } } catch (const Exception&) @@ -785,8 +785,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl) if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory()) { - MessageDialog aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO); - aWarnBox.Execute(); + VclPtr<MessageDialog> aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO)); + aWarnBox->Execute(); } return 0; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index e95c86cc90be..8843f10df485 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -326,8 +326,8 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl) (void)eErr; if ( bRunning ) { - MessageDialog aWarnBox( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ); - aWarnBox.Execute(); + VclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO )); + aWarnBox->Execute(); } } } @@ -371,8 +371,8 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl) (void)eErr; if ( bRunning ) { - MessageDialog aWarnBox( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ); - aWarnBox.Execute(); + VclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO )); + aWarnBox->Execute(); } } } @@ -620,13 +620,13 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder ) } else if ( JFW_E_NOT_RECOGNIZED == eErr ) { - MessageDialog aErrBox( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ); - aErrBox.Execute(); + VclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) )); + aErrBox->Execute(); } else if ( JFW_E_FAILED_VERSION == eErr ) { - MessageDialog aErrBox( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ); - aErrBox.Execute(); + VclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) )); + aErrBox->Execute(); } if ( bStartAgain ) diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index f91b782fa96f..393f6f7625ec 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1576,8 +1576,8 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) pLinguData = new SvxLinguData_Impl; SvxLinguData_Impl aOldLinguData( *pLinguData ); - SvxEditModulesDlg aDlg( this, *pLinguData ); - if (aDlg.Execute() != RET_OK) + VclPtr<SvxEditModulesDlg> aDlg(new SvxEditModulesDlg( this, *pLinguData )); + if (aDlg->Execute() != RET_OK) *pLinguData = aOldLinguData; // evaluate new status of 'bConfigured' flag @@ -1653,9 +1653,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) } else if (m_pLinguDicsDelPB == pBtn) { - MessageDialog aQuery(this, "QueryDeleteDictionaryDialog", - "cui/ui/querydeletedictionarydialog.ui"); - if (RET_NO == aQuery.Execute()) + VclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog", + "cui/ui/querydeletedictionarydialog.ui")); + if (RET_NO == aQuery->Execute()) return 0; SvTreeListEntry *pEntry = m_pLinguDicsCLB->GetCurEntry(); @@ -1725,11 +1725,11 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) if(aData.HasNumericValue()) { sal_uInt16 nRID = aData.GetEntryId(); - OptionsBreakSet aDlg( this, nRID ); - aDlg.GetNumericFld().SetValue( aData.GetNumericValue() ); - if (RET_OK == aDlg.Execute() ) + VclPtr<OptionsBreakSet> aDlg( new OptionsBreakSet(this, nRID) ); + aDlg->GetNumericFld().SetValue( aData.GetNumericValue() ); + if (RET_OK == aDlg->Execute() ) { - long nVal = static_cast<long>(aDlg.GetNumericFld().GetValue()); + long nVal = static_cast<long>(aDlg->GetNumericFld().GetValue()); if (-1 != nVal && aData.GetNumericValue() != nVal) { aData.SetNumericValue( (sal_uInt8)nVal ); //! sets IsModified ! diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 2323fc465b4e..b6faede94b5e 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -273,10 +273,10 @@ IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit) void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag) { - ListEntryDialog aDlg(pTabPage, rEntry, rTag); + VclPtr<ListEntryDialog> aDlg(new ListEntryDialog(pTabPage, rEntry, rTag)); - if (aDlg.Execute() == RET_OK) - rEntry = aDlg.maEntry; + if (aDlg->Execute() == RET_OK) + rEntry = aDlg->maEntry; } const OpenCLConfig::ImplMatcher& findCurrentEntry(OpenCLConfig::ImplMatcherSet& rSet, SvSimpleTable* pListBox) diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index d4591fe163ea..1bae7f526f79 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -437,11 +437,11 @@ void SvxPersonalizationTabPage::LoadExtensionThemes() IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ ) { - SelectPersonaDialog aDialog( NULL ); + VclPtr<SelectPersonaDialog> aDialog( new SelectPersonaDialog(NULL) ); - if ( aDialog.Execute() == RET_OK ) + if ( aDialog->Execute() == RET_OK ) { - OUString aPersonaSetting( aDialog.GetAppliedPersonaSetting() ); + OUString aPersonaSetting( aDialog->GetAppliedPersonaSetting() ); if ( !aPersonaSetting.isEmpty() ) { SetPersonaSettings( aPersonaSetting ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index f808ef4b45fe..a35fa19ad9c3 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -717,11 +717,11 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl) else if( MERGE_SINGLE_LINE_PARA == nSelEntryPos ) { // dialog for per cent settings - OfaAutoFmtPrcntSet aDlg(this); - aDlg.GetPrcntFld().SetValue(nPercent); - if(RET_OK == aDlg.Execute()) + VclPtr<OfaAutoFmtPrcntSet> aDlg(new OfaAutoFmtPrcntSet(this)); + aDlg->GetPrcntFld().SetValue(nPercent); + if(RET_OK == aDlg->Execute()) { - nPercent = (sal_uInt16)aDlg.GetPrcntFld().GetValue(); + nPercent = (sal_uInt16)aDlg->GetPrcntFld().GetValue(); sMargin = " " + unicode::formatPercent(nPercent, Application::GetSettings().GetUILanguageTag()); } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index fe48e241c93b..70c126dcf651 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -681,17 +681,17 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) // display original size const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() ); - MetricField aFld(this, WB_HIDE); - SetFieldUnit( aFld, eMetric ); - aFld.SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); - aFld.SetMax( LONG_MAX - 1 ); - - aFld.SetValue( aFld.Normalize( aOrigSize.Width() ), eUnit ); - OUString sTemp = aFld.GetText(); - aFld.SetValue( aFld.Normalize( aOrigSize.Height() ), eUnit ); + VclPtr<MetricField> aFld(new MetricField(this, WB_HIDE)); + SetFieldUnit( *aFld.get(), eMetric ); + aFld->SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); + aFld->SetMax( LONG_MAX - 1 ); + + aFld->SetValue( aFld->Normalize( aOrigSize.Width() ), eUnit ); + OUString sTemp = aFld->GetText(); + aFld->SetValue( aFld->Normalize( aOrigSize.Height() ), eUnit ); // multiplication sign (U+00D7) sTemp += OUString( sal_Unicode (0x00D7) ); - sTemp += aFld.GetText(); + sTemp += aFld->GetText(); if ( aOrigPixelSize.Width() && aOrigPixelSize.Height() ) { sal_Int32 ax = sal_Int32(floor((float)aOrigPixelSize.Width() / diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index cdde799b2529..3a81c3dfaa41 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -716,10 +716,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr<MessageDialog> aBox( new MessageDialog(GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } } @@ -734,9 +734,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui"); + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui" )); - if( aQueryBox.Execute() == RET_YES ) + if( aQueryBox->Execute() == RET_YES ) { delete pBitmapList->Remove( nPos ); m_pLbBitmaps->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 336a2422798b..a9dd01440549 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -682,10 +682,10 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl) // if yes, it is repeated and a new name is demanded if ( !bDifferent ) { - MessageDialog aWarningBox( GetParentDialog() + VclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aWarningBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aWarningBox->Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); @@ -705,7 +705,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl) if( bDifferent ) bLoop = false; else - aWarningBox.Execute(); + aWarningBox->Execute(); } } @@ -753,10 +753,10 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl) // if yes, it is repeated and a new name is demanded if ( !bDifferent ) { - MessageDialog aWarningBox( GetParentDialog() + VclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aWarningBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aWarningBox->Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); @@ -774,7 +774,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl) if( bDifferent ) bLoop = false; else - aWarningBox.Execute(); + aWarningBox->Execute(); } } @@ -849,9 +849,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui"); + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui")); - if( aQueryBox.Execute() == RET_YES ) + if( aQueryBox->Execute() == RET_YES ) { XColorEntry* pEntry = pColorList->Remove( nPos ); DBG_ASSERT( pEntry, "ColorEntry not found !" ); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 9c554b7f1e1c..98caa11d0905 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -561,10 +561,10 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr<MessageDialog> aBox( new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui") ); + aBox->Execute(); } } @@ -580,9 +580,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui"); + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) { delete pGradientList->Remove( nPos ); m_pLbGradients->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index c3afeafafd6e..782b98b66d72 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -606,10 +606,10 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } } @@ -624,9 +624,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui"); + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui")); - if( aQueryBox.Execute() == RET_YES ) + if( aQueryBox->Execute() == RET_YES ) { delete pHatchingList->Remove( nPos ); m_pLbHatchings->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 66de7c9bffcf..04b7ff0905cc 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -594,10 +594,10 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl) else { - MessageDialog aBox( GetParentDialog() + VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } pDlg.reset(); @@ -672,10 +672,10 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui") ); + aBox->Execute(); } } } @@ -690,11 +690,11 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog() + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog() ,"AskDelLineStyleDialog" - ,"cui/ui/querydeletelinestyledialog.ui"); + ,"cui/ui/querydeletelinestyledialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) { delete pDashList->Remove( nPos ); m_pLbLineStyles->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 3bbe56877361..5235d1dd7325 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -188,11 +188,11 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() if( aString != m_pLbLineEnds->GetSelectEntry() ) { - MessageDialog aQueryBox( GetParentDialog() + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog() ,"AskChangeLineEndDialog" - ,"cui/ui/querychangelineenddialog.ui"); + ,"cui/ui/querychangelineenddialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) ClickModifyHdl_Impl( this ); } } @@ -325,10 +325,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) // if yes, repeat and demand a new name if ( !bDifferent ) { - MessageDialog aWarningBox( GetParentDialog() + VclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aWarningBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aWarningBox->Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); @@ -350,7 +350,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) if( bDifferent ) bLoop = false; else - aWarningBox.Execute(); + aWarningBox->Execute(); } } @@ -479,10 +479,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } } @@ -507,11 +507,11 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog() + VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog() ,"AskDelLineEndDialog" - ,"cui/ui/querydeletelineenddialog.ui"); + ,"cui/ui/querydeletelineenddialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) { delete pLineEndList->Remove( nPos ); m_pLbLineEnds->RemoveEntry( nPos ); |