vclwidget: fixup locally allocated vcl::Window objects

They need to be wrapped in ScopedVclPtr in order to be disposed properly.

Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
This commit is contained in:
Noel Grandin 2015-03-20 11:27:10 +02:00 committed by Michael Meeks
parent f1d9eef416
commit 61b224f392
248 changed files with 555 additions and 558 deletions

View File

@ -327,7 +327,7 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window* /* pParent */,
void MediaWindow::executeFormatErrorBox( vcl::Window* pParent ) void MediaWindow::executeFormatErrorBox( vcl::Window* pParent )
{ {
VclPtr<MessageDialog> aErrBox(new MessageDialog( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) ) ); ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) ) );
aErrBox->Execute(); aErrBox->Execute();
aErrBox.disposeAndClear(); aErrBox.disposeAndClear();

View File

@ -619,7 +619,7 @@ void ModulWindow::BasicToggleBreakPointEnabled()
void ModulWindow::ManageBreakPoints() void ModulWindow::ManageBreakPoints()
{ {
BreakPointWindow& rBrkWin = GetBreakPointWindow(); BreakPointWindow& rBrkWin = GetBreakPointWindow();
VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() )); ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() ));
aBrkDlg->Execute(); aBrkDlg->Execute();
rBrkWin.Invalidate(); rBrkWin.Invalidate();
} }
@ -1043,7 +1043,7 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
break; break;
case SID_GOTOLINE: case SID_GOTOLINE:
{ {
VclPtr<GotoLineDialog> aGotoDlg(new GotoLineDialog(this)); ScopedVclPtr<GotoLineDialog> aGotoDlg(new GotoLineDialog(this));
if (aGotoDlg->Execute()) if (aGotoDlg->Execute())
if (sal_Int32 const nLine = aGotoDlg->GetLineNumber()) if (sal_Int32 const nLine = aGotoDlg->GetLineNumber())
{ {

View File

@ -1520,7 +1520,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
break; break;
case RID_BRKPROPS: case RID_BRKPROPS:
{ {
VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() )); ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
aBrkDlg->SetCurrentBreakPoint( pBrk ); aBrkDlg->SetCurrentBreakPoint( pBrk );
aBrkDlg->Execute(); aBrkDlg->Execute();
Invalidate(); Invalidate();
@ -1535,7 +1535,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{ {
case RID_BRKDLG: case RID_BRKDLG:
{ {
VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() )); ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
aBrkDlg->Execute(); aBrkDlg->Execute();
Invalidate(); Invalidate();
} }

View File

@ -1024,7 +1024,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT)); OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName); aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName);
VclPtr<NameClashQueryBox> aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText )); ScopedVclPtr<NameClashQueryBox> aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
sal_uInt16 nRet = aQueryBox->Execute(); sal_uInt16 nRet = aQueryBox->Execute();
if( RET_YES == nRet ) if( RET_YES == nRet )
{ {
@ -1086,7 +1086,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
{ {
OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE)); OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE));
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT)); OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT));
VclPtr<LanguageMismatchQueryBox> aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText )); ScopedVclPtr<LanguageMismatchQueryBox> aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
sal_uInt16 nRet = aQueryBox->Execute(); sal_uInt16 nRet = aQueryBox->Execute();
if( RET_YES == nRet ) if( RET_YES == nRet )
{ {

View File

@ -136,7 +136,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
SfxViewFrame* pViewFrame = GetViewFrame(); SfxViewFrame* pViewFrame = GetViewFrame();
SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL; SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL;
vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL; vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL;
VclPtr<QueryBox> aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART))); ScopedVclPtr<QueryBox> aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)));
if ( aQuery->Execute() == RET_YES ) if ( aQuery->Execute() == RET_YES )
{ {
it = aWindowTable.begin(); it = aWindowTable.begin();
@ -676,7 +676,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_MANAGE_LANG: case SID_BASICIDE_MANAGE_LANG:
{ {
VclPtr<ManageLanguageDialog> aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr)); ScopedVclPtr<ManageLanguageDialog> aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr));
aDlg->Execute(); aDlg->Execute();
rReq.Done(); rReq.Done();
} }

View File

@ -149,7 +149,7 @@ bool RenameModule (
if ( rDocument.hasModule( rLibName, rNewName ) ) if ( rDocument.hasModule( rLibName, rNewName ) )
{ {
VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))); ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
aError->Execute(); aError->Execute();
return false; return false;
} }
@ -157,7 +157,7 @@ bool RenameModule (
// #i74440 // #i74440
if ( rNewName.isEmpty() ) if ( rNewName.isEmpty() )
{ {
VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME))); ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)));
aError->Execute(); aError->Execute();
return false; return false;
} }

View File

@ -155,7 +155,7 @@ bool RenameDialog (
if ( rDocument.hasDialog( rLibName, rNewName ) ) if ( rDocument.hasDialog( rLibName, rNewName ) )
{ {
VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))); ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
aError->Execute(); aError->Execute();
return false; return false;
} }
@ -163,7 +163,7 @@ bool RenameDialog (
// #i74440 // #i74440
if ( rNewName.isEmpty() ) if ( rNewName.isEmpty() )
{ {
VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME))); ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)));
aError->Execute(); aError->Execute();
return false; return false;
} }

View File

@ -803,7 +803,7 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent )
aNameBuf.append('\''); aNameBuf.append('\'');
aNameBuf.insert(0, '\''); aNameBuf.insert(0, '\'');
aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear()); aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
VclPtr<MessageDialog> aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
return ( aQueryBox->Execute() == RET_YES ); return ( aQueryBox->Execute() == RET_YES );
} }
@ -840,7 +840,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
do do
{ {
// password dialog // password dialog
VclPtr<SfxPasswordDialog> aDlg(new SfxPasswordDialog(Application::GetDefDialogParent())); ScopedVclPtr<SfxPasswordDialog> aDlg(new SfxPasswordDialog(Application::GetDefDialogParent()));
aDlg->SetMinLen( 1 ); aDlg->SetMinLen( 1 );
// set new title // set new title
@ -868,7 +868,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
if ( !bOK ) if ( !bOK )
{ {
VclPtr<MessageDialog> aErrorBox(new MessageDialog(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD))); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD)));
aErrorBox->Execute(); aErrorBox->Execute();
} }
} }

View File

@ -1128,7 +1128,7 @@ void LibPage::Export( void )
return; return;
} }
VclPtr<ExportDialog> aNewDlg(new ExportDialog(this)); ScopedVclPtr<ExportDialog> aNewDlg(new ExportDialog(this));
if (aNewDlg->Execute() == RET_OK) if (aNewDlg->Execute() == RET_OK)
{ {
try try
@ -1504,7 +1504,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
i++; i++;
} }
VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library)); ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library));
aNewDlg->SetObjectName(aLibName); aNewDlg->SetObjectName(aLibName);
if (aNewDlg->Execute()) if (aNewDlg->Execute())

View File

@ -825,7 +825,7 @@ void ObjectPage::NewDialog()
{ {
aDocument.getOrCreateLibrary( E_DIALOGS, aLibName ); aDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true)); ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true));
aNewDlg->SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) ); aNewDlg->SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) );
if (aNewDlg->Execute() != 0) if (aNewDlg->Execute() != 0)
@ -983,7 +983,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
if ( aModName.isEmpty() ) if ( aModName.isEmpty() )
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true)); ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true));
aNewDlg->SetObjectName( aModName ); aNewDlg->SetObjectName( aModName );
if (aNewDlg->Execute() != 0) if (aNewDlg->Execute() != 0)

View File

@ -146,7 +146,7 @@ void ManageLanguageDialog::ClearLanguageBox()
IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl) IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
{ {
VclPtr<SetDefaultLanguageDialog> aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr )); ScopedVclPtr<SetDefaultLanguageDialog> aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr ));
if ( RET_OK == aDlg->Execute() ) if ( RET_OK == aDlg->Execute() )
{ {
// add new locales // add new locales
@ -164,7 +164,7 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl) IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl)
{ {
VclPtr<MessageDialog> aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui")); ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui"));
if ( aQBox->Execute() == RET_OK ) if ( aQBox->Execute() == RET_OK )
{ {
sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount(); sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount();

View File

@ -966,7 +966,7 @@ void SbiIoSystem::CloseAll(void)
void SbiIoSystem::ReadCon(OString& rIn) void SbiIoSystem::ReadCon(OString& rIn)
{ {
OUString aPromptStr(OStringToOUString(aPrompt, osl_getThreadTextEncoding())); OUString aPromptStr(OStringToOUString(aPrompt, osl_getThreadTextEncoding()));
VclPtr<SbiInputDialog> aDlg(new SbiInputDialog(NULL, aPromptStr) ); ScopedVclPtr<SbiInputDialog> aDlg(new SbiInputDialog(NULL, aPromptStr) );
if( aDlg->Execute() ) if( aDlg->Execute() )
{ {
rIn = OUStringToOString(aDlg->GetInput(), osl_getThreadTextEncoding()); rIn = OUStringToOString(aDlg->GetInput(), osl_getThreadTextEncoding());

View File

@ -205,7 +205,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton )
aNumberSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, rnFormatKey )); aNumberSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, rnFormatKey ));
aNumberSet.Put( SfxBoolItem( SID_ATTR_NUMBERFORMAT_SOURCE, rUseSourceFormat )); aNumberSet.Put( SfxBoolItem( SID_ATTR_NUMBERFORMAT_SOURCE, rUseSourceFormat ));
VclPtr<NumberFormatDialog> aDlg(new NumberFormatDialog(m_pWindow, aNumberSet)); ScopedVclPtr<NumberFormatDialog> aDlg(new NumberFormatDialog(m_pWindow, aNumberSet));
if( bPercent ) if( bPercent )
aDlg->SetText( m_pFT_NumberFormatForPercent->GetText()); aDlg->SetText( m_pFT_NumberFormatForPercent->GetText());
if( RET_OK == aDlg->Execute() ) if( RET_OK == aDlg->Execute() )

View File

@ -1271,7 +1271,7 @@ void ChartController::executeDispatch_ChartType()
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
//prepare and open dialog //prepare and open dialog
VclPtr<ChartTypeDialog> aDlg(new ChartTypeDialog( m_pChartWindow, getModel(), m_xCC )); ScopedVclPtr<ChartTypeDialog> aDlg(new ChartTypeDialog( m_pChartWindow, getModel(), m_xCC ));
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
impl_adaptDataSeriesAutoResize(); impl_adaptDataSeriesAutoResize();
@ -1292,7 +1292,7 @@ void ChartController::executeDispatch_SourceData()
if( xChartDoc.is()) if( xChartDoc.is())
{ {
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
VclPtr<::chart::DataSourceDialog> aDlg(new ::chart::DataSourceDialog( m_pChartWindow, xChartDoc, m_xCC )); ScopedVclPtr<::chart::DataSourceDialog> aDlg(new ::chart::DataSourceDialog( m_pChartWindow, xChartDoc, m_xCC ));
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
impl_adaptDataSeriesAutoResize(); impl_adaptDataSeriesAutoResize();

View File

@ -54,7 +54,7 @@ void ChartController::executeDispatch_EditData()
UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData( UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData(
SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ), SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ),
m_xUndoManager ); m_xUndoManager );
VclPtr<DataEditor> aDataEditorDialog(new DataEditor( nullptr, xChartDoc, m_xCC )); ScopedVclPtrInstance<DataEditor> aDataEditorDialog( nullptr, xChartDoc, m_xCC );
if (aDataEditorDialog->Execute() == RET_OK) if (aDataEditorDialog->Execute() == RET_OK)
aDataEditorDialog->ApplyChangesToModel(); aDataEditorDialog->ApplyChangesToModel();
aUndoGuard.commit(); aUndoGuard.commit();

View File

@ -109,7 +109,7 @@ void ChartController::executeDispatch_InsertAxes()
AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, true ); AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, true );
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchAxisDlg> aDlg(new SchAxisDlg( m_pChartWindow, aDialogInput )); ScopedVclPtr<SchAxisDlg> aDlg(new SchAxisDlg( m_pChartWindow, aDialogInput ));
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
// lock controllers till end of block // lock controllers till end of block
@ -147,7 +147,7 @@ void ChartController::executeDispatch_InsertGrid()
AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, false ); AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, false );
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchGridDlg> aDlg(new SchGridDlg( m_pChartWindow, aDialogInput ));//aItemSet, b3D, bNet, bSecondaryX, bSecondaryY ); ScopedVclPtr<SchGridDlg> aDlg(new SchGridDlg( m_pChartWindow, aDialogInput ));//aItemSet, b3D, bNet, bSecondaryX, bSecondaryY );
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
// lock controllers till end of block // lock controllers till end of block
@ -179,7 +179,7 @@ void ChartController::executeDispatch_InsertTitles()
aDialogInput.readFromModel( getModel() ); aDialogInput.readFromModel( getModel() );
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchTitleDlg> aDlg(new SchTitleDlg( m_pChartWindow, aDialogInput )); ScopedVclPtr<SchTitleDlg> aDlg(new SchTitleDlg( m_pChartWindow, aDialogInput ));
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
// lock controllers till end of block // lock controllers till end of block
@ -232,7 +232,7 @@ void ChartController::executeDispatch_OpenLegendDialog()
{ {
//prepare and open dialog //prepare and open dialog
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchLegendDlg> aDlg(new SchLegendDlg( m_pChartWindow, m_xCC )); ScopedVclPtr<SchLegendDlg> aDlg(new SchLegendDlg( m_pChartWindow, m_xCC ));
aDlg->init( getModel() ); aDlg->init( getModel() );
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
@ -292,7 +292,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier ); NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter(); SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
VclPtr<DataLabelsDialog> aDlg(new DataLabelsDialog( m_pChartWindow, aItemSet, pNumberFormatter)); ScopedVclPtr<DataLabelsDialog> aDlg(new DataLabelsDialog( m_pChartWindow, aItemSet, pNumberFormatter));
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
{ {
@ -397,7 +397,7 @@ void ChartController::executeDispatch_InsertTrendline()
aDialogParameter.init( getModel() ); aDialogParameter.init( getModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchAttribTabDlg> aDialog(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, ScopedVclPtr<SchAttribTabDlg> aDialog(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider,
uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ))); uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )));
// note: when a user pressed "OK" but didn't change any settings in the // note: when a user pressed "OK" but didn't change any settings in the
@ -452,7 +452,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
aDialogParameter.init( getModel() ); aDialogParameter.init( getModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchAttribTabDlg> aDlg(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, ScopedVclPtr<SchAttribTabDlg> aDlg(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider,
uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ))); uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )));
aDlg->SetAxisMinorStepWidthForErrorBarDecimals( aDlg->SetAxisMinorStepWidthForErrorBarDecimals(
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(),
@ -489,7 +489,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
//prepare and open dialog //prepare and open dialog
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<InsertErrorBarsDialog> aDlg(new InsertErrorBarsDialog( ScopedVclPtr<InsertErrorBarsDialog> aDlg(new InsertErrorBarsDialog(
m_pChartWindow, aItemSet, m_pChartWindow, aItemSet,
uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ), uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ),
bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X)); bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X));

