dialogs lifetimes should be wrapped in ScopedVclPtr

Change-Id: Ica8467af599fb3f9313bfa916fec8b7792a6000f
This commit is contained in:
Noel Grandin
2015-04-10 15:51:48 +02:00
parent 746b518cef
commit 3bf4ada33f
8 changed files with 14 additions and 14 deletions

View File

@@ -242,7 +242,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
OUString aScriptURL;
SbMethod* pMethod = NULL;
VclPtr< MacroChooser > pChooser( new MacroChooser( NULL, true ) );
ScopedVclPtr< MacroChooser > pChooser( NULL, true );
if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() )
pChooser->SetMode(MacroChooser::ChooseOnly);

View File

@@ -267,10 +267,10 @@ void ShapeController::executeDispatch_FormatLine()
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
pFact->CreateSvxLineTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
pSelectedObj, bHasMarked ) );
if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
if ( bHasMarked )
@@ -549,7 +549,7 @@ void ShapeController::executeDispatch_FontDialog()
SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
pDrawViewWrapper->GetAttributes( aAttr );
ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
VclPtr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
ScopedVclPtr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
@@ -587,7 +587,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
VclPtr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
ScopedVclPtr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();

View File

@@ -906,7 +906,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
}
}
VclPtr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
ScopedVclPtr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
xNewDlg->SetObjectName( aNewName );
do
@@ -1029,7 +1029,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
}
sal_uInt16 nMode = INPUTMODE_RENAME;
VclPtr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
ScopedVclPtr< CuiInputDialog > xNewDlg( new CuiInputDialog( static_cast<vcl::Window*>(this), nMode ) );
xNewDlg->SetObjectName( aNewName );
bool bValid;

View File

@@ -170,7 +170,7 @@ protected:
SdrOutliner* pDrawOutliner; // an Outliner for outputting text
SdrOutliner* pHitTestOutliner;// an Outliner for the HitTest
sal_uIntPtr nDefTextHgt; // Default text heigth in logical units
Vclptr<OutputDevice> pRefOutDev; // ReferenceDevice for the EditEngine
VclPtr<OutputDevice> pRefOutDev; // ReferenceDevice for the EditEngine
/// Set if we are doing tiled rendering.
bool mbTiledRendering;
LibreOfficeKitCallback mpLibreOfficeKitCallback;

View File

@@ -813,7 +813,7 @@ short TableDesignDialog::Execute()
void showTableDesignDialog( ::vcl::Window* pParent, ViewShellBase& rBase )
{
VclPtr< TableDesignDialog > xDialog( new TableDesignDialog( pParent, rBase ) );
ScopedVclPtr< TableDesignDialog > xDialog( new TableDesignDialog( pParent, rBase ) );
xDialog->Execute();
}

View File

@@ -55,7 +55,7 @@ executeFilterDialog(
{
SolarMutexGuard aGuard;
VclPtr< uui::FilterDialog > xDialog(new uui::FilterDialog(pParent));
ScopedVclPtr< uui::FilterDialog > xDialog(new uui::FilterDialog(pParent));
xDialog->SetURL(rURL);
xDialog->ChangeFilters(&rFilters);

View File

@@ -93,7 +93,7 @@ handleLockedDocumentRequest_(
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
VclPtr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
ScopedVclPtr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
pParent, xManager.get(), aMessage ) );
nResult = xDialog->Execute();
}
@@ -107,7 +107,7 @@ handleLockedDocumentRequest_(
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
aMessage, aArguments );
VclPtr< TryLaterQueryBox > xDialog(
ScopedVclPtr< TryLaterQueryBox > xDialog(
new TryLaterQueryBox( pParent, xManager.get(), aMessage ) );
nResult = xDialog->Execute();
}

View File

@@ -145,7 +145,7 @@ executeUnknownAuthDialog(
{
SolarMutexGuard aGuard;
VclPtr< UnknownAuthDialog > xDialog(new UnknownAuthDialog(pParent, rXCert, xContext));
ScopedVclPtr< UnknownAuthDialog > xDialog(new UnknownAuthDialog(pParent, rXCert, xContext));
// Get correct resource string
OUString aMessage;
@@ -186,7 +186,7 @@ executeSSLWarnDialog(
{
SolarMutexGuard aGuard;
VclPtr< SSLWarnDialog > xDialog(new SSLWarnDialog(pParent, rXCert, xContext));
ScopedVclPtr< SSLWarnDialog > xDialog(new SSLWarnDialog(pParent, rXCert, xContext));
// Get correct resource string
OUString aMessage_1;