summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 11:27:10 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:37:44 +0100
commit61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch)
tree77a28e38763bc5f9d95e2c278601d31dc6fbf65d /filter
parentf1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff)
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphic/GraphicExportDialog.cxx2
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/pdf/impdialog.cxx4
-rw-r--r--filter/source/pdf/pdfinteract.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx12
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx2
6 files changed, 12 insertions, 12 deletions
diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx
index 64f090a7fa66..4f425d8b3273 100644
--- a/filter/source/graphic/GraphicExportDialog.cxx
+++ b/filter/source/graphic/GraphicExportDialog.cxx
@@ -107,7 +107,7 @@ void GraphicExportDialog::setTitle( const OUString& aTitle )
sal_Int16 GraphicExportDialog::execute() throw ( RuntimeException, std::exception )
{
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 )
{
maFilterDataSequence = graphicExportOptionsDialog->getFilterData();
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index ef1a7317c85b..47071f7be51a 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -486,7 +486,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag() );
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();
delete pResMgr;
}
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index c3e6fa1e2419..5a672f44b157 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -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( 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();
}
@@ -1291,7 +1291,7 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const ImpPDFTabDialog* paParen
IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
{
- VclPtr<SfxPasswordDialog> aPwdDialog(new SfxPasswordDialog( this, &msUserPwdTitle ) );
+ ScopedVclPtr<SfxPasswordDialog> aPwdDialog(new SfxPasswordDialog( this, &msUserPwdTitle ) );
aPwdDialog->SetMinLen( 0 );
aPwdDialog->ShowMinLengthText(false);
aPwdDialog->ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 );
diff --git a/filter/source/pdf/pdfinteract.cxx b/filter/source/pdf/pdfinteract.cxx
index ad7641ded77c..0c2750547110 100644
--- a/filter/source/pdf/pdfinteract.cxx
+++ b/filter/source/pdf/pdfinteract.cxx
@@ -53,7 +53,7 @@ sal_Bool SAL_CALL PDFInteractionHandler::handleInteractionRequest( const Referen
sal_Int32 nCodes = aExc.ErrorCodes.getLength();
for( sal_Int32 i = 0; i < nCodes; i++ )
aCodes.insert( (vcl::PDFWriter::ErrorCode)aExc.ErrorCodes.getConstArray()[i] );
- VclPtr<ImplErrorDialog> aDlg(new ImplErrorDialog( aCodes ) );
+ ScopedVclPtr<ImplErrorDialog> aDlg(new ImplErrorDialog( aCodes ) );
aDlg->Execute();
bHandled = true;
}
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 795b97a82341..d889b1473c69 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -242,7 +242,7 @@ void XMLFilterSettingsDialog::onNew()
aTempInfo.maDocumentService = "com.sun.star.text.TextDocument";
// 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 )
{
// insert the new filter
@@ -263,7 +263,7 @@ void XMLFilterSettingsDialog::onEdit()
filter_info_impl* pOldInfo = static_cast<filter_info_impl*>(pEntry->GetUserData());
// 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 )
{
filter_info_impl* pNewInfo = aDlg->getNewFilterInfo();
@@ -788,7 +788,7 @@ void XMLFilterSettingsDialog::onTest()
{
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 );
}
}
@@ -806,7 +806,7 @@ void XMLFilterSettingsDialog::onDelete()
OUString aMessage(RESIDSTR(STR_WARN_DELETE));
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 )
{
try
@@ -936,7 +936,7 @@ void XMLFilterSettingsDialog::onSave()
aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() );
}
- VclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
+ ScopedVclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
aBox->Execute();
}
}
@@ -1002,7 +1002,7 @@ void XMLFilterSettingsDialog::onOpen()
aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) );
}
- VclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
+ ScopedVclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
aBox->Execute();
}
}
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 79409c7dde45..73caf6c297ac 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -265,7 +265,7 @@ bool XMLFilterTabDialog::onOk()
aMessage = aMessage.replaceAll( "%s", aReplace1 );
}
- VclPtr<MessageDialog> aBox(new MessageDialog(this, aMessage));
+ ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, aMessage));
aBox->Execute();
if( pFocusWindow )