summaryrefslogtreecommitdiff
path: root/cui/source/inc/iconcdlg.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/inc/iconcdlg.hxx')
-rw-r--r--cui/source/inc/iconcdlg.hxx32
1 files changed, 17 insertions, 15 deletions
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 8831eb65f3d0..74b686d17ca5 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -40,8 +40,8 @@ class IconChoiceDialog;
class IconChoicePage;
// Create-Function
-typedef IconChoicePage* (*CreatePage)(vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet &rAttrSet);
-typedef const sal_uInt16* (*GetPageRanges)(); // gives international Which-value
+typedef VclPtr<IconChoicePage> (*CreatePage)(vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet &rAttrSet);
+typedef const sal_uInt16* (*GetPageRanges)(); // gives international Which-value
/// Data-structure for pages in dialog
struct IconChoicePageData
@@ -49,7 +49,7 @@ struct IconChoicePageData
sal_uInt16 nId;
CreatePage fnCreatePage; ///< pointer to the factory
GetPageRanges fnGetRanges; ///< pointer to the ranges-function
- IconChoicePage* pPage; ///< the TabPage itself
+ VclPtr<IconChoicePage> pPage; ///< the TabPage itself
bool bOnDemand; ///< Flag: ItemSet onDemand
bool bRefresh; ///< Flag: page has to be newly initialized
@@ -73,7 +73,7 @@ private :
const SfxItemSet* pSet;
OUString aUserString;
bool bHasExchangeSupport;
- IconChoiceDialog* pDialog;
+ VclPtr<IconChoiceDialog> pDialog;
void SetDialog( IconChoiceDialog* pNew ) { pDialog = pNew; }
IconChoiceDialog* GetDialog() const { return pDialog; }
@@ -85,11 +85,12 @@ private :
protected :
IconChoicePage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet );
- sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); }
- sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); }
+ sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); }
+ sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); }
public :
- virtual ~IconChoicePage();
+ virtual ~IconChoicePage();
+ virtual void dispose() SAL_OVERRIDE;
const SfxItemSet& GetItemSet() const { return *pSet; }
@@ -125,18 +126,18 @@ private :
::std::vector< IconChoicePageData* > maPageList;
- SvtIconChoiceCtrl *m_pIconCtrl;
+ VclPtr<SvtIconChoiceCtrl> m_pIconCtrl;
sal_uInt16 mnCurrentPageId;
// Buttons
- OKButton *m_pOKBtn;
- PushButton *m_pApplyBtn;
- CancelButton *m_pCancelBtn;
- HelpButton *m_pHelpBtn;
- PushButton *m_pResetBtn;
+ VclPtr<OKButton> m_pOKBtn;
+ VclPtr<PushButton> m_pApplyBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
+ VclPtr<HelpButton> m_pHelpBtn;
+ VclPtr<PushButton> m_pResetBtn;
- VclVBox *m_pTabContainer;
+ VclPtr<VclVBox> m_pTabContainer;
const SfxItemSet* pSet;
SfxItemSet* pOutSet;
SfxItemSet* pExampleSet;
@@ -167,7 +168,7 @@ protected :
SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
inline SfxItemSet* GetInputSetImpl() { return const_cast<SfxItemSet*>(pSet); }
inline IconChoicePage* GetTabPage( sal_uInt16 nPageId )
- { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); }
+ { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage.get():NULL); }
void RefreshInputSet();
void ActivatePageImpl ();
@@ -182,6 +183,7 @@ public :
IconChoiceDialog ( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription,
const SfxItemSet * pItemSet = 0 );
virtual ~IconChoiceDialog ();
+ virtual void dispose() SAL_OVERRIDE;
// interface
SvxIconChoiceCtrlEntry* AddTabPage(