diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-20 11:27:10 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:37:44 +0100 |
commit | 61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch) | |
tree | 77a28e38763bc5f9d95e2c278601d31dc6fbf65d /reportdesign | |
parent | f1d9eef4163e88a3cb6360178b52ce441e65d8ae (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 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 2e9c96fe16a9..5b7e37119812 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -712,7 +712,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor ); { // 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 ); if ( xShape.is() ) aDlg->RemoveTabPage("background"); @@ -1027,7 +1027,7 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula CharClass aCC(_xContext, aLangTag); svl::SharedStringPool aStringPool(&aCC); - VclPtr<FormulaDialog> aDlg(new FormulaDialog( + ScopedVclPtr<FormulaDialog> aDlg(new FormulaDialog( pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool)); bSuccess = aDlg->Execute() == RET_OK; diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 330f54c43677..e256afe9e952 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -1567,7 +1567,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > uno::Reference< report::XFormattedField> xFormattedField(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY); if ( xFormattedField.is() ) { - VclPtr<ConditionalFormattingDialog> aDlg(new ConditionalFormattingDialog( getView(), xFormattedField.get(), *this )); + ScopedVclPtr<ConditionalFormattingDialog> aDlg(new ConditionalFormattingDialog( getView(), xFormattedField.get(), *this )); aDlg->Execute(); } } @@ -1577,7 +1577,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { if ( !aArgs.getLength() ) { - VclPtr<ODateTimeDialog> aDlg(new ODateTimeDialog(getView(),getDesignView()->getCurrentSection(),this)); + ScopedVclPtr<ODateTimeDialog> aDlg(new ODateTimeDialog(getView(),getDesignView()->getCurrentSection(),this)); aDlg->Execute(); } else @@ -1589,7 +1589,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { if ( !aArgs.getLength() ) { - VclPtr<OPageNumberDialog> aDlg(new OPageNumberDialog(getView(),m_xReportDefinition,this)); + ScopedVclPtr<OPageNumberDialog> aDlg(new OPageNumberDialog(getView(),m_xReportDefinition,this)); aDlg->Execute(); } else @@ -2480,7 +2480,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ } { // want the dialog to be destroyed before our set - VclPtr<ORptPageDialog> aDlg(new ORptPageDialog(getView(), pDescriptor.get(),_xSection.is() + ScopedVclPtr<ORptPageDialog> aDlg(new ORptPageDialog(getView(), pDescriptor.get(),_xSection.is() ? OUString("BackgroundDialog") : OUString("PageDialog"))); if (RET_OK == aDlg->Execute()) |