diff options
Diffstat (limited to 'include/svtools')
41 files changed, 176 insertions, 139 deletions
diff --git a/include/svtools/DocumentInfoPreview.hxx b/include/svtools/DocumentInfoPreview.hxx index e75877588029..9eba310af05c 100644 --- a/include/svtools/DocumentInfoPreview.hxx +++ b/include/svtools/DocumentInfoPreview.hxx @@ -43,6 +43,7 @@ public: ODocumentInfoPreview(vcl::Window * pParent, WinBits nBits); virtual ~ODocumentInfoPreview(); + virtual void dispose() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; @@ -54,8 +55,8 @@ public: OUString const & rURL); private: - ExtMultiLineEdit m_pEditWin; - std::unique_ptr< SvtDocInfoTable_Impl > m_xInfoTable; + VclPtr<ExtMultiLineEdit> m_pEditWin; + boost::scoped_ptr< SvtDocInfoTable_Impl > m_xInfoTable; LanguageTag m_aLanguageTag; void insertEntry(OUString const & title, OUString const & value); diff --git a/include/svtools/GraphicExportOptionsDialog.hxx b/include/svtools/GraphicExportOptionsDialog.hxx index 1982aa1bc679..884e08b3e2a2 100644 --- a/include/svtools/GraphicExportOptionsDialog.hxx +++ b/include/svtools/GraphicExportOptionsDialog.hxx @@ -37,9 +37,9 @@ class SVT_DLLPUBLIC GraphicExportOptionsDialog : public ModalDialog { private: - NumericField* mpWidth; - NumericField* mpHeight; - ComboBox* mpResolution; + VclPtr<NumericField> mpWidth; + VclPtr<NumericField> mpHeight; + VclPtr<ComboBox> mpResolution; Size mSize100mm; double mResolution; @@ -63,7 +63,7 @@ private: public: GraphicExportOptionsDialog( vcl::Window* pWindow, const css::uno::Reference<css::lang::XComponent>& rxSourceDocument ); virtual ~GraphicExportOptionsDialog(); - + virtual void dispose() SAL_OVERRIDE; css::uno::Sequence<css::beans::PropertyValue> getFilterData(); }; diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx index 5cdad02f1807..a3e4c2caa77b 100644 --- a/include/svtools/PlaceEditDialog.hxx +++ b/include/svtools/PlaceEditDialog.hxx @@ -27,16 +27,15 @@ class SVT_DLLPUBLIC PlaceEditDialog : public ModalDialog { private : - - Edit* m_pEDServerName; - ListBox* m_pLBServerType; + VclPtr<Edit> m_pEDServerName; + VclPtr<ListBox> m_pLBServerType; std::shared_ptr< DetailsContainer > m_xCurrentDetails; - Edit* m_pEDUsername; - OKButton* m_pBTOk; - CancelButton* m_pBTCancel; + VclPtr<Edit> m_pEDUsername; + VclPtr<OKButton> m_pBTOk; + VclPtr<CancelButton> m_pBTCancel; - PushButton* m_pBTDelete; + VclPtr<PushButton> m_pBTDelete; /** Vector holding the details UI control for each server type. @@ -51,11 +50,12 @@ public : PlaceEditDialog( vcl::Window* pParent); PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Place> &rPlace ); virtual ~PlaceEditDialog(); + virtual void dispose() SAL_OVERRIDE; // Returns a place instance with given information std::shared_ptr<Place> GetPlace(); - OUString GetServerName() { return m_pEDServerName->GetText(); } + OUString GetServerName() { return m_pEDServerName->GetText(); } OUString GetServerUrl(); private: diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx index a4997b3113c7..9c17ecea0191 100644 --- a/include/svtools/ServerDetailsControls.hxx +++ b/include/svtools/ServerDetailsControls.hxx @@ -25,7 +25,7 @@ class DetailsContainer { private: Link m_aChangeHdl; - VclFrame* m_pFrame; + VclPtr<VclFrame> m_pFrame; public: DetailsContainer( VclBuilderContainer* pBuilder, const OString& rFrame ); @@ -57,9 +57,9 @@ class HostDetailsContainer : public DetailsContainer OUString m_sScheme; protected: - Edit* m_pEDHost; - NumericField* m_pEDPort; - Edit* m_pEDPath; + VclPtr<Edit> m_pEDHost; + VclPtr<NumericField> m_pEDPort; + VclPtr<Edit> m_pEDPath; public: HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme ); @@ -81,7 +81,7 @@ class HostDetailsContainer : public DetailsContainer class DavDetailsContainer : public HostDetailsContainer { private: - CheckBox* m_pCBDavs; + VclPtr<CheckBox> m_pCBDavs; public: DavDetailsContainer( VclBuilderContainer* pBuilder ); @@ -99,9 +99,9 @@ class DavDetailsContainer : public HostDetailsContainer class SmbDetailsContainer : public DetailsContainer { private: - Edit* m_pEDHost; - Edit* m_pEDShare; - Edit* m_pEDPath; + VclPtr<Edit> m_pEDHost; + VclPtr<Edit> m_pEDShare; + VclPtr<Edit> m_pEDPath; public: SmbDetailsContainer( VclBuilderContainer* pBuilder ); @@ -120,11 +120,11 @@ class CmisDetailsContainer : public DetailsContainer std::vector< OUString > m_aRepoIds; OUString m_sRepoId; - Edit* m_pEDBinding; - ListBox* m_pLBRepository; - Button* m_pBTRepoRefresh; - ListBox* m_pLBServerType; - Edit* m_pEDPath; + VclPtr<Edit> m_pEDBinding; + VclPtr<ListBox> m_pLBRepository; + VclPtr<Button> m_pBTRepoRefresh; + VclPtr<ListBox> m_pLBServerType; + VclPtr<Edit> m_pEDPath; public: CmisDetailsContainer( VclBuilderContainer* pBuilder ); diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx index 0c286ee73cd2..b8811613da1b 100644 --- a/include/svtools/accessibleruler.hxx +++ b/include/svtools/accessibleruler.hxx @@ -38,6 +38,7 @@ #include <comphelper/broadcasthelper.hxx> #include <cppuhelper/implbase5.hxx> #include <comphelper/servicehelper.hxx> +#include <vcl/vclptr.hxx> namespace com { namespace sun { namespace star { namespace awt { struct Point; @@ -198,7 +199,7 @@ private: mxParent; /// pointer to internal representation - Ruler* mpRepr; + VclPtr<Ruler> mpRepr; /// client id in the AccessibleEventNotifier queue sal_uInt32 mnClientId; diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx index d771efb5e473..28bc7edfcc1d 100644 --- a/include/svtools/addresstemplate.hxx +++ b/include/svtools/addresstemplate.hxx @@ -48,10 +48,10 @@ namespace svt { private: // Controls - ComboBox* m_pDatasource; - PushButton* m_pAdministrateDatasources; - ComboBox* m_pTable; - ScrollBar* m_pFieldScroller; + VclPtr<ComboBox> m_pDatasource; + VclPtr<PushButton> m_pAdministrateDatasources; + VclPtr<ComboBox> m_pTable; + VclPtr<ScrollBar> m_pFieldScroller; // string to display for "no selection" const OUString m_sNoFieldSelection; @@ -100,6 +100,7 @@ namespace svt ); virtual ~AddressBookSourceDialog(); + virtual void dispose() SAL_OVERRIDE; // to be used if the object was constructed for editing a field mapping only void getFieldMapping( diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 8ad76b82caab..fb8fc3a63aa1 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -22,6 +22,7 @@ #include <svtools/svtdllapi.h> #include <vcl/scrbar.hxx> #include <vcl/ctrl.hxx> +#include <vcl/vclptr.hxx> #include <tools/multisel.hxx> #include <svtools/headbar.hxx> #include <svtools/transfer.hxx> @@ -129,9 +130,9 @@ namespace o3tl class BrowseEvent { - vcl::Window* pWin; - long nRow; - Rectangle aRect; + VclPtr<vcl::Window> pWin; + long nRow; + Rectangle aRect; sal_uInt16 nCol; sal_uInt16 nColId; @@ -142,10 +143,10 @@ public: sal_uInt16 nColumn, sal_uInt16 nColumnId, const Rectangle& rRect ); - vcl::Window* GetWindow() const { return pWin; } + vcl::Window* GetWindow() const { return pWin; } long GetRow() const { return nRow; } - sal_uInt16 GetColumn() const { return nCol; } - sal_uInt16 GetColumnId() const { return nColId; } + sal_uInt16 GetColumn() const { return nCol; } + sal_uInt16 GetColumnId() const { return nColId; } const Rectangle& GetRect() const { return aRect; } }; @@ -218,9 +219,9 @@ public: static const sal_uInt16 HandleColumnId = 0; private: - vcl::Window* pDataWin; // window to display data rows - ScrollBar* pVScroll; // vertical scrollbar - ScrollBar aHScroll; // horizontal scrollbar + VclPtr<vcl::Window> pDataWin; // window to display data rows + VclPtr<ScrollBar> pVScroll; // vertical scrollbar + VclPtr<ScrollBar> aHScroll; // horizontal scrollbar long nDataRowHeight; // height of a single data-row sal_uInt16 nTitleLines; // number of lines in title row @@ -391,7 +392,7 @@ protected: void DoHideCursor( const char *pWhoLog ); short GetCursorHideCount() const; - virtual BrowserHeader* CreateHeaderBar( BrowseBox* pParent ); + virtual VclPtr<BrowserHeader> CreateHeaderBar( BrowseBox* pParent ); // HACK(virtual create is not called in Ctor) void SetHeaderBar( BrowserHeader* ); @@ -423,7 +424,8 @@ public: BrowserMode nMode = BrowserMode::NONE ); BrowseBox( vcl::Window* pParent, const ResId& rId, BrowserMode nMode = BrowserMode::NONE ); - virtual ~BrowseBox(); + virtual ~BrowseBox(); + virtual void dispose() SAL_OVERRIDE; // override inherited handler virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; diff --git a/include/svtools/brwhead.hxx b/include/svtools/brwhead.hxx index e60949100731..c82ccace0601 100644 --- a/include/svtools/brwhead.hxx +++ b/include/svtools/brwhead.hxx @@ -29,8 +29,11 @@ class BrowseBox; class SVT_DLLPUBLIC BrowserHeader: public HeaderBar { - BrowseBox* _pBrowseBox; + VclPtr<BrowseBox> _pBrowseBox; +public: + virtual ~BrowserHeader(); + virtual void dispose() SAL_OVERRIDE; protected: virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE; virtual void Select() SAL_OVERRIDE; diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index e970842480a7..48173a37003c 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -258,7 +258,8 @@ protected: public: Calendar( vcl::Window* pParent, WinBits nWinStyle = 0 ); - virtual ~Calendar(); + virtual ~Calendar(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -400,11 +401,11 @@ method in CalendarField and create an own calendar there ourselves. class SVT_DLLPUBLIC CalendarField : public DateField { private: - ImplCFieldFloatWin* mpFloatWin; - Calendar* mpCalendar; + VclPtr<ImplCFieldFloatWin> mpFloatWin; + VclPtr<Calendar> mpCalendar; WinBits mnCalendarStyle; - PushButton* mpTodayBtn; - PushButton* mpNoneBtn; + VclPtr<PushButton> mpTodayBtn; + VclPtr<PushButton> mpNoneBtn; Date maDefaultDate; bool mbToday; bool mbNone; @@ -416,12 +417,13 @@ private: public: CalendarField( vcl::Window* pParent, WinBits nWinStyle ); - virtual ~CalendarField(); + virtual ~CalendarField(); + virtual void dispose() SAL_OVERRIDE; void Select(); virtual bool ShowDropDown( bool bShow ) SAL_OVERRIDE; - Calendar* CreateCalendar( vcl::Window* pParent ); + VclPtr<Calendar> CreateCalendar( vcl::Window* pParent ); Calendar* GetCalendar(); void SetDefaultDate( const Date& rDate ) { maDefaultDate = rDate; } diff --git a/include/svtools/colrdlg.hxx b/include/svtools/colrdlg.hxx index 1919ba0666c4..4fe31bfa1d8a 100644 --- a/include/svtools/colrdlg.hxx +++ b/include/svtools/colrdlg.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SVTOOLS_COLRDLG_HXX #include <svtools/svtdllapi.h> - +#include <vcl/vclptr.hxx> #include <tools/color.hxx> namespace vcl { class Window; } @@ -50,9 +50,9 @@ public: short Execute(); private: - vcl::Window* mpParent; - Color maColor; - sal_Int16 meMode; + VclPtr<vcl::Window> mpParent; + Color maColor; + sal_Int16 meMode; }; #endif // INCLUDED_SVTOOLS_COLRDLG_HXX diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index fe29ee120083..a38f00940fb2 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -155,6 +155,7 @@ public: WinBits nWinStyle = WB_BORDER ); ColorListBox( vcl::Window* pParent, const ResId& rResId ); virtual ~ColorListBox(); + virtual void dispose() SAL_OVERRIDE; virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; @@ -287,7 +288,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox long m_nWidth; OUString m_sNone; - VirtualDevice aVirDev; + ScopedVclPtr<VirtualDevice> aVirDev; Size aTxtSize; Color aColor; Color maPaintCol; @@ -311,6 +312,7 @@ public: LineListBox( vcl::Window* pParent, WinBits nWinStyle = WB_BORDER ); virtual ~LineListBox(); + virtual void dispose() SAL_OVERRIDE; /** Set the width in Twips */ void SetWidth( long nWidth ); @@ -408,6 +410,7 @@ public: FontNameBox( vcl::Window* pParent, WinBits nWinStyle = WB_SORT ); virtual ~FontNameBox(); + virtual void dispose() SAL_OVERRIDE; virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; @@ -433,7 +436,6 @@ private: using ComboBox::SetText; public: FontStyleBox( vcl::Window* pParent, WinBits nBits ); - virtual ~FontStyleBox(); virtual void Select() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; @@ -477,7 +479,6 @@ protected: public: FontSizeBox( vcl::Window* pParent, WinBits nWinStyle = 0 ); - virtual ~FontSizeBox(); void Reformat() SAL_OVERRIDE; void Modify() SAL_OVERRIDE; diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx index 5ff6a2df5510..c6be1c49acf7 100644 --- a/include/svtools/ctrltool.hxx +++ b/include/svtools/ctrltool.hxx @@ -147,8 +147,8 @@ private: OUString maBlack; OUString maBlackItalic; sal_IntPtr* mpSizeAry; - OutputDevice* mpDev; - OutputDevice* mpDev2; + VclPtr<OutputDevice> mpDev; + VclPtr<OutputDevice> mpDev2; boost::ptr_vector<ImplFontListNameInfo> maEntries; SVT_DLLPRIVATE ImplFontListNameInfo* ImplFind( const OUString& rSearchName, sal_uLong* pIndex ) const; diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 43320ef78185..dbc921b58d80 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -85,7 +85,7 @@ namespace svt friend class EditBrowseBox; protected: - Control* pWindow; + VclPtr<Control> pWindow; bool bSuspended; // <true> if the window is hidden and disabled public: @@ -279,13 +279,14 @@ namespace svt class SVT_DLLPUBLIC CheckBoxControl : public Control { - CheckBox* pBox; + VclPtr<CheckBox> pBox; Rectangle aFocusRect; Link m_aClickLink,m_aModifyLink; public: CheckBoxControl(vcl::Window* pParent, WinBits nWinStyle = 0); virtual ~CheckBoxControl(); + virtual void dispose() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual bool PreNotify(NotifyEvent& rEvt) SAL_OVERRIDE; @@ -479,7 +480,7 @@ namespace svt aOldController; ImplSVEvent * nStartEvent, * nEndEvent, * nCellModifiedEvent; // event ids - vcl::Window* m_pFocusWhileRequest; + VclPtr<vcl::Window> m_pFocusWhileRequest; // In ActivateCell, we grab the focus asynchronously, but if between requesting activation // and the asynchornous event the focus has changed, we won't grab it for ourself. @@ -491,14 +492,14 @@ namespace svt mutable bool bPaintStatus : 1; // paint a status (image) in the handle column bool bActiveBeforeTracking; - CheckBoxControl* pCheckBoxPaint; + VclPtr<CheckBoxControl> pCheckBoxPaint; EditBrowseBoxFlags m_nBrowserFlags; ImageList m_aStatusImages; ::std::unique_ptr< EditBrowseBoxImpl> m_aImpl; protected: - BrowserHeader* pHeader; + VclPtr<BrowserHeader> pHeader; bool isGetCellFocusPending() const { return nStartEvent != 0; } void cancelGetCellFocus() { if (nStartEvent) Application::RemoveUserEvent(nStartEvent); nStartEvent = 0; } @@ -509,10 +510,10 @@ namespace svt protected: BrowserHeader* GetHeaderBar() const {return pHeader;} - virtual BrowserHeader* CreateHeaderBar(BrowseBox* pParent) SAL_OVERRIDE; + virtual VclPtr<BrowserHeader> CreateHeaderBar(BrowseBox* pParent) SAL_OVERRIDE; // if you want to have an own header ... - virtual BrowserHeader* imp_CreateHeaderBar(BrowseBox* pParent); + virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent); virtual void ColumnMoved(sal_uInt16 nId) SAL_OVERRIDE; virtual void ColumnResized(sal_uInt16 nColId) SAL_OVERRIDE; @@ -598,6 +599,7 @@ namespace svt EditBrowseBox(vcl::Window* pParent, EditBrowseBoxFlags nBrowserFlags = EditBrowseBoxFlags::NONE, WinBits nBits = WB_TABSTOP, BrowserMode nMode = BrowserMode::NONE ); EditBrowseBox(vcl::Window* pParent, const ResId& rId, EditBrowseBoxFlags nBrowserFlags = EditBrowseBoxFlags::NONE, BrowserMode nMode = BrowserMode::NONE ); virtual ~EditBrowseBox(); + virtual void dispose() SAL_OVERRIDE; bool IsEditing() const {return aController.Is();} void InvalidateStatusCell(long nRow) {RowModified(nRow, 0);} diff --git a/include/svtools/editsyntaxhighlighter.hxx b/include/svtools/editsyntaxhighlighter.hxx index 5099750026b2..be6da6e118e2 100644 --- a/include/svtools/editsyntaxhighlighter.hxx +++ b/include/svtools/editsyntaxhighlighter.hxx @@ -40,7 +40,6 @@ class SVT_DLLPUBLIC MultiLineEditSyntaxHighlight : public MultiLineEdit public: MultiLineEditSyntaxHighlight( vcl::Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER , HighlighterLanguage aLanguage = HIGHLIGHT_SQL); - virtual ~MultiLineEditSyntaxHighlight(); virtual void UpdateData() SAL_OVERRIDE; virtual void SetText(const OUString& rNewText) SAL_OVERRIDE; diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx index 53486c0e4d35..20506dbd7b51 100644 --- a/include/svtools/filectrl.hxx +++ b/include/svtools/filectrl.hxx @@ -54,8 +54,8 @@ namespace o3tl class SVT_DLLPUBLIC FileControl : public vcl::Window { private: - Edit maEdit; - PushButton maButton; + VclPtr<Edit> maEdit; + VclPtr<PushButton> maButton; OUString maButtonText; bool mbOpenDlg; @@ -77,10 +77,11 @@ protected: public: FileControl( vcl::Window* pParent, WinBits nStyle, FileControlMode = FileControlMode::NONE ); - virtual ~FileControl(); + virtual ~FileControl(); + virtual void dispose() SAL_OVERRIDE; - Edit& GetEdit() { return maEdit; } - PushButton& GetButton() { return maButton; } + Edit& GetEdit() { return *maEdit.get(); } + PushButton& GetButton() { return *maButton.get(); } void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; @@ -89,13 +90,13 @@ public: void SetText( const OUString& rStr ) SAL_OVERRIDE; OUString GetText() const SAL_OVERRIDE; - OUString GetSelectedText() const { return maEdit.GetSelected(); } + OUString GetSelectedText() const { return maEdit->GetSelected(); } - void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); } - Selection GetSelection() const { return maEdit.GetSelection(); } + void SetSelection( const Selection& rSelection ) { maEdit->SetSelection( rSelection ); } + Selection GetSelection() const { return maEdit->GetSelection(); } - void SetReadOnly( bool bReadOnly = true ) { maEdit.SetReadOnly( bReadOnly ); } - bool IsReadOnly() const { return maEdit.IsReadOnly(); } + void SetReadOnly( bool bReadOnly = true ) { maEdit->SetReadOnly( bReadOnly ); } + bool IsReadOnly() const { return maEdit->IsReadOnly(); } //use this to manipulate the dialog bevore executing it: diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx index 27384412655a..690efd1aa076 100644 --- a/include/svtools/fileview.hxx +++ b/include/svtools/fileview.hxx @@ -76,6 +76,7 @@ protected: public: SvtFileView( vcl::Window* pParent, WinBits nBits, bool bOnlyFolder, bool bMultiSelection ); virtual ~SvtFileView(); + virtual void dispose() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; @@ -205,10 +206,12 @@ enum QueryDeleteResult_Impl class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public MessageDialog { private: - PushButton* m_pAllButton; + VclPtr<PushButton> m_pAllButton; public: QueryDeleteDlg_Impl(vcl::Window* pParent, const OUString& rName); + virtual ~QueryDeleteDlg_Impl(); + virtual void dispose() SAL_OVERRIDE; void EnableAllButton() { m_pAllButton->Enable(true); } }; diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index 9e8eaf7fe4cb..562cf5ca14f5 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -95,7 +95,6 @@ protected: public: FormattedField(vcl::Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = NULL, sal_Int32 nFormatKey = 0); - virtual ~FormattedField(); // Min-/Max-management bool HasMinValue() const { return m_bHasMin; } @@ -270,6 +269,7 @@ public: } virtual ~DoubleNumericField(); + virtual void dispose() SAL_OVERRIDE; protected: virtual bool CheckText(const OUString& sText) const SAL_OVERRIDE; diff --git a/include/svtools/generictoolboxcontroller.hxx b/include/svtools/generictoolboxcontroller.hxx index 15b542cc3458..d5bf7d7fc51d 100644 --- a/include/svtools/generictoolboxcontroller.hxx +++ b/include/svtools/generictoolboxcontroller.hxx @@ -50,8 +50,8 @@ class SVT_DLLPUBLIC GenericToolboxController : public svt::ToolboxController DECL_STATIC_LINK( GenericToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); private: - ToolBox* m_pToolbox; - sal_uInt16 m_nID; + VclPtr<ToolBox> m_pToolbox; + sal_uInt16 m_nID; }; } diff --git a/include/svtools/genericunodialog.hxx b/include/svtools/genericunodialog.hxx index f0445ff96405..072516f3d5ce 100644 --- a/include/svtools/genericunodialog.hxx +++ b/include/svtools/genericunodialog.hxx @@ -38,6 +38,7 @@ #include <comphelper/propertycontainer.hxx> #include <comphelper/broadcasthelper.hxx> #include <tools/link.hxx> +#include <vcl/vclptr.hxx> class Dialog; namespace vcl { class Window; } @@ -73,7 +74,7 @@ namespace svt ::osl::Mutex m_aExecutionMutex; /// access safety for execute/cancel protected: - Dialog* m_pDialog; /// the dialog to execute + VclPtr<Dialog> m_pDialog; /// the dialog to execute bool m_bExecuting : 1; /// we're currently executing the dialog bool m_bCanceled : 1; /// endDialog was called while we were executing bool m_bTitleAmbiguous : 1; /// m_sTitle has not been set yet @@ -124,7 +125,7 @@ namespace svt but the application-wide solar mutex is (to guard the not thread-safe ctor of the dialog). @param pParent the parent window for the new dialog */ - virtual Dialog* createDialog(vcl::Window* _pParent) = 0; + virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) = 0; /// called to destroy the dialog used. the default implementation just deletes m_pDialog and resets it to NULL virtual void destroyDialog(); diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx index acdb018a59ae..27fd4e8f7865 100644 --- a/include/svtools/headbar.hxx +++ b/include/svtools/headbar.hxx @@ -288,6 +288,7 @@ private: public: HeaderBar( vcl::Window* pParent, WinBits nWinBits = WB_STDHEADERBAR ); virtual ~HeaderBar(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/include/svtools/hyperlabel.hxx b/include/svtools/hyperlabel.hxx index eacfe4896372..cdda74067bab 100644 --- a/include/svtools/hyperlabel.hxx +++ b/include/svtools/hyperlabel.hxx @@ -32,7 +32,7 @@ namespace svt { - class HyperLabelImpl; + class HyperLabelImpl; class HyperLabel : public FixedText { @@ -54,6 +54,7 @@ namespace svt public: HyperLabel( vcl::Window* _pParent, WinBits _nWinStyle = 0 ); virtual ~HyperLabel( ); + virtual void dispose() SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx index 7d2d4f5ccbee..35a0893ec09f 100644 --- a/include/svtools/inettbc.hxx +++ b/include/svtools/inettbc.hxx @@ -63,6 +63,7 @@ public: SvtURLBox( vcl::Window* pParent, WinBits _nStyle, INetProtocol eSmart = INetProtocol::NotValid, bool bSetDefaultHelpID = true ); SvtURLBox( vcl::Window* pParent, const ResId& _rResId, INetProtocol eSmart = INetProtocol::NotValid, bool bSetDefaultHelpID = true ); virtual ~SvtURLBox(); + virtual void dispose() SAL_OVERRIDE; void SetBaseURL( const OUString& rURL ); const OUString& GetBaseURL() const { return aBaseURL; } diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index c48803c88ee9..d862e7d0b31c 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -268,6 +268,7 @@ public: SvtIconChoiceCtrl( vcl::Window* pParent, WinBits nWinStyle = WB_ICON | WB_BORDER ); virtual ~SvtIconChoiceCtrl(); + virtual void dispose() SAL_OVERRIDE; void SetStyle( WinBits nWinStyle ); WinBits GetStyle() const; diff --git a/include/svtools/popupwindowcontroller.hxx b/include/svtools/popupwindowcontroller.hxx index d505e2f04dc2..a455670b8c95 100644 --- a/include/svtools/popupwindowcontroller.hxx +++ b/include/svtools/popupwindowcontroller.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <svtools/toolboxcontroller.hxx> +#include <vcl/vclptr.hxx> namespace vcl { class Window; } @@ -40,7 +41,7 @@ public: const OUString& aCommandURL ); virtual ~PopupWindowController(); - virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) = 0; + virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) = 0; // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/include/svtools/prnsetup.hxx b/include/svtools/prnsetup.hxx index b7ed0fd8f3dc..62d430a053c3 100644 --- a/include/svtools/prnsetup.hxx +++ b/include/svtools/prnsetup.hxx @@ -40,16 +40,16 @@ class QueueInfo; class SVT_DLLPUBLIC PrinterSetupDialog : public ModalDialog { private: - ListBox* m_pLbName; - PushButton* m_pBtnProperties; - PushButton* m_pBtnOptions; - FixedText* m_pFiStatus; - FixedText* m_pFiType; - FixedText* m_pFiLocation; - FixedText* m_pFiComment; - AutoTimer maStatusTimer; - Printer* mpPrinter; - Printer* mpTempPrinter; + VclPtr<ListBox> m_pLbName; + VclPtr<PushButton> m_pBtnProperties; + VclPtr<PushButton> m_pBtnOptions; + VclPtr<FixedText> m_pFiStatus; + VclPtr<FixedText> m_pFiType; + VclPtr<FixedText> m_pFiLocation; + VclPtr<FixedText> m_pFiComment; + AutoTimer maStatusTimer; + VclPtr<Printer> mpPrinter; + VclPtr<Printer> mpTempPrinter; SVT_DLLPRIVATE void ImplSetInfo(); @@ -60,7 +60,8 @@ private: public: PrinterSetupDialog( vcl::Window* pWindow ); - virtual ~PrinterSetupDialog(); + virtual ~PrinterSetupDialog(); + virtual void dispose() SAL_OVERRIDE; void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; } Printer* GetPrinter() const { return mpPrinter; } diff --git a/include/svtools/roadmapwizard.hxx b/include/svtools/roadmapwizard.hxx index 578ba284adb8..237d0f17d78b 100644 --- a/include/svtools/roadmapwizard.hxx +++ b/include/svtools/roadmapwizard.hxx @@ -36,7 +36,7 @@ namespace svt public: typedef sal_Int16 PathId; typedef ::std::vector< WizardTypes::WizardState > WizardPath; - typedef TabPage* (* RoadmapPageFactory)( RoadmapWizard& ); + typedef VclPtr<TabPage> (* RoadmapPageFactory)( RoadmapWizard& ); }; @@ -77,6 +77,7 @@ namespace svt sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ); virtual ~RoadmapWizard( ); + virtual void dispose() SAL_OVERRIDE; void SetRoadmapHelpId( const OString& _rId ); @@ -89,7 +90,7 @@ namespace svt virtual bool canAdvance() const SAL_OVERRIDE; virtual void updateTravelUI() SAL_OVERRIDE; -protected: + protected: /** declares a valid path in the wizard The very first path which is declared is automatically activated. @@ -207,7 +208,7 @@ protected: This member is inherited from OWizardMachine, and default-implemented in this class for all states which have been described using describeState. */ - virtual TabPage* createPage( WizardState _nState ) SAL_OVERRIDE; + virtual VclPtr<TabPage> createPage( WizardState _nState ) SAL_OVERRIDE; /** asks for a new label of the wizard page diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index e19b05a72c61..97c446c4271c 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -606,7 +606,7 @@ class ImplRulerData; class SVT_DLLPUBLIC Ruler : public vcl::Window { private: - VirtualDevice maVirDev; + ScopedVclPtr<VirtualDevice> maVirDev; MapMode maMapMode; long mnBorderOff; long mnWinOff; @@ -708,6 +708,7 @@ protected: public: Ruler( vcl::Window* pParent, WinBits nWinStyle = WB_STDRULER ); virtual ~Ruler(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/include/svtools/scrwin.hxx b/include/svtools/scrwin.hxx index 4e034e69f82d..2396725af54c 100644 --- a/include/svtools/scrwin.hxx +++ b/include/svtools/scrwin.hxx @@ -23,6 +23,7 @@ #include <svtools/svtdllapi.h> #include <vcl/scrbar.hxx> #include <o3tl/typed_flags_set.hxx> +#include <vcl/vclptr.hxx> class DataChangedEvent; @@ -54,9 +55,9 @@ private: long nLinePixH; // size of a line/column (pixel) long nColumnPixW; - ScrollBar aVScroll; // the scrollbars - ScrollBar aHScroll; - ScrollBarBox aCornerWin; // window in the bottom right corner + VclPtr<ScrollBar> aVScroll; // the scrollbars + VclPtr<ScrollBar> aHScroll; + VclPtr<ScrollBarBox> aCornerWin; // window in the bottom right corner bool bScrolling:1, // user controlled scrolling bHandleDragging:1, // scroll window while dragging bHCenter:1, @@ -69,6 +70,8 @@ private: public: ScrollableWindow( vcl::Window* pParent, WinBits nBits = 0, ScrollableWindowFlags = ScrollableWindowFlags::DEFAULT ); + virtual ~ScrollableWindow(); + virtual void dispose() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE; diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx index e3fc9f9cb929..07eb53d48e59 100644 --- a/include/svtools/simptabl.hxx +++ b/include/svtools/simptabl.hxx @@ -29,13 +29,15 @@ class SvSimpleTable; class SVT_DLLPUBLIC SvSimpleTableContainer : public Control { private: - SvSimpleTable* m_pTable; + VclPtr<SvSimpleTable> m_pTable; protected: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; public: SvSimpleTableContainer( vcl::Window* pParent, WinBits nBits = WB_BORDER ); + virtual ~SvSimpleTableContainer(); + virtual void dispose() SAL_OVERRIDE; void SetTable(SvSimpleTable* pTable); @@ -53,7 +55,7 @@ private: Link aHeaderBarDblClickLink; Link aCommandLink; CommandEvent aCEvt; - HeaderBar aHeaderBar; + VclPtr<HeaderBar> aHeaderBar; long nOldPos; sal_uInt16 nHeaderItemId; bool bPaintFlag; @@ -89,6 +91,7 @@ public: SvSimpleTable(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER); virtual ~SvSimpleTable(); + virtual void dispose() SAL_OVERRIDE; void UpdateViewSize(); @@ -126,9 +129,9 @@ public: void SetHeaderBarDblClickHdl( const Link& rLink ) { aHeaderBarDblClickLink = rLink; } const Link& GetHeaderBarDblClickHdl() const { return aHeaderBarDblClickLink; } - void SetHeaderBarHelpId(const OString& rHelpId) {aHeaderBar.SetHelpId(rHelpId);} + void SetHeaderBarHelpId(const OString& rHelpId) { aHeaderBar->SetHelpId(rHelpId); } - HeaderBar& GetTheHeaderBar() {return aHeaderBar;} + HeaderBar& GetTheHeaderBar() { return *aHeaderBar.get(); } }; diff --git a/include/svtools/svmedit.hxx b/include/svtools/svmedit.hxx index 33c2b90fe6f2..0c322f267e04 100644 --- a/include/svtools/svmedit.hxx +++ b/include/svtools/svmedit.hxx @@ -27,7 +27,6 @@ #include <svtools/colorcfg.hxx> - class SVT_DLLPUBLIC MultiLineEdit : public VclMultiLineEdit { public: diff --git a/include/svtools/svmedit2.hxx b/include/svtools/svmedit2.hxx index 2e17023629c9..d6c30d26872b 100644 --- a/include/svtools/svmedit2.hxx +++ b/include/svtools/svmedit2.hxx @@ -28,7 +28,6 @@ class SVT_DLLPUBLIC ExtMultiLineEdit : public MultiLineEdit { public: ExtMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER ); - virtual ~ExtMultiLineEdit(); // methods of TextView void InsertText( const OUString& rNew, bool bSelect = false ); @@ -37,7 +36,7 @@ public: // methods of TextEngine void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd ); void SetLeftMargin( sal_uInt16 nLeftMargin ); - sal_uLong GetParagraphCount() const; + sal_uLong GetParagraphCount() const; }; #endif diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx index dcded33f9c90..5d1d9e1320b9 100644 --- a/include/svtools/svtabbx.hxx +++ b/include/svtools/svtabbx.hxx @@ -65,8 +65,9 @@ protected: public: SvTabListBox( vcl::Window* pParent, WinBits = WB_BORDER ); virtual ~SvTabListBox(); + virtual void dispose() SAL_OVERRIDE; void SetTabs(const long* pTabs, MapUnit = MAP_APPFONT); - sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; } + sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; } using SvTreeListBox::GetTab; long GetTab( sal_uInt16 nTab ) const; void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MAP_APPFONT ); @@ -139,6 +140,7 @@ private: public: SvHeaderTabListBox( vcl::Window* pParent, WinBits nBits ); virtual ~SvHeaderTabListBox(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& ) SAL_OVERRIDE; diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 7e5dc03e90ad..fc44b0f75d3b 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -315,6 +315,8 @@ class SVT_DLLPUBLIC TabBar : public vcl::Window private: std::unique_ptr<TabBar_Impl> mpImpl; + ImplTabBarList* mpItemList; + OUString maEditText; Color maSelColor; Color maSelTextColor; @@ -384,6 +386,7 @@ public: TabBar( vcl::Window* pParent, WinBits nWinStyle = WB_STDTABBAR ); virtual ~TabBar(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index 2b20a31c5f2f..7c679ac5bdb3 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -51,6 +51,7 @@ public: WinBits nBits ); virtual ~ToolbarMenu(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -68,7 +69,7 @@ public: void appendSeparator(); /** creates an empty ValueSet that is initialized and can be inserted with appendEntry. */ - ValueSet* createEmptyValueSetControl(); + VclPtr<ValueSet> createEmptyValueSetControl(); void checkEntry( int nEntryId, bool bCheck = true ); diff --git a/include/svtools/toolpanel/drawerlayouter.hxx b/include/svtools/toolpanel/drawerlayouter.hxx index cba7f020e735..e35d0dd211c9 100644 --- a/include/svtools/toolpanel/drawerlayouter.hxx +++ b/include/svtools/toolpanel/drawerlayouter.hxx @@ -29,12 +29,8 @@ namespace svt { - - class ToolPanelViewShell; class ToolPanelDrawer; - typedef std::shared_ptr< ToolPanelDrawer > PToolPanelDrawer; - //= ToolPanelDrawer @@ -79,7 +75,7 @@ namespace svt private: vcl::Window& m_rParentWindow; IToolPanelDeck& m_rPanelDeck; - ::std::vector< PToolPanelDrawer > m_aDrawers; + ::std::vector< VclPtr<ToolPanelDrawer> > m_aDrawers; ::boost::optional< size_t > m_aLastKnownActivePanel; }; diff --git a/include/svtools/toolpanel/paneltabbar.hxx b/include/svtools/toolpanel/paneltabbar.hxx index 18e4d1ea1197..3e20b2dede70 100644 --- a/include/svtools/toolpanel/paneltabbar.hxx +++ b/include/svtools/toolpanel/paneltabbar.hxx @@ -52,6 +52,7 @@ namespace svt public: PanelTabBar( vcl::Window& i_rParentWindow, IToolPanelDeck& i_rPanelDeck, const TabAlignment i_eAlignment, const TabItemContent i_eItemContent ); virtual ~PanelTabBar(); + virtual void dispose() SAL_OVERRIDE; // attribute access TabItemContent GetTabItemContent() const; diff --git a/include/svtools/toolpanel/toolpaneldeck.hxx b/include/svtools/toolpanel/toolpaneldeck.hxx index d9c06ced6771..211c099deb93 100644 --- a/include/svtools/toolpanel/toolpaneldeck.hxx +++ b/include/svtools/toolpanel/toolpaneldeck.hxx @@ -138,6 +138,7 @@ namespace svt public: ToolPanelDeck( vcl::Window& i_rParent, const WinBits i_nStyle = WB_DIALOGCONTROL ); virtual ~ToolPanelDeck(); + virtual void dispose() SAL_OVERRIDE; // attributes PDeckLayouter GetLayouter() const; diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 3f74b4c7fa37..7d55c17ad403 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -373,6 +373,7 @@ public: SvTreeListBox( vcl::Window* pParent, WinBits nWinStyle=0 ); SvTreeListBox( vcl::Window* pParent, const ResId& rResId ); virtual ~SvTreeListBox(); + virtual void dispose() SAL_OVERRIDE; SvTreeList* GetModel() const { @@ -385,11 +386,11 @@ public: sal_uLong GetEntryCount() const { - return pModel->GetEntryCount(); + return pModel ? pModel->GetEntryCount() : 0; } SvTreeListEntry* First() const { - return pModel->First(); + return pModel ? pModel->First() : NULL; } SvTreeListEntry* Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth = 0 ) const { @@ -401,7 +402,7 @@ public: } SvTreeListEntry* Last() const { - return pModel->Last(); + return pModel ? pModel->Last() : NULL; } SvTreeListEntry* FirstChild( SvTreeListEntry* pParent ) const; @@ -820,7 +821,7 @@ public: struct SvLBoxDDInfo { Application* pApp; - SvTreeListBox* pSource; + VclPtr<SvTreeListBox> pSource; SvTreeListEntry* pDDStartEntry; // Relative position in the Entry at DragBeginn (IconView) long nMouseRelX,nMouseRelY; @@ -833,7 +834,7 @@ class SvInplaceEdit2 Accelerator aAccReturn; Accelerator aAccEscape; Idle aIdle; - Edit* pEdit; + VclPtr<Edit> pEdit; bool bCanceled; bool bAlreadyInCallBack; diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index baebae42db8c..a6a8e5e47ffc 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -197,11 +197,11 @@ class SVT_DLLPUBLIC ValueSet : public Control { private: - VirtualDevice maVirDev; + ScopedVclPtr<VirtualDevice> maVirDev; Timer maTimer; ValueItemList mItemList; ValueSetItemPtr mpNoneItem; - std::unique_ptr<ScrollBar> mxScrollBar; + VclPtr<ScrollBar> mxScrollBar; Rectangle maNoneItemRect; Rectangle maItemListRect; long mnItemWidth; @@ -284,7 +284,8 @@ protected: public: ValueSet( vcl::Window* pParent, WinBits nWinStyle, bool bDisableTransientChildren = false ); ValueSet( vcl::Window* pParent, const ResId& rResId, bool bDisableTransientChildren = false ); - virtual ~ValueSet(); + virtual ~ValueSet(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/include/svtools/wizardmachine.hxx b/include/svtools/wizardmachine.hxx index b5cd150dee07..6865c4e2e74a 100644 --- a/include/svtools/wizardmachine.hxx +++ b/include/svtools/wizardmachine.hxx @@ -100,6 +100,7 @@ namespace svt */ OWizardPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription); virtual ~OWizardPage(); + virtual void dispose() SAL_OVERRIDE; // IWizardPageController overridables virtual void initializePage() SAL_OVERRIDE; @@ -154,15 +155,14 @@ namespace svt // So use the travelXXX methods if you need to travel protected: - OKButton* m_pFinish; - CancelButton* m_pCancel; - PushButton* m_pNextPage; - PushButton* m_pPrevPage; - HelpButton* m_pHelp; + VclPtr<OKButton> m_pFinish; + VclPtr<CancelButton> m_pCancel; + VclPtr<PushButton> m_pNextPage; + VclPtr<PushButton> m_pPrevPage; + VclPtr<HelpButton> m_pHelp; private: - WizardMachineImplData* - m_pImpl; + WizardMachineImplData* m_pImpl; // hold members in this structure to allow keeping compatible when members are added SVT_DLLPRIVATE void addButtons(vcl::Window* _pParent, sal_uInt32 _nButtonFlags); @@ -175,6 +175,7 @@ namespace svt OWizardMachine(vcl::Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags ); OWizardMachine(vcl::Window* _pParent, sal_uInt32 _nButtonFlags ); virtual ~OWizardMachine(); + virtual void dispose() SAL_OVERRIDE; /// enable (or disable) buttons void enableButtons(sal_uInt32 _nWizardButtonFlags, bool _bEnable); @@ -205,7 +206,7 @@ namespace svt // our own overridables /// to override to create new pages - virtual TabPage* createPage(WizardState _nState) = 0; + virtual VclPtr<TabPage> createPage(WizardState _nState) = 0; /// will be called when a new page is about to be displayed virtual void enterState(WizardState _nState); diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index a8c7e4e332f7..00f9d95b9db7 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -202,10 +202,10 @@ private: Size maPageSize; ImplWizPageData* mpFirstPage; ImplWizButtonData* mpFirstBtn; - TabPage* mpCurTabPage; - PushButton* mpPrevBtn; - PushButton* mpNextBtn; - vcl::Window* mpViewWindow; + VclPtr<TabPage> mpCurTabPage; + VclPtr<PushButton> mpPrevBtn; + VclPtr<PushButton> mpNextBtn; + VclPtr<vcl::Window> mpViewWindow; sal_uInt16 mnCurLevel; WindowAlign meViewAlign; Link maActivateHdl; @@ -242,6 +242,7 @@ public: WizardDialog( vcl::Window* pParent, WinBits nStyle = WB_STDTABDIALOG ); WizardDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription ); virtual ~WizardDialog(); + virtual void dispose() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; @@ -272,7 +273,7 @@ public: PushButton* GetNextButton() const { return mpNextBtn; } void SetViewWindow( vcl::Window* pWindow ) { mpViewWindow = pWindow; } - vcl::Window* GetViewWindow() const { return mpViewWindow; } + vcl::Window* GetViewWindow() const { return mpViewWindow; } void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; } WindowAlign GetViewAlign() const { return meViewAlign; } |