View File

@ -761,7 +761,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() );
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
VclPtr<SchAttribTabDlg> aDlg(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider ScopedVclPtr<SchAttribTabDlg> aDlg(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider
, uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) )); , uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) ));
if(aDialogParameter.HasSymbolProperties()) if(aDialogParameter.HasSymbolProperties())
@ -822,7 +822,7 @@ void ChartController::executeDispatch_View3D()
//open dialog //open dialog
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
VclPtr<View3DDialog> aDlg(new View3DDialog( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorList() )); ScopedVclPtr<View3DDialog> aDlg(new View3DDialog( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorList() ));
if( aDlg->Execute() == RET_OK ) if( aDlg->Execute() == RET_OK )
aUndoGuard.commit(); aUndoGuard.commit();
} }

View File

@ -2393,7 +2393,7 @@ short SvxMenuConfigPage::QueryReset()
OUString label = replaceSaveInName( msg, saveInName ); OUString label = replaceSaveInName( msg, saveInName );
VclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label )); ScopedVclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label ));
return qbox->Execute(); return qbox->Execute();
} }
@ -3045,7 +3045,7 @@ bool SvxToolbarConfigPage::DeleteSelectedContent()
if ( m_pContentsListBox->GetEntryCount() == 0 && if ( m_pContentsListBox->GetEntryCount() == 0 &&
GetTopLevelSelection()->IsDeletable() ) GetTopLevelSelection()->IsDeletable() )
{ {
VclPtr<MessageDialog> qbox(new MessageDialog(this, ScopedVclPtr<MessageDialog> qbox(new MessageDialog(this,
CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( qbox->Execute() == RET_YES ) if ( qbox->Execute() == RET_YES )
@ -3125,7 +3125,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
} }
case ID_DEFAULT_STYLE: case ID_DEFAULT_STYLE:
{ {
VclPtr<MessageDialog> qbox(new MessageDialog(this, ScopedVclPtr<MessageDialog> qbox(new MessageDialog(this,
CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( qbox->Execute() == RET_YES ) if ( qbox->Execute() == RET_YES )
@ -4356,7 +4356,7 @@ short SvxToolbarConfigPage::QueryReset()
OUString label = replaceSaveInName( msg, saveInName ); OUString label = replaceSaveInName( msg, saveInName );
VclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label )); ScopedVclPtr<QueryBox> qbox(new QueryBox( this, WB_YES_NO, label ));
return qbox->Execute(); return qbox->Execute();
} }
@ -5298,7 +5298,7 @@ void SvxIconSelectorDialog::ImportGraphics(
message += newLine; message += newLine;
} }
VclPtr<SvxIconChangeDialog> aDialog(new SvxIconChangeDialog(this, message)); ScopedVclPtr<SvxIconChangeDialog> aDialog(new SvxIconChangeDialog(this, message));
aDialog->Execute(); aDialog->Execute();
} }
} }

View File

@ -2055,7 +2055,7 @@ IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink )
uno::Any exc( ::cppu::getCaughtException() ); uno::Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) ); OUString msg( ::comphelper::anyToString( exc ) );
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
aErrorBox->SetText(sTitle); aErrorBox->SetText(sTitle);
aErrorBox->Execute(); aErrorBox->Execute();
} }

View File

@ -143,7 +143,7 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton )
Any exc( ::cppu::getCaughtException() ); Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) ); OUString msg( ::comphelper::anyToString( exc ) );
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
aErrorBox->SetText( GetText() ); aErrorBox->SetText( GetText() );
aErrorBox->Execute(); aErrorBox->Execute();
} }

View File

@ -1541,7 +1541,7 @@ void SAL_CALL ColorPicker::setTitle( const OUString& sTitle ) throw (RuntimeExce
sal_Int16 SAL_CALL ColorPicker::execute( ) throw (RuntimeException, std::exception) sal_Int16 SAL_CALL ColorPicker::execute( ) throw (RuntimeException, std::exception)
{ {
VclPtr<ColorPickerDialog> aDlg(new ColorPickerDialog( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode )); ScopedVclPtr<ColorPickerDialog> aDlg(new ColorPickerDialog( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode ));
sal_Int16 ret = aDlg->Execute(); sal_Int16 ret = aDlg->Execute();
if( ret ) if( ret )
mnColor = aDlg->GetColor(); mnColor = aDlg->GetColor();

View File

@ -611,7 +611,7 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl)
aStr += pInfo->GetThemeName(); aStr += pInfo->GetThemeName();
aStr += ")"; aStr += ")";
VclPtr<InfoBox> aBox(new InfoBox( this, aStr )); ScopedVclPtr<InfoBox> aBox(new InfoBox( this, aStr ));
aBox->Execute(); aBox->Execute();
m_pLbResName->GrabFocus(); m_pLbResName->GrabFocus();
bDifferentThemeExists = true; bDifferentThemeExists = true;

View File

@ -761,7 +761,7 @@ namespace svx
IMPL_LINK_NOARG( HangulHanjaConversionDialog, OnOption ) IMPL_LINK_NOARG( HangulHanjaConversionDialog, OnOption )
{ {
VclPtr<HangulHanjaOptionsDialog> aOptDlg( new HangulHanjaOptionsDialog(this) ); ScopedVclPtr<HangulHanjaOptionsDialog> aOptDlg( new HangulHanjaOptionsDialog(this) );
aOptDlg->Execute(); aOptDlg->Execute();
m_aOptionsChangedLink.Call( this ); m_aOptionsChangedLink.Call( this );
return 0L; return 0L;
@ -1041,7 +1041,7 @@ namespace svx
IMPL_LINK_NOARG(HangulHanjaOptionsDialog, NewDictHdl) IMPL_LINK_NOARG(HangulHanjaOptionsDialog, NewDictHdl)
{ {
OUString aName; OUString aName;
VclPtr<HangulHanjaNewDictDialog> aNewDlg( new HangulHanjaNewDictDialog(this) ); ScopedVclPtr<HangulHanjaNewDictDialog> aNewDlg( new HangulHanjaNewDictDialog(this) );
aNewDlg->Execute(); aNewDlg->Execute();
if( aNewDlg->GetName( aName ) ) if( aNewDlg->GetName( aName ) )
{ {
@ -1077,7 +1077,7 @@ namespace svx
DBG_ASSERT( pEntry, "+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!" ); DBG_ASSERT( pEntry, "+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!" );
if( pEntry ) if( pEntry )
{ {
VclPtr<HangulHanjaEditDictDialog> aEdDlg( new HangulHanjaEditDictDialog(this, m_aDictList, m_pDictsLB->GetSelectEntryPos()) ); ScopedVclPtr<HangulHanjaEditDictDialog> aEdDlg( new HangulHanjaEditDictDialog(this, m_aDictList, m_pDictsLB->GetSelectEntryPos()) );
aEdDlg->Execute(); aEdDlg->Execute();
} }
return 0L; return 0L;

View File

@ -271,7 +271,7 @@ bool SvxHyperlinkNewDocTp::AskApply()
bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject ); bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject );
if ( !bRet ) if ( !bRet )
{ {
VclPtr<WarningBox> aWarning(new WarningBox( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ) ); ScopedVclPtr<WarningBox> aWarning(new WarningBox( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ) );
aWarning->Execute(); aWarning->Execute();
} }
return bRet; return bRet;
@ -321,7 +321,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
if( bOk ) if( bOk )
{ {
VclPtr<WarningBox> aWarning(new WarningBox( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) )); ScopedVclPtrInstance<WarningBox> aWarning( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) );
bCreate = aWarning->Execute() == RET_YES; bCreate = aWarning->Execute() == RET_YES;
} }
} }

View File

@ -333,7 +333,7 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl)
bool bIsInputEnabled = GetParent()->IsInputEnabled(); bool bIsInputEnabled = GetParent()->IsInputEnabled();
if ( bIsInputEnabled ) if ( bIsInputEnabled )
GetParent()->EnableInput( false ); GetParent()->EnableInput( false );
VclPtr<SfxMacroAssignDlg> aDlg(new SfxMacroAssignDlg( this, mxDocumentFrame, *pItemSet )); ScopedVclPtr<SfxMacroAssignDlg> aDlg(new SfxMacroAssignDlg( this, mxDocumentFrame, *pItemSet ));
// add events // add events
SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg->GetTabPage() ); SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg->GetTabPage() );

View File

@ -444,7 +444,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
if( !xLink.Is() ) if( !xLink.Is() )
return 0; return 0;
VclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() )); ScopedVclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() ));
if( RET_YES == aBox->Execute() ) if( RET_YES == aBox->Execute() )
{ {
@ -475,7 +475,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
} }
else else
{ {
VclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() )); ScopedVclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() ));
if( RET_YES == aBox->Execute() ) if( RET_YES == aBox->Execute() )
{ {

View File

@ -101,7 +101,7 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
m_pPasswdToModifyED->GetText().isEmpty(); m_pPasswdToModifyED->GetText().isEmpty();
if (bInvalidState) if (bInvalidState)
{ {
VclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent, ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent,
m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2)); m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2));
aErrorBox->Execute(); aErrorBox->Execute();
} }
@ -112,7 +112,7 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1); const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1);
if (nMismatch > 0) if (nMismatch > 0)
{ {
VclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch));
aErrorBox->Execute(); aErrorBox->Execute();
Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED; Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED;

View File

@ -922,7 +922,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
bValid = false; bValid = false;
OUString aError( m_createErrStr ); OUString aError( m_createErrStr );
aError += m_createDupStr; aError += m_createDupStr;
VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError));
aErrorBox->SetText( m_createErrTitleStr ); aErrorBox->SetText( m_createErrTitleStr );
aErrorBox->Execute(); aErrorBox->Execute();
xNewDlg->SetObjectName( aNewName ); xNewDlg->SetObjectName( aNewName );
@ -1004,7 +1004,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
{ {
//ISSUE L10N & message from exception? //ISSUE L10N & message from exception?
OUString aError( m_createErrStr ); OUString aError( m_createErrStr );
VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError));
aErrorBox->SetText( m_createErrTitleStr ); aErrorBox->SetText( m_createErrTitleStr );
aErrorBox->Execute(); aErrorBox->Execute();
} }
@ -1080,7 +1080,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
{ {
//ISSUE L10N & message from exception? //ISSUE L10N & message from exception?
OUString aError( m_renameErrStr ); OUString aError( m_renameErrStr );
VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), aError));
aErrorBox->SetText( m_renameErrTitleStr ); aErrorBox->SetText( m_renameErrTitleStr );
aErrorBox->Execute(); aErrorBox->Execute();
} }
@ -1126,7 +1126,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
else else
{ {
//ISSUE L10N & message from exception? //ISSUE L10N & message from exception?
VclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), m_delErrStr)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(static_cast<vcl::Window*>(this), m_delErrStr));
aErrorBox->SetText( m_delErrTitleStr ); aErrorBox->SetText( m_delErrTitleStr );
aErrorBox->Execute(); aErrorBox->Execute();
} }

View File

@ -278,7 +278,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl)
SvTreeListEntry* pEntry = pPathBox->FirstSelected(); SvTreeListEntry* pEntry = pPathBox->FirstSelected();
if ( pEntry ) if ( pEntry )
{ {
VclPtr<MessageDialog> aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( aQuery->Execute() == RET_YES ) if ( aQuery->Execute() == RET_YES )
pPathBox->GetModel()->Remove(pEntry); pPathBox->GetModel()->Remove(pEntry);
} }
@ -414,7 +414,7 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS
void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry) void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry)
{ {
VclPtr<ODocumentLinkDialog> aDlg(new ODocumentLinkDialog(this,_pEntry == NULL)); ScopedVclPtr<ODocumentLinkDialog> aDlg(new ODocumentLinkDialog(this,_pEntry == NULL));
aDlg->setLink(_sOldName,_sOldLocation); aDlg->setLink(_sOldName,_sOldLocation);
aDlg->setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); aDlg->setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) );

View File

@ -130,7 +130,7 @@ namespace svx
{ {
OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST); OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
aError->Execute(); aError->Execute();
return 0L; return 0L;
} // if (!bFileExists) } // if (!bFileExists)
@ -139,7 +139,7 @@ namespace svx
{ {
OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg));
aError->Execute(); aError->Execute();
return 0L; return 0L;
} }
@ -151,7 +151,7 @@ namespace svx
{ {
OUString sMsg = CUI_RES(STR_NAME_CONFLICT); OUString sMsg = CUI_RES(STR_NAME_CONFLICT);
sMsg = sMsg.replaceFirst("$file$", sCurrentText); sMsg = sMsg.replaceFirst("$file$", sCurrentText);
VclPtr<MessageDialog> aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO));
aError->Execute(); aError->Execute();
m_pName->SetSelection(Selection(0,sCurrentText.getLength())); m_pName->SetSelection(Selection(0,sCurrentText.getLength()));

View File

@ -231,7 +231,7 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
{ {
OSL_ENSURE(pColorConfig->GetColorList().size() > 1, "don't delete the last chart color"); OSL_ENSURE(pColorConfig->GetColorList().size() > 1, "don't delete the last chart color");
VclPtr<MessageDialog> aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog", ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog",
"cui/ui/querydeletechartcolordialog.ui")); "cui/ui/querydeletechartcolordialog.ui"));
if (RET_YES == aQuery->Execute()) if (RET_YES == aQuery->Execute())
{ {

View File

@ -553,8 +553,8 @@ void ColorConfigWindow_Impl::CreateEntries()
long nCheckBoxLabelOffset = 0; long nCheckBoxLabelOffset = 0;
{ {
OUString sSampleText("X"); OUString sSampleText("X");
VclPtr<CheckBox> aCheckBox(new CheckBox(this)); ScopedVclPtr<CheckBox> aCheckBox(new CheckBox(this));
VclPtr<FixedText> aFixedText(new FixedText(this)); ScopedVclPtr<FixedText> aFixedText(new FixedText(this));
aCheckBox->SetText(sSampleText); aCheckBox->SetText(sSampleText);
aFixedText->SetText(sSampleText); aFixedText->SetText(sSampleText);
Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff)); Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff));
@ -628,7 +628,7 @@ void ColorConfigWindow_Impl::SetAppearance ()
OSL_ENSURE( vEntries.size() >= sizeof vEntryInfo / sizeof vEntryInfo[0], "wrong number of helpIDs for color listboxes" ); 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 // creating a sample color listbox with the color entries
VclPtr<ColorListBox> aSampleColorList(new ColorListBox(this)); ScopedVclPtr<ColorListBox> aSampleColorList(new ColorListBox(this));
{ {
XColorListRef const xColorTable = XColorList::CreateStdColorList(); XColorListRef const xColorTable = XColorList::CreateStdColorList();
for (sal_Int32 i = 0; i != xColorTable->Count(); ++i) for (sal_Int32 i = 0; i != xColorTable->Count(); ++i)
@ -1205,7 +1205,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton )
else else
{ {
DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme"); DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme");
VclPtr<MessageDialog> aQuery(new MessageDialog(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<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)); aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE));
if(RET_YES == aQuery->Execute()) if(RET_YES == aQuery->Execute())
{ {

View File

@ -477,7 +477,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
if ( nLang != nOldLang ) if ( nLang != nOldLang )
{ {
VclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<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()); OUString sTxt(aBox->get_primary_text());
sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() ); sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() );
aBox->set_primary_text(sTxt); aBox->set_primary_text(sTxt);

View File

@ -1356,7 +1356,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
xProp->setPropertyValue(sUserLocaleKey, makeAny(aLangString)); xProp->setPropertyValue(sUserLocaleKey, makeAny(aLangString));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges(); Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
// display info // display info
VclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO));
aBox->Execute(); aBox->Execute();
// tell quickstarter to stop being a veto listener // tell quickstarter to stop being a veto listener

