diff options
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/insrc.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/newtabledlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/splitcelldlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 263 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 134 | ||||
-rw-r--r-- | cui/source/inc/insrc.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/newtabledlg.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/splitcelldlg.hxx | 1 |
9 files changed, 229 insertions, 191 deletions
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx index 13f18c3b5493..a6d6a4bd2304 100644 --- a/cui/source/dialogs/insrc.cxx +++ b/cui/source/dialogs/insrc.cxx @@ -47,10 +47,16 @@ SvxInsRowColDlg::SvxInsRowColDlg(vcl::Window* pParent, bool bCol, const OString& SvxInsRowColDlg::~SvxInsRowColDlg() { + disposeOnce(); +} + +void SvxInsRowColDlg::dispose() +{ m_pCountEdit.clear(); m_pBeforeBtn.clear(); m_pAfterBtn.clear(); m_pDialog.disposeAndClear(); + SvxAbstractInsRowColDlg::dispose(); } short SvxInsRowColDlg::Execute() diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx index 6c02303647f2..50e752789f95 100644 --- a/cui/source/dialogs/newtabledlg.cxx +++ b/cui/source/dialogs/newtabledlg.cxx @@ -30,9 +30,15 @@ SvxNewTableDialog::SvxNewTableDialog() SvxNewTableDialog::~SvxNewTableDialog() { + disposeOnce(); +} + +void SvxNewTableDialog::dispose() +{ mpNumColumns.clear(); mpNumRows.clear(); m_pDialog.disposeAndClear(); + SvxAbstractNewTableDialog::dispose(); } short SvxNewTableDialog::Execute() diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 8f7b433521d6..a737b9ed6a32 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -71,7 +71,7 @@ using namespace css::document; void ShowErrorDialog( const Any& aException ) { - std::unique_ptr<SvxScriptErrorDialog> pDlg(new SvxScriptErrorDialog( aException )); + ScopedVclPtrInstance<SvxScriptErrorDialog> pDlg( aException ); pDlg->Execute(); } diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index 3fdf3e578327..f786644b9ba6 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -66,11 +66,17 @@ SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical, SvxSplitTableDlg::~SvxSplitTableDlg() { + disposeOnce(); +} + +void SvxSplitTableDlg::dispose() +{ m_pCountEdit.clear(); m_pHorzBox.clear(); m_pVertBox.clear(); m_pPropCB.clear(); m_pDialog.disposeAndClear(); + SvxAbstractSplittTableDialog::dispose(); } IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton, void ) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 47f4f4c7e59c..01e97c794872 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -143,7 +143,13 @@ IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl); // virtual VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl() { + disposeOnce(); +} + +void VclAbstractDialog2_Impl::dispose() +{ m_pDlg.disposeAndClear(); + VclAbstractDialog2::dispose(); } // virtual @@ -798,7 +804,7 @@ bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const } // Create dialogs with simplest interface -VclAbstractDialog* AbstractDialogFactory_Impl::CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) { VclPtr<Dialog> pDlg; switch ( nResId ) @@ -834,11 +840,11 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateVclDialog( vcl::Window* pPa } if ( pDlg ) - return new CuiVclAbstractDialog_Impl( pDlg ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg ); return nullptr; } -VclAbstractDialog* AbstractDialogFactory_Impl::CreateFrameDialog( const Reference< frame::XFrame >& rxFrame, +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog( const Reference< frame::XFrame >& rxFrame, sal_uInt32 nResId, const OUString& rParameter ) { VclPtr<Dialog> pDlg; @@ -855,19 +861,19 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateFrameDialog( const Referenc } if ( pDlg ) - return new CuiVclAbstractDialog_Impl( pDlg ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg ); else return nullptr; } // TabDialog outside the drawing layer -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) { VclPtrInstance<OfaAutoCorrDlg> pDlg( nullptr, pAttrSet ); - return new CuiAbstractTabDialog_Impl( pDlg ); + return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg ); } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateCustomizeTabDialog( +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateCustomizeTabDialog( const SfxItemSet* pAttrSet, const Reference< frame::XFrame >& xViewFrame ) { @@ -875,96 +881,95 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateCustomizeTabDialog( VclPtrInstance<SvxConfigDialog> pDlg1( nullptr, pAttrSet ); pDlg1->SetFrame(xViewFrame); pDlg.reset(pDlg1); - return new CuiAbstractTabDialog_Impl( pDlg ); + return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg ); } // TabDialog that use functionality of the drawing layer -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTextTabDialog( vcl::Window* pParent, +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttrSet, SdrView* pView ) { VclPtrInstance<SvxTextTabDialog> pDlg( pParent, pAttrSet, pView ); - return new CuiAbstractTabDialog_Impl( pDlg ); + return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg ); } // TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog -AbstractSvxCaptionDialog* AbstractDialogFactory_Impl::CreateCaptionDialog( vcl::Window* pParent, +VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog( vcl::Window* pParent, const SdrView* pView, SvxAnchorIds nAnchorTypes ) { VclPtrInstance<SvxCaptionTabDialog> pDlg( pParent, pView, nAnchorTypes ); - return new AbstractSvxCaptionDialog_Impl( pDlg ); + return VclPtr<AbstractSvxCaptionDialog_Impl>::Create( pDlg ); } -AbstractSvxDistributeDialog* AbstractDialogFactory_Impl::CreateSvxDistributeDialog(const SfxItemSet& rAttr) +VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(const SfxItemSet& rAttr) { VclPtrInstance<SvxDistributeDialog> pDlg( nullptr, rAttr, SvxDistributeHorizontal::NONE, SvxDistributeVertical::NONE); - return new AbstractSvxDistributeDialog_Impl( pDlg ); + return VclPtr<AbstractSvxDistributeDialog_Impl>::Create( pDlg ); } -AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(vcl::Window* pParent, +VclPtr<AbstractHangulHanjaConversionDialog> AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(vcl::Window* pParent, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) { VclPtrInstance<HangulHanjaConversionDialog> pDlg( pParent, _ePrimaryDirection); - return new AbstractHangulHanjaConversionDialog_Impl( pDlg ); + return VclPtr<AbstractHangulHanjaConversionDialog_Impl>::Create( pDlg ); } -AbstractThesaurusDialog* AbstractDialogFactory_Impl::CreateThesaurusDialog( vcl::Window* pParent, +VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialog( vcl::Window* pParent, css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus, const OUString &rWord, sal_Int16 nLanguage ) { VclPtrInstance<SvxThesaurusDialog> pDlg( pParent, xThesaurus, rWord, nLanguage ); - return new AbstractThesaurusDialog_Impl( pDlg ); + return VclPtr<AbstractThesaurusDialog_Impl>::Create( pDlg ); } -AbstractHyphenWordDialog* AbstractDialogFactory_Impl::CreateHyphenWordDialog( vcl::Window* pParent, +VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog( vcl::Window* pParent, const OUString &rWord, LanguageType nLang, css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ) { VclPtrInstance<SvxHyphenWordDialog> pDlg( rWord, nLang, pParent, xHyphen, pWrapper ); - return new AbstractHyphenWordDialog_Impl( pDlg ); + return VclPtr<AbstractHyphenWordDialog_Impl>::Create( pDlg ); } -AbstractFmShowColsDialog * AbstractDialogFactory_Impl::CreateFmShowColsDialog() +VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog() { VclPtrInstance<FmShowColsDialog> pDlg( nullptr ); - return new AbstractFmShowColsDialog_Impl( pDlg ); + return VclPtr<AbstractFmShowColsDialog_Impl>::Create( pDlg ); } -AbstractSvxZoomDialog * AbstractDialogFactory_Impl::CreateSvxZoomDialog( vcl::Window* pParent, + +VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet) { VclPtrInstance<SvxZoomDialog> pDlg( pParent, rCoreSet); - return new AbstractSvxZoomDialog_Impl( pDlg ); + return VclPtr<AbstractSvxZoomDialog_Impl>::Create( pDlg ); } -AbstractSpellDialog * AbstractDialogFactory_Impl::CreateSvxSpellDialog( +VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog( vcl::Window* pParent, SfxBindings* pBindings, svx::SpellDialogChildWindow* pSpellChildWindow ) { VclPtrInstance<svx::SpellDialog> pDlg(pSpellChildWindow, pParent, pBindings); - return new AbstractSpellDialog_Impl(pDlg); + return VclPtr<AbstractSpellDialog_Impl>::Create(pDlg); } -VclAbstractRefreshableDialog * AbstractDialogFactory_Impl::CreateActualizeProgressDialog( vcl::Window* pParent, GalleryTheme* pThm ) +VclPtr<VclAbstractRefreshableDialog> AbstractDialogFactory_Impl::CreateActualizeProgressDialog( vcl::Window* pParent, GalleryTheme* pThm ) { VclPtrInstance<ActualizeProgress> pDlg(pParent, pThm); - return new VclAbstractRefreshableDialog_Impl( pDlg ); + return VclPtr<VclAbstractRefreshableDialog_Impl>::Create( pDlg ); } -VclAbstractDialog* -AbstractDialogFactory_Impl::CreateScriptErrorDialog(const css::uno::Any& rException) +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateScriptErrorDialog(const css::uno::Any& rException) { - return new SvxScriptErrorDialog(rException); + return VclPtr<SvxScriptErrorDialog>::Create(rException); } -AbstractScriptSelectorDialog* -AbstractDialogFactory_Impl::CreateScriptSelectorDialog( +VclPtr<AbstractScriptSelectorDialog> AbstractDialogFactory_Impl::CreateScriptSelectorDialog( vcl::Window* pParent, const Reference< frame::XFrame >& _rxFrame ) { VclPtrInstance<SvxScriptSelectorDialog> pDlg(pParent, false/*bShowSlots*/, _rxFrame); - return new AbstractScriptSelectorDialog_Impl(pDlg); + return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(pDlg); } OUString AbstractScriptSelectorDialog_Impl::GetScriptURL() const @@ -981,72 +986,72 @@ void AbstractScriptSelectorDialog_Impl::SetRunLabel() return; } -VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( vcl::Window* pParent, +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage) { VclPtrInstance<SvxScriptOrgDialog> pDlg( pParent, rLanguage); - return new CuiVclAbstractDialog_Impl( pDlg ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg ); } -AbstractTitleDialog * AbstractDialogFactory_Impl::CreateTitleDialog( vcl::Window* pParent, +VclPtr<AbstractTitleDialog> AbstractDialogFactory_Impl::CreateTitleDialog( vcl::Window* pParent, const OUString& rOldText) { VclPtrInstance<TitleDialog> pDlg( pParent, rOldText); - return new AbstractTitleDialog_Impl( pDlg ); + return VclPtr<AbstractTitleDialog_Impl>::Create( pDlg ); } -AbstractGalleryIdDialog * AbstractDialogFactory_Impl::CreateGalleryIdDialog( vcl::Window* pParent, +VclPtr<AbstractGalleryIdDialog> AbstractDialogFactory_Impl::CreateGalleryIdDialog( vcl::Window* pParent, GalleryTheme* pThm ) { VclPtrInstance<GalleryIdDialog> pDlg( pParent, pThm); - return new AbstractGalleryIdDialog_Impl( pDlg ); + return VclPtr<AbstractGalleryIdDialog_Impl>::Create( pDlg ); } -VclAbstractDialog2 * AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog( +VclPtr<VclAbstractDialog2> AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog( ExchangeData* pData, SfxItemSet* pItemSet) { VclPtrInstance<GalleryThemeProperties> pDlg( nullptr, pData, pItemSet); - return new VclAbstractDialog2_Impl( pDlg ); + return VclPtr<VclAbstractDialog2_Impl>::Create( pDlg ); } -AbstractURLDlg * AbstractDialogFactory_Impl::CreateURLDialog( vcl::Window* pParent, +VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog( vcl::Window* pParent, const OUString& rURL, const OUString& rAltText, const OUString& rDescription, const OUString& rTarget, const OUString& rName, TargetList& rTargetList ) { VclPtrInstance<URLDlg> pDlg( pParent, rURL, rAltText, rDescription, rTarget, rName, rTargetList); - return new AbstractURLDlg_Impl( pDlg ); + return VclPtr<AbstractURLDlg_Impl>::Create( pDlg ); } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabItemDialog(vcl::Window* pParent, +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTabItemDialog(vcl::Window* pParent, const SfxItemSet& rSet) { VclPtrInstance<SvxSearchFormatDialog> pDlg(pParent, rSet); - return new CuiAbstractTabDialog_Impl(pDlg); + return VclPtr<CuiAbstractTabDialog_Impl>::Create(pDlg); } -VclAbstractDialog* AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog( vcl::Window* pParent, +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog( vcl::Window* pParent, SearchAttrItemList& rLst, const sal_uInt16* pWhRanges ) { VclPtrInstance<SvxSearchAttributeDialog> pDlg( pParent, rLst, pWhRanges); - return new CuiVclAbstractDialog_Impl( pDlg ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg ); } -AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( vcl::Window* pParent, +VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( vcl::Window* pParent, bool bRelax, sal_uInt16 nOther, sal_uInt16 nShorter, sal_uInt16 nLonger) { VclPtrInstance<SvxSearchSimilarityDialog> pDlg( pParent, bRelax, nOther, nShorter, nLonger ); - return new AbstractSvxSearchSimilarityDialog_Impl( pDlg ); + return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create( pDlg ); } //UUUU -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( vcl::Window* pParent, const SfxItemSet& rCoreSet, bool bEnableSelector, @@ -1058,19 +1063,19 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( bEnableSelector, bEnableDrawingLayerFillStyles); - return new CuiAbstractTabDialog_Impl(pDlg); + return VclPtr<CuiAbstractTabDialog_Impl>::Create(pDlg); } -AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( vcl::Window* pParent, +VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView, SvxAnchorIds nAnchorTypes ) { VclPtrInstance<SvxTransformTabDialog> pDlg( pParent, pAttr,pView, nAnchorTypes); - return new AbstractSvxTransformTabDialog_Impl( pDlg ); + return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create( pDlg ); } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( vcl::Window* pParent, +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView, bool bSizeTabPage @@ -1079,73 +1084,73 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( v VclPtrInstance<SvxTransformTabDialog> pDlg( pParent, pAttr,pSdrView, bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize); pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" ); pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" ); - return new CuiAbstractTabDialog_Impl( pDlg ); + return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg ); } -AbstractSvxJSearchOptionsDialog * AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( vcl::Window* pParent, +VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( vcl::Window* pParent, const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags) { VclPtrInstance<SvxJSearchOptionsDialog> pDlg( pParent, rOptionsSet, nInitialFlags ); - return new AbstractSvxJSearchOptionsDialog_Impl( pDlg ); + return VclPtr<AbstractSvxJSearchOptionsDialog_Impl>::Create( pDlg ); } -AbstractFmInputRecordNoDialog * AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog( ) +VclPtr<AbstractFmInputRecordNoDialog> AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog( ) { VclPtrInstance<FmInputRecordNoDialog> pDlg( nullptr ); - return new AbstractFmInputRecordNoDialog_Impl( pDlg ); + return VclPtr<AbstractFmInputRecordNoDialog_Impl>::Create( pDlg ); } -AbstractSvxNewDictionaryDialog * AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog( vcl::Window* pParent ) +VclPtr<AbstractSvxNewDictionaryDialog> AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog( vcl::Window* pParent ) { VclPtrInstance<SvxNewDictionaryDialog> pDlg( pParent ); - return new AbstractSvxNewDictionaryDialog_Impl( pDlg ); + return VclPtr<AbstractSvxNewDictionaryDialog_Impl>::Create( pDlg ); } -VclAbstractDialog* AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( vcl::Window* pParent, +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( vcl::Window* pParent, const OUString& rName ) { VclPtrInstance<SvxEditDictionaryDialog> pDlg( pParent, rName ); - return new CuiVclAbstractDialog_Impl( pDlg ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg ); } -AbstractSvxNameDialog * AbstractDialogFactory_Impl::CreateSvxNameDialog( vcl::Window* pParent, +VclPtr<AbstractSvxNameDialog> AbstractDialogFactory_Impl::CreateSvxNameDialog( vcl::Window* pParent, const OUString& rName, const OUString& rDesc ) { VclPtrInstance<SvxNameDialog> pDlg( pParent, rName, rDesc ); - return new AbstractSvxNameDialog_Impl( pDlg ); + return VclPtr<AbstractSvxNameDialog_Impl>::Create( pDlg ); } -AbstractSvxObjectNameDialog* AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(const OUString& rName ) +VclPtr<AbstractSvxObjectNameDialog> AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(const OUString& rName ) { - return new AbstractSvxObjectNameDialog_Impl(VclPtr<SvxObjectNameDialog>::Create(nullptr, rName)); + return VclPtr<AbstractSvxObjectNameDialog_Impl>::Create(VclPtr<SvxObjectNameDialog>::Create(nullptr, rName)); } -AbstractSvxObjectTitleDescDialog* AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(const OUString& rTitle, const OUString& rDescription) +VclPtr<AbstractSvxObjectTitleDescDialog> AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(const OUString& rTitle, const OUString& rDescription) { - return new AbstractSvxObjectTitleDescDialog_Impl(VclPtr<SvxObjectTitleDescDialog>::Create(nullptr, rTitle, rDescription)); + return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(VclPtr<SvxObjectTitleDescDialog>::Create(nullptr, rTitle, rDescription)); } -AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(vcl::Window* pParent) +VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(vcl::Window* pParent) { VclPtrInstance<SvxMultiPathDialog> pDlg(pParent); - return new AbstractSvxMultiPathDialog_Impl( pDlg ); + return VclPtr<AbstractSvxMultiPathDialog_Impl>::Create( pDlg ); } -AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(vcl::Window* pParent) +VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(vcl::Window* pParent) { VclPtrInstance<SvxPathSelectDialog> pDlg(pParent); - return new AbstractSvxPathSelectDialog_Impl( pDlg ); + return VclPtr<AbstractSvxPathSelectDialog_Impl>::Create( pDlg ); } -AbstractSvxHpLinkDlg * AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (vcl::Window* pParent, +VclPtr<AbstractSvxHpLinkDlg> AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings) { SvxHpLinkDlg* pDlg = VclPtr<SvxHpLinkDlg>::Create( pParent, pBindings ); - return new AbstractSvxHpLinkDlg_Impl(pDlg); + return VclPtr<AbstractSvxHpLinkDlg_Impl>::Create(pDlg); } -AbstractFmSearchDialog* AbstractDialogFactory_Impl::CreateFmSearchDialog(vcl::Window* pParent, +VclPtr<AbstractFmSearchDialog> AbstractDialogFactory_Impl::CreateFmSearchDialog(vcl::Window* pParent, const OUString& strInitialText, const ::std::vector< OUString >& _rContexts, sal_Int16 nInitialContext, @@ -1153,70 +1158,70 @@ AbstractFmSearchDialog* AbstractDialogFactory_Impl::CreateFmSearchDialog(vcl::W { VclPtrInstance<FmSearchDialog> pDlg( pParent, strInitialText, _rContexts, nInitialContext, lnkContextSupplier ); - return new AbstractFmSearchDialog_Impl( pDlg ); + return VclPtr<AbstractFmSearchDialog_Impl>::Create( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (vcl::Window* pParent, +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (vcl::Window* pParent, const Graphic& rGraphic) { VclPtrInstance<GraphicFilterEmboss> pDlg( pParent, rGraphic, RectPoint::MM ); - return new AbstractGraphicFilterDialog_Impl( pDlg ); + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPoster(vcl::Window* pParent, +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterPoster(vcl::Window* pParent, const Graphic& rGraphic) { VclPtrInstance<GraphicFilterPoster> pDlg( pParent, rGraphic, 16 ); - return new AbstractGraphicFilterDialog_Impl( pDlg ); + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSepia (vcl::Window* pParent, +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSepia (vcl::Window* pParent, const Graphic& rGraphic) { VclPtrInstance<GraphicFilterSepia> pDlg( pParent, rGraphic, 10 ); - return new AbstractGraphicFilterDialog_Impl( pDlg ); + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(vcl::Window* pParent, +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(vcl::Window* pParent, const Graphic& rGraphic, double nRadius) { VclPtrInstance<GraphicFilterSmooth> pDlg( pParent, rGraphic, nRadius ); - return new AbstractGraphicFilterDialog_Impl( pDlg ); + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (vcl::Window* pParent, +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (vcl::Window* pParent, const Graphic& rGraphic) { VclPtrInstance<GraphicFilterSolarize> pDlg( pParent, rGraphic, 128, false/*bInvert*/ ); - return new AbstractGraphicFilterDialog_Impl( pDlg ); + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (vcl::Window* pParent, +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (vcl::Window* pParent, const Graphic& rGraphic) { VclPtrInstance<GraphicFilterMosaic> pDlg(pParent, rGraphic, 4, 4, false/*bEnhanceEdges*/); - return new AbstractGraphicFilterDialog_Impl( pDlg ); + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create( pDlg ); } -AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( vcl::Window* pParent, +VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow) { VclPtrInstance<SvxAreaTabDialog> pDlg( pParent, pAttr, pModel, bShadow ); - return new AbstractSvxAreaTabDialog_Impl( pDlg ); + return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create( pDlg ); } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog SdrModel* pModel, const SdrObject* pObj , bool bHasObj) { VclPtrInstance<SvxLineTabDialog> pDlg( pParent, pAttr, pModel,pObj,bHasObj ); - return new CuiAbstractTabDialog_Impl( pDlg ); + return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg ); } -SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent, +VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent, const SfxItemSet& rAttr, const Reference< XFrame >& _rxDocumentFrame, sal_uInt32 nResId @@ -1236,11 +1241,11 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pPa } if ( pDlg ) - return new CuiAbstractSfxDialog_Impl( pDlg ); + return VclPtr<CuiAbstractSfxDialog_Impl>::Create( pDlg ); return nullptr; } -SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent, +VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent, const SfxItemSet& rAttr, const SdrView* pView, sal_uInt32 nResId @@ -1264,17 +1269,17 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pPa } if ( pDlg ) - return new CuiAbstractSfxDialog_Impl( pDlg ); + return VclPtr<CuiAbstractSfxDialog_Impl>::Create( pDlg ); return nullptr; } -AbstractSvxPostItDialog* AbstractDialogFactory_Impl::CreateSvxPostItDialog( vcl::Window* pParent, +VclPtr<AbstractSvxPostItDialog> AbstractDialogFactory_Impl::CreateSvxPostItDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet, bool bPrevNext ) { VclPtrInstance<SvxPostItDialog> pDlg( pParent, rCoreSet, bPrevNext ); - return new AbstractSvxPostItDialog_Impl( pDlg ); + return VclPtr<AbstractSvxPostItDialog_Impl>::Create( pDlg ); } class SvxMacroAssignDialog : public VclAbstractDialog @@ -1290,10 +1295,11 @@ public: virtual short Execute() override; virtual ~SvxMacroAssignDialog() override; + virtual void dispose() override; private: SfxItemSet m_aItems; - VclPtr< SvxMacroAssignDlg > m_pDialog; + VclPtr<SvxMacroAssignDlg > m_pDialog; }; short SvxMacroAssignDialog::Execute() @@ -1303,13 +1309,20 @@ short SvxMacroAssignDialog::Execute() SvxMacroAssignDialog::~SvxMacroAssignDialog() { + disposeOnce(); +} + +void SvxMacroAssignDialog::dispose() +{ + m_pDialog.clear(); + VclAbstractDialog::dispose(); } -VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg( +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg( vcl::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent ) { - return new SvxMacroAssignDialog( _pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent ); + return VclPtr<SvxMacroAssignDialog>::Create( _pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent ); } // Factories for TabPages @@ -1450,7 +1463,7 @@ GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI return nullptr; } -SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommand, +VclPtr<SfxAbstractInsertObjectDialog> AbstractDialogFactory_Impl::CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommand, const Reference < css::embed::XStorage >& xStor, const SvObjectServerList* pList ) { @@ -1463,77 +1476,77 @@ SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDia if ( pDlg ) { pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) ); - return new AbstractInsertObjectDialog_Impl( pDlg ); + return VclPtr<AbstractInsertObjectDialog_Impl>::Create( pDlg ); } return nullptr; } -VclAbstractDialog* AbstractDialogFactory_Impl::CreateEditObjectDialog( const OUString& rCommand, +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog( const OUString& rCommand, const Reference < css::embed::XEmbeddedObject >& xObj ) { if ( rCommand == ".uno:InsertObjectFloatingFrame" ) { VclPtrInstance<SfxInsertFloatingFrameDialog> pDlg( nullptr, xObj ); pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) ); - return new CuiVclAbstractDialog_Impl( pDlg ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg ); } return nullptr; } -SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( vcl::Window* pParent ) +VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog( vcl::Window* pParent ) { - return new AbstractPasteDialog_Impl( VclPtr<SvPasteObjectDialog>::Create( pParent ) ); + return VclPtr<AbstractPasteDialog_Impl>::Create( VclPtr<SvPasteObjectDialog>::Create( pParent ) ); } -SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p) +VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p) { VclPtrInstance<SvBaseLinksDlg> pLinkDlg( pParent, pMgr, bHTML ); if ( p ) pLinkDlg->SetActLink(p); - return new AbstractLinksDialog_Impl( pLinkDlg ); + return VclPtr<AbstractLinksDialog_Impl>::Create( pLinkDlg ); } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* /*pObj*/ ) +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* /*pObj*/ ) { - return new CuiAbstractTabDialog_Impl( VclPtr<SvxFormatCellsDialog>::Create( nullptr, pAttr, pModel ) ); + return VclPtr<CuiAbstractTabDialog_Impl>::Create( VclPtr<SvxFormatCellsDialog>::Create( nullptr, pAttr, pModel ) ); } -SvxAbstractSplittTableDialog* AbstractDialogFactory_Impl::CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical ) +VclPtr<SvxAbstractSplittTableDialog> AbstractDialogFactory_Impl::CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical ) { - return new SvxSplitTableDlg( pParent, bIsTableVertical, nMaxVertical, 99 ); + return VclPtr<SvxSplitTableDlg>::Create( pParent, bIsTableVertical, nMaxVertical, 99 ); } -SvxAbstractNewTableDialog* AbstractDialogFactory_Impl::CreateSvxNewTableDialog() +VclPtr<SvxAbstractNewTableDialog> AbstractDialogFactory_Impl::CreateSvxNewTableDialog() { - return new SvxNewTableDialog; + return VclPtr<SvxNewTableDialog>::Create(); } -VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog( +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId, const OUString& /*rApplicationContext*/ ) { - return new CuiVclAbstractDialog_Impl( VclPtr<OfaTreeOptionsDialog>::Create( pParent, rExtensionId ) ); + return VclPtr<CuiVclAbstractDialog_Impl>::Create( VclPtr<OfaTreeOptionsDialog>::Create( pParent, rExtensionId ) ); } -SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ) +VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ) { - return new SvxInsRowColDlg( pParent, bCol, sHelpId ); + return VclPtr<SvxInsRowColDlg>::Create( pParent, bCol, sHelpId ); } -AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog( +VclPtr<AbstractPasswordToOpenModifyDialog> AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog( vcl::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) { VclPtrInstance<PasswordToOpenModifyDialog> pDlg( pParent, 0, nMaxPasswdLen, bIsPasswordToModify ); - return new AbstractPasswordToOpenModifyDialog_Impl( pDlg ); + return VclPtr<AbstractPasswordToOpenModifyDialog_Impl>::Create( pDlg ); } -AbstractScreenshotAnnotationDlg* AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg( +VclPtr<AbstractScreenshotAnnotationDlg> AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg( vcl::Window * pParent, Dialog& rParentDialog) { VclPtrInstance<ScreenshotAnnotationDlg> pDlg(pParent, rParentDialog); - return new AbstractScreenshotAnnotationDlg_Impl(pDlg); + return VclPtr<AbstractScreenshotAnnotationDlg_Impl>::Create(pDlg); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 510d18e49836..adf568ecaaae 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -82,6 +82,7 @@ class VclAbstractDialog2_Impl : public VclAbstractDialog2 public: explicit VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {} virtual ~VclAbstractDialog2_Impl() override; + virtual void dispose() override; virtual void StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override; virtual long GetResult() override; private: @@ -454,137 +455,140 @@ class AbstractScreenshotAnnotationDlg_Impl : public AbstractScreenshotAnnotation class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory { public: - virtual VclAbstractDialog* CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) override; + virtual VclPtr<VclAbstractDialog> CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) override; - virtual SfxAbstractDialog* CreateSfxDialog( vcl::Window* pParent, + virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( vcl::Window* pParent, const SfxItemSet& rAttr, const SdrView* pView, sal_uInt32 nResId ) override; - virtual SfxAbstractDialog* CreateSfxDialog( vcl::Window* pParent, + virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( vcl::Window* pParent, const SfxItemSet& rAttr, const css::uno::Reference< css::frame::XFrame >& _rxFrame, sal_uInt32 nResId ) override; - virtual VclAbstractDialog* CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rxFrame, + virtual VclPtr<VclAbstractDialog> CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rxFrame, sal_uInt32 nResId, const OUString& rParameter ) override; - virtual SfxAbstractTabDialog* CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) override; - virtual SfxAbstractTabDialog* CreateCustomizeTabDialog( + virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) override; + virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog( const SfxItemSet* pAttrSet, const css::uno::Reference< css::frame::XFrame >& xViewFrame ) override; - virtual SfxAbstractTabDialog* CreateTextTabDialog( vcl::Window* pParent, + virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttrSet, SdrView* pView ) override; - virtual SfxAbstractTabDialog* CreateTabItemDialog(vcl::Window* pParent, + virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(vcl::Window* pParent, const SfxItemSet& rSet) override; - virtual AbstractSvxCaptionDialog* CreateCaptionDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxCaptionDialog> + CreateCaptionDialog( vcl::Window* pParent, const SdrView* pView, SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE ) override; - virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(const SfxItemSet& rAttr) override; - virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommmand, - const css::uno::Reference < css::embed::XStorage >& xStor, - const SvObjectServerList* pList = nullptr ) override; - virtual VclAbstractDialog* CreateEditObjectDialog( const OUString& rCommmand, - const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override; - virtual SfxAbstractPasteDialog* CreatePasteDialog( vcl::Window* pParent ) override; - virtual SfxAbstractLinksDialog* CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr ) override; - - virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( vcl::Window* _pParent, + virtual VclPtr<AbstractSvxDistributeDialog> + CreateSvxDistributeDialog(const SfxItemSet& rAttr) override; + virtual VclPtr<SfxAbstractInsertObjectDialog> + CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommmand, + const css::uno::Reference < css::embed::XStorage >& xStor, + const SvObjectServerList* pList = nullptr ) override; + virtual VclPtr<VclAbstractDialog> CreateEditObjectDialog( const OUString& rCommmand, + const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override; + virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog( vcl::Window* pParent ) override; + virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr ) override; + + virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog( vcl::Window* _pParent, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) override; - virtual AbstractThesaurusDialog* CreateThesaurusDialog( vcl::Window*, css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus, + virtual VclPtr<AbstractThesaurusDialog> CreateThesaurusDialog( vcl::Window*, css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus, const OUString &rWord, sal_Int16 nLanguage ) override; - virtual AbstractHyphenWordDialog* CreateHyphenWordDialog( vcl::Window*, + virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog( vcl::Window*, const OUString &rWord, LanguageType nLang, css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ) override; - virtual AbstractFmShowColsDialog * CreateFmShowColsDialog() override; - virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( vcl::Window* pParent, + virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog() override; + virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet) override; //UUUU add for SvxBorderBackgroundDlg - virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( + virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg( vcl::Window* pParent, const SfxItemSet& rCoreSet, bool bEnableSelector, bool bEnableDrawingLayerFillStyles = false) override; - virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView, SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override ; - virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( vcl::Window* pParent, + virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView, bool bSizeTabPage ) override; - virtual AbstractSpellDialog * CreateSvxSpellDialog( + virtual VclPtr<AbstractSpellDialog> CreateSvxSpellDialog( vcl::Window* pParent, SfxBindings* pBindings, svx::SpellDialogChildWindow* pSpellChildWindow ) override; - virtual VclAbstractRefreshableDialog * CreateActualizeProgressDialog( vcl::Window* pParent, GalleryTheme* pThm ) override; - virtual AbstractTitleDialog * CreateTitleDialog( vcl::Window* pParent, + virtual VclPtr<VclAbstractRefreshableDialog> CreateActualizeProgressDialog( vcl::Window* pParent, GalleryTheme* pThm ) override; + virtual VclPtr<AbstractTitleDialog> CreateTitleDialog( vcl::Window* pParent, const OUString& rOldText) override; - virtual AbstractGalleryIdDialog * CreateGalleryIdDialog( vcl::Window* pParent, + virtual VclPtr<AbstractGalleryIdDialog> CreateGalleryIdDialog( vcl::Window* pParent, GalleryTheme* pThm) override; - virtual VclAbstractDialog2 * CreateGalleryThemePropertiesDialog( + virtual VclPtr<VclAbstractDialog2> CreateGalleryThemePropertiesDialog( ExchangeData* pData, SfxItemSet* pItemSet) override; - virtual AbstractURLDlg * CreateURLDialog( vcl::Window* pParent, + virtual VclPtr<AbstractURLDlg> CreateURLDialog( vcl::Window* pParent, const OUString& rURL, const OUString& rAltText, const OUString& rDescription, const OUString& rTarget, const OUString& rName, TargetList& rTargetList ) override; - virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( vcl::Window* pParent, + virtual VclPtr<VclAbstractDialog> CreateSvxSearchAttributeDialog( vcl::Window* pParent, SearchAttrItemList& rLst, const sal_uInt16* pWhRanges) override; - virtual AbstractSvxSearchSimilarityDialog * CreateSvxSearchSimilarityDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( vcl::Window* pParent, bool bRelax, sal_uInt16 nOther, sal_uInt16 nShorter, sal_uInt16 nLonger) override; - virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxJSearchOptionsDialog> CreateSvxJSearchOptionsDialog( vcl::Window* pParent, const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags) override; - virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog() override; - virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( vcl::Window* pParent ) override; - virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( vcl::Window* pParent, + virtual VclPtr<AbstractFmInputRecordNoDialog> CreateFmInputRecordNoDialog() override; + virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog( vcl::Window* pParent ) override; + virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog( vcl::Window* pParent, const OUString& rName) override; - virtual AbstractSvxNameDialog * CreateSvxNameDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog( vcl::Window* pParent, const OUString& rName, const OUString& rDesc ) override; // #i68101# - virtual AbstractSvxObjectNameDialog* CreateSvxObjectNameDialog(const OUString& rName ) override; - virtual AbstractSvxObjectTitleDescDialog* CreateSvxObjectTitleDescDialog(const OUString& rTitle, const OUString& rDescription) override; + virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(const OUString& rName ) override; + virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(const OUString& rTitle, const OUString& rDescription) override; - virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(vcl::Window* pParent) override; - virtual AbstractSvxMultiPathDialog * CreateSvxPathSelectDialog(vcl::Window* pParent) override; - virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings) override; - virtual AbstractFmSearchDialog* CreateFmSearchDialog(vcl::Window* pParent, + virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(vcl::Window* pParent) override; + virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(vcl::Window* pParent) override; + virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings) override; + virtual VclPtr<AbstractFmSearchDialog> CreateFmSearchDialog(vcl::Window* pParent, const OUString& strInitialText, const ::std::vector< OUString >& _rContexts, sal_Int16 nInitialContext, const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier) override; - virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(vcl::Window* pParent, + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterEmboss(vcl::Window* pParent, const Graphic& rGraphic) override; - virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(vcl::Window* pParent, + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterPoster(vcl::Window* pParent, const Graphic& rGraphic) override; - virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (vcl::Window* pParent, + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSepia (vcl::Window* pParent, const Graphic& rGraphic) override; - virtual AbstractGraphicFilterDialog * CreateGraphicFilterSmooth (vcl::Window* pParent, + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSmooth (vcl::Window* pParent, const Graphic& rGraphic, double nRadius) override; - virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (vcl::Window* pParent, + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSolarize (vcl::Window* pParent, const Graphic& rGraphic) override; - virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (vcl::Window* pParent, + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterMosaic (vcl::Window* pParent, const Graphic& rGraphic) override; - virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow ) override; - virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, + virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj, bool bHasObj = true ) override; - virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( vcl::Window* pParent, + virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false ) override; @@ -593,17 +597,17 @@ public: virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) override; virtual DialogGetRanges GetDialogGetRangesFunc() override; - virtual VclAbstractDialog* CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage ) override; + virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage ) override; - virtual AbstractScriptSelectorDialog* + virtual VclPtr<AbstractScriptSelectorDialog> CreateScriptSelectorDialog( vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& _rxFrame ) override; - virtual VclAbstractDialog* CreateScriptErrorDialog(const css::uno::Any& rException) override; + virtual VclPtr<VclAbstractDialog> CreateScriptErrorDialog(const css::uno::Any& rException) override; - virtual VclAbstractDialog* CreateSvxMacroAssignDlg( + virtual VclPtr<VclAbstractDialog> CreateSvxMacroAssignDlg( vcl::Window* _pParent, const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, @@ -611,20 +615,20 @@ public: const sal_uInt16 _nInitiallySelectedEvent ) override; - virtual SfxAbstractTabDialog* CreateSvxFormatCellsDialog( const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj ) override; + virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog( const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj ) override; - virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical ) override; + virtual VclPtr<SvxAbstractSplittTableDialog> CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical ) override; - virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog() override ; + virtual VclPtr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog() override ; - virtual VclAbstractDialog* CreateOptionsDialog( + virtual VclPtr<VclAbstractDialog> CreateOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId, const OUString& rApplicationContext ) override; - virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ) override; + virtual VclPtr<SvxAbstractInsRowColDlg> CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ) override; - virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog(vcl::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) override; + virtual VclPtr<AbstractPasswordToOpenModifyDialog> CreatePasswordToOpenModifyDialog(vcl::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) override; - virtual AbstractScreenshotAnnotationDlg* CreateScreenshotAnnotationDlg(vcl::Window * pParent, Dialog& rParentDialog) override; + virtual VclPtr<AbstractScreenshotAnnotationDlg> CreateScreenshotAnnotationDlg(vcl::Window * pParent, Dialog& rParentDialog) override; }; #endif diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx index 9739e28f4c8f..e6fa2a01b94f 100644 --- a/cui/source/inc/insrc.hxx +++ b/cui/source/inc/insrc.hxx @@ -45,6 +45,7 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg public: SvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ); virtual ~SvxInsRowColDlg() override; + virtual void dispose() override; virtual short Execute() override; diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx index 6dd1de126ae4..91de08ff6f23 100644 --- a/cui/source/inc/newtabledlg.hxx +++ b/cui/source/inc/newtabledlg.hxx @@ -36,6 +36,7 @@ private: public: SvxNewTableDialog(); virtual ~SvxNewTableDialog() override; + virtual void dispose() override; virtual short Execute() override; diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx index df85c2f73cb8..6ff4d0c9abc5 100644 --- a/cui/source/inc/splitcelldlg.hxx +++ b/cui/source/inc/splitcelldlg.hxx @@ -40,6 +40,7 @@ class SvxSplitTableDlg : public SvxAbstractSplittTableDialog public: SvxSplitTableDlg(vcl::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal ); virtual ~SvxSplitTableDlg() override; + virtual void dispose() override; DECL_LINK( ClickHdl, Button *, void ); |