summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 14:42:23 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:17:00 +0100
commit00f2787a4a68633206635743298926bf2e65a8fa (patch)
treeefc3a4f02b3d8acd69d25071499be5a475cb0338 /filter/source
parentb3dcb2996b70caabda1939c9e85545c97d78404a (diff)
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/graphic/GraphicExportDialog.cxx6
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx4
-rw-r--r--filter/source/pdf/impdialog.cxx24
-rw-r--r--filter/source/pdf/pdfinteract.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx28
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx4
6 files changed, 35 insertions, 35 deletions
diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx
index ca98685e20ab..64f090a7fa66 100644
--- a/filter/source/graphic/GraphicExportDialog.cxx
+++ b/filter/source/graphic/GraphicExportDialog.cxx
@@ -107,10 +107,10 @@ void GraphicExportDialog::setTitle( const OUString& aTitle )
sal_Int16 GraphicExportDialog::execute() throw ( RuntimeException, std::exception )
{
sal_Int16 nReturn = ui::dialogs::ExecutableDialogResults::CANCEL;
- GraphicExportOptionsDialog graphicExportOptionsDialog( Application::GetDefDialogParent(), mxSourceDocument );
- if (graphicExportOptionsDialog.Execute() == RET_OK )
+ VclPtr<GraphicExportOptionsDialog> graphicExportOptionsDialog(new GraphicExportOptionsDialog( Application::GetDefDialogParent(), mxSourceDocument ) );
+ if (graphicExportOptionsDialog->Execute() == RET_OK )
{
- maFilterDataSequence = graphicExportOptionsDialog.getFilterData();
+ maFilterDataSequence = graphicExportOptionsDialog->getFilterData();
nReturn = ui::dialogs::ExecutableDialogResults::OK;
}
return nReturn;
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index edd7061a13d0..4a5d8f28cd0e 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -486,8 +486,8 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag() );
if( pResMgr )
{
- InfoBox aInfoBox( NULL, ResId(KEY_VERSION_CHECK, *pResMgr).toString() );
- aInfoBox.Execute();
+ VclPtr<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 4d08f140d2c4..073039dab505 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -812,8 +812,8 @@ 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() )
{
- MessageDialog aBox(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING);
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING));
+ aBox->Execute();
}
return 0;
@@ -1197,17 +1197,17 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const ImpPDFTabDialog* paParen
IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
{
- SfxPasswordDialog aPwdDialog( this, &msUserPwdTitle );
- aPwdDialog.SetMinLen( 0 );
- aPwdDialog.ShowMinLengthText(false);
- aPwdDialog.ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 );
- aPwdDialog.SetText(msStrSetPwd);
- aPwdDialog.SetGroup2Text(msOwnerPwdTitle);
- aPwdDialog.AllowAsciiOnly();
- if( aPwdDialog.Execute() == RET_OK ) //OK issued get password and set it
+ VclPtr<SfxPasswordDialog> aPwdDialog(new SfxPasswordDialog( this, &msUserPwdTitle ) );
+ aPwdDialog->SetMinLen( 0 );
+ aPwdDialog->ShowMinLengthText(false);
+ aPwdDialog->ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 );
+ aPwdDialog->SetText(msStrSetPwd);
+ aPwdDialog->SetGroup2Text(msOwnerPwdTitle);
+ aPwdDialog->AllowAsciiOnly();
+ if( aPwdDialog->Execute() == RET_OK ) //OK issued get password and set it
{
- OUString aUserPW( aPwdDialog.GetPassword() );
- OUString aOwnerPW( aPwdDialog.GetPassword2() );
+ OUString aUserPW( aPwdDialog->GetPassword() );
+ OUString aOwnerPW( aPwdDialog->GetPassword2() );
mbHaveUserPassword = !aUserPW.isEmpty();
mbHaveOwnerPassword = !aOwnerPW.isEmpty();
diff --git a/filter/source/pdf/pdfinteract.cxx b/filter/source/pdf/pdfinteract.cxx
index 579d9ef3fb40..ad7641ded77c 100644
--- a/filter/source/pdf/pdfinteract.cxx
+++ b/filter/source/pdf/pdfinteract.cxx
@@ -53,8 +53,8 @@ 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] );
- ImplErrorDialog aDlg( aCodes );
- aDlg.Execute();
+ VclPtr<ImplErrorDialog> aDlg(new ImplErrorDialog( aCodes ) );
+ aDlg->Execute();
bHandled = true;
}
return bHandled;
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 57d8a3d2f5d7..9186fc888e04 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -225,11 +225,11 @@ void XMLFilterSettingsDialog::onNew()
aTempInfo.maDocumentService = "com.sun.star.text.TextDocument";
// execute XML Filter Dialog
- XMLFilterTabDialog aDlg( this, *getXSLTDialogResMgr(), mxContext, &aTempInfo );
- if ( aDlg.Execute() == RET_OK )
+ VclPtr<XMLFilterTabDialog> aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, &aTempInfo ) );
+ if ( aDlg->Execute() == RET_OK )
{
// insert the new filter
- insertOrEdit( aDlg.getNewFilterInfo() );
+ insertOrEdit( aDlg->getNewFilterInfo() );
}
}
@@ -246,10 +246,10 @@ void XMLFilterSettingsDialog::onEdit()
filter_info_impl* pOldInfo = static_cast<filter_info_impl*>(pEntry->GetUserData());
// execute XML Filter Dialog
- XMLFilterTabDialog aDlg( this, *getXSLTDialogResMgr(), mxContext, pOldInfo );
- if ( aDlg.Execute() == RET_OK )
+ VclPtr<XMLFilterTabDialog> aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, pOldInfo ) );
+ if ( aDlg->Execute() == RET_OK )
{
- filter_info_impl* pNewInfo = aDlg.getNewFilterInfo();
+ filter_info_impl* pNewInfo = aDlg->getNewFilterInfo();
if( !(*pOldInfo == *pNewInfo) )
{
@@ -771,8 +771,8 @@ void XMLFilterSettingsDialog::onTest()
{
filter_info_impl* pInfo = static_cast<filter_info_impl*>(pEntry->GetUserData());
- XMLFilterTestDialog aDlg(this, mxContext);
- aDlg.test( *pInfo );
+ VclPtr<XMLFilterTestDialog> aDlg(new XMLFilterTestDialog(this, mxContext));
+ aDlg->test( *pInfo );
}
}
@@ -789,8 +789,8 @@ void XMLFilterSettingsDialog::onDelete()
OUString aMessage(RESIDSTR(STR_WARN_DELETE));
aMessage = aMessage.replaceFirst( aPlaceHolder, pInfo->maFilterName );
- WarningBox aWarnBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage );
- if( aWarnBox.Execute() == RET_YES )
+ VclPtr<WarningBox> aWarnBox(new WarningBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage ));
+ if( aWarnBox->Execute() == RET_YES )
{
try
{
@@ -919,8 +919,8 @@ void XMLFilterSettingsDialog::onSave()
aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() );
}
- InfoBox aBox(this, aMsg );
- aBox.Execute();
+ VclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
+ aBox->Execute();
}
}
@@ -985,8 +985,8 @@ void XMLFilterSettingsDialog::onOpen()
aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) );
}
- InfoBox aBox(this, aMsg );
- aBox.Execute();
+ VclPtr<InfoBox> aBox(new InfoBox(this, aMsg ));
+ aBox->Execute();
}
}
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index b5e28d1053aa..3c286b649c12 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -263,8 +263,8 @@ bool XMLFilterTabDialog::onOk()
aMessage = aMessage.replaceAll( "%s", aReplace1 );
}
- MessageDialog aBox(this, aMessage);
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(this, aMessage));
+ aBox->Execute();
if( pFocusWindow )
pFocusWindow->GrabFocus();