View File

@ -706,7 +706,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl)
} }
else else
{ {
VclPtr<QueryBox> aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr )); ScopedVclPtr<QueryBox> aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr ));
sal_uInt16 nRet = aQuery->Execute(); sal_uInt16 nRet = aQuery->Execute();
if( RET_YES == nRet ) if( RET_YES == nRet )
@ -803,7 +803,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl)
if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) ) if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) )
{ {
VclPtr<svx::WebConnectionInfoDialog> aDlg( new svx::WebConnectionInfoDialog(this) ); ScopedVclPtr<svx::WebConnectionInfoDialog> aDlg( new svx::WebConnectionInfoDialog(this) );
aDlg->Execute(); aDlg->Execute();
} }
} }
@ -822,7 +822,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl)
if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory()) if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory())
{ {
VclPtr<MessageDialog> aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO)); ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO));
aWarnBox->Execute(); aWarnBox->Execute();
} }

View File

@ -336,7 +336,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl)
(void)eErr; (void)eErr;
if ( bRunning ) if ( bRunning )
{ {
VclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO )); ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
aWarnBox->Execute(); aWarnBox->Execute();
} }
} }
@ -381,7 +381,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl)
(void)eErr; (void)eErr;
if ( bRunning ) if ( bRunning )
{ {
VclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO )); ScopedVclPtr<MessageDialog> aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ));
aWarnBox->Execute(); aWarnBox->Execute();
} }
} }
@ -437,7 +437,7 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl ) IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl )
{ {
VclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg = new CuiAboutConfigTabPage(this); ScopedVclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg = new CuiAboutConfigTabPage(this);
m_pExpertConfigDlg->Reset();//initialize and reset function m_pExpertConfigDlg->Reset();//initialize and reset function
if( RET_OK == m_pExpertConfigDlg->Execute() ) if( RET_OK == m_pExpertConfigDlg->Execute() )
@ -630,12 +630,12 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )
} }
else if ( JFW_E_NOT_RECOGNIZED == eErr ) else if ( JFW_E_NOT_RECOGNIZED == eErr )
{ {
VclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) )); ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ));
aErrBox->Execute(); aErrBox->Execute();
} }
else if ( JFW_E_FAILED_VERSION == eErr ) else if ( JFW_E_FAILED_VERSION == eErr )
{ {
VclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) )); ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ));
aErrBox->Execute(); aErrBox->Execute();
} }

View File

@ -1596,7 +1596,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
pLinguData = new SvxLinguData_Impl; pLinguData = new SvxLinguData_Impl;
SvxLinguData_Impl aOldLinguData( *pLinguData ); SvxLinguData_Impl aOldLinguData( *pLinguData );
VclPtr<SvxEditModulesDlg> aDlg(new SvxEditModulesDlg( this, *pLinguData )); ScopedVclPtr<SvxEditModulesDlg> aDlg(new SvxEditModulesDlg( this, *pLinguData ));
if (aDlg->Execute() != RET_OK) if (aDlg->Execute() != RET_OK)
*pLinguData = aOldLinguData; *pLinguData = aOldLinguData;
@ -1673,7 +1673,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
} }
else if (m_pLinguDicsDelPB == pBtn) else if (m_pLinguDicsDelPB == pBtn)
{ {
VclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog", ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog",
"cui/ui/querydeletedictionarydialog.ui")); "cui/ui/querydeletedictionarydialog.ui"));
if (RET_NO == aQuery->Execute()) if (RET_NO == aQuery->Execute())
return 0; return 0;
@ -1745,7 +1745,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
if(aData.HasNumericValue()) if(aData.HasNumericValue())
{ {
sal_uInt16 nRID = aData.GetEntryId(); sal_uInt16 nRID = aData.GetEntryId();
VclPtr<OptionsBreakSet> aDlg( new OptionsBreakSet(this, nRID) ); ScopedVclPtr<OptionsBreakSet> aDlg( new OptionsBreakSet(this, nRID) );
aDlg->GetNumericFld().SetValue( aData.GetNumericValue() ); aDlg->GetNumericFld().SetValue( aData.GetNumericValue() );
if (RET_OK == aDlg->Execute() ) if (RET_OK == aDlg->Execute() )
{ {

View File

@ -312,7 +312,7 @@ IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit)
void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag) void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
{ {
VclPtr<ListEntryDialog> aDlg(new ListEntryDialog(pTabPage, rEntry, rTag)); ScopedVclPtr<ListEntryDialog> aDlg(new ListEntryDialog(pTabPage, rEntry, rTag));
if (aDlg->Execute() == RET_OK) if (aDlg->Execute() == RET_OK)
rEntry = aDlg->maEntry; rEntry = aDlg->maEntry;

View File

@ -476,7 +476,7 @@ void SvxPersonalizationTabPage::LoadExtensionThemes()
IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ ) IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ )
{ {
VclPtr<SelectPersonaDialog> aDialog( new SelectPersonaDialog(NULL) ); ScopedVclPtr<SelectPersonaDialog> aDialog( new SelectPersonaDialog(NULL) );
if ( aDialog->Execute() == RET_OK ) if ( aDialog->Execute() == RET_OK )
{ {

View File

@ -731,7 +731,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl)
if( nSelEntryPos == REPLACE_BULLETS || if( nSelEntryPos == REPLACE_BULLETS ||
nSelEntryPos == APPLY_NUMBERING) nSelEntryPos == APPLY_NUMBERING)
{ {
VclPtr<SvxCharacterMap> pMapDlg(new SvxCharacterMap(this)); ScopedVclPtr<SvxCharacterMap> pMapDlg(new SvxCharacterMap(this));
ImpUserData* pUserData = (ImpUserData*)m_pCheckLB->FirstSelected()->GetUserData(); ImpUserData* pUserData = (ImpUserData*)m_pCheckLB->FirstSelected()->GetUserData();
pMapDlg->SetCharFont(*pUserData->pFont); pMapDlg->SetCharFont(*pUserData->pFont);
pMapDlg->SetChar( (*pUserData->pString)[0] ); pMapDlg->SetChar( (*pUserData->pString)[0] );
@ -748,7 +748,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl)
else if( MERGE_SINGLE_LINE_PARA == nSelEntryPos ) else if( MERGE_SINGLE_LINE_PARA == nSelEntryPos )
{ {
// dialog for per cent settings // dialog for per cent settings
VclPtr<OfaAutoFmtPrcntSet> aDlg(new OfaAutoFmtPrcntSet(this)); ScopedVclPtr<OfaAutoFmtPrcntSet> aDlg(new OfaAutoFmtPrcntSet(this));
aDlg->GetPrcntFld().SetValue(nPercent); aDlg->GetPrcntFld().SetValue(nPercent);
if(RET_OK == aDlg->Execute()) if(RET_OK == aDlg->Execute())
{ {
@ -2061,7 +2061,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn )
else if (pBtn == m_pDblEndQuotePB) else if (pBtn == m_pDblEndQuotePB)
nMode = DBL_END; nMode = DBL_END;
// start character selection dialog // start character selection dialog
VclPtr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true )); ScopedVclPtr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
pMap->SetCharFont( OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, pMap->SetCharFont( OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT,
LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 )); LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 ));
pMap->SetText(nMode < SGL_END ? m_sStartQuoteDlg : m_sEndQuoteDlg ); pMap->SetText(nMode < SGL_END ? m_sStartQuoteDlg : m_sEndQuoteDlg );

View File

@ -699,7 +699,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
// display original size // display original size
const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() ); const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() );
VclPtr<MetricField> aFld(new MetricField(this, WB_HIDE)); ScopedVclPtr<MetricField> aFld(new MetricField(this, WB_HIDE));
SetFieldUnit( *aFld.get(), eMetric ); SetFieldUnit( *aFld.get(), eMetric );
aFld->SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); aFld->SetDecimalDigits( m_pWidthMF->GetDecimalDigits() );
aFld->SetMax( LONG_MAX - 1 ); aFld->SetMax( LONG_MAX - 1 );

View File

@ -446,7 +446,7 @@ long SvxBitmapTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(), ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
SVX_RES( RID_SVXSTR_BITMAP ), SVX_RES( RID_SVXSTR_BITMAP ),
CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ), CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ),
&aWarningBoxImage )); &aWarningBoxImage ));
@ -510,7 +510,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
DBG_ASSERT(pFact, "Dialog creation failed!"); DBG_ASSERT(pFact, "Dialog creation failed!");
boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
DBG_ASSERT(pDlg, "Dialog creation failed!"); DBG_ASSERT(pDlg, "Dialog creation failed!");
VclPtr<MessageDialog> pWarnBox; ScopedVclPtr<MessageDialog> pWarnBox;
sal_uInt16 nError(1); sal_uInt16 nError(1);
while( pDlg->Execute() == RET_OK ) while( pDlg->Execute() == RET_OK )
@ -610,7 +610,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
if( !nError ) if( !nError )
{ {
OUString aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) ); OUString aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) );
VclPtr<MessageDialog> pWarnBox; ScopedVclPtr<MessageDialog> pWarnBox;
// convert file URL to UI name // convert file URL to UI name
OUString aName; OUString aName;
@ -728,7 +728,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
} }
else else
{ {
VclPtr<MessageDialog> aBox( new MessageDialog(GetParentDialog() ScopedVclPtr<MessageDialog> aBox( new MessageDialog(GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aBox->Execute(); aBox->Execute();
@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND ) if( nPos != LISTBOX_ENTRY_NOTFOUND )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui" )); ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui" ));
if( aQueryBox->Execute() == RET_YES ) if( aQueryBox->Execute() == RET_YES )
{ {

View File

@ -539,7 +539,7 @@ long SvxColorTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(), ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_COLOR ), SVX_RESSTR( RID_SVXSTR_COLOR ),
ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ), ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
&aWarningBoxImage )); &aWarningBoxImage ));
@ -705,7 +705,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl)
// if yes, it is repeated and a new name is demanded // if yes, it is repeated and a new name is demanded
if ( !bDifferent ) if ( !bDifferent )
{ {
VclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aWarningBox->Execute(); aWarningBox->Execute();
@ -776,7 +776,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl)
// if yes, it is repeated and a new name is demanded // if yes, it is repeated and a new name is demanded
if ( !bDifferent ) if ( !bDifferent )
{ {
VclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aWarningBox->Execute(); aWarningBox->Execute();
@ -872,7 +872,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND ) if( nPos != LISTBOX_ENTRY_NOTFOUND )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui")); ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui"));
if( aQueryBox->Execute() == RET_YES ) if( aQueryBox->Execute() == RET_YES )
{ {

View File

@ -291,7 +291,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(), ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_GRADIENT ), SVX_RESSTR( RID_SVXSTR_GRADIENT ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
&aWarningBoxImage )); &aWarningBoxImage ));
@ -457,7 +457,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
DBG_ASSERT(pFact, "Dialog creation failed!"); DBG_ASSERT(pFact, "Dialog creation failed!");
boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
DBG_ASSERT(pDlg, "Dialog creation failed!"); DBG_ASSERT(pDlg, "Dialog creation failed!");
VclPtr<MessageDialog> pWarnBox; ScopedVclPtr<MessageDialog> pWarnBox;
sal_uInt16 nError = 1; sal_uInt16 nError = 1;
while( pDlg->Execute() == RET_OK ) while( pDlg->Execute() == RET_OK )
@ -589,7 +589,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
} }
else else
{ {
VclPtr<MessageDialog> aBox( new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aBox( new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui") ); ,"cui/ui/queryduplicatedialog.ui") );
aBox->Execute(); aBox->Execute();
@ -608,7 +608,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND ) if( nPos != LISTBOX_ENTRY_NOTFOUND )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui")); ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui"));
if ( aQueryBox->Execute() == RET_YES ) if ( aQueryBox->Execute() == RET_YES )
{ {

View File

@ -261,7 +261,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(), ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_HATCH ), SVX_RESSTR( RID_SVXSTR_HATCH ),
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ), CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_HATCH ),
&aWarningBoxImage )); &aWarningBoxImage ));
@ -500,7 +500,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl)
DBG_ASSERT(pFact, "Dialog creation failed!"); DBG_ASSERT(pFact, "Dialog creation failed!");
boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
DBG_ASSERT(pDlg, "Dialog creation failed!"); DBG_ASSERT(pDlg, "Dialog creation failed!");
VclPtr<MessageDialog> pWarnBox; ScopedVclPtr<MessageDialog> pWarnBox;
sal_uInt16 nError = 1; sal_uInt16 nError = 1;
while( pDlg->Execute() == RET_OK ) while( pDlg->Execute() == RET_OK )
@ -627,7 +627,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
} }
else else
{ {
VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aBox->Execute(); aBox->Execute();
@ -645,7 +645,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND ) if( nPos != LISTBOX_ENTRY_NOTFOUND )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui")); ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui"));
if( aQueryBox->Execute() == RET_YES ) if( aQueryBox->Execute() == RET_YES )
{ {

View File

@ -246,7 +246,7 @@ void SvxLineDefTabPage::CheckChanges_Impl()
{ {
ResMgr& rMgr = CUI_MGR(); ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage(); Image aWarningBoxImage = WarningBox::GetStandardImage();
VclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(), ScopedVclPtr<SvxMessDialog> aMessDlg(new SvxMessDialog(GetParentDialog(),
SVX_RESSTR( RID_SVXSTR_LINESTYLE ), SVX_RESSTR( RID_SVXSTR_LINESTYLE ),
OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ), OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ),
&aWarningBoxImage )); &aWarningBoxImage ));
@ -619,7 +619,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl)
else else
{ {
VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aBox->Execute(); aBox->Execute();
@ -697,7 +697,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl)
} }
else else
{ {
VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui") ); ,"cui/ui/queryduplicatedialog.ui") );
aBox->Execute(); aBox->Execute();
@ -715,7 +715,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl)
if ( nPos != LISTBOX_ENTRY_NOTFOUND ) if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog()
,"AskDelLineStyleDialog" ,"AskDelLineStyleDialog"
,"cui/ui/querydeletelinestyledialog.ui")); ,"cui/ui/querydeletelinestyledialog.ui"));

