diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 12:10:27 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 12:14:28 +0100 |
commit | 0a497cb52a2ffecd94178eed296ba8ae7f526358 (patch) | |
tree | 9ca24fc64bc20085dc8f055114b67736cd08119b /filter/source | |
parent | 0703fc22519b391cece54f9d67012cffd9867765 (diff) |
Use VclPtr for OGenericUnoDialog::createDialog.
Change-Id: I0c2040889931a4700735339c5252f8d5fee234ff
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/flash/swfdialog.cxx | 7 | ||||
-rw-r--r-- | filter/source/flash/swfdialog.hxx | 2 | ||||
-rw-r--r-- | filter/source/pdf/pdfdialog.cxx | 12 | ||||
-rw-r--r-- | filter/source/pdf/pdfdialog.hxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgdialog.cxx | 9 | ||||
-rw-r--r-- | filter/source/svg/svgdialog.hxx | 2 |
6 files changed, 14 insertions, 20 deletions
diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index 0817f86bcbed..9fa75b711001 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -146,9 +146,9 @@ Sequence< OUString > SAL_CALL SWFDialog::getSupportedServiceNames() -Dialog* SWFDialog::createDialog( vcl::Window* pParent ) +VclPtr<Dialog> SWFDialog::createDialog( vcl::Window* pParent ) { - Dialog* pRet = NULL; + VclPtr<Dialog> pRet; if (mxSrcDoc.is()) { @@ -172,8 +172,7 @@ Dialog* SWFDialog::createDialog( vcl::Window* pParent ) { } */ - ImpSWFDialog* pDlg = new ImpSWFDialog( pParent, maFilterData ); - pRet = pDlg; + pRet.reset( VclPtr<ImpSWFDialog>::Create( pParent, maFilterData ) ); } return pRet; diff --git a/filter/source/flash/swfdialog.hxx b/filter/source/flash/swfdialog.hxx index 931432e33c4c..2130f79f38b2 100644 --- a/filter/source/flash/swfdialog.hxx +++ b/filter/source/flash/swfdialog.hxx @@ -54,7 +54,7 @@ protected: virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getImplementationName() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual Dialog* createDialog( vcl::Window* pParent ) SAL_OVERRIDE; + virtual VclPtr<Dialog> createDialog( vcl::Window* pParent ) SAL_OVERRIDE; virtual void executedDialog( sal_Int16 nExecutionResult ) SAL_OVERRIDE; virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE; diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index 0c5c9b4b9d0d..a4c914928873 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -107,17 +107,11 @@ Sequence< OUString > SAL_CALL PDFDialog::getSupportedServiceNames() -Dialog* PDFDialog::createDialog( vcl::Window* pParent ) +VclPtr<Dialog> PDFDialog::createDialog( vcl::Window* pParent ) { - Dialog* pRet = NULL; - if( mxSrcDoc.is() ) - { - ImpPDFTabDialog* pDlg = new ImpPDFTabDialog( pParent, maFilterData, mxSrcDoc ); - pRet = pDlg; - } - - return pRet; + return VclPtr<ImpPDFTabDialog>::Create( pParent, maFilterData, mxSrcDoc ); + return VclPtr<Dialog>(); } diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx index 85135fa24079..e343902e2481 100644 --- a/filter/source/pdf/pdfdialog.hxx +++ b/filter/source/pdf/pdfdialog.hxx @@ -51,7 +51,7 @@ protected: virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getImplementationName() throw (RuntimeException, std::exception) SAL_OVERRIDE; virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual Dialog* createDialog( vcl::Window* pParent ) SAL_OVERRIDE; + virtual VclPtr<Dialog> createDialog( vcl::Window* pParent ) SAL_OVERRIDE; virtual void executedDialog( sal_Int16 nExecutionResult ) SAL_OVERRIDE; virtual Reference< XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(RuntimeException, std::exception) SAL_OVERRIDE; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE; diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx index 0420570004f2..70318fe0f6a5 100644 --- a/filter/source/svg/svgdialog.cxx +++ b/filter/source/svg/svgdialog.cxx @@ -143,11 +143,12 @@ Sequence< OUString > SAL_CALL SVGDialog::getSupportedServiceNames() -Dialog* SVGDialog::createDialog( vcl::Window* pParent ) +VclPtr<Dialog> SVGDialog::createDialog( vcl::Window* pParent ) { - return( ( /*KA: *mapResMgr.get() &&*/ mxSrcDoc.is() ) ? - new ImpSVGDialog( pParent/*KA: , *mapResMgr*/, maFilterData ) : - NULL ); + if( mxSrcDoc.is() ) + return VclPtr<ImpSVGDialog>::Create( pParent, maFilterData ); + else + return VclPtr<Dialog>(); } diff --git a/filter/source/svg/svgdialog.hxx b/filter/source/svg/svgdialog.hxx index 064240ff49c7..7c87789c2438 100644 --- a/filter/source/svg/svgdialog.hxx +++ b/filter/source/svg/svgdialog.hxx @@ -56,7 +56,7 @@ protected: virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getImplementationName() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual Dialog* createDialog( vcl::Window* pParent ) SAL_OVERRIDE; + virtual VclPtr<Dialog> createDialog( vcl::Window* pParent ) SAL_OVERRIDE; virtual void executedDialog( sal_Int16 nExecutionResult ) SAL_OVERRIDE; virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE; |