dialogs lifetimes should be wrapped in ScopedVclPtr
Change-Id: Ica8467af599fb3f9313bfa916fec8b7792a6000f
This commit is contained in:
@@ -242,7 +242,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
|
|||||||
OUString aScriptURL;
|
OUString aScriptURL;
|
||||||
SbMethod* pMethod = NULL;
|
SbMethod* pMethod = NULL;
|
||||||
|
|
||||||
VclPtr< MacroChooser > pChooser( new MacroChooser( NULL, true ) );
|
ScopedVclPtr< MacroChooser > pChooser( NULL, true );
|
||||||
if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() )
|
if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() )
|
||||||
pChooser->SetMode(MacroChooser::ChooseOnly);
|
pChooser->SetMode(MacroChooser::ChooseOnly);
|
||||||
|
|
||||||
|
@@ -267,10 +267,10 @@ void ShapeController::executeDispatch_FormatLine()
|
|||||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||||
if ( pFact )
|
if ( pFact )
|
||||||
{
|
{
|
||||||
::boost::scoped_ptr< SfxAbstractTabDialog > pDlg(
|
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
|
||||||
pFact->CreateSvxLineTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
|
pFact->CreateSvxLineTabDialog( pParent, &aAttr, &pDrawModelWrapper->getSdrModel(),
|
||||||
pSelectedObj, bHasMarked ) );
|
pSelectedObj, bHasMarked ) );
|
||||||
if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
|
if ( pDlg->Execute() == RET_OK )
|
||||||
{
|
{
|
||||||
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
|
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
|
||||||
if ( bHasMarked )
|
if ( bHasMarked )
|
||||||
@@ -549,7 +549,7 @@ void ShapeController::executeDispatch_FontDialog()
|
|||||||
SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
|
SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
|
||||||
pDrawViewWrapper->GetAttributes( aAttr );
|
pDrawViewWrapper->GetAttributes( aAttr );
|
||||||
ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
|
ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
|
||||||
VclPtr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
|
ScopedVclPtr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
|
||||||
if ( pDlg->Execute() == RET_OK )
|
if ( pDlg->Execute() == RET_OK )
|
||||||
{
|
{
|
||||||
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
|
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
|
||||||
@@ -587,7 +587,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
|
|||||||
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
|
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
|
||||||
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
|
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 )
|
if ( pDlg->Execute() == RET_OK )
|
||||||
{
|
{
|
||||||
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
|
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
|
||||||
|
@@ -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 );
|
xNewDlg->SetObjectName( aNewName );
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -1029,7 +1029,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
|
|||||||
}
|
}
|
||||||
sal_uInt16 nMode = INPUTMODE_RENAME;
|
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 );
|
xNewDlg->SetObjectName( aNewName );
|
||||||
|
|
||||||
bool bValid;
|
bool bValid;
|
||||||
|
@@ -170,7 +170,7 @@ protected:
|
|||||||
SdrOutliner* pDrawOutliner; // an Outliner for outputting text
|
SdrOutliner* pDrawOutliner; // an Outliner for outputting text
|
||||||
SdrOutliner* pHitTestOutliner;// an Outliner for the HitTest
|
SdrOutliner* pHitTestOutliner;// an Outliner for the HitTest
|
||||||
sal_uIntPtr nDefTextHgt; // Default text heigth in logical units
|
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.
|
/// Set if we are doing tiled rendering.
|
||||||
bool mbTiledRendering;
|
bool mbTiledRendering;
|
||||||
LibreOfficeKitCallback mpLibreOfficeKitCallback;
|
LibreOfficeKitCallback mpLibreOfficeKitCallback;
|
||||||
|
@@ -813,7 +813,7 @@ short TableDesignDialog::Execute()
|
|||||||
|
|
||||||
void showTableDesignDialog( ::vcl::Window* pParent, ViewShellBase& rBase )
|
void showTableDesignDialog( ::vcl::Window* pParent, ViewShellBase& rBase )
|
||||||
{
|
{
|
||||||
VclPtr< TableDesignDialog > xDialog( new TableDesignDialog( pParent, rBase ) );
|
ScopedVclPtr< TableDesignDialog > xDialog( new TableDesignDialog( pParent, rBase ) );
|
||||||
xDialog->Execute();
|
xDialog->Execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ executeFilterDialog(
|
|||||||
{
|
{
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
VclPtr< uui::FilterDialog > xDialog(new uui::FilterDialog(pParent));
|
ScopedVclPtr< uui::FilterDialog > xDialog(new uui::FilterDialog(pParent));
|
||||||
|
|
||||||
xDialog->SetURL(rURL);
|
xDialog->SetURL(rURL);
|
||||||
xDialog->ChangeFilters(&rFilters);
|
xDialog->ChangeFilters(&rFilters);
|
||||||
|
@@ -93,7 +93,7 @@ handleLockedDocumentRequest_(
|
|||||||
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
|
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
|
||||||
aMessage, aArguments );
|
aMessage, aArguments );
|
||||||
|
|
||||||
VclPtr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
|
ScopedVclPtr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
|
||||||
pParent, xManager.get(), aMessage ) );
|
pParent, xManager.get(), aMessage ) );
|
||||||
nResult = xDialog->Execute();
|
nResult = xDialog->Execute();
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ handleLockedDocumentRequest_(
|
|||||||
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
|
aMessage = UUIInteractionHelper::replaceMessageWithArguments(
|
||||||
aMessage, aArguments );
|
aMessage, aArguments );
|
||||||
|
|
||||||
VclPtr< TryLaterQueryBox > xDialog(
|
ScopedVclPtr< TryLaterQueryBox > xDialog(
|
||||||
new TryLaterQueryBox( pParent, xManager.get(), aMessage ) );
|
new TryLaterQueryBox( pParent, xManager.get(), aMessage ) );
|
||||||
nResult = xDialog->Execute();
|
nResult = xDialog->Execute();
|
||||||
}
|
}
|
||||||
|
@@ -145,7 +145,7 @@ executeUnknownAuthDialog(
|
|||||||
{
|
{
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
VclPtr< UnknownAuthDialog > xDialog(new UnknownAuthDialog(pParent, rXCert, xContext));
|
ScopedVclPtr< UnknownAuthDialog > xDialog(new UnknownAuthDialog(pParent, rXCert, xContext));
|
||||||
|
|
||||||
// Get correct resource string
|
// Get correct resource string
|
||||||
OUString aMessage;
|
OUString aMessage;
|
||||||
@@ -186,7 +186,7 @@ executeSSLWarnDialog(
|
|||||||
{
|
{
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
VclPtr< SSLWarnDialog > xDialog(new SSLWarnDialog(pParent, rXCert, xContext));
|
ScopedVclPtr< SSLWarnDialog > xDialog(new SSLWarnDialog(pParent, rXCert, xContext));
|
||||||
|
|
||||||
// Get correct resource string
|
// Get correct resource string
|
||||||
OUString aMessage_1;
|
OUString aMessage_1;
|
||||||
|
Reference in New Issue
Block a user