diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /reportdesign/source | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 16 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 20 |
2 files changed, 18 insertions, 18 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 41cc15eaf948..2e9c96fe16a9 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -712,16 +712,16 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor ); { // want the dialog to be destroyed before our set - ORptPageDialog aDlg(pParent, pDescriptor.get(), "CharDialog"); + VclPtr<ORptPageDialog> aDlg(new ORptPageDialog(pParent, pDescriptor.get(), "CharDialog")); uno::Reference< report::XShape > xShape( _rxReportControlFormat, uno::UNO_QUERY ); if ( xShape.is() ) - aDlg.RemoveTabPage("background"); - bSuccess = ( RET_OK == aDlg.Execute() ); + aDlg->RemoveTabPage("background"); + bSuccess = ( RET_OK == aDlg->Execute() ); if ( bSuccess ) { lcl_itemsToCharProperties( lcl_getReportControlFont( _rxReportControlFormat,WESTERN ), lcl_getReportControlFont( _rxReportControlFormat,ASIAN ), - lcl_getReportControlFont( _rxReportControlFormat,COMPLEX ), *aDlg.GetOutputItemSet(), _out_rNewValues ); + lcl_getReportControlFont( _rxReportControlFormat,COMPLEX ), *aDlg->GetOutputItemSet(), _out_rNewValues ); } } } @@ -1027,13 +1027,13 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula CharClass aCC(_xContext, aLangTag); svl::SharedStringPool aStringPool(&aCC); - FormulaDialog aDlg( - pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool); + VclPtr<FormulaDialog> aDlg(new FormulaDialog( + pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool)); - bSuccess = aDlg.Execute() == RET_OK; + bSuccess = aDlg->Execute() == RET_OK; if ( bSuccess ) { - OUString sFormula = aDlg.getCurrentFormula(); + OUString sFormula = aDlg->getCurrentFormula(); if ( sFormula[0] == '=' ) _in_out_rFormula = "rpt:" + sFormula.copy(1); else diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 549fa2f33c36..c0d7373d2d72 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -1568,8 +1568,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > uno::Reference< report::XFormattedField> xFormattedField(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY); if ( xFormattedField.is() ) { - ConditionalFormattingDialog aDlg( getView(), xFormattedField.get(), *this ); - aDlg.Execute(); + VclPtr<ConditionalFormattingDialog> aDlg(new ConditionalFormattingDialog( getView(), xFormattedField.get(), *this )); + aDlg->Execute(); } } break; @@ -1578,8 +1578,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { if ( !aArgs.getLength() ) { - ODateTimeDialog aDlg(getView(),getDesignView()->getCurrentSection(),this); - aDlg.Execute(); + VclPtr<ODateTimeDialog> aDlg(new ODateTimeDialog(getView(),getDesignView()->getCurrentSection(),this)); + aDlg->Execute(); } else createDateTime(aArgs); @@ -1590,8 +1590,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { if ( !aArgs.getLength() ) { - OPageNumberDialog aDlg(getView(),m_xReportDefinition,this); - aDlg.Execute(); + VclPtr<OPageNumberDialog> aDlg(new OPageNumberDialog(getView(),m_xReportDefinition,this)); + aDlg->Execute(); } else createPageNumber(aArgs); @@ -2481,15 +2481,15 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ } { // want the dialog to be destroyed before our set - ORptPageDialog aDlg(getView(), pDescriptor.get(),_xSection.is() + VclPtr<ORptPageDialog> aDlg(new ORptPageDialog(getView(), pDescriptor.get(),_xSection.is() ? OUString("BackgroundDialog") - : OUString("PageDialog")); - if (RET_OK == aDlg.Execute()) + : OUString("PageDialog"))); + if (RET_OK == aDlg->Execute()) { // ItemSet->UNO // UNO-properties - const SfxItemSet* pSet = aDlg.GetOutputItemSet(); + const SfxItemSet* pSet = aDlg->GetOutputItemSet(); if ( _xSection.is() ) { const SfxPoolItem* pItem; |