View File

@ -206,7 +206,7 @@ void SvxLineEndDefTabPage::CheckChanges_Impl()
if( aString != m_pLbLineEnds->GetSelectEntry() ) if( aString != m_pLbLineEnds->GetSelectEntry() )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog()
,"AskChangeLineEndDialog" ,"AskChangeLineEndDialog"
,"cui/ui/querychangelineenddialog.ui")); ,"cui/ui/querychangelineenddialog.ui"));
@ -343,7 +343,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl)
// if yes, repeat and demand a new name // if yes, repeat and demand a new name
if ( !bDifferent ) if ( !bDifferent )
{ {
VclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aWarningBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aWarningBox->Execute(); aWarningBox->Execute();
@ -497,7 +497,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl)
} }
else else
{ {
VclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aBox(new MessageDialog( GetParentDialog()
,"DuplicateNameDialog" ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui")); ,"cui/ui/queryduplicatedialog.ui"));
aBox->Execute(); aBox->Execute();
@ -525,7 +525,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl)
if( nPos != LISTBOX_ENTRY_NOTFOUND ) if( nPos != LISTBOX_ENTRY_NOTFOUND )
{ {
VclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog() ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog( GetParentDialog()
,"AskDelLineEndDialog" ,"AskDelLineEndDialog"
,"cui/ui/querydeletelineenddialog.ui")); ,"cui/ui/querydeletelineenddialog.ui"));

View File

@ -406,7 +406,7 @@ namespace dbmm
// check that the backup location isn't the same as the document itself // check that the backup location isn't the same as the document itself
if ( lcl_equalURLs_nothrow( m_pData->aContext, sBackupLocation, m_pData->xDocumentModel->getURL() ) ) if ( lcl_equalURLs_nothrow( m_pData->aContext, sBackupLocation, m_pData->xDocumentModel->getURL() ) )
{ {
VclPtr<MessageDialog> aErrorBox(new MessageDialog( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( STR_INVALID_BACKUP_LOCATION ) )); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( STR_INVALID_BACKUP_LOCATION ) ));
aErrorBox->Execute(); aErrorBox->Execute();
rBackupPage.grabLocationFocus(); rBackupPage.grabLocationFocus();
return false; return false;

View File

@ -175,7 +175,7 @@ void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList
else else
{ {
OUString sMessage(ModuleRes(STR_MISSING_TABLES_XDROP)); OUString sMessage(ModuleRes(STR_MISSING_TABLES_XDROP));
VclPtr<MessageDialog> aError(new MessageDialog(getView(), sMessage)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(getView(), sMessage));
aError->Execute(); aError->Execute();
} }
} }
@ -210,7 +210,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
if ( eResult != svtools::QUERYDELETE_ALL ) if ( eResult != svtools::QUERYDELETE_ALL )
{ {
VclPtr<svtools::QueryDeleteDlg_Impl> aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) ); ScopedVclPtr<svtools::QueryDeleteDlg_Impl> aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) );
if ( !sDialogPosition.isEmpty() ) if ( !sDialogPosition.isEmpty() )
aDlg->SetWindowState( sDialogPosition ); aDlg->SetWindowState( sDialogPosition );
@ -686,7 +686,7 @@ bool OApplicationController::paste( ElementType _eType, const ::svx::ODataAccess
has a /table/ with that name) */ has a /table/ with that name) */
if ( bNeedAskForName ) if ( bNeedAskForName )
{ {
VclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( getView(), ScopedVclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( getView(),
CommandType::QUERY, CommandType::QUERY,
getORB(), getORB(),
getConnection(), getConnection(),

View File

@ -111,7 +111,7 @@ void OApplicationController::convertToView(const OUString& _sName)
OUString aDefaultName = ::dbaui::createDefaultName(xMeta,xTables,aName); OUString aDefaultName = ::dbaui::createDefaultName(xMeta,xTables,aName);
DynamicTableOrQueryNameCheck aNameChecker( xConnection, CommandType::TABLE ); DynamicTableOrQueryNameCheck aNameChecker( xConnection, CommandType::TABLE );
VclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) ); ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) );
if ( aDlg->Execute() == RET_OK ) if ( aDlg->Execute() == RET_OK )
{ {
OUString sName = aDlg->getName(); OUString sName = aDlg->getName();
@ -534,7 +534,7 @@ void OApplicationController::askToReconnect()
bool bClear = true; bool bClear = true;
if ( !m_pSubComponentManager->empty() ) if ( !m_pSubComponentManager->empty() )
{ {
VclPtr<MessageDialog> aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
switch (aQry->Execute()) switch (aQry->Execute())
{ {
case RET_YES: case RET_YES:

View File

@ -1271,7 +1271,7 @@ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotIntere
{ {
if ( m_aCurrentError.isValid() ) if ( m_aCurrentError.isValid() )
{ {
VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( getBrowserView(), m_aCurrentError )); ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( getBrowserView(), m_aCurrentError ));
aDlg->Execute(); aDlg->Execute();
} }
return 0L; return 0L;
@ -1764,14 +1764,14 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter)
Reference< XConnection> xCon(xFormSet->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY); Reference< XConnection> xCon(xFormSet->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
if(bFilter) if(bFilter)
{ {
VclPtr<DlgFilterCrit> aDlg(new DlgFilterCrit( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ) ); ScopedVclPtr<DlgFilterCrit> aDlg(new DlgFilterCrit( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ) );
if ( !aDlg->Execute() ) if ( !aDlg->Execute() )
return; // if so we don't need to update the grid return; // if so we don't need to update the grid
aDlg->BuildWherePart(); aDlg->BuildWherePart();
} }
else else
{ {
VclPtr<DlgOrderCrit> aDlg(new DlgOrderCrit( getBrowserView(),xCon,xParser,xSup->getColumns() ) ); ScopedVclPtr<DlgOrderCrit> aDlg(new DlgOrderCrit( getBrowserView(),xCon,xParser,xSup->getColumns() ) );
if(!aDlg->Execute()) if(!aDlg->Execute())
{ {
return; // if so we don't need to actualize the grid return; // if so we don't need to actualize the grid
@ -2172,7 +2172,7 @@ bool SbaXDataBrowserController::SaveModified(bool bAskFor)
{ {
getBrowserView()->getVclControl()->GrabFocus(); getBrowserView()->getVclControl()->GrabFocus();
VclPtr<MessageDialog> aQry(new MessageDialog(getBrowserView()->getVclControl(), ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getBrowserView()->getVclControl(),
"SaveModifiedDialog", "SaveModifiedDialog",
"dbaccess/ui/savemodifieddialog.ui")); "dbaccess/ui/savemodifieddialog.ui"));

View File

@ -792,7 +792,7 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId)
Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH); Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH);
sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1; sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1;
VclPtr<DlgSize> aDlgColWidth(new DlgSize(this, nCurWidth, false)); ScopedVclPtr<DlgSize> aDlgColWidth(new DlgSize(this, nCurWidth, false));
if (aDlgColWidth->Execute()) if (aDlgColWidth->Execute())
{ {
sal_Int32 nValue = aDlgColWidth->GetValue(); sal_Int32 nValue = aDlgColWidth->GetValue();
@ -821,7 +821,7 @@ void SbaGridControl::SetRowHeight()
Any aHeight = xCols->getPropertyValue(PROPERTY_ROW_HEIGHT); Any aHeight = xCols->getPropertyValue(PROPERTY_ROW_HEIGHT);
sal_Int32 nCurHeight = aHeight.hasValue() ? ::comphelper::getINT32(aHeight) : -1; sal_Int32 nCurHeight = aHeight.hasValue() ? ::comphelper::getINT32(aHeight) : -1;
VclPtr<DlgSize> aDlgRowHeight(new DlgSize(this, nCurHeight, true)); ScopedVclPtr<DlgSize> aDlgRowHeight(new DlgSize(this, nCurHeight, true));
if (aDlgRowHeight->Execute()) if (aDlgRowHeight->Execute())
{ {
sal_Int32 nValue = aDlgRowHeight->GetValue(); sal_Int32 nValue = aDlgRowHeight->GetValue();

View File

@ -180,7 +180,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click)
Reference< XContent> xContent; Reference< XContent> xContent;
if ( xNameContainer->hasByName(sName) ) if ( xNameContainer->hasByName(sName) )
{ {
VclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ) ); ScopedVclPtr<QueryBox> aBox(new QueryBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ) );
if ( aBox->Execute() != RET_YES ) if ( aBox->Execute() != RET_YES )
return 0; return 0;
} }

View File

@ -309,7 +309,7 @@ namespace dbaui
aProfiles.insert(pArray[index]); aProfiles.insert(pArray[index]);
// execute the select dialog // execute the select dialog
VclPtr<ODatasourceSelectDialog> aSelector(new ODatasourceSelectDialog(GetParent(), aProfiles)); ScopedVclPtr<ODatasourceSelectDialog> aSelector(new ODatasourceSelectDialog(GetParent(), aProfiles));
OUString sOldProfile=getURLNoPrefix(); OUString sOldProfile=getURLNoPrefix();
if (!sOldProfile.isEmpty()) if (!sOldProfile.isEmpty())
@ -479,7 +479,7 @@ namespace dbaui
sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM)); sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM));
m_bUserGrabFocus = false; m_bUserGrabFocus = false;
VclPtr<QueryBox> aQuery(new QueryBox(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery)); ScopedVclPtr<QueryBox> aQuery(new QueryBox(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery));
sal_Int32 nQueryResult = aQuery->Execute(); sal_Int32 nQueryResult = aQuery->Execute();
m_bUserGrabFocus = true; m_bUserGrabFocus = true;
@ -496,7 +496,7 @@ namespace dbaui
sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM)); sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM));
m_bUserGrabFocus = false; m_bUserGrabFocus = false;
VclPtr<QueryBox> aWhatToDo(new QueryBox(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery)); ScopedVclPtr<QueryBox> aWhatToDo(new QueryBox(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery));
nQueryResult = aWhatToDo->Execute(); nQueryResult = aWhatToDo->Execute();
m_bUserGrabFocus = true; m_bUserGrabFocus = true;

View File

@ -308,7 +308,7 @@ namespace dbaui
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
VclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) ); ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) );
aMsg->Execute(); aMsg->Execute();
return 0L; return 0L;
} }

View File

@ -563,7 +563,7 @@ using namespace ::com::sun::star;
#endif #endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
VclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) ); ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) );
aMsg->Execute(); aMsg->Execute();
return 0L; return 0L;
} }
@ -685,7 +685,7 @@ using namespace ::com::sun::star;
} }
#endif #endif
sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
VclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString() ) ); ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString() ) );
aMsg->Execute(); aMsg->Execute();
return 0L; return 0L;
} }

View File

@ -102,7 +102,7 @@ IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl)
else else
{ {
OUString aErrorMsg( ModuleRes( STR_ERROR_PASSWORDS_NOT_IDENTICAL)); OUString aErrorMsg( ModuleRes( STR_ERROR_PASSWORDS_NOT_IDENTICAL));
VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aErrorMsg)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aErrorMsg));
aErrorBox->Execute(); aErrorBox->Execute();
m_pEDPassword->SetText( OUString() ); m_pEDPassword->SetText( OUString() );
m_pEDPasswordRepeat->SetText( OUString() ); m_pEDPasswordRepeat->SetText( OUString() );
@ -213,7 +213,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
{ {
if(pButton == m_pNEWUSER) if(pButton == m_pNEWUSER)
{ {
VclPtr<SfxPasswordDialog> aPwdDlg(new SfxPasswordDialog(this)); ScopedVclPtr<SfxPasswordDialog> aPwdDlg(new SfxPasswordDialog(this));
aPwdDlg->ShowExtras(SHOWEXTRAS_ALL); aPwdDlg->ShowExtras(SHOWEXTRAS_ALL);
if(aPwdDlg->Execute()) if(aPwdDlg->Execute())
{ {
@ -240,7 +240,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
if(xUser.is()) if(xUser.is())
{ {
OUString sNewPassword,sOldPassword; OUString sNewPassword,sOldPassword;
VclPtr<OPasswordDialog> aDlg(new OPasswordDialog(this,sName)); ScopedVclPtr<OPasswordDialog> aDlg(new OPasswordDialog(this,sName));
if(aDlg->Execute() == RET_OK) if(aDlg->Execute() == RET_OK)
{ {
sNewPassword = aDlg->GetNewPassword(); sNewPassword = aDlg->GetNewPassword();
@ -259,7 +259,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
Reference<XDrop> xDrop(m_xUsers,UNO_QUERY); Reference<XDrop> xDrop(m_xUsers,UNO_QUERY);
if(xDrop.is()) if(xDrop.is())
{ {
VclPtr<MessageDialog> aQry(new MessageDialog(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aQry(new MessageDialog(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if(aQry->Execute() == RET_YES) if(aQry->Execute() == RET_YES)
xDrop->dropByName(GetUser()); xDrop->dropByName(GetUser());
} }

View File

@ -117,7 +117,7 @@ namespace dbaui
// show an error message // show an error message
OUString sError( ModuleRes( STR_COULD_NOT_LOAD_ODBC_LIB ) ); OUString sError( ModuleRes( STR_COULD_NOT_LOAD_ODBC_LIB ) );
sError = sError.replaceFirst("#lib#", aEnumeration.getLibraryName()); sError = sError.replaceFirst("#lib#", aEnumeration.getLibraryName());
VclPtr<MessageDialog> aDialog(new MessageDialog(this, sError)); ScopedVclPtr<MessageDialog> aDialog(new MessageDialog(this, sError));
aDialog->Execute(); aDialog->Execute();
return false; return false;
} }
@ -125,7 +125,7 @@ namespace dbaui
{ {
aEnumeration.getDatasourceNames(aOdbcDatasources); aEnumeration.getDatasourceNames(aOdbcDatasources);
// execute the select dialog // execute the select dialog
VclPtr<ODatasourceSelectDialog> aSelector(new ODatasourceSelectDialog(GetParent(), aOdbcDatasources)); ScopedVclPtr<ODatasourceSelectDialog> aSelector(new ODatasourceSelectDialog(GetParent(), aOdbcDatasources));
if (!_sCurr.isEmpty()) if (!_sCurr.isEmpty())
aSelector->Select(_sCurr); aSelector->Select(_sCurr);
if ( RET_OK == aSelector->Execute() ) if ( RET_OK == aSelector->Execute() )
@ -242,7 +242,7 @@ namespace dbaui
eImage = OSQLMessageBox::Error; eImage = OSQLMessageBox::Error;
aMessage = ModuleRes(STR_CONNECTION_NO_SUCCESS); aMessage = ModuleRes(STR_CONNECTION_NO_SUCCESS);
} }
VclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, sTitle, aMessage, WB_OK, eImage ) ); ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, sTitle, aMessage, WB_OK, eImage ) );
aMsg->Execute(); aMsg->Execute();
} }
if ( !bSuccess ) if ( !bSuccess )

View File

@ -248,7 +248,7 @@ namespace dbaui
{ {
if (m_pIndexes == pButton) if (m_pIndexes == pButton)
{ {
VclPtr<ODbaseIndexDialog> aIndexDialog(new ODbaseIndexDialog(this, m_sDsn)); ScopedVclPtr<ODbaseIndexDialog> aIndexDialog(new ODbaseIndexDialog(this, m_sDsn));
aIndexDialog->Execute(); aIndexDialog->Execute();
} }
else else
@ -541,7 +541,7 @@ namespace dbaui
#endif #endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
VclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) ); ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) );
aMsg->Execute(); aMsg->Execute();
return 0L; return 0L;
} }

View File

@ -106,7 +106,7 @@ namespace dbaui
{ {
OUString sMessage(ModuleRes(STR_DIRECTSQL_CONNECTIONLOST)); OUString sMessage(ModuleRes(STR_DIRECTSQL_CONNECTIONLOST));
VclPtr<MessageDialog> aError(new MessageDialog(this, sMessage)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMessage));
aError->Execute(); aError->Execute();
} }

View File

@ -738,7 +738,7 @@ namespace dbaui
if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) ) if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) )
{ {
OUString sMessage(ModuleRes(STR_ERR_USE_CONNECT_TO)); OUString sMessage(ModuleRes(STR_ERR_USE_CONNECT_TO));
VclPtr<InfoBox> aError(new InfoBox(this, sMessage)); ScopedVclPtr<InfoBox> aError(new InfoBox(this, sMessage));
aError->Execute(); aError->Execute();
m_pRB_ConnectDatabase->Check(); m_pRB_ConnectDatabase->Check();
OnSetupModeSelected( m_pRB_ConnectDatabase ); OnSetupModeSelected( m_pRB_ConnectDatabase );

View File

@ -422,7 +422,7 @@ namespace dbaui
{ {
OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX)); OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX));
sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected)); sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected));
VclPtr<MessageDialog> aConfirm(new MessageDialog(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aConfirm(new MessageDialog(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if (RET_YES != aConfirm->Execute()) if (RET_YES != aConfirm->Execute())
return; return;
} }
@ -586,7 +586,7 @@ namespace dbaui
if (aSelected->isModified() || aSelected->isNew()) if (aSelected->isModified() || aSelected->isNew())
{ {
VclPtr<MessageDialog> aQuestion(new MessageDialog(this, "SaveIndexDialog", ScopedVclPtr<MessageDialog> aQuestion(new MessageDialog(this, "SaveIndexDialog",
"dbaccess/ui/saveindexdialog.ui")); "dbaccess/ui/saveindexdialog.ui"));
nResponse = aQuestion->Execute(); nResponse = aQuestion->Execute();
} }
@ -630,7 +630,7 @@ namespace dbaui
{ {
OUString sError(ModuleRes(STR_INDEX_NAME_ALREADY_USED)); OUString sError(ModuleRes(STR_INDEX_NAME_ALREADY_USED));
sError = sError.replaceFirst("$name$", sNewName); sError = sError.replaceFirst("$name$", sNewName);
VclPtr<MessageDialog> aError(new MessageDialog(this, sError)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sError));
aError->Execute(); aError->Execute();
updateToolbox(); updateToolbox();
@ -691,7 +691,7 @@ namespace dbaui
// need at least one field // need at least one field
if (0 == _rPos->aFields.size()) if (0 == _rPos->aFields.size())
{ {
VclPtr<MessageDialog> aError(new MessageDialog(this, ModuleRes(STR_NEED_INDEX_FIELDS))); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, ModuleRes(STR_NEED_INDEX_FIELDS)));
aError->Execute(); aError->Execute();
m_pFields->GrabFocus(); m_pFields->GrabFocus();
return false; return false;
@ -709,7 +709,7 @@ namespace dbaui
// a column is specified twice ... won't work anyway, so prevent this here and now // a column is specified twice ... won't work anyway, so prevent this here and now
OUString sMessage(ModuleRes(STR_INDEXDESIGN_DOUBLE_COLUMN_NAME)); OUString sMessage(ModuleRes(STR_INDEXDESIGN_DOUBLE_COLUMN_NAME));
sMessage = sMessage.replaceFirst("$name$", aFieldCheck->sFieldName); sMessage = sMessage.replaceFirst("$name$", aFieldCheck->sFieldName);
VclPtr<MessageDialog> aError(new MessageDialog(this, sMessage)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, sMessage));
aError->Execute(); aError->Execute();
m_pFields->GrabFocus(); m_pFields->GrabFocus();
return false; return false;

View File

@ -712,7 +712,7 @@ void OSQLMessageBox::dispose()
IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ ) IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ )
{ {
VclPtr<OExceptionChainDialog> aDlg(new OExceptionChainDialog( this, m_pImpl->aDisplayInfo ) ); ScopedVclPtr<OExceptionChainDialog> aDlg(new OExceptionChainDialog( this, m_pImpl->aDisplayInfo ) );
aDlg->Execute(); aDlg->Execute();
return 0; return 0;
} }

View File

@ -327,7 +327,7 @@ namespace dbaui
if (aErrorInfo.isValid()) if (aErrorInfo.isValid())
{ {
// establishing the connection failed. Show an error window and exit. // establishing the connection failed. Show an error window and exit.
VclPtr<OSQLMessageBox> aMessageBox(new OSQLMessageBox( GetParentDialog(), aErrorInfo )); ScopedVclPtr<OSQLMessageBox> aMessageBox(new OSQLMessageBox( GetParentDialog(), aErrorInfo ));
aMessageBox->Execute(); aMessageBox->Execute();
m_pTables->Enable(false); m_pTables->Enable(false);
m_pTablesList->Clear(); m_pTablesList->Clear();

View File

@ -687,7 +687,7 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe
{ {
bool bHaveDefaultTable = !m_sDefaultTableName.isEmpty(); bool bHaveDefaultTable = !m_sDefaultTableName.isEmpty();
OUString sTableName( bHaveDefaultTable ? m_sDefaultTableName : _rTableName ); OUString sTableName( bHaveDefaultTable ? m_sDefaultTableName : _rTableName );
VclPtr<OCopyTableWizard> aWizard(new OCopyTableWizard( ScopedVclPtr<OCopyTableWizard> aWizard(new OCopyTableWizard(
NULL, NULL,
sTableName, sTableName,
bHaveDefaultTable ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData, bHaveDefaultTable ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData,
@ -754,7 +754,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
OUString aMsg(e.Message); OUString aMsg(e.Message);
aMsg += "\n"; aMsg += "\n";
aMsg += ModuleRes( STR_QRY_CONTINUE ); aMsg += ModuleRes( STR_QRY_CONTINUE );
VclPtr<OSQLWarningBox> aBox(new OSQLWarningBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ) ); ScopedVclPtr<OSQLWarningBox> aBox(new OSQLWarningBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ) );
if (aBox->Execute() == RET_YES) if (aBox->Execute() == RET_YES)
m_bDontAskAgain = true; m_bDontAskAgain = true;

View File

@ -241,7 +241,7 @@ bool ORowSetImportExport::insertNewRow()
if(!m_bAlreadyAsked) if(!m_bAlreadyAsked)
{ {
OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING); OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING);
VclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ) ); ScopedVclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ) );
if(aDlg->Execute() == RET_YES) if(aDlg->Execute() == RET_YES)
m_bAlreadyAsked = true; m_bAlreadyAsked = true;
else else

View File

@ -852,7 +852,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
} }
{ // want the dialog to be destroyed before our set { // want the dialog to be destroyed before our set
VclPtr<SbaSbAttrDlg> aDlg(new SbaSbAttrDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat)); ScopedVclPtr<SbaSbAttrDlg> aDlg(new SbaSbAttrDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat));
if (RET_OK == aDlg->Execute()) if (RET_OK == aDlg->Execute())
{ {
// ItemSet->UNO // ItemSet->UNO
@ -997,7 +997,7 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId
Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) ); Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) );
VclPtr<DlgSize> aColumnSizeDlg(new DlgSize( _pBox, nColSize, false, aDefaultMM.Width() * 10 ) ); ScopedVclPtr<DlgSize> aColumnSizeDlg(new DlgSize( _pBox, nColSize, false, aDefaultMM.Width() * 10 ) );
if ( aColumnSizeDlg->Execute() ) if ( aColumnSizeDlg->Execute() )
{ {
sal_Int32 nValue = aColumnSizeDlg->GetValue(); sal_Int32 nValue = aColumnSizeDlg->GetValue();
@ -1286,7 +1286,7 @@ sal_Int32 askForUserAction(vcl::Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
OUString aMsg = ModuleRes(_nText); OUString aMsg = ModuleRes(_nText);
aMsg = aMsg.replaceFirst("%1", _sName); aMsg = aMsg.replaceFirst("%1", _sName);
VclPtr<OSQLMessageBox> aAsk(new OSQLMessageBox(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query)); ScopedVclPtr<OSQLMessageBox> aAsk(new OSQLMessageBox(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query));
if ( _bAll ) if ( _bAll )
{ {
aAsk->AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL, 0); aAsk->AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL, 0);
@ -1431,7 +1431,7 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo
// here we have everything needed to create a new query object ... // here we have everything needed to create a new query object ...
HierarchicalNameCheck aNameChecker( _xNames.get(), sName ); HierarchicalNameCheck aNameChecker( _xNames.get(), sName );
// ... ehm, except a new name // ... ehm, except a new name
VclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( _pParent, ScopedVclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( _pParent,
_rxContext, _rxContext,
sTargetName, sTargetName,
sLabel, sLabel,

View File

@ -308,7 +308,7 @@ namespace dbaui
bool bReConnect = true; bool bReConnect = true;
if ( _bUI ) if ( _bUI )
{ {
VclPtr<MessageDialog> aQuery(new MessageDialog(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
bReConnect = ( RET_YES == aQuery->Execute() ); bReConnect = ( RET_YES == aQuery->Execute() );
} }

View File

@ -158,7 +158,7 @@ namespace
} }
} }
VclPtr<OQueryTableConnection> aInfo(new OQueryTableConnection(pTableView, aInfoData)); ScopedVclPtr<OQueryTableConnection> aInfo(new OQueryTableConnection(pTableView, aInfoData));
// Because OQueryTableConnection never takes ownership of the data passed to it, but only remembers the pointer, // Because OQueryTableConnection never takes ownership of the data passed to it, but only remembers the pointer,
// this pointer to a local variable is not critical, as aInfoData and aInfo have the same lifetime // this pointer to a local variable is not critical, as aInfoData and aInfo have the same lifetime
pTableView->NotifyTabConnection( *aInfo.get() ); pTableView->NotifyTabConnection( *aInfo.get() );

View File

@ -118,7 +118,7 @@ namespace
{ {
OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get()); OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get());
VclPtr<DlgQryJoin> aDlg(new DlgQryJoin(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables)); ScopedVclPtr<DlgQryJoin> aDlg(new DlgQryJoin(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables));
bool bOk = aDlg->Execute() == RET_OK; bool bOk = aDlg->Execute() == RET_OK;
if( bOk ) if( bOk )
{ {
@ -208,7 +208,7 @@ namespace
pNewConnData->AppendConnLine(*pIter,sRelatedColumn); pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
// now add the Conn itself // now add the Conn itself
VclPtr<OQueryTableConnection> aNewConn(new OQueryTableConnection(_pView, aNewConnData)); ScopedVclPtr<OQueryTableConnection> aNewConn(new OQueryTableConnection(_pView, aNewConnData));
// referring to the local variable is not important, as NotifyQueryTabConn creates a new copy // referring to the local variable is not important, as NotifyQueryTabConn creates a new copy
// to add me (if not existent) // to add me (if not existent)
_pView->NotifyTabConnection(*aNewConn.get(), false); _pView->NotifyTabConnection(*aNewConn.get(), false);
@ -621,7 +621,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
pNewConnectionData->AppendConnLine( aSourceFieldName,aDestFieldName ); pNewConnectionData->AppendConnLine( aSourceFieldName,aDestFieldName );
VclPtr<OQueryTableConnection> aNewConnection(new OQueryTableConnection(this, aNewConnectionData)); ScopedVclPtr<OQueryTableConnection> aNewConnection(new OQueryTableConnection(this, aNewConnectionData));
NotifyTabConnection(*aNewConnection.get()); NotifyTabConnection(*aNewConnection.get());
// As usual with NotifyTabConnection, using a local variable is fine because a copy is made // As usual with NotifyTabConnection, using a local variable is fine because a copy is made
} }

View File

@ -987,7 +987,7 @@ void OQueryController::impl_initialize()
OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) ); OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) );
OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) ); OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) );
ODataView* pWindow = getView(); ODataView* pWindow = getView();
VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query )); ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query ));
bClose = aDlg->Execute() == RET_NO; bClose = aDlg->Execute() == RET_NO;
} }
if ( bClose ) if ( bClose )
@ -1238,7 +1238,7 @@ void OQueryController::loadViewSettings( const ::comphelper::NamedValueCollectio
void OQueryController::execute_QueryPropDlg() void OQueryController::execute_QueryPropDlg()
{ {
VclPtr<QueryPropertiesDialog> aQueryPropDlg(new QueryPropertiesDialog( ScopedVclPtr<QueryPropertiesDialog> aQueryPropDlg(new QueryPropertiesDialog(
getContainer(), m_bDistinct, m_nLimit )); getContainer(), m_bDistinct, m_nLimit ));
if( aQueryPropDlg->Execute() == RET_OK ) if( aQueryPropDlg->Execute() == RET_OK )
@ -1398,7 +1398,7 @@ bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements, b
} }
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::QUERY ); DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::QUERY );
VclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg(
getView(), getView(),
m_nCommandType, m_nCommandType,
getORB(), getORB(),
@ -1802,7 +1802,7 @@ short OQueryController::saveModified()
) )
{ {
OUString sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) ); OUString sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) );
VclPtr<QueryBox> aQry(new QueryBox( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ) ); ScopedVclPtr<QueryBox> aQry(new QueryBox( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ) );
nRet = aQry->Execute(); nRet = aQry->Execute();
if ( ( nRet == RET_YES ) if ( ( nRet == RET_YES )
@ -1914,7 +1914,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings
if ( !i_bForceCurrentControllerSettings && !editingView() ) if ( !i_bForceCurrentControllerSettings && !editingView() )
{ {
OUString aTitle(ModuleRes(STR_SVT_SQL_SYNTAX_ERROR)); OUString aTitle(ModuleRes(STR_SVT_SQL_SYNTAX_ERROR));
VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(getView(),aTitle,aErrorMsg)); ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(getView(),aTitle,aErrorMsg));
aDlg->Execute(); aDlg->Execute();
} }
bError = true; bError = true;

View File

@ -205,7 +205,7 @@ void ORelationController::impl_initialize()
{ {
OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); OUString sTitle(ModuleRes(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3); sTitle = sTitle.copy(3);
VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE)));
aDlg->Execute(); aDlg->Execute();
} }
disconnect(); disconnect();
@ -255,7 +255,7 @@ short ORelationController::saveModified()
short nSaved = RET_YES; short nSaved = RET_YES;
if(haveDataSource() && isModified()) if(haveDataSource() && isModified())
{ {
VclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog",
"dbaccess/ui/designsavemodifieddialog.ui")); "dbaccess/ui/designsavemodifieddialog.ui"));
nSaved = aQry->Execute(); nSaved = aQry->Execute();
if(nSaved == RET_YES) if(nSaved == RET_YES)

View File

@ -223,7 +223,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection ) void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection )
{ {
VclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, pConnection->GetData() )); ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, pConnection->GetData() ));
switch (aRelDlg->Execute()) switch (aRelDlg->Execute())
{ {
case RET_OK: case RET_OK:
@ -251,7 +251,7 @@ void ORelationTableView::AddNewRelation()
{ {
TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() ); TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() );
VclPtr<ORelationDialog> aRelDlg(new ORelationDialog(this, pNewConnData, true)); ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog(this, pNewConnData, true));
bool bSuccess = (aRelDlg->Execute() == RET_OK); bool bSuccess = (aRelDlg->Execute() == RET_OK);
if (bSuccess) if (bSuccess)
@ -326,7 +326,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
{ {
VclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES )); ScopedVclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ));
if ( m_bInRemove || aDlg->Execute() == RET_YES ) if ( m_bInRemove || aDlg->Execute() == RET_YES )
{ {
m_pView->getController().ClearUndoManager(); m_pView->getController().ClearUndoManager();
@ -344,8 +344,7 @@ void ORelationTableView::lookForUiActivities()
{ {
OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); OUString sTitle(ModuleRes(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3); sTitle = sTitle.copy(3);
ScopedVclPtrInstance<OSQLMessageBox> aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0);
VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0));
aDlg->SetText(sTitle); aDlg->SetText(sTitle);
aDlg->RemoveButton(aDlg->GetButtonId(0)); aDlg->RemoveButton(aDlg->GetButtonId(0));
aDlg->AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); aDlg->AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
@ -365,7 +364,7 @@ void ORelationTableView::lookForUiActivities()
} }
if(m_pCurrentlyTabConnData) if(m_pCurrentlyTabConnData)
{ {
VclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) ); ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) );
if (aRelDlg->Execute() == RET_OK) if (aRelDlg->Execute() == RET_OK)
{ {
// already updated by the dialog // already updated by the dialog

View File

@ -285,7 +285,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
if (!xTablesSup.is()) if (!xTablesSup.is())
{ {
OUString aMessage(ModuleRes(STR_TABLEDESIGN_CONNECTION_MISSING)); OUString aMessage(ModuleRes(STR_TABLEDESIGN_CONNECTION_MISSING));
VclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), aMessage ) )->Execute(); ScopedVclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), aMessage ) )->Execute();
return false; return false;
} }
@ -318,7 +318,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
} }
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::TABLE ); DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::TABLE );
VclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker ) ); ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker ) );
if ( aDlg->Execute() != RET_OK ) if ( aDlg->Execute() != RET_OK )
return false; return false;
@ -415,7 +415,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs)
{ {
OUString sText( ModuleRes( STR_NAME_ALREADY_EXISTS ) ); OUString sText( ModuleRes( STR_NAME_ALREADY_EXISTS ) );
sText = sText.replaceFirst( "#" , m_sName); sText = sText.replaceFirst( "#" , m_sName);
VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error ) ); ScopedVclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error ) );
aDlg->Execute(); aDlg->Execute();
bError = true; bError = true;
@ -447,7 +447,7 @@ void OTableController::doEditIndexes()
// table needs to be saved before editing indexes // table needs to be saved before editing indexes
if (m_bNew || isModified()) if (m_bNew || isModified())
{ {
VclPtr<MessageDialog> aAsk(new MessageDialog(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aAsk(new MessageDialog(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if (RET_YES != aAsk->Execute()) if (RET_YES != aAsk->Execute())
return; return;
@ -490,7 +490,7 @@ void OTableController::doEditIndexes()
if (!xIndexes.is()) if (!xIndexes.is())
return; return;
VclPtr<DbaIndexDialog> aDialog(new DbaIndexDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0)); ScopedVclPtr<DbaIndexDialog> aDialog(new DbaIndexDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0));
if (RET_OK != aDialog->Execute()) if (RET_OK != aDialog->Execute())
return; return;
@ -522,7 +522,7 @@ void OTableController::impl_initialize()
} }
catch(const SQLException&) catch(const SQLException&)
{ {
VclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ) ) )->Execute(); ScopedVclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ) ) )->Execute();
throw; throw;
} }
try try
@ -563,7 +563,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
::boost::mem_fn(&OTableRow::isValid)); ::boost::mem_fn(&OTableRow::isValid));
if ( aIter != m_vRowList.end() ) if ( aIter != m_vRowList.end() )
{ {
VclPtr<MessageDialog> aQry(new MessageDialog(getView(), "TableDesignSaveModifiedDialog", ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "TableDesignSaveModifiedDialog",
"dbaccess/ui/tabledesignsavemodifieddialog.ui")); "dbaccess/ui/tabledesignsavemodifieddialog.ui"));
switch (aQry->Execute()) switch (aQry->Execute())
{ {
@ -580,7 +580,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
} }
else if ( !m_bNew ) else if ( !m_bNew )
{ {
VclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DeleteAllRowsDialog", ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DeleteAllRowsDialog",
"dbaccess/ui/deleteallrowsdialog.ui")); "dbaccess/ui/deleteallrowsdialog.ui"));
switch (aQry->Execute()) switch (aQry->Execute())
{ {
@ -936,7 +936,7 @@ bool OTableController::checkColumns(bool _bNew)
{ {
OUString strMessage = ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME); OUString strMessage = ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME);
strMessage = strMessage.replaceFirst("$column$", pFieldDesc->GetName()); strMessage = strMessage.replaceFirst("$column$", pFieldDesc->GetName());
VclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), strMessage ) )->Execute(); ScopedVclPtr<OSQLWarningBox>(new OSQLWarningBox( getView(), strMessage ) )->Execute();
return false; return false;
} }
} }
@ -946,7 +946,7 @@ bool OTableController::checkColumns(bool _bNew)
{ {
OUString sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD)); OUString sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD));
OUString sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY)); OUString sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY));
VclPtr<OSQLMessageBox> aBox(new OSQLMessageBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES)); ScopedVclPtr<OSQLMessageBox> aBox(new OSQLMessageBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES));
switch ( aBox->Execute() ) switch ( aBox->Execute() )
{ {
@ -1075,7 +1075,7 @@ void OTableController::alterColumns()
aMessage = aMessage.replaceFirst( "$column$", pField->GetName() ); aMessage = aMessage.replaceFirst( "$column$", pField->GetName() );
SQLExceptionInfo aError( ::cppu::getCaughtException() ); SQLExceptionInfo aError( ::cppu::getCaughtException() );
VclPtr<OSQLWarningBox> aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError ) ); ScopedVclPtr<OSQLWarningBox> aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError ) );
bNotOk = aMsg->Execute() == RET_YES; bNotOk = aMsg->Execute() == RET_YES;
} }
else else
@ -1131,7 +1131,7 @@ void OTableController::alterColumns()
{ {
OUString aMessage(ModuleRes(STR_TABLEDESIGN_ALTER_ERROR)); OUString aMessage(ModuleRes(STR_TABLEDESIGN_ALTER_ERROR));
aMessage = aMessage.replaceFirst("$column$",pField->GetName()); aMessage = aMessage.replaceFirst("$column$",pField->GetName());
VclPtr<OSQLWarningBox> aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES ) ); ScopedVclPtr<OSQLWarningBox> aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES ) );
if ( aMsg->Execute() != RET_YES ) if ( aMsg->Execute() != RET_YES )
{ {
Reference<XPropertySet> xNewColumn(xIdxColumns->getByIndex(nPos),UNO_QUERY_THROW); Reference<XPropertySet> xNewColumn(xIdxColumns->getByIndex(nPos),UNO_QUERY_THROW);
@ -1198,7 +1198,7 @@ void OTableController::alterColumns()
OUString aMsgT(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN)); OUString aMsgT(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN));
aMsgT = aMsgT.replaceFirst("$column$",*pIter); aMsgT = aMsgT.replaceFirst("$column$",*pIter);
OUString aTitle(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE)); OUString aTitle(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE));
VclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox(getView(),aTitle,aMsgT,WB_YES_NO| WB_DEF_YES)); ScopedVclPtr<OSQLMessageBox> aMsg(new OSQLMessageBox(getView(),aTitle,aMsgT,WB_YES_NO| WB_DEF_YES));
if(aMsg->Execute() == RET_YES) if(aMsg->Execute() == RET_YES)
{ {
xKeyColumns = NULL; xKeyColumns = NULL;

View File

@ -127,7 +127,7 @@ namespace dbaui
xParamCallback = Reference< XInteractionSupplyParameters >(_rContinuations[nParamPos], UNO_QUERY); xParamCallback = Reference< XInteractionSupplyParameters >(_rContinuations[nParamPos], UNO_QUERY);
OSL_ENSURE(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s"); OSL_ENSURE(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s");
VclPtr<OParameterDialog> aDlg(new OParameterDialog(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, m_xContext)); ScopedVclPtr<OParameterDialog> aDlg(new OParameterDialog(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, m_xContext));
sal_Int16 nResult = aDlg->Execute(); sal_Int16 nResult = aDlg->Execute();
try try
{ {
@ -182,7 +182,7 @@ namespace dbaui
} }
// execute the dialog // execute the dialog
VclPtr<OSQLMessageBox> aDialog(new OSQLMessageBox(NULL, _rSqlInfo, nDialogStyle)); ScopedVclPtr<OSQLMessageBox> aDialog(new OSQLMessageBox(NULL, _rSqlInfo, nDialogStyle));
// TODO: need a way to specify the parent window // TODO: need a way to specify the parent window
sal_Int16 nResult = aDialog->Execute(); sal_Int16 nResult = aDialog->Execute();
try try
@ -256,7 +256,7 @@ namespace dbaui
Reference< XInteractionDocumentSave > xCallback(_rContinuations[nDocuPos], UNO_QUERY); Reference< XInteractionDocumentSave > xCallback(_rContinuations[nDocuPos], UNO_QUERY);
OSL_ENSURE(xCallback.is(), "BasicInteractionHandler::implHandle(DocumentSaveRequest): can't save document without an appropriate interaction handler!s"); OSL_ENSURE(xCallback.is(), "BasicInteractionHandler::implHandle(DocumentSaveRequest): can't save document without an appropriate interaction handler!s");
VclPtr<OCollectionView> aDlg(new OCollectionView(NULL, _rDocuRequest.Content, _rDocuRequest.Name, m_xContext)); ScopedVclPtr<OCollectionView> aDlg(new OCollectionView(NULL, _rDocuRequest.Content, _rDocuRequest.Name, m_xContext));
sal_Int16 nResult = aDlg->Execute(); sal_Int16 nResult = aDlg->Execute();
try try
{ {

View File

@ -708,7 +708,7 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
OUString const aMessage(aDiagnosticMessage + "\n"); OUString const aMessage(aDiagnosticMessage + "\n");
VclPtr<MessageDialog> aBootstrapFailedBox(new MessageDialog(NULL, aMessage)); ScopedVclPtr<MessageDialog> aBootstrapFailedBox(new MessageDialog(NULL, aMessage));
aBootstrapFailedBox->SetText( aProductKey ); aBootstrapFailedBox->SetText( aProductKey );
aBootstrapFailedBox->Execute(); aBootstrapFailedBox->Execute();
} }
@ -2354,7 +2354,7 @@ void Desktop::OpenClients()
ResMgr* pDtResMgr = GetDesktopResManager(); ResMgr* pDtResMgr = GetDesktopResManager();
if( pDtResMgr ) if( pDtResMgr )
{ {
VclPtr<MessageDialog> aBox(new MessageDialog(NULL, ResId(STR_ERR_PRINTDISABLED, *pDtResMgr))); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(NULL, ResId(STR_ERR_PRINTDISABLED, *pDtResMgr)));
aBox->Execute(); aBox->Execute();
} }
} }

View File

@ -38,7 +38,7 @@ bool Lockfile_execWarning( Lockfile * that )
OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY ); OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
// display warning and return response // display warning and return response
VclPtr<MessageDialog> aBox(new MessageDialog(NULL, DesktopResId(STR_QUERY_USERDATALOCKED), ScopedVclPtr<MessageDialog> aBox(new MessageDialog(NULL, DesktopResId(STR_QUERY_USERDATALOCKED),
VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
// set box title // set box title
OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED )); OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));

View File

@ -408,7 +408,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
break; break;
case CMD_SHOW_LICENSE: case CMD_SHOW_LICENSE:
{ {
VclPtr<ShowLicenseDialog> aLicenseDlg(new ShowLicenseDialog( m_pParent, GetEntryData( nPos )->m_xPackage )); ScopedVclPtr<ShowLicenseDialog> aLicenseDlg(new ShowLicenseDialog( m_pParent, GetEntryData( nPos )->m_xPackage ));
aLicenseDlg->Execute(); aLicenseDlg->Execute();
break; break;
} }
@ -595,7 +595,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
if ( !bHadWarning && IsSharedPkgMgr( xPackage ) ) if ( !bHadWarning && IsSharedPkgMgr( xPackage ) )
{ {
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aInfoBox(new MessageDialog(pParent, getResId(nResID), ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(pParent, getResId(nResID),
VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
bHadWarning = true; bHadWarning = true;
@ -627,7 +627,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
uno::Any exc( ::cppu::getCaughtException() ); uno::Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) ); OUString msg( ::comphelper::anyToString( exc ) );
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg)); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
aErrorBox->SetText( sTitle ); aErrorBox->SetText( sTitle );
aErrorBox->Execute(); aErrorBox->Execute();
} }
@ -636,7 +636,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
{ {
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aInfo(new MessageDialog(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION), ScopedVclPtr<MessageDialog> aInfo(new MessageDialog(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
OUString sText(aInfo->get_primary_text()); OUString sText(aInfo->get_primary_text());
@ -649,7 +649,7 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const
{ {
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aQuery(new MessageDialog(m_pVCLWindow, "InstallForAllDialog", ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(m_pVCLWindow, "InstallForAllDialog",
"desktop/ui/installforalldialog.ui")); "desktop/ui/installforalldialog.ui"));
short nRet = aQuery->Execute(); short nRet = aQuery->Execute();
@ -794,7 +794,7 @@ void ExtMgrDialog::checkEntries()
bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
{ {
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> aInfo(new MessageDialog(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION), ScopedVclPtr<MessageDialog> aInfo(new MessageDialog(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
OUString sText(aInfo->get_primary_text()); OUString sText(aInfo->get_primary_text());

View File

@ -451,7 +451,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
verExc.Deployed->getDisplayName()); verExc.Deployed->getDisplayName());
{ {
SolarMutexGuard guard; SolarMutexGuard guard;
VclPtr<MessageDialog> box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, ScopedVclPtr<MessageDialog> box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL,
ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
OUString s; OUString s;
if (bEqualNames) if (bEqualNames)
@ -506,7 +506,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
SolarMutexGuard guard; SolarMutexGuard guard;
OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString()); OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString());
sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName()); sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName());
VclPtr<MessageDialog> box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, sMsg)); ScopedVclPtr<MessageDialog> box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, sMsg));
box->Execute(); box->Execute();
approve = true; approve = true;
} }
@ -571,7 +571,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
text = ::comphelper::anyToString( rStatus ); // fallback text = ::comphelper::anyToString( rStatus ); // fallback
const SolarMutexGuard aGuard; const SolarMutexGuard aGuard;
VclPtr<MessageDialog> aBox(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, text)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, text));
aBox->Execute(); aBox->Execute();
} }
++m_nCurrentProgress; ++m_nCurrentProgress;
@ -813,7 +813,7 @@ void ExtensionCmdQueue::Thread::execute()
msg = ::comphelper::anyToString(exc); msg = ::comphelper::anyToString(exc);
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> box( ScopedVclPtr<MessageDialog> box(
new MessageDialog(currentCmdEnv->activeDialog(), msg)); new MessageDialog(currentCmdEnv->activeDialog(), msg));
if ( m_pDialogHelper ) if ( m_pDialogHelper )
box->SetText( m_pDialogHelper->getWindow()->GetText() ); box->SetText( m_pDialogHelper->getWindow()->GetText() );
@ -923,7 +923,7 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE
void ExtensionCmdQueue::Thread::_checkForUpdates( void ExtensionCmdQueue::Thread::_checkForUpdates(
const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList ) const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
{ {
VclPtr<UpdateDialog> pUpdateDialog; ScopedVclPtr<UpdateDialog> pUpdateDialog;
std::vector< UpdateData > vData; std::vector< UpdateData > vData;
const SolarMutexGuard guard; const SolarMutexGuard guard;

View File

@ -472,7 +472,7 @@ Reference<XComponentContext> getUNO(
if ( ! InitVCL() ) if ( ! InitVCL() )
throw RuntimeException( "Cannot initialize VCL!" ); throw RuntimeException( "Cannot initialize VCL!" );
{ {
VclPtr<WarningBox> warn(new WarningBox(NULL, WB_OK | WB_DEF_OK, sMsg)); ScopedVclPtr<WarningBox> warn(new WarningBox(NULL, WB_OK | WB_DEF_OK, sMsg));
warn->SetText(utl::ConfigManager::getProductName()); warn->SetText(utl::ConfigManager::getProductName());
warn->SetIcon(0); warn->SetIcon(0);
warn->Execute(); warn->Execute();

View File

@ -411,7 +411,7 @@ bool SvxSpellWrapper::SpellNext( )
WAIT_OFF(); WAIT_OFF();
sal_uInt16 nResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE; sal_uInt16 nResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
VclPtr<MessageDialog> aBox(new MessageDialog(pWin, EditResId(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pWin, EditResId(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( aBox->Execute() != RET_YES ) if ( aBox->Execute() != RET_YES )
{ {
// sacrifice the other area if necessary ask for special area // sacrifice the other area if necessary ask for special area

View File

@ -243,7 +243,7 @@ namespace abp
if (AST_INVALID == getSelectedType( )) if (AST_INVALID == getSelectedType( ))
{ {
VclPtr<MessageDialog> aError(new MessageDialog(this, ModuleRes(RID_STR_NEEDTYPESELECTION))); ScopedVclPtr<MessageDialog> aError(new MessageDialog(this, ModuleRes(RID_STR_NEEDTYPESELECTION)));
aError->Execute(); aError->Execute();
return false; return false;
} }

View File

@ -141,7 +141,7 @@ namespace bib
{ {
sErrorString += "\n"; sErrorString += "\n";
sErrorString += BIB_RESSTR(RID_MAP_QUESTION); sErrorString += BIB_RESSTR(RID_MAP_QUESTION);
VclPtr<QueryBox> aQuery(new QueryBox(this, WB_YES_NO, sErrorString) ); ScopedVclPtr<QueryBox> aQuery(new QueryBox(this, WB_YES_NO, sErrorString) );
aQuery->SetDefaultCheckBoxText(); aQuery->SetDefaultCheckBoxText();
short nResult = aQuery->Execute(); short nResult = aQuery->Execute();
BibModul::GetConfig()->SetShowColumnAssignmentWarning( BibModul::GetConfig()->SetShowColumnAssignmentWarning(

View File

@ -357,7 +357,7 @@ namespace pcr
,m_bUpdate(true) ,m_bUpdate(true)
,m_pControlContextImpl( new PropertyControlContext_Impl( *this ) ) ,m_pControlContextImpl( new PropertyControlContext_Impl( *this ) )
{ {
VclPtr<ListBox> aListBox(new ListBox(this,WB_DROPDOWN)); ScopedVclPtr<ListBox> aListBox(new ListBox(this,WB_DROPDOWN));
aListBox->SetPosSizePixel(Point(0,0),Size(100,100)); aListBox->SetPosSizePixel(Point(0,0),Size(100,100));
m_nRowHeight = aListBox->GetSizePixel().Height()+2; m_nRowHeight = aListBox->GetSizePixel().Height()+2;
SetBackground( pParent->GetBackground() ); SetBackground( pParent->GetBackground() );

View File

@ -98,7 +98,7 @@ namespace pcr
if ( !m_pControlWindow ) if ( !m_pControlWindow )
return; return;
VclPtr<ComboBox> aComboBox(new ComboBox(m_pControlWindow, WB_DROPDOWN)); ScopedVclPtr<ComboBox> aComboBox(new ComboBox(m_pControlWindow, WB_DROPDOWN));
aComboBox->SetPosSizePixel(Point(0,0), Size(100,100)); aComboBox->SetPosSizePixel(Point(0,0), Size(100,100));
m_pControlWindow->SetSizePixel(aComboBox->GetSizePixel()); m_pControlWindow->SetSizePixel(aComboBox->GetSizePixel());

View File

@ -2608,7 +2608,7 @@ namespace pcr
OSL_PRECOND( m_pInfoService.get(), "FormComponentPropertyHandler::impl_dialogListSelection_nothrow: no property meta data!" ); OSL_PRECOND( m_pInfoService.get(), "FormComponentPropertyHandler::impl_dialogListSelection_nothrow: no property meta data!" );
OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( m_pInfoService->getPropertyId( _rProperty ) ) ); OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( m_pInfoService->getPropertyId( _rProperty ) ) );
VclPtr<ListSelectionDialog> aDialog(new ListSelectionDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, _rProperty, sPropertyUIName ) ); ScopedVclPtr<ListSelectionDialog> aDialog(new ListSelectionDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, _rProperty, sPropertyUIName ) );
_rClearBeforeDialog.clear(); _rClearBeforeDialog.clear();
return ( RET_OK == aDialog->Execute() ); return ( RET_OK == aDialog->Execute() );
} }
@ -2685,7 +2685,7 @@ namespace pcr
return false; return false;
VclPtr<FormLinkDialog> aDialog(new FormLinkDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_xContext ) ); ScopedVclPtr<FormLinkDialog> aDialog(new FormLinkDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_xContext ) );
_rClearBeforeDialog.clear(); _rClearBeforeDialog.clear();
return ( RET_OK == aDialog->Execute() ); return ( RET_OK == aDialog->Execute() );
} }
@ -2722,7 +2722,7 @@ namespace pcr
aCoreSet.Put( aFormatter ); aCoreSet.Put( aFormatter );
// a tab dialog with a single page // a tab dialog with a single page
VclPtr< SfxSingleTabDialog > xDialog(new SfxSingleTabDialog( ScopedVclPtr< SfxSingleTabDialog > xDialog(new SfxSingleTabDialog(
impl_getDefaultDialogParent_nothrow(), aCoreSet, impl_getDefaultDialogParent_nothrow(), aCoreSet,
"FormatNumberDialog", "cui/ui/formatnumberdialog.ui")); "FormatNumberDialog", "cui/ui/formatnumberdialog.ui"));
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@ -2871,7 +2871,7 @@ namespace pcr
{ // do this in an own block. The dialog needs to be destroyed before we call { // do this in an own block. The dialog needs to be destroyed before we call
// destroyItemSet // destroyItemSet
VclPtr<ControlCharacterDialog> aDlg(new ControlCharacterDialog( impl_getDefaultDialogParent_nothrow(), *pSet ) ); ScopedVclPtr<ControlCharacterDialog> aDlg(new ControlCharacterDialog( impl_getDefaultDialogParent_nothrow(), *pSet ) );
_rClearBeforeDialog.clear(); _rClearBeforeDialog.clear();
if ( RET_OK == aDlg->Execute() ) if ( RET_OK == aDlg->Execute() )
{ {
@ -2942,7 +2942,7 @@ namespace pcr
bool FormComponentPropertyHandler::impl_dialogChooseLabelControl_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const bool FormComponentPropertyHandler::impl_dialogChooseLabelControl_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{ {
VclPtr<OSelectLabelDialog> dlgSelectLabel(new OSelectLabelDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent ) ); ScopedVclPtr<OSelectLabelDialog> dlgSelectLabel(new OSelectLabelDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent ) );
_rClearBeforeDialog.clear(); _rClearBeforeDialog.clear();
bool bSuccess = ( RET_OK == dlgSelectLabel->Execute() ); bool bSuccess = ( RET_OK == dlgSelectLabel->Execute() );
if ( bSuccess ) if ( bSuccess )
@ -2965,7 +2965,7 @@ namespace pcr
OSL_PRECOND( impl_getContextControlContainer_nothrow().is(), "FormComponentPropertyHandler::impl_dialogChangeTabOrder_nothrow: invalid control context!" ); OSL_PRECOND( impl_getContextControlContainer_nothrow().is(), "FormComponentPropertyHandler::impl_dialogChangeTabOrder_nothrow: invalid control context!" );
Reference< XTabControllerModel > xTabControllerModel( impl_getRowSet_nothrow(), UNO_QUERY ); Reference< XTabControllerModel > xTabControllerModel( impl_getRowSet_nothrow(), UNO_QUERY );
VclPtr<TabOrderDialog> aDialog(new TabOrderDialog( ScopedVclPtr<TabOrderDialog> aDialog(new TabOrderDialog(
impl_getDefaultDialogParent_nothrow(), impl_getDefaultDialogParent_nothrow(),
xTabControllerModel, xTabControllerModel,
impl_getContextControlContainer_nothrow(), impl_getContextControlContainer_nothrow(),

View File

@ -496,7 +496,7 @@ namespace pcr
::std::vector< OUString > aExistentNames; ::std::vector< OUString > aExistentNames;
m_pHelper->getAvailableDataTypeNames( aExistentNames ); m_pHelper->getAvailableDataTypeNames( aExistentNames );
VclPtr<NewDataTypeDialog> aDialog(new NewDataTypeDialog( NULL, pType->getName(), aExistentNames ) ); // TODO/eForms: proper parent ScopedVclPtr<NewDataTypeDialog> aDialog(new NewDataTypeDialog( NULL, pType->getName(), aExistentNames ) ); // TODO/eForms: proper parent
if ( aDialog->Execute() != RET_OK ) if ( aDialog->Execute() != RET_OK )
return false; return false;
@ -535,7 +535,7 @@ namespace pcr
// confirmation message // confirmation message
OUString sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ).toString() ); OUString sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ).toString() );
sConfirmation = sConfirmation.replaceFirst( "#type#", pType->getName() ); sConfirmation = sConfirmation.replaceFirst( "#type#", pType->getName() );
VclPtr<QueryBox> aQuery(new QueryBox( NULL, WB_YES_NO, sConfirmation ) ); // TODO/eForms: proper parent ScopedVclPtr<QueryBox> aQuery(new QueryBox( NULL, WB_YES_NO, sConfirmation ) ); // TODO/eForms: proper parent
if ( aQuery->Execute() != RET_YES ) if ( aQuery->Execute() != RET_YES )
return false; return false;

View File

@ -292,7 +292,7 @@ short SaneDlg::Execute()
{ {
if( ! Sane::IsSane() ) if( ! Sane::IsSane() )
{ {
VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, SaneResId(STR_COULD_NOT_BE_INIT))); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, SaneResId(STR_COULD_NOT_BE_INIT)));
aErrorBox->Execute(); aErrorBox->Execute();
return sal_False; return sal_False;
} }
@ -575,7 +575,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton )
aString = aString.replaceFirst( "%s", Sane::GetVendor( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetVendor( mrSane.GetDeviceNumber() ) );
aString = aString.replaceFirst( "%s", Sane::GetModel( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetModel( mrSane.GetDeviceNumber() ) );
aString = aString.replaceFirst( "%s", Sane::GetType( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetType( mrSane.GetDeviceNumber() ) );
VclPtr<MessageDialog> aInfoBox(new MessageDialog(this, aString, VCL_MESSAGE_INFO)); ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(this, aString, VCL_MESSAGE_INFO));
aInfoBox->Execute(); aInfoBox->Execute();
} }
else if( pButton == mpPreviewButton ) else if( pButton == mpPreviewButton )
@ -604,7 +604,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton )
x[ i ] = (double)i; x[ i ] = (double)i;
mrSane.GetOptionValue( mnCurrentOption, y.get() ); mrSane.GetOptionValue( mnCurrentOption, y.get() );
VclPtr<GridDialog> aGrid(new GridDialog( x.get(), y.get(), nElements, this ) ); ScopedVclPtr<GridDialog> aGrid(new GridDialog( x.get(), y.get(), nElements, this ) );
aGrid->SetText( mrSane.GetOptionName( mnCurrentOption ) ); aGrid->SetText( mrSane.GetOptionName( mnCurrentOption ) );
aGrid->setBoundings( 0, mfMin, nElements, mfMax ); aGrid->setBoundings( 0, mfMin, nElements, mfMax );
if( aGrid->Execute() && aGrid->getNewYValues() ) if( aGrid->Execute() && aGrid->getNewYValues() )
@ -856,7 +856,7 @@ void SaneDlg::AcquirePreview()
if( nOption == -1 ) if( nOption == -1 )
{ {
OUString aString(SaneResId(STR_SLOW_PREVIEW)); OUString aString(SaneResId(STR_SLOW_PREVIEW));
VclPtr<MessageDialog> aBox(new MessageDialog(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
if (aBox->Execute() == RET_CANCEL) if (aBox->Execute() == RET_CANCEL)
return; return;
} }
@ -866,7 +866,7 @@ void SaneDlg::AcquirePreview()
BitmapTransporter aTransporter; BitmapTransporter aTransporter;
if( ! mrSane.Start( aTransporter ) ) if( ! mrSane.Start( aTransporter ) )
{ {
VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, SaneResId(STR_ERROR_SCAN))); ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this, SaneResId(STR_ERROR_SCAN)));
aErrorBox->Execute(); aErrorBox->Execute();
} }
else else

View File

@ -299,7 +299,7 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex
); );
pHolder->m_bBusy = true; pHolder->m_bBusy = true;
VclPtr<SaneDlg> aDlg(new SaneDlg(NULL, pHolder->m_aSane, listener.is()) ); ScopedVclPtr<SaneDlg> aDlg(new SaneDlg(NULL, pHolder->m_aSane, listener.is()) );
bRet = aDlg->Execute(); bRet = aDlg->Execute();
bScan = aDlg->getDoScan(); bScan = aDlg->getDoScan();
pHolder->m_bBusy = false; pHolder->m_bBusy = false;

View File

@ -107,7 +107,7 @@ void GraphicExportDialog::setTitle( const OUString& aTitle )
sal_Int16 GraphicExportDialog::execute() throw ( RuntimeException, std::exception ) sal_Int16 GraphicExportDialog::execute() throw ( RuntimeException, std::exception )
{ {
sal_Int16 nReturn = ui::dialogs::ExecutableDialogResults::CANCEL; sal_Int16 nReturn = ui::dialogs::ExecutableDialogResults::CANCEL;
VclPtr<GraphicExportOptionsDialog> graphicExportOptionsDialog(new GraphicExportOptionsDialog( Application::GetDefDialogParent(), mxSourceDocument ) ); ScopedVclPtr<GraphicExportOptionsDialog> graphicExportOptionsDialog(new GraphicExportOptionsDialog( Application::GetDefDialogParent(), mxSourceDocument ) );
if (graphicExportOptionsDialog->Execute() == RET_OK ) if (graphicExportOptionsDialog->Execute() == RET_OK )
{ {
maFilterDataSequence = graphicExportOptionsDialog->getFilterData(); maFilterDataSequence = graphicExportOptionsDialog->getFilterData();

View File

@ -486,7 +486,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag() ); pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag() );
if( pResMgr ) if( pResMgr )
{ {
VclPtr<InfoBox> aInfoBox(new InfoBox( NULL, ResId(KEY_VERSION_CHECK, *pResMgr).toString() ) ); ScopedVclPtr<InfoBox> aInfoBox(new InfoBox( NULL, ResId(KEY_VERSION_CHECK, *pResMgr).toString() ) );
aInfoBox->Execute(); aInfoBox->Execute();
delete pResMgr; delete pResMgr;
} }

View File

@ -844,7 +844,7 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl)
// if a password was set, inform the user that this will not be used in PDF/A case // if a password was set, inform the user that this will not be used in PDF/A case
if( mpCbPDFA1b->IsChecked() && pSecPage && pSecPage->hasPassword() ) if( mpCbPDFA1b->IsChecked() && pSecPage && pSecPage->hasPassword() )
{ {
VclPtr<MessageDialog> aBox(new MessageDialog(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING));
aBox->Execute(); aBox->Execute();
} }
@ -1291,7 +1291,7 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const ImpPDFTabDialog* paParen
IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl) IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
{ {
VclPtr<SfxPasswordDialog> aPwdDialog(new SfxPasswordDialog( this, &msUserPwdTitle ) ); ScopedVclPtr<SfxPasswordDialog> aPwdDialog(new SfxPasswordDialog( this, &msUserPwdTitle ) );
aPwdDialog->SetMinLen( 0 ); aPwdDialog->SetMinLen( 0 );
aPwdDialog->ShowMinLengthText(false); aPwdDialog->ShowMinLengthText(false);
aPwdDialog->ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 ); aPwdDialog->ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 );

View File

@ -53,7 +53,7 @@ sal_Bool SAL_CALL PDFInteractionHandler::handleInteractionRequest( const Referen
sal_Int32 nCodes = aExc.ErrorCodes.getLength(); sal_Int32 nCodes = aExc.ErrorCodes.getLength();
for( sal_Int32 i = 0; i < nCodes; i++ ) for( sal_Int32 i = 0; i < nCodes; i++ )
aCodes.insert( (vcl::PDFWriter::ErrorCode)aExc.ErrorCodes.getConstArray()[i] ); aCodes.insert( (vcl::PDFWriter::ErrorCode)aExc.ErrorCodes.getConstArray()[i] );
VclPtr<ImplErrorDialog> aDlg(new ImplErrorDialog( aCodes ) ); ScopedVclPtr<ImplErrorDialog> aDlg(new ImplErrorDialog( aCodes ) );
aDlg->Execute(); aDlg->Execute();
bHandled = true; bHandled = true;
} }

View File

@ -242,7 +242,7 @@ void XMLFilterSettingsDialog::onNew()
aTempInfo.maDocumentService = "com.sun.star.text.TextDocument"; aTempInfo.maDocumentService = "com.sun.star.text.TextDocument";
// execute XML Filter Dialog // execute XML Filter Dialog
VclPtr<XMLFilterTabDialog> aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, &aTempInfo ) ); ScopedVclPtr<XMLFilterTabDialog> aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, &aTempInfo ) );
if ( aDlg->Execute() == RET_OK ) if ( aDlg->Execute() == RET_OK )
{ {
// insert the new filter // insert the new filter
@ -263,7 +263,7 @@ void XMLFilterSettingsDialog::onEdit()
filter_info_impl* pOldInfo = static_cast<filter_info_impl*>(pEntry->GetUserData()); filter_info_impl* pOldInfo = static_cast<filter_info_impl*>(pEntry->GetUserData());
// execute XML Filter Dialog // execute XML Filter Dialog
VclPtr<XMLFilterTabDialog> aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, pOldInfo ) ); ScopedVclPtr<XMLFilterTabDialog> aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, pOldInfo ) );
if ( aDlg->Execute() == RET_OK ) if ( aDlg->Execute() == RET_OK )
{ {
filter_info_impl* pNewInfo = aDlg->getNewFilterInfo(); filter_info_impl* pNewInfo = aDlg->getNewFilterInfo();
@ -788,7 +788,7 @@ void XMLFilterSettingsDialog::onTest()
{ {
filter_info_impl* pInfo = static_cast<filter_info_impl*>(pEntry->GetUserData()); filter_info_impl* pInfo = static_cast<filter_info_impl*>(pEntry->GetUserData());
VclPtr<XMLFilterTestDialog> aDlg(new XMLFilterTestDialog(this, mxContext)); ScopedVclPtr<XMLFilterTestDialog> aDlg(new XMLFilterTestDialog(this, mxContext));
aDlg->test( *pInfo ); aDlg->test( *pInfo );
} }
} }
@ -806,7 +806,7 @@ void XMLFilterSettingsDialog::onDelete()
OUString aMessage(RESIDSTR(STR_WARN_DELETE)); OUString aMessage(RESIDSTR(STR_WARN_DELETE));
aMessage = aMessage.replaceFirst( aPlaceHolder, pInfo->maFilterName ); aMessage = aMessage.replaceFirst( aPlaceHolder, pInfo->maFilterName );
VclPtr<WarningBox> aWarnBox(new WarningBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage )); ScopedVclPtr<WarningBox> aWarnBox(new WarningBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage ));
if( aWarnBox->Execute() == RET_YES ) if( aWarnBox->Execute() == RET_YES )
{ {
try try
@ -936,7 +936,7 @@ void XMLFilterSettingsDialog::onSave()
aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() ); aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() );
} }
VclPtr<InfoBox> aBox(new InfoBox(this, aMsg )); ScopedVclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
aBox->Execute(); aBox->Execute();
} }
} }
@ -1002,7 +1002,7 @@ void XMLFilterSettingsDialog::onOpen()
aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) ); aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) );
} }
VclPtr<InfoBox> aBox(new InfoBox(this, aMsg )); ScopedVclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
aBox->Execute(); aBox->Execute();
} }
} }

View File

@ -265,7 +265,7 @@ bool XMLFilterTabDialog::onOk()
aMessage = aMessage.replaceAll( "%s", aReplace1 ); aMessage = aMessage.replaceAll( "%s", aReplace1 );
} }
VclPtr<MessageDialog> aBox(new MessageDialog(this, aMessage)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, aMessage));
aBox->Execute(); aBox->Execute();
if( pFocusWindow ) if( pFocusWindow )

View File

@ -445,7 +445,7 @@ namespace frm
if(needConfirmation) if(needConfirmation)
{ {
// TODO: shouldn't this be done with an interaction handler? // TODO: shouldn't this be done with an interaction handler?
VclPtr<QueryBox> aQuery(new QueryBox( NULL, WB_YES_NO_CANCEL | WB_DEF_YES, FRM_RES_STRING( RID_STR_QUERY_SAVE_MODIFIED_ROW ) ) ); ScopedVclPtr<QueryBox> aQuery(new QueryBox( NULL, WB_YES_NO_CANCEL | WB_DEF_YES, FRM_RES_STRING( RID_STR_QUERY_SAVE_MODIFIED_ROW ) ) );
switch ( aQuery->Execute() ) switch ( aQuery->Execute() )
{ {
case RET_NO: case RET_NO:

View File

@ -194,7 +194,7 @@ IMPL_LINK ( PlacesListBox, DoubleClick, void*, EMPTYARG )
PlacePtr pPlace = maPlaces[nSelected]; PlacePtr pPlace = maPlaces[nSelected];
if ( pPlace->IsEditable() == true && !pPlace->IsLocal( ) ) if ( pPlace->IsEditable() == true && !pPlace->IsLocal( ) )
{ {
VclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(mpDlg, pPlace)); ScopedVclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(mpDlg, pPlace));
short aRetCode = aDlg->Execute(); short aRetCode = aDlg->Execute();
switch(aRetCode) { switch(aRetCode) {
case RET_OK : case RET_OK :

View File

@ -681,7 +681,7 @@ IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG )
SmartContent aContent( pThis->_pFileView->GetViewURL( ) ); SmartContent aContent( pThis->_pFileView->GetViewURL( ) );
OUString aTitle; OUString aTitle;
aContent.getTitle( aTitle ); aContent.getTitle( aTitle );
VclPtr<QueryFolderNameDialog> aDlg(new QueryFolderNameDialog(pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER)) ); ScopedVclPtr<QueryFolderNameDialog> aDlg(new QueryFolderNameDialog(pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER)) );
bool bHandled = false; bool bHandled = false;
while ( !bHandled ) while ( !bHandled )
@ -1065,7 +1065,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
"$filename$", "$filename$",
aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET) aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)
); );
VclPtr<MessageDialog> aBox(new MessageDialog(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
if ( aBox->Execute() != RET_YES ) if ( aBox->Execute() != RET_YES )
return 0; return 0;
} }
@ -1110,7 +1110,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
} }
sError = sError.replaceFirst( "$name$", sInvalidFile ); sError = sError.replaceFirst( "$name$", sInvalidFile );
VclPtr<MessageDialog> aError(new MessageDialog(pThis, sError)); ScopedVclPtr<MessageDialog> aError(new MessageDialog(pThis, sError));
aError->Execute(); aError->Execute();
return 0; return 0;
} }
@ -1263,7 +1263,7 @@ IMPL_STATIC_LINK ( SvtFileDialog, ConnectToServerPressed_Hdl, void*, EMPTYARG )
{ {
pThis->_pFileView->EndInplaceEditing( false ); pThis->_pFileView->EndInplaceEditing( false );
VclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(pThis)); ScopedVclPtr<PlaceEditDialog> aDlg(new PlaceEditDialog(pThis));
short aRetCode = aDlg->Execute(); short aRetCode = aDlg->Execute();
switch (aRetCode) { switch (aRetCode) {
@ -1899,7 +1899,7 @@ short SvtFileDialog::PrepareExecute()
if ( bEmpty ) if ( bEmpty )
{ {
VclPtr<MessageDialog> aBox(new MessageDialog(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE))); ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE)));
aBox->Execute(); aBox->Execute();
return 0; return 0;
} }

View File

@ -4205,7 +4205,7 @@ void AutoRecovery::impl_showFullDiscError()
if (sBackupPath.getLength() < 1) if (sBackupPath.getLength() < 1)
sBackupPath = sBackupURL; sBackupPath = sBackupURL;
VclPtr<ErrorBox> dlgError(new ErrorBox( ScopedVclPtr<ErrorBox> dlgError(new ErrorBox(
0, WB_OK, 0, WB_OK,
sMsg.replaceAll("%PATH", sBackupPath))); sMsg.replaceAll("%PATH", sBackupPath)));
dlgError->SetButtonText(dlgError->GetButtonId(0), sBtn); dlgError->SetButtonText(dlgError->GetButtonId(0), sBtn);

View File

@ -712,7 +712,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor ); lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor );
{ // want the dialog to be destroyed before our set { // want the dialog to be destroyed before our set
VclPtr<ORptPageDialog> aDlg(new ORptPageDialog(pParent, pDescriptor.get(), "CharDialog")); ScopedVclPtr<ORptPageDialog> aDlg(new ORptPageDialog(pParent, pDescriptor.get(), "CharDialog"));
uno::Reference< report::XShape > xShape( _rxReportControlFormat, uno::UNO_QUERY ); uno::Reference< report::XShape > xShape( _rxReportControlFormat, uno::UNO_QUERY );
if ( xShape.is() ) if ( xShape.is() )
aDlg->RemoveTabPage("background"); aDlg->RemoveTabPage("background");
@ -1027,7 +1027,7 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula
CharClass aCC(_xContext, aLangTag); CharClass aCC(_xContext, aLangTag);
svl::SharedStringPool aStringPool(&aCC); svl::SharedStringPool aStringPool(&aCC);
VclPtr<FormulaDialog> aDlg(new FormulaDialog( ScopedVclPtr<FormulaDialog> aDlg(new FormulaDialog(
pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool)); pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool));
bSuccess = aDlg->Execute() == RET_OK; bSuccess = aDlg->Execute() == RET_OK;

Some files were not shown because too many files have changed in this diff Show More