diff options
Diffstat (limited to 'dbaccess/source/ui/inc/WTypeSelect.hxx')
-rw-r--r-- | dbaccess/source/ui/inc/WTypeSelect.hxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx index 5f587481e867..d86c70e5f07a 100644 --- a/dbaccess/source/ui/inc/WTypeSelect.hxx +++ b/dbaccess/source/ui/inc/WTypeSelect.hxx @@ -37,7 +37,7 @@ namespace dbaui class OWizTypeSelectControl : public OFieldDescControl { protected: - vcl::Window* m_pParentTabPage; + VclPtr<vcl::Window> m_pParentTabPage; virtual void ActivateAggregate( EControlType eType ) SAL_OVERRIDE; virtual void DeactivateAggregate( EControlType eType ) SAL_OVERRIDE; @@ -53,6 +53,7 @@ namespace dbaui public: OWizTypeSelectControl(vcl::Window* pParent, vcl::Window* pParentTabPage, OTableDesignHelpBar* pHelpBar=NULL); virtual ~OWizTypeSelectControl(); + virtual void dispose() SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData() SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection() SAL_OVERRIDE; @@ -69,13 +70,15 @@ namespace dbaui bool _bSet = false); protected: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - vcl::Window* m_pParentTabPage; + VclPtr<vcl::Window> m_pParentTabPage; public: OWizTypeSelectList( vcl::Window* pParent, WinBits nStyle = WB_BORDER ) : MultiListBox(pParent,nStyle) , m_bPKey(false) , m_pParentTabPage(NULL) {} + virtual ~OWizTypeSelectList(); + virtual void dispose() SAL_OVERRIDE; void SetPKey(bool bPKey) { m_bPKey = bPKey; } void SetParentTabPage(vcl::Window* pParentTabPage) { m_pParentTabPage = pParentTabPage; } }; @@ -91,13 +94,13 @@ namespace dbaui DECL_LINK( ColumnSelectHdl, MultiListBox* ); DECL_LINK( ButtonClickHdl, Button * ); protected: - OWizTypeSelectList *m_pColumnNames; - FixedText *m_pColumns; - OWizTypeSelectControl *m_pTypeControl; - FixedText *m_pAutoType; - FixedText *m_pAutoFt; - NumericField *m_pAutoEt; - PushButton *m_pAutoPb; + VclPtr<OWizTypeSelectList> m_pColumnNames; + VclPtr<FixedText> m_pColumns; + VclPtr<OWizTypeSelectControl> m_pTypeControl; + VclPtr<FixedText> m_pAutoType; + VclPtr<FixedText> m_pAutoFt; + VclPtr<NumericField> m_pAutoEt; + VclPtr<PushButton> m_pAutoPb; Image m_imgPKey; SvStream* m_pParserStream; // stream to read the tokens from or NULL @@ -118,12 +121,13 @@ namespace dbaui OWizTypeSelect(vcl::Window* pParent, SvStream* _pStream = NULL ); virtual ~OWizTypeSelect(); + virtual void dispose() SAL_OVERRIDE; inline void setDisplayRow(sal_Int32 _nRow) { m_nDisplayRow = _nRow - 1; } inline void setDuplicateName(bool _bDuplicateName) { m_bDuplicateName = _bDuplicateName; } }; - typedef OWizTypeSelect* (*TypeSelectionPageFactory)( vcl::Window*, SvStream& ); + typedef VclPtr<OWizTypeSelect> (*TypeSelectionPageFactory)( vcl::Window*, SvStream& ); } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WTYPESELECT_HXX |