basctl/source/basicide/baside2b.cxx | 2 - basctl/source/basicide/basides1.cxx | 6 +-- basctl/source/basicide/basidesh.cxx | 2 - basic/source/runtime/basrdll.cxx | 2 - basic/source/runtime/iosys.cxx | 5 +- chart2/source/controller/dialogs/DataBrowser.cxx | 8 ++-- chart2/source/controller/dialogs/tp_Scale.cxx | 2 - chart2/source/controller/main/ChartController_Window.cxx | 2 - cui/source/customize/cfg.cxx | 9 ++--- cui/source/dialogs/multipat.cxx | 4 +- cui/source/options/treeopt.cxx | 2 - cui/source/tabpages/page.cxx | 2 - dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 - dbaccess/source/ui/misc/UITools.cxx | 2 - dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 12 +++--- dbaccess/source/ui/querydesign/querycontroller.cxx | 2 - dbaccess/source/ui/relationdesign/RelationController.cxx | 2 - editeng/source/editeng/editdbg.cxx | 2 - editeng/source/editeng/editeng.cxx | 2 - editeng/source/misc/unolingu.cxx | 2 - extensions/source/propctrlr/propcontroller.cxx | 2 - sc/source/ui/dbgui/consdlg.cxx | 2 - sc/source/ui/dbgui/scendlg.cxx | 4 +- sc/source/ui/docshell/dbdocfun.cxx | 4 +- sc/source/ui/docshell/docfunc.cxx | 8 ++-- sc/source/ui/miscdlgs/crnrdlg.cxx | 4 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 2 - sc/source/ui/navipi/scenwnd.cxx | 2 - sc/source/ui/optdlg/tpusrlst.cxx | 6 +-- sc/source/ui/view/cellsh3.cxx | 4 +- sc/source/ui/view/dbfunc.cxx | 4 +- sc/source/ui/view/dbfunc3.cxx | 4 +- sc/source/ui/view/spelleng.cxx | 4 +- sc/source/ui/view/tabvwshf.cxx | 4 +- sc/source/ui/view/viewfunc.cxx | 4 +- sd/source/core/drawdoc3.cxx | 2 - sd/source/ui/dlg/custsdlg.cxx | 4 +- sd/source/ui/func/fudraw.cxx | 2 - sd/source/ui/view/drawview.cxx | 5 +- sd/source/ui/view/drviews2.cxx | 26 +++++++-------- sd/source/ui/view/drviews4.cxx | 2 - sd/source/ui/view/drviewse.cxx | 18 +++++----- sd/source/ui/view/sdview4.cxx | 2 - sfx2/source/appl/linkmgr2.cxx | 2 - sfx2/source/bastyp/fltfnc.cxx | 4 +- sfx2/source/dialog/securitypage.cxx | 2 - svx/source/svdraw/svdedtv1.cxx | 2 - svx/source/svdraw/svdedxv.cxx | 2 - svx/source/svdraw/svdpntv.cxx | 2 - sw/source/ui/misc/bookmark.cxx | 2 - sw/source/uibase/app/docsh.cxx | 6 +-- sw/source/uibase/app/docsh2.cxx | 2 - sw/source/uibase/dochdl/gloshdl.cxx | 2 - sw/source/uibase/lingu/hyp.cxx | 2 - sw/source/uibase/uiview/viewling.cxx | 4 +- sw/source/uibase/uiview/viewprt.cxx | 2 - sw/source/uibase/uiview/viewsrch.cxx | 2 - sw/source/uibase/utlui/unotools.cxx | 2 - xmlsecurity/workben/signaturetest.cxx | 2 - 59 files changed, 115 insertions(+), 116 deletions(-)
New commits: commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f Author: Michael Meeks <michael.me...@collabora.com> Date: Thu May 28 21:35:43 2015 +0100 tdf#91702 - fix stack-based MessBox allocation. Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7 Reviewed-on: https://gerrit.libreoffice.org/15954 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index e931552..8c949c7 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -483,7 +483,7 @@ bool EditorWindow::ImpCanModify() { // If in Trace-mode, abort the trace or refuse input // Remove markers in the modules in Notify at Basic::Stoped - if ( QueryBox( 0, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString() ).Execute() == RET_OK ) + if ( ScopedVclPtr<QueryBox>::Create( nullptr, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString() )->Execute() == RET_OK ) { rModulWindow.GetBasicStatus().bIsRunning = false; StopBasic(); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index f99f7bb..783c4c0 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -97,7 +97,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) nActModWindows++; } - if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && QueryBox( pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString() ).Execute() == RET_YES ) ) + if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && ScopedVclPtr<QueryBox>::Create( pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString() )->Execute() == RET_YES ) ) { for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it) { @@ -110,7 +110,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES)); aReplStr = aReplStr.replaceAll("XX", OUString::number(nFound)); - InfoBox( pCurWin, aReplStr ).Execute(); + ScopedVclPtr<InfoBox>::Create( pCurWin, aReplStr )->Execute(); } else { @@ -177,7 +177,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SetCurWindow( pWin, true ); } if ( !nFound && !bCanceled ) - InfoBox( pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString() ).Execute(); + ScopedVclPtr<InfoBox>::Create( pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString() )->Execute(); } rReq.Done(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index e337fdf..661a667 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -396,7 +396,7 @@ bool Shell::PrepareClose( bool bUI ) if( bUI ) { vcl::Window *pParent = &GetViewFrame()->GetWindow(); - InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute(); + ScopedVclPtr<InfoBox>::Create( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE))->Execute(); } return false; } diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index a1ad75a..e02c0f67 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -98,7 +98,7 @@ void BasicDLL::BasicBreak() { bJustStopping = true; StarBASIC::Stop(); - InfoBox( 0, BasResId(IDS_SBERR_TERMINATED).toString() ).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, BasResId(IDS_SBERR_TERMINATED).toString() )->Execute(); bJustStopping = false; } } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 2e666ea..40fb2f6 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -1004,9 +1004,10 @@ void SbiIoSystem::WriteCon(const OUString& rText) } { SolarMutexGuard aSolarGuard; - if( !MessBox( Application::GetDefDialogParent(), + if( !ScopedVclPtr<MessBox>::Create( + Application::GetDefDialogParent(), WinBits( WB_OK_CANCEL | WB_DEF_OK ), - OUString(), s ).Execute() ) + OUString(), s )->Execute() ) { nError = SbERR_USER_ABORT; } diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 8f0f979..e39213f 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -136,8 +136,8 @@ void SeriesHeaderEdit::MouseButtonDown( const MouseEvent& rMEvt ) Edit::MouseButtonDown( rMEvt ); if( m_bShowWarningBox ) - WarningBox(this, WinBits( WB_OK ), - SCH_RESSTR(STR_INVALID_NUMBER)).Execute(); + ScopedVclPtr<WarningBox>::Create(this, WinBits( WB_OK ), + SCH_RESSTR(STR_INVALID_NUMBER))->Execute(); } class SeriesHeader @@ -767,8 +767,8 @@ void DataBrowser::MouseButtonDown( const BrowserMouseEvent& rEvt ) void DataBrowser::ShowWarningBox() { - WarningBox(this, WinBits( WB_OK ), - SCH_RESSTR(STR_INVALID_NUMBER)).Execute(); + ScopedVclPtr<WarningBox>::Create(this, WinBits( WB_OK ), + SCH_RESSTR(STR_INVALID_NUMBER))->Execute(); } bool DataBrowser::ShowQueryBox() diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 0e12651..f27f8e8 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -621,7 +621,7 @@ bool ScaleTabPage::ShowWarning( sal_uInt16 nResIdMessage, Control* pControl /* = if( nResIdMessage == 0 ) return false; - WarningBox( this, WinBits( WB_OK ), SCH_RESSTR( nResIdMessage ) ).Execute(); + ScopedVclPtr<WarningBox>::Create( this, WinBits( WB_OK ), SCH_RESSTR( nResIdMessage ) )->Execute(); if( pControl ) { pControl->GrabFocus(); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 9f2f011..57addb8 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1536,7 +1536,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( ! bReturn ) { SolarMutexGuard aGuard; - InfoBox( m_pChartWindow, SCH_RESSTR( STR_ACTION_NOTPOSSIBLE )).Execute(); + ScopedVclPtr<InfoBox>::Create( m_pChartWindow, SCH_RESSTR( STR_ACTION_NOTPOSSIBLE ))->Execute(); } } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index b5ebf1a..c5a1e7a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -5079,7 +5079,7 @@ IMPL_LINK( SvxIconSelectorDialog, DeleteHdl, PushButton *, pButton ) (void)pButton; OUString message = CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM ); - if ( WarningBox( this, WinBits(WB_OK_CANCEL), message ).Execute() == RET_OK ) + if ( ScopedVclPtr<WarningBox>::Create( this, WinBits(WB_OK_CANCEL), message )->Execute() == RET_OK ) { sal_uInt16 nCount = pTbSymbol->GetItemCount(); @@ -5204,7 +5204,7 @@ void SvxIconSelectorDialog::ImportGraphics( { aIndex = rPaths[0].lastIndexOf( '/' ); aIconName = rPaths[0].copy( aIndex+1 ); - ret = SvxIconReplacementDialog( this, aIconName ).ShowDialog(); + ret = ScopedVclPtr<SvxIconReplacementDialog>::Create( this, aIconName )->ShowDialog(); if ( ret == 2 ) { ReplaceGraphicItem( rPaths[0] ); @@ -5232,7 +5232,7 @@ void SvxIconSelectorDialog::ImportGraphics( { aIndex = rPaths[i].lastIndexOf( '/' ); aIconName = rPaths[i].copy( aIndex+1 ); - ret = SvxIconReplacementDialog( this, aIconName, true ).ShowDialog(); + ret = ScopedVclPtr<SvxIconReplacementDialog>::Create( this, aIconName, true )->ShowDialog(); if ( ret == 2 ) { ReplaceGraphicItem( aPath ); @@ -5388,8 +5388,7 @@ MessBox( pWindow, WB_DEF_YES, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_R SvxIconReplacementDialog :: SvxIconReplacementDialog( vcl::Window *pWindow, const OUString& aMessage ) - : -MessBox( pWindow, WB_YES_NO_CANCEL, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) + : MessBox( pWindow, WB_YES_NO_CANCEL, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { SetImage( WarningBox::GetStandardImage() ); SetMessText( ReplaceIconName( aMessage )); diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 75c8b88..b8b5b04 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -92,7 +92,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl) { OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sInsPath ); - InfoBox( this, sMsg ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, sMsg )->Execute(); } SelectHdl_Impl( NULL ); @@ -117,7 +117,7 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl) { OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sInsPath ); - InfoBox( this, sMsg ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, sMsg )->Execute(); } else { diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index a3d1b90..5aeaafb 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1016,7 +1016,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() if(!pGroupInfo->m_pModule) { pGroupInfo->m_bLoadError = true; - InfoBox(pBox, sNotLoadedError).Execute(); + ScopedVclPtr<InfoBox>::Create(pBox, sNotLoadedError)->Execute(); return; } if(bIdentical) diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 89c0641..65c28c7 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1493,7 +1493,7 @@ SfxTabPage::sfxpg SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper != PAPER_SCREEN_16_10 && IsMarginOutOfRange() ) { - if ( QueryBox( this, WB_YES_NO | WB_DEF_NO, m_pPrintRangeQueryText->GetText() ).Execute() == RET_NO ) + if ( ScopedVclPtr<QueryBox>::Create( this, WB_YES_NO | WB_DEF_NO, m_pPrintRangeQueryText->GetText() )->Execute() == RET_NO ) { MetricField* pField = NULL; if ( IsPrinterRangeOverflow( *m_pLeftMarginEdit, nFirstLeftMargin, nLastLeftMargin, MARGIN_LEFT ) ) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 8bf6989..9a3ac81 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -689,7 +689,7 @@ namespace dbaui { OUString sFile = ModuleRes( STR_FILE_DOES_NOT_EXIST ); sFile = sFile.replaceFirst("$file$", aTransformer.get(OFileNotation::N_SYSTEM)); - OSQLWarningBox( this, sFile ).Execute(); + ScopedVclPtr<OSQLWarningBox>::Create( this, sFile )->Execute(); setURLNoPrefix(sOldPath); SetRoadmapStateValue(false); callModifiedHdl(); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index ca24bc2..2b15eae 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -941,7 +941,7 @@ bool appendToFilter(const Reference<XConnection>& _xConnection, if(! ::dbaui::checkDataSourceAvailable(::comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)),_rxContext)) { OUString aMessage(ModuleRes(STR_TABLEDESIGN_DATASOURCE_DELETED)); - OSQLWarningBox( _pParent, aMessage ).Execute(); + ScopedVclPtr<OSQLWarningBox>::Create( _pParent, aMessage )->Execute(); bRet = false; } else diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 098ba2d..64ecc68 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -524,7 +524,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon m_pVisibleCell->GetBox().EnableInput(false); OUString aMessage(ModuleRes(STR_QRY_ORDERBY_UNRELATED)); OQueryDesignView* paDView = getDesignView(); - InfoBox(paDView, aMessage).Execute(); + ScopedVclPtr<InfoBox>::Create(paDView, aMessage)->Execute(); } } break; case BROW_ORDER_ROW: @@ -614,7 +614,7 @@ bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const OUSt { OUString sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST)); sErrorMsg = sErrorMsg.replaceFirst("$name$",_sColumnName); - OSQLErrorBox( this, sErrorMsg ).Execute(); + ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMsg )->Execute(); bError = true; } else @@ -719,7 +719,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _ // something different which we have to check OUString sErrorMessage( ModuleRes( STR_QRY_COLUMN_NOT_FOUND ) ); sErrorMessage = sErrorMessage.replaceFirst("$name$",_sFieldName); - OSQLErrorBox( this, sErrorMessage ).Execute(); + ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute(); return true; } @@ -876,7 +876,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _ { // the field could not be inserted OUString sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) ); sErrorMessage = sErrorMessage.replaceFirst("$name$",aSelEntry->GetField()); - OSQLErrorBox( this, sErrorMessage ).Execute(); + ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute(); bError = true; } } @@ -1143,7 +1143,7 @@ bool OSelectionBrowseBox::SaveModified() { if ( !m_bDisableErrorBox ) { - OSQLWarningBox( this, aErrorMsg ).Execute(); + ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute(); } bError = true; } @@ -1152,7 +1152,7 @@ bool OSelectionBrowseBox::SaveModified() { if ( !m_bDisableErrorBox ) { - OSQLWarningBox( this, aErrorMsg ).Execute(); + ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute(); } bError = true; } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 841dc33..3b85887 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1425,7 +1425,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs) if ( !editingCommand() && !haveDataSource() ) { OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED)); - OSQLWarningBox( getView(), aMessage ).Execute(); + ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute(); return false; } diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index fc9f0df..46a6c38 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -160,7 +160,7 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue if(!::dbaui::checkDataSourceAvailable(::comphelper::getString(getDataSource()->getPropertyValue(PROPERTY_NAME)), getORB())) { OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED)); - OSQLWarningBox( getView(), aMessage ).Execute(); + ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute(); } else { diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index f1f5112..34f7ddf 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -483,7 +483,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) } fclose( fp ); if ( bInfoBox ) - InfoBox(0, OUString( "D:\\DEBUG.LOG !" ) ).Execute(); + ScopedVclPtr<InfoBox>::Create(nullptr, OUString( "D:\\DEBUG.LOG !" ) )->Execute(); } #endif diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index a119b58..4629ba5 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1038,7 +1038,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v bDebugPaint = !bDebugPaint; OStringBuffer aInfo("DebugPaint: "); aInfo.append(bDebugPaint ? "On" : "Off"); - InfoBox(NULL, OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US)).Execute(); + ScopedVclPtr<InfoBox>::Create(nullptr, OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US))->Execute(); } bDone = false; } diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 9208677..c85eda2 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -836,7 +836,7 @@ short SvxDicError( vcl::Window *pParent, linguistic::DictionaryError nError ) nRid = RID_SVXSTR_DIC_ERR_UNKNOWN; SAL_WARN("editeng", "unexpected case"); } - nRes = InfoBox( pParent, EE_RESSTR( nRid ) ).Execute(); + nRes = ScopedVclPtr<InfoBox>::Create( pParent, EE_RESSTR( nRid ) )->Execute(); } return nRes; } diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index dc85415..7236a9b 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1412,7 +1412,7 @@ namespace pcr } catch(const PropertyVetoException& eVetoException) { - InfoBox(m_pView, eVetoException.Message).Execute(); + ScopedVclPtr<InfoBox>::Create(m_pView, eVetoException.Message)->Execute(); PropertyHandlerRef handler = impl_getHandlerForProperty_throw( rName ); Any aNormalizedValue = handler->getPropertyValue( rName ); getPropertyBox().SetPropertyValue( rName, aNormalizedValue, false ); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 03fb45c..675b089 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -34,7 +34,7 @@ #include "consdlg.hxx" #include <vcl/msgbox.hxx> -#define INFOBOX(id) InfoBox(this, ScGlobal::GetRscString(id)).Execute() +#define INFOBOX(id) ScopedVclPtr<InfoBox>::Create(this, ScGlobal::GetRscString(id))->Execute() class ScAreaData { diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index bbe8b6c..0403320 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -171,12 +171,12 @@ IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl) if ( !ScDocument::ValidTabName( aName ) ) { - InfoBox( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) )->Execute(); m_pEdName->GrabFocus(); } else if ( !bIsEdit && !pDoc->ValidNewTabName( aName ) ) { - InfoBox( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) )->Execute(); m_pEdName->GrabFocus(); } else diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 95f33cf..567e100 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -987,10 +987,10 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( MessBox( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtr<MessBox>::Create( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) ).Execute() + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() == RET_YES ); } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 91f1c4b..1245ef5 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -395,8 +395,8 @@ bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) aModificator.SetDocumentModified(); if ( bOverflow ) { - InfoBox( NULL, - ScGlobal::GetRscString( STR_DETINVALID_OVERFLOW ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, + ScGlobal::GetRscString( STR_DETINVALID_OVERFLOW ) )->Execute(); } } else @@ -4920,9 +4920,9 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, aMessage += aName; aMessage += aTemplate.getToken( 1, '#' ); - short nResult = QueryBox( ScDocShell::GetActiveDialogParent(), + short nResult = ScopedVclPtr<QueryBox>::Create( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO_CANCEL | WB_DEF_YES), - aMessage ).Execute(); + aMessage )->Execute(); if ( nResult == RET_YES ) { rList.erase(*pOld); diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 8772dc0..9bfa857 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -26,8 +26,8 @@ #include <vcl/msgbox.hxx> #include <boost/scoped_array.hpp> -#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>::Create(this, s)->Execute() -#define QUERYBOX(m) ScopedVclPtrInstance<QueryBox>::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() +#define ERRORBOX(s) ScopedVclPtr<MessageDialog>::Create(this, s)->Execute() +#define QUERYBOX(m) ScopedVclPtr<QueryBox>::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() const sal_uLong nEntryDataCol = 0; const sal_uLong nEntryDataRow = 1; diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 8a5d071..773169d 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -293,7 +293,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RemoveHdl) aMsg += aStrDelMsg.getToken( 1, '#' ); if ( RET_YES == - QueryBox( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg ).Execute() ) + ScopedVclPtr<QueryBox>::Create( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) { m_pLbFormat->RemoveEntry( nIndex ); m_pLbFormat->SelectEntryPos( nIndex-1 ); diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index 22ebb99..eedca03 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -188,7 +188,7 @@ void ScScenarioListBox::EditScenario() void ScScenarioListBox::DeleteScenario( bool bQueryBox ) { if( GetSelectEntryCount() > 0 ) - if( !bQueryBox || (::QueryBox( 0, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) ).Execute() == RET_YES) ) + if( !bQueryBox || (ScopedVclPtr<QueryBox>::Create( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES) ) ExecuteScenarioSlot( SID_DELETE_SCENARIO ); } diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index fa1611d..0815c13 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -425,7 +425,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( bValueIgnored ) { - InfoBox( this, aStrCopyErr ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, aStrCopyErr )->Execute(); } } @@ -622,10 +622,10 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) aMsg += mpLbLists->GetEntry( nRemovePos ); aMsg += aStrQueryRemove.getToken( 1, '#' ); - if ( RET_YES == QueryBox( this, + if ( RET_YES == ScopedVclPtr<QueryBox>::Create( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg - ).Execute() ) + )->Execute() ) { RemoveList( nRemovePos ); UpdateUserListBox(); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 77be8cf..6c12d03 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -412,8 +412,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) { if ( rReq.IsAPI() || RET_YES == - QueryBox( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_UPDATE_SCENARIO) ). + ScopedVclPtr<QueryBox>::Create( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScGlobal::GetRscString(STR_UPDATE_SCENARIO) )-> Execute() ) { pTabViewShell->ExtendScenario(); diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 83224c9..2b05d3c 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -354,10 +354,10 @@ void ScDBFunc::ToggleAutoFilter() { if (!bHeader) { - if ( MessBox( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + if ( ScopedVclPtr<MessBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), // "StarCalc" ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // header from first row? - ).Execute() == RET_YES ) + )->Execute() == RET_YES ) { pDBData->SetHeader( true ); //! Undo ?? bHeader = true; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index e05dab4..d22ec10 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -397,10 +397,10 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( MessBox( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtr<MessBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) ).Execute() + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() == RET_YES ); } diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 41604f9..a8e0fca 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -287,7 +287,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView ) { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - InfoBox( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); } } @@ -315,7 +315,7 @@ void ScSpellingEngine::ShowFinishDialog() { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - InfoBox( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) )->Execute(); } vcl::Window* ScSpellingEngine::GetDialogParent() diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 570bf9a..29cfc5f 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -568,10 +568,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) // source isn't basic -> ask again bDoIt = ( RET_YES == - QueryBox( GetDialogParent(), + ScopedVclPtr<QueryBox>::Create( GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString(STR_QUERY_DELTAB) - ).Execute() ); + )->Execute() ); } if( bDoIt ) { diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index da021a2..3783473 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -441,9 +441,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, { OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) ); aMessage += aCorrectedFormula; - nResult = QueryBox( GetViewData().GetDialogParent(), + nResult = ScopedVclPtr<QueryBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - aMessage ).Execute(); + aMessage )->Execute(); } if ( nResult == RET_YES ) { diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 6853564..3f966e8 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -461,7 +461,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( pBMPage->GetLwrBorder() != pRefPage->GetLwrBorder()) { OUString aStr(SD_RESSTR(STR_SCALE_OBJECTS)); - sal_uInt16 nBut = QueryBox( NULL, WB_YES_NO_CANCEL, aStr).Execute(); + sal_uInt16 nBut = ScopedVclPtr<QueryBox>::Create( nullptr, WB_YES_NO_CANCEL, aStr)->Execute(); bScaleObjects = nBut == RET_YES; bContinue = nBut != RET_CANCEL; diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index dae2cd4..27c3a86 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -515,8 +515,8 @@ IMPL_LINK_NOARG(SdDefineCustomShowDlg, OKHdl) } else { - WarningBox( this, WinBits( WB_OK ), - SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ).Execute(); + ScopedVclPtr<WarningBox>::Create( this, WinBits( WB_OK ), + SD_RESSTR( STR_WARN_NAME_DUPLICATE ) )->Execute(); m_pEdtName->GrabFocus(); } diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index a00a513..b50fe2c 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -360,7 +360,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) { if (mpView->IsPresObjSelected(false, true, false, true)) { - InfoBox(mpWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create(mpWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } else { diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 179529c..ae2f99c 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -434,9 +434,8 @@ bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAtt { if (IsPresObjSelected(false, true)) { - - InfoBox(mpDrawViewShell->GetActiveWindow(), - SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(mpDrawViewShell->GetActiveWindow(), + SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); bResult = false; } else diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index f281b69..e9c5f00 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -627,7 +627,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -672,7 +672,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -700,7 +700,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(true,true,true) ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -1161,7 +1161,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -1347,7 +1347,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) #endif ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(nId)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(nId))->Execute(); } else { @@ -2061,7 +2061,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected( true, true, true ) ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2180,7 +2180,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2197,7 +2197,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2217,7 +2217,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2238,7 +2238,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2259,7 +2259,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2288,7 +2288,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2380,7 +2380,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE)).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index e87de5b..548dbf4 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -106,7 +106,7 @@ void DrawViewShell::DeleteActualLayer() // replace placeholder aString = aString.replaceFirst("$", rName); - if (QueryBox(GetActiveWindow(), WB_YES_NO, aString).Execute() == RET_YES) + if (ScopedVclPtr<QueryBox>::Create(GetActiveWindow(), WB_YES_NO, aString)->Execute() == RET_YES) { const SdrLayer* pLayer = rAdmin.GetLayer(rName, false); mpDrawView->DeleteLayer( pLayer->GetName() ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 5b945c5..d7bc78f 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -331,11 +331,11 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } - else if ( QueryBox(GetActiveWindow(), WB_YES_NO, + else if ( ScopedVclPtr<QueryBox>::Create(GetActiveWindow(), WB_YES_NO, SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER) - ).Execute() == RET_YES ) + )->Execute() == RET_YES ) { // implicit transformation into bezier WaitObject aWait( (Window*)GetActiveWindow() ); @@ -368,11 +368,11 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } - else if ( QueryBox(GetActiveWindow(), WB_YES_NO, + else if ( ScopedVclPtr<QueryBox>::Create(GetActiveWindow(), WB_YES_NO, SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER) - ).Execute() == RET_YES ) + )->Execute() == RET_YES ) { // implicit transformation into bezier WaitObject aWait( (Window*)GetActiveWindow() ); @@ -676,7 +676,7 @@ void DrawViewShell::FuDeleteSelectedObjects() if (mpDrawView->IsPresObjSelected(false, true, false, true)) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); bConsumed = true; } @@ -812,7 +812,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } else { @@ -834,7 +834,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } else { diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 0395499..1bfe74c 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -591,7 +591,7 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void) */ IMPL_LINK_NOARG_TYPED(View, DropErrorHdl, Idle *, void) { - InfoBox( mpViewSh ? mpViewSh->GetActiveWindow() : 0, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); + ScopedVclPtr<InfoBox>::Create( mpViewSh ? mpViewSh->GetActiveWindow() : 0, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } /** diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index b39ab71..c3e2565 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -327,7 +327,7 @@ void LinkManager::UpdateAllLinks( if( bAskUpdate ) { - int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString() ).Execute(); + int nRet = ScopedVclPtr<QueryBox>::Create( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString() )->Execute(); if( RET_YES != nRet ) { SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist(); diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 7136345..48bf28d 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -540,7 +540,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter ) { #ifdef DBG_UTIL // Start Setup - InfoBox( NULL, "Here should the Setup now be starting!" ).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, "Here should the Setup now be starting!" )->Execute(); #endif // Installation must still give feedback if it worked or not, // then the Filterflag be deleted @@ -552,7 +552,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter ) { OUString aText( SfxResId(STR_FILTER_CONSULT_SERVICE).toString() ); aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() ); - InfoBox ( NULL, aText ).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, aText )->Execute(); return false; } else diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index e5de1d3..2af8ef5 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -126,7 +126,7 @@ static bool lcl_IsPasswordCorrect( const OUString &rPassword ) if (SvPasswordHelper::CompareHashPassword( aPasswordHash, rPassword )) bRes = true; // password was correct else - InfoBox( NULL, SFX2_RESSTR(RID_SVXSTR_INCORRECT_PASSWORD) ).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, SFX2_RESSTR(RID_SVXSTR_INCORRECT_PASSWORD) )->Execute(); return bRes; } diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 26e4b32..8b5e0f3 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -993,7 +993,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - InfoBox(NULL, aMessage).Execute(); + ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); } } #endif diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 8e5b31d..e06571a 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1517,7 +1517,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - InfoBox(NULL, aMessage).Execute(); + ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); } } #endif diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index a596e98..515c439 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1048,7 +1048,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - InfoBox(NULL, aMessage).Execute(); + ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); } } #endif diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index f3c5597..fb98057 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -53,7 +53,7 @@ IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox ) if(sTmp.getLength() != nLen) { pBox->SetText(sTmp); - InfoBox(this, sRemoveWarning+sMsg).Execute(); + ScopedVclPtr<InfoBox>::Create(this, sRemoveWarning+sMsg)->Execute(); } } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index a614c85..ff621d3 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -173,7 +173,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { if(!bAPICall) { - InfoBox( 0, SW_RESSTR(STR_CANTOPEN)).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR(STR_CANTOPEN))->Execute(); } return 0; } @@ -519,8 +519,8 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); if( !xWriter.Is() ) { // Filter not available - InfoBox( 0, - SW_RESSTR(STR_DLLNOTFOUND) ).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, + SW_RESSTR(STR_DLLNOTFOUND) )->Execute(); return false; } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 60b8c0e..d75d160 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1098,7 +1098,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } if( !bDone && !rReq.IsAPI() ) { - InfoBox( 0, SW_RESSTR( STR_CANTCREATE )).Execute(); + ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR( STR_CANTCREATE ))->Execute(); } } } diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 844f6b6..7f00672 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -486,7 +486,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, } OUString aTmp( SW_RES(STR_NOGLOS)); aTmp = aTmp.replaceFirst("%1", aShortName); - InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute(); + ScopedVclPtr<InfoBox>::Create( pWrtShell->GetView().GetWindow(), aTmp )->Execute(); } return false; diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index cdf8015..057bd69 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -123,7 +123,7 @@ SwHyphWrapper::~SwHyphWrapper() if( nPageCount ) ::EndProgress( pView->GetDocShell() ); if( bInfoBox ) - InfoBox( &pView->GetEditWin(), SW_RESSTR(STR_HYP_OK) ).Execute(); + ScopedVclPtr<InfoBox>::Create( &pView->GetEditWin(), SW_RESSTR(STR_HYP_OK) )->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index a6aae3e..f074cbf 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -419,8 +419,8 @@ void SwView::HyphenateDocument() // do not hyphenate if interactive hyphenation is active elsewhere if (SwEditShell::HasHyphIter()) { - MessBox( 0, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), - OUString( SW_RES( STR_MULT_INTERACT_HYPH_WARN ) ) ).Execute(); + ScopedVclPtr<MessBox>::Create( nullptr, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), + OUString( SW_RES( STR_MULT_INTERACT_HYPH_WARN ) ) )->Execute(); return; } diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index 012e0dd..281567a 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -217,7 +217,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) { if( ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) ) { - short nBtn = SvxPrtQryBox(&GetEditWin()).Execute(); + short nBtn = ScopedVclPtr<SvxPrtQryBox>::Create(&GetEditWin())->Execute(); if( RET_CANCEL == nBtn ) return; diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index dbd792b..a4951ef 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -355,7 +355,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) OUString aText( SW_RES( STR_NB_REPLACED ) ); aText = aText.replaceFirst("XX", OUString::number( nFound )); vcl::Window* pParentWindow = GetParentWindow( m_pSrchDlg ); - InfoBox( pParentWindow, aText ).Execute(); + ScopedVclPtr<InfoBox>::Create( pParentWindow, aText )->Execute(); } } #if HAVE_FEATURE_DESKTOP diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 6d870cf..785eba8 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -96,7 +96,7 @@ void SwOneExampleFrame::CreateErrorMessage(vcl::Window* pParent) { OUString sInfo(SW_RES(STR_SERVICE_UNAVAILABLE)); sInfo += OUString(cFrameControl); - InfoBox(pParent, sInfo).Execute(); + ScopedVclPtr<InfoBox>::Create(pParent, sInfo)->Execute(); SwOneExampleFrame::bShowServiceNotAvailableMessage = false; } } diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index 77e665f..e97e6f3 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -301,7 +301,7 @@ IMPL_LINK_NOARG(MyWin, VerifyDigitalSignaturesHdl) if ( !rInf.SignatureIsValid ) aText.append( "NOT " ); aText.append( "valid" ); - InfoBox( this, aText ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, aText )->Execute(); } return 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits