summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-28 11:41:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-28 15:08:48 +0100
commite8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch)
treeb322529f4a54a6427862cb20cb4cf87fb6a5d065 /include/sfx2
parent2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff)
parent0cde74f788a054fa2b65107a030dd463b8d11c7a (diff)
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/basedlgs.hxx20
-rw-r--r--include/sfx2/checkin.hxx8
-rw-r--r--include/sfx2/childwin.hxx8
-rw-r--r--include/sfx2/ctrlitem.hxx1
-rw-r--r--include/sfx2/dinfdlg.hxx159
-rw-r--r--include/sfx2/dockwin.hxx1
-rw-r--r--include/sfx2/fcontnr.hxx5
-rw-r--r--include/sfx2/frame.hxx3
-rw-r--r--include/sfx2/infobar.hxx19
-rw-r--r--include/sfx2/ipclient.hxx4
-rw-r--r--include/sfx2/mgetempl.hxx31
-rw-r--r--include/sfx2/module.hxx2
-rw-r--r--include/sfx2/new.hxx1
-rw-r--r--include/sfx2/newstyle.hxx7
-rw-r--r--include/sfx2/objsh.hxx3
-rw-r--r--include/sfx2/passwd.hxx30
-rw-r--r--include/sfx2/printer.hxx5
-rw-r--r--include/sfx2/printopt.hxx46
-rw-r--r--include/sfx2/prnmon.hxx3
-rw-r--r--include/sfx2/recentdocsview.hxx1
-rw-r--r--include/sfx2/securitypage.hxx6
-rw-r--r--include/sfx2/sidebar/ControlFactory.hxx5
-rw-r--r--include/sfx2/sidebar/ControllerItem.hxx3
-rw-r--r--include/sfx2/sidebar/SidebarPanelBase.hxx3
-rw-r--r--include/sfx2/sidebar/SidebarToolBox.hxx1
-rw-r--r--include/sfx2/stbitem.hxx6
-rw-r--r--include/sfx2/styledlg.hxx1
-rw-r--r--include/sfx2/tabdlg.hxx24
-rw-r--r--include/sfx2/taskpane.hxx6
-rw-r--r--include/sfx2/tbxctrl.hxx11
-rw-r--r--include/sfx2/templateabstractview.hxx7
-rw-r--r--include/sfx2/templatedefaultview.hxx1
-rw-r--r--include/sfx2/templatedlg.hxx21
-rw-r--r--include/sfx2/templateinfodlg.hxx11
-rw-r--r--include/sfx2/templatelocalview.hxx1
-rw-r--r--include/sfx2/templateremoteview.hxx2
-rw-r--r--include/sfx2/templdlg.hxx3
-rw-r--r--include/sfx2/thumbnailview.hxx3
-rw-r--r--include/sfx2/thumbnailviewitem.hxx2
-rw-r--r--include/sfx2/titledockwin.hxx14
-rw-r--r--include/sfx2/viewsh.hxx9
41 files changed, 267 insertions, 230 deletions
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 5a19603bdca8..99feed27df20 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -81,6 +81,7 @@ protected:
public:
virtual ~SfxModalDialog();
+ virtual void dispose() SAL_OVERRIDE;
const SfxItemSet* GetOutputItemSet() const { return pOutputSet; }
const SfxItemSet* GetInputItemSet() const { return pInputSet; }
};
@@ -102,6 +103,7 @@ protected:
SfxModelessDialog( SfxBindings*, SfxChildWindow*,
vcl::Window*, const OUString& rID, const OUString& rUIXMLDescription );
virtual ~SfxModelessDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual void Move() SAL_OVERRIDE;
@@ -140,6 +142,7 @@ protected:
const OString& rID, const OUString& rUIXMLDescription,
const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>());
virtual ~SfxFloatingWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
@@ -161,16 +164,12 @@ public:
struct SingleTabDlgImpl
{
- SfxTabPage* m_pSfxPage;
- FixedLine* m_pLine;
+ VclPtr<SfxTabPage> m_pSfxPage;
+ VclPtr<FixedLine> m_pLine;
OUString m_sInfoURL;
Link m_aInfoLink;
- SingleTabDlgImpl()
- : m_pSfxPage(NULL)
- , m_pLine(NULL)
- {
- }
+ SingleTabDlgImpl();
};
typedef const sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte
@@ -187,6 +186,7 @@ public:
const OUString& rUIXMLDescription = OUString("sfx/ui/singletabdialog.ui"));
virtual ~SfxSingleTabDialog();
+ virtual void dispose() SAL_OVERRIDE;
void SetTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0, sal_uInt32 nSettingsId = 0);
SfxTabPage* GetTabPage() const { return pImpl->m_pSfxPage; }
@@ -197,9 +197,9 @@ public:
protected:
GetTabPageRanges fnGetRanges;
- OKButton* pOKBtn;
- CancelButton* pCancelBtn;
- HelpButton* pHelpBtn;
+ VclPtr<OKButton> pOKBtn;
+ VclPtr<CancelButton> pCancelBtn;
+ VclPtr<HelpButton> pHelpBtn;
SingleTabDlgImpl* pImpl;
diff --git a/include/sfx2/checkin.hxx b/include/sfx2/checkin.hxx
index c5d93f68846d..54d2dffa2174 100644
--- a/include/sfx2/checkin.hxx
+++ b/include/sfx2/checkin.hxx
@@ -16,15 +16,17 @@
class SfxCheckinDialog : public ModalDialog
{
private:
- Edit* m_pCommentED;
- CheckBox* m_pMajorCB;
+ VclPtr<Edit> m_pCommentED;
+ VclPtr<CheckBox> m_pMajorCB;
- OKButton* m_pOKBtn;
+ VclPtr<OKButton> m_pOKBtn;
DECL_DLLPRIVATE_LINK(OKHdl, void *);
public:
SfxCheckinDialog( vcl::Window* pParent );
+ virtual ~SfxCheckinDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetComment( );
bool IsMajor( );
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index a74b236a3f63..eb43f8e38343 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -124,7 +124,7 @@ struct SfxChildWindow_Impl;
class SFX2_DLLPUBLIC SfxChildWindowContext
{
friend class SfxChildWindow;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
sal_uInt16 nContextId;
protected:
@@ -148,12 +148,12 @@ public:
class SFX2_DLLPUBLIC SfxChildWindow
{
- vcl::Window* pParent; // parent window ( Topwindow )
- sal_uInt16 nType; // ChildWindow-Id
+ VclPtr<vcl::Window> pParent; // parent window ( Topwindow )
+ sal_uInt16 nType; // ChildWindow-Id
protected:
SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment
- vcl::Window* pWindow; // actual contents
+ VclPtr<vcl::Window> pWindow; // actual contents
SfxChildWindow_Impl* pImp; // Implementation data
private:
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index aa38dc0e54b9..24f64d9a73c1 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -56,6 +56,7 @@ public:
SfxControllerItem(); // for arrays
SfxControllerItem( sal_uInt16 nId, SfxBindings & );
virtual ~SfxControllerItem();
+ virtual void dispose();
void Bind( sal_uInt16 nNewId, SfxBindings * = 0); // Register in SfxBindings
void UnBind();
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 58c874cba363..babea564b5df 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -180,27 +180,27 @@ public:
class SfxDocumentPage : public SfxTabPage
{
private:
- FixedImage* m_pBmp;
- SelectableFixedText* m_pNameED;
- PushButton* m_pChangePassBtn;
+ VclPtr<FixedImage> m_pBmp;
+ VclPtr<SelectableFixedText> m_pNameED;
+ VclPtr<PushButton> m_pChangePassBtn;
- SelectableFixedText* m_pShowTypeFT;
- Edit* m_pFileValEd;
- SelectableFixedText* m_pShowSizeFT;
+ VclPtr<SelectableFixedText> m_pShowTypeFT;
+ VclPtr<Edit> m_pFileValEd;
+ VclPtr<SelectableFixedText> m_pShowSizeFT;
- SelectableFixedText* m_pCreateValFt;
- SelectableFixedText* m_pChangeValFt;
- SelectableFixedText* m_pSignedValFt;
- PushButton* m_pSignatureBtn;
- SelectableFixedText* m_pPrintValFt;
- SelectableFixedText* m_pTimeLogValFt;
- SelectableFixedText* m_pDocNoValFt;
+ VclPtr<SelectableFixedText> m_pCreateValFt;
+ VclPtr<SelectableFixedText> m_pChangeValFt;
+ VclPtr<SelectableFixedText> m_pSignedValFt;
+ VclPtr<PushButton> m_pSignatureBtn;
+ VclPtr<SelectableFixedText> m_pPrintValFt;
+ VclPtr<SelectableFixedText> m_pTimeLogValFt;
+ VclPtr<SelectableFixedText> m_pDocNoValFt;
- CheckBox* m_pUseUserDataCB;
- PushButton* m_pDeleteBtn;
+ VclPtr<CheckBox> m_pUseUserDataCB;
+ VclPtr<PushButton> m_pDeleteBtn;
- FixedText* m_pTemplFt;
- SelectableFixedText* m_pTemplValFt;
+ VclPtr<FixedText> m_pTemplFt;
+ VclPtr<SelectableFixedText> m_pTemplValFt;
OUString m_aUnknownSize;
OUString m_aMultiSignedStr;
@@ -215,13 +215,15 @@ private:
void ImplCheckPasswordState();
protected:
- SfxDocumentPage( vcl::Window* pParent, const SfxItemSet& );
+ virtual ~SfxDocumentPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
public:
- static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* );
+ SfxDocumentPage( vcl::Window* pParent, const SfxItemSet& );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
void EnableUseUserData();
};
@@ -231,20 +233,22 @@ public:
class SfxDocumentDescPage : public SfxTabPage
{
private:
- Edit* m_pTitleEd;
- Edit* m_pThemaEd;
- Edit* m_pKeywordsEd;
- VclMultiLineEdit* m_pCommentEd;
- SfxDocumentInfoItem* m_pInfoItem;
+ VclPtr<Edit> m_pTitleEd;
+ VclPtr<Edit> m_pThemaEd;
+ VclPtr<Edit> m_pKeywordsEd;
+ VclPtr<VclMultiLineEdit> m_pCommentEd;
+ SfxDocumentInfoItem* m_pInfoItem;
protected:
- SfxDocumentDescPage( vcl::Window* pParent, const SfxItemSet& );
+ virtual ~SfxDocumentDescPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
public:
- static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* );
+ SfxDocumentDescPage( vcl::Window* pParent, const SfxItemSet& );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};
// class SfxDocumentInfoDialog -------------------------------------------
@@ -335,7 +339,6 @@ protected:
virtual void RequestHelp(const HelpEvent& rEvt) SAL_OVERRIDE;
public:
CustomPropertiesDurationField(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine);
- virtual ~CustomPropertiesDurationField();
void SetDuration( const com::sun::star::util::Duration& rDuration );
const com::sun::star::util::Duration& GetDuration() const { return m_aDuration; }
@@ -347,7 +350,6 @@ class CustomPropertiesEditButton : public PushButton
public:
CustomPropertiesEditButton(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine);
- virtual ~CustomPropertiesEditButton();
DECL_LINK(ClickHdl, void *);
};
@@ -370,33 +372,35 @@ public:
class CustomPropertiesYesNoButton : public Control
{
private:
- RadioButton m_aYesButton;
- RadioButton m_aNoButton;
+ VclPtr<RadioButton> m_aYesButton;
+ VclPtr<RadioButton> m_aNoButton;
public:
CustomPropertiesYesNoButton( vcl::Window* pParent, const ResId& rResId );
+ virtual ~CustomPropertiesYesNoButton();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
- inline void CheckYes() { m_aYesButton.Check(); }
- inline void CheckNo() { m_aNoButton.Check(); }
- inline bool IsYesChecked() const { return m_aYesButton.IsChecked(); }
+ inline void CheckYes() { m_aYesButton->Check(); }
+ inline void CheckNo() { m_aNoButton->Check(); }
+ inline bool IsYesChecked() const { return m_aYesButton->IsChecked(); }
};
// struct CustomPropertyLine ---------------------------------------------
struct CustomPropertyLine
{
- ComboBox m_aNameBox;
- CustomPropertiesTypeBox m_aTypeBox;
- CustomPropertiesEdit m_aValueEdit;
- CustomPropertiesDateField m_aDateField;
- CustomPropertiesTimeField m_aTimeField;
- const OUString m_sDurationFormat;
- CustomPropertiesDurationField m_aDurationField;
- CustomPropertiesEditButton m_aEditButton;
- CustomPropertiesYesNoButton m_aYesNoButton;
- CustomPropertiesRemoveButton m_aRemoveButton;
+ VclPtr<ComboBox> m_aNameBox;
+ VclPtr<CustomPropertiesTypeBox> m_aTypeBox;
+ VclPtr<CustomPropertiesEdit> m_aValueEdit;
+ VclPtr<CustomPropertiesDateField> m_aDateField;
+ VclPtr<CustomPropertiesTimeField> m_aTimeField;
+ const OUString m_sDurationFormat;
+ VclPtr<CustomPropertiesDurationField> m_aDurationField;
+ VclPtr<CustomPropertiesEditButton> m_aEditButton;
+ VclPtr<CustomPropertiesYesNoButton> m_aYesNoButton;
+ VclPtr<CustomPropertiesRemoveButton> m_aRemoveButton;
bool m_bIsDate;
bool m_bIsRemoved;
@@ -412,19 +416,19 @@ struct CustomPropertyLine
class CustomPropertiesWindow : public vcl::Window
{
private:
- FixedText* m_pHeaderAccName;
- FixedText* m_pHeaderAccType;
- FixedText* m_pHeaderAccValue;
-
- ComboBox m_aNameBox;
- ListBox m_aTypeBox;
- Edit m_aValueEdit;
- DateField m_aDateField;
- TimeField m_aTimeField;
- Edit m_aDurationField;
- PushButton m_aEditButton;
- CustomPropertiesYesNoButton m_aYesNoButton;
- ImageButton m_aRemoveButton;
+ VclPtr<FixedText> m_pHeaderAccName;
+ VclPtr<FixedText> m_pHeaderAccType;
+ VclPtr<FixedText> m_pHeaderAccValue;
+
+ VclPtr<ComboBox> m_aNameBox;
+ VclPtr<ListBox> m_aTypeBox;
+ VclPtr<Edit> m_aValueEdit;
+ VclPtr<DateField> m_aDateField;
+ VclPtr<TimeField> m_aTimeField;
+ VclPtr<Edit> m_aDurationField;
+ VclPtr<PushButton> m_aEditButton;
+ VclPtr<CustomPropertiesYesNoButton> m_aYesNoButton;
+ VclPtr<ImageButton> m_aRemoveButton;
sal_Int32 m_nLineHeight;
sal_Int32 m_nScrollPos;
@@ -454,6 +458,7 @@ public:
FixedText *pHeaderAccType,
FixedText *pHeaderAccValue);
virtual ~CustomPropertiesWindow();
+ virtual void dispose() SAL_OVERRIDE;
bool InitControls( HeaderBar* pHeaderBar, const ScrollBar* pScrollBar );
sal_uInt16 GetVisibleLineCount() const;
@@ -476,11 +481,11 @@ public:
class CustomPropertiesControl : public vcl::Window
{
private:
- VclVBox* m_pVBox;
- HeaderBar* m_pHeaderBar;
- VclHBox* m_pBody;
- CustomPropertiesWindow* m_pPropertiesWin;
- ScrollBar* m_pVertScroll;
+ VclPtr<VclVBox> m_pVBox;
+ VclPtr<HeaderBar> m_pHeaderBar;
+ VclPtr<VclHBox> m_pBody;
+ VclPtr<CustomPropertiesWindow> m_pPropertiesWin;
+ VclPtr<ScrollBar> m_pVertScroll;
sal_Int32 m_nThumbPos;
@@ -490,6 +495,7 @@ private:
public:
CustomPropertiesControl(vcl::Window* pParent);
virtual ~CustomPropertiesControl();
+ virtual void dispose() SAL_OVERRIDE;
void AddLine( const OUString& sName, com::sun::star::uno::Any& rAny, bool bInteractive );
@@ -507,42 +513,44 @@ public:
class SfxCustomPropertiesPage : public SfxTabPage
{
private:
- CustomPropertiesControl* m_pPropertiesCtrl;
+ VclPtr<CustomPropertiesControl> m_pPropertiesCtrl;
DECL_LINK(AddHdl, void *);
using TabPage::DeactivatePage;
protected:
- SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
+ virtual ~SfxCustomPropertiesPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
virtual sfxpg DeactivatePage( SfxItemSet* pSet = NULL ) SAL_OVERRIDE;
public:
- static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* );
+ SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};
struct CmisValue : public VclBuilderContainer
{
- Edit* m_aValueEdit;
+ VclPtr<Edit> m_aValueEdit;
CmisValue( vcl::Window* pParent, const OUString& aStr );
};
struct CmisDateTime : public VclBuilderContainer
{
- DateField* m_aDateField;
- TimeField* m_aTimeField;
+ VclPtr<DateField> m_aDateField;
+ VclPtr<TimeField> m_aTimeField;
CmisDateTime( vcl::Window* pParent, const ::com::sun::star::util::DateTime& aDateTime );
};
struct CmisYesNo : public VclBuilderContainer
{
- RadioButton* m_aYesButton;
- RadioButton* m_aNoButton;
+ VclPtr<RadioButton> m_aYesButton;
+ VclPtr<RadioButton> m_aNoButton;
CmisYesNo( vcl::Window* pParent, bool bValue);
};
@@ -551,15 +559,15 @@ struct CmisYesNo : public VclBuilderContainer
struct CmisPropertyLine : public VclBuilderContainer
{
- VclFrame* m_pFrame;
+ VclPtr<VclFrame> m_pFrame;
OUString m_sId;
OUString m_sType;
bool m_bUpdatable;
bool m_bRequired;
bool m_bMultiValued;
bool m_bOpenChoice;
- FixedText* m_aName;
- FixedText* m_aType;
+ VclPtr<FixedText> m_aName;
+ VclPtr<FixedText> m_aType;
std::vector< CmisValue* > m_aValues;
std::vector< CmisDateTime* > m_aDateTimes;
std::vector< CmisYesNo* > m_aYesNos;
@@ -574,7 +582,7 @@ struct CmisPropertyLine : public VclBuilderContainer
class CmisPropertiesWindow
{
private:
- VclBox* m_pBox;
+ VclPtr<VclBox> m_pBox;
sal_Int32 m_nItemHeight;
SvNumberFormatter m_aNumberFormatter;
std::vector< CmisPropertyLine* > m_aCmisPropertiesLines;
@@ -636,14 +644,13 @@ private:
DECL_LINK(UpdateHdl, void *);
protected:
- SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
-
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
virtual sfxpg DeactivatePage( SfxItemSet* pSet = NULL ) SAL_OVERRIDE;
public:
- static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* );
+ SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};
#endif // #ifndef _ INCLUDED_SFX2_DINFDLG_HXX
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index 57f256707658..e5a5ff8a704b 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -84,6 +84,7 @@ public:
vcl::Window* pParent,
const OString& rID, const OUString& rUIXMLDescription );
virtual ~SfxDockingWindow();
+ virtual void dispose() SAL_OVERRIDE;
void Initialize (SfxChildWinInfo* pInfo);
virtual void FillInfo(SfxChildWinInfo&) const;
diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx
index 7e66740176ac..1c325b92f628 100644
--- a/include/sfx2/fcontnr.hxx
+++ b/include/sfx2/fcontnr.hxx
@@ -57,14 +57,13 @@ public:
class SfxFrameWindow
{
- vcl::Window* pWindow;
+ ScopedVclPtr<vcl::Window> pWindow;
public:
SfxFrameWindow( vcl::Window *pWin )
: pWindow( pWin )
{}
- virtual ~SfxFrameWindow()
- { delete pWindow; }
+ virtual ~SfxFrameWindow() {}
vcl::Window* GetWindow() const
{ return pWindow; }
void SetWindow( vcl::Window *pWin )
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index fcd6c46c748b..d9c3620ee1eb 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <vcl/vclptr.hxx>
namespace com
{
@@ -103,7 +104,7 @@ private:
SfxFrame* pParentFrame;
SfxFrameArr_Impl* pChildArr;
SfxFrame_Impl* pImp;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
protected:
bool Close();
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index eb0c4c6dcb8c..7a89267b3bc5 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -43,16 +43,16 @@ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow
class SfxInfoBarWindow : public vcl::Window
{
private:
- OUString m_sId;
-
- std::unique_ptr<FixedText> m_pMessage;
- std::unique_ptr<Button> m_pCloseBtn;
-
- boost::ptr_vector<PushButton> m_aActionBtns;
+ OUString m_sId;
+ VclPtr<FixedText> m_pMessage;
+ VclPtr<Button> m_pCloseBtn;
+ std::vector< VclPtr<PushButton> > m_aActionBtns;
public:
- SfxInfoBarWindow(vcl::Window* parent, const OUString& sId, const OUString& sMessage);
+ SfxInfoBarWindow( vcl::Window* parent, const OUString& sId,
+ const OUString& sMessage );
virtual ~SfxInfoBarWindow( );
+ virtual void dispose() SAL_OVERRIDE;
const OUString& getId() const { return m_sId; }
virtual void Paint( const Rectangle& ) SAL_OVERRIDE;
@@ -71,12 +71,13 @@ class SfxInfoBarWindow : public vcl::Window
class SfxInfoBarContainerWindow : public vcl::Window
{
private:
- SfxInfoBarContainerChild* m_pChildWin;
- boost::ptr_vector<SfxInfoBarWindow> m_pInfoBars;
+ SfxInfoBarContainerChild* m_pChildWin;
+ std::vector< VclPtr<SfxInfoBarWindow> > m_pInfoBars;
public:
SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin);
virtual ~SfxInfoBarContainerWindow( );
+ virtual void dispose() SAL_OVERRIDE;
SfxInfoBarWindow* appendInfoBar(const OUString& sId, const OUString& sMessage);
SfxInfoBarWindow* getInfoBar(const OUString& sId);
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 10ab174bbdbd..9022f73573c7 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -29,11 +29,11 @@
#include <tools/gen.hxx>
#include <sfx2/objsh.hxx>
+#include <vcl/window.hxx>
class SfxInPlaceClient_Impl;
class SfxViewShell;
class SfxObjectShell;
-namespace vcl { class Window; }
class Fraction;
@@ -44,7 +44,7 @@ friend class SfxInPlaceClient_Impl;
SfxInPlaceClient_Impl* m_pImp;
SfxViewShell* m_pViewSh;
- vcl::Window* m_pEditWin;
+ VclPtr<vcl::Window> m_pEditWin;
// called after the requested new object area was negotiated
SAL_DLLPRIVATE virtual void ObjectAreaChanged();
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 6b5ba434c562..f8f4b5556be6 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -36,23 +36,23 @@ class SfxStyleSheetBase;
class SfxManageStyleSheetPage : public SfxTabPage
{
- VclMultiLineEdit* m_pNameRo;
- Edit* m_pNameRw;
+ VclPtr<VclMultiLineEdit> m_pNameRo;
+ VclPtr<Edit> m_pNameRw;
- CheckBox* m_pAutoCB;
+ VclPtr<CheckBox> m_pAutoCB;
- FixedText* m_pFollowFt;
- ListBox* m_pFollowLb;
- PushButton* m_pEditStyleBtn;
+ VclPtr<FixedText> m_pFollowFt;
+ VclPtr<ListBox> m_pFollowLb;
+ VclPtr<PushButton> m_pEditStyleBtn;
- FixedText* m_pBaseFt;
- ListBox* m_pBaseLb;
- PushButton* m_pEditLinkStyleBtn;
+ VclPtr<FixedText> m_pBaseFt;
+ VclPtr<ListBox> m_pBaseLb;
+ VclPtr<PushButton> m_pEditLinkStyleBtn;
- FixedText* m_pFilterFt;
- ListBox* m_pFilterLb;
+ VclPtr<FixedText> m_pFilterFt;
+ VclPtr<ListBox> m_pFilterLb;
- FixedText *m_pDescFt;
+ VclPtr<FixedText> m_pDescFt;
SfxStyleSheetBase *pStyle;
SfxStyleFamilies *pFamilies;
@@ -79,10 +79,10 @@ friend class SfxStyleDialog;
void UpdateName_Impl(ListBox *, const OUString &rNew);
void SetDescriptionText_Impl();
- SfxManageStyleSheetPage(vcl::Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SfxManageStyleSheetPage();
+ virtual void dispose() SAL_OVERRIDE;
- static SfxTabPage* Create(vcl::Window *pParent, const SfxItemSet *rAttrSet );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
protected:
virtual bool FillItemSet(SfxItemSet *) SAL_OVERRIDE;
@@ -95,6 +95,9 @@ protected:
virtual void ActivatePage(const SfxItemSet &) SAL_OVERRIDE;
using TabPage::DeactivatePage;
virtual sfxpg DeactivatePage(SfxItemSet * = 0) SAL_OVERRIDE;
+
+public:
+ SfxManageStyleSheetPage(vcl::Window *pParent, const SfxItemSet &rAttrSet );
};
#endif
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 4c30e4f2cac4..d98b5c9c190d 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -83,7 +83,7 @@ public:
void RegisterStatusBarControl(SfxStbCtrlFactory*);
void RegisterMenuControl(SfxMenuCtrlFactory*);
- virtual SfxTabPage* CreateTabPage( sal_uInt16 nId,
+ virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId,
vcl::Window* pParent,
const SfxItemSet& rSet );
virtual void Invalidate(sal_uInt16 nId = 0) SAL_OVERRIDE;
diff --git a/include/sfx2/new.hxx b/include/sfx2/new.hxx
index 48b6dab5cc38..05482a4e1027 100644
--- a/include/sfx2/new.hxx
+++ b/include/sfx2/new.hxx
@@ -67,6 +67,7 @@ public:
SfxNewFileDialog(vcl::Window *pParent, sal_uInt16 nFlags = 0);
virtual ~SfxNewFileDialog();
+ virtual void dispose() SAL_OVERRIDE;
// Returns false, when '- No -' is set as Template
// Template names can only be obtained when IsTemplate() returns true.
diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index f0f47e26bb15..1a23a8d78683 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -33,10 +33,10 @@ class SfxStyleSheetBasePool;
class SFX2_DLLPUBLIC SfxNewStyleDlg : public ModalDialog
{
private:
- ComboBox* m_pColBox;
- OKButton* m_pOKBtn;
+ VclPtr<ComboBox> m_pColBox;
+ VclPtr<OKButton> m_pOKBtn;
- MessageDialog aQueryOverwriteBox;
+ VclPtr<MessageDialog> aQueryOverwriteBox;
SfxStyleSheetBasePool& rPool;
DECL_DLLPRIVATE_LINK( OKHdl, Control * );
@@ -45,6 +45,7 @@ private:
public:
SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& );
virtual ~SfxNewStyleDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetName() const { return comphelper::string::stripStart(m_pColBox->GetText(), ' '); }
};
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 041631e3aa01..b9d20fe2d6a1 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -37,6 +37,7 @@
#include <com/sun/star/document/CmisVersion.hpp>
#include <vcl/timer.hxx>
+#include <vcl/vclptr.hxx>
#include <svl/poolitem.hxx>
#include <vcl/bitmap.hxx>
#include <sot/storage.hxx>
@@ -370,7 +371,7 @@ public:
SignatureState GetScriptingSignatureState();
void SignScriptingContent();
- virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
+ virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(
vcl::Window *pParent, const SfxItemSet& );
ErrCode CallBasic( const OUString& rMacro, const OUString& rBasicName,
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 4b241d0a243c..647776241eaa 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -50,23 +50,23 @@ namespace o3tl
class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
{
private:
- VclFrame* mpPassword1Box;
- FixedText* mpUserFT;
- Edit* mpUserED;
- FixedText* mpPassword1FT;
- Edit* mpPassword1ED;
- FixedText* mpConfirm1FT;
- Edit* mpConfirm1ED;
+ VclPtr<VclFrame> mpPassword1Box;
+ VclPtr<FixedText> mpUserFT;
+ VclPtr<Edit> mpUserED;
+ VclPtr<FixedText> mpPassword1FT;
+ VclPtr<Edit> mpPassword1ED;
+ VclPtr<FixedText> mpConfirm1FT;
+ VclPtr<Edit> mpConfirm1ED;
- VclFrame* mpPassword2Box;
- FixedText* mpPassword2FT;
- Edit* mpPassword2ED;
- FixedText* mpConfirm2FT;
- Edit* mpConfirm2ED;
+ VclPtr<VclFrame> mpPassword2Box;
+ VclPtr<FixedText> mpPassword2FT;
+ VclPtr<Edit> mpPassword2ED;
+ VclPtr<FixedText> mpConfirm2FT;
+ VclPtr<Edit> mpConfirm2ED;
- FixedText* mpMinLengthFT;
+ VclPtr<FixedText> mpMinLengthFT;
- OKButton* mpOKBtn;
+ VclPtr<OKButton> mpOKBtn;
OUString maMinLenPwdStr;
OUString maMinLenPwdStr1;
@@ -83,6 +83,8 @@ private:
public:
SfxPasswordDialog(vcl::Window* pParent, const OUString* pGroupText = NULL);
+ virtual ~SfxPasswordDialog();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetUser() const
{
diff --git a/include/sfx2/printer.hxx b/include/sfx2/printer.hxx
index f07a135c8ece..d419b356507d 100644
--- a/include/sfx2/printer.hxx
+++ b/include/sfx2/printer.hxx
@@ -51,10 +51,11 @@ public:
const JobSetup &rTheOrigJobSetup );
SfxPrinter( const SfxPrinter &rPrinter );
virtual ~SfxPrinter();
+ virtual void dispose() SAL_OVERRIDE;
- SfxPrinter* Clone() const;
+ VclPtr<SfxPrinter> Clone() const;
- static SfxPrinter* Create( SvStream &rStream, SfxItemSet *pOptions );
+ static VclPtr<SfxPrinter> Create( SvStream &rStream, SfxItemSet *pOptions );
SvStream& Store( SvStream &rStream ) const;
const JobSetup& GetOrigJobSetup() const { return aOrigJobSetup; }
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index 3fcf7a0fdd4e..f969b5ff645f 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -41,32 +41,32 @@ class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage : public SfxTabPage
{
private:
- RadioButton* m_pPrinterOutputRB;
- RadioButton* m_pPrintFileOutputRB;
+ VclPtr<RadioButton> m_pPrinterOutputRB;
+ VclPtr<RadioButton> m_pPrintFileOutputRB;
- CheckBox* m_pReduceTransparencyCB;
- RadioButton* m_pReduceTransparencyAutoRB;
- RadioButton* m_pReduceTransparencyNoneRB;
+ VclPtr<CheckBox> m_pReduceTransparencyCB;
+ VclPtr<RadioButton> m_pReduceTransparencyAutoRB;
+ VclPtr<RadioButton> m_pReduceTransparencyNoneRB;
- CheckBox* m_pReduceGradientsCB;
- RadioButton* m_pReduceGradientsStripesRB;
- RadioButton* m_pReduceGradientsColorRB;
- NumericField* m_pReduceGradientsStepCountNF;
+ VclPtr<CheckBox> m_pReduceGradientsCB;
+ VclPtr<RadioButton> m_pReduceGradientsStripesRB;
+ VclPtr<RadioButton> m_pReduceGradientsColorRB;
+ VclPtr<NumericField> m_pReduceGradientsStepCountNF;
- CheckBox* m_pReduceBitmapsCB;
- RadioButton* m_pReduceBitmapsOptimalRB;
- RadioButton* m_pReduceBitmapsNormalRB;
- RadioButton* m_pReduceBitmapsResolutionRB;
- ListBox* m_pReduceBitmapsResolutionLB;
- CheckBox* m_pReduceBitmapsTransparencyCB;
+ VclPtr<CheckBox> m_pReduceBitmapsCB;
+ VclPtr<RadioButton> m_pReduceBitmapsOptimalRB;
+ VclPtr<RadioButton> m_pReduceBitmapsNormalRB;
+ VclPtr<RadioButton> m_pReduceBitmapsResolutionRB;
+ VclPtr<ListBox> m_pReduceBitmapsResolutionLB;
+ VclPtr<CheckBox> m_pReduceBitmapsTransparencyCB;
- CheckBox* m_pConvertToGreyscalesCB;
+ VclPtr<CheckBox> m_pConvertToGreyscalesCB;
- CheckBox* m_pPDFCB;
+ VclPtr<CheckBox> m_pPDFCB;
- CheckBox* m_pPaperSizeCB;
- CheckBox* m_pPaperOrientationCB;
- CheckBox* m_pTransparencyCB;
+ VclPtr<CheckBox> m_pPaperSizeCB;
+ VclPtr<CheckBox> m_pPaperOrientationCB;
+ VclPtr<CheckBox> m_pTransparencyCB;
private:
@@ -94,14 +94,14 @@ protected:
public:
SfxCommonPrintOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
- virtual ~SfxCommonPrintOptionsTabPage();
-
+ virtual ~SfxCommonPrintOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
virtual vcl::Window* GetParentLabeledBy( const vcl::Window* pLabel ) const SAL_OVERRIDE;
virtual vcl::Window* GetParentLabelFor( const vcl::Window* pLabel ) const SAL_OVERRIDE;
- static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};
#endif // INCLUDED_SFX2_PRINTOPT_HXX
diff --git a/include/sfx2/prnmon.hxx b/include/sfx2/prnmon.hxx
index 1468ee81fe82..ff42cb0253df 100644
--- a/include/sfx2/prnmon.hxx
+++ b/include/sfx2/prnmon.hxx
@@ -38,13 +38,14 @@ private:
SfxPrintOptDlg_Impl* pDlgImpl;
SfxViewShell* pViewSh;
SfxItemSet* pOptions;
- SfxTabPage* pPage;
+ VclPtr<SfxTabPage> pPage;
public:
SfxPrintOptionsDialog( vcl::Window *pParent,
SfxViewShell *pViewShell,
const SfxItemSet *rOptions );
virtual ~SfxPrintOptionsDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool Construct();
virtual short Execute() SAL_OVERRIDE;
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 68176cf8a7eb..1affc2e23b58 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -42,7 +42,6 @@ class SFX2_DLLPUBLIC RecentDocsView : public ThumbnailView
{
public:
RecentDocsView( vcl::Window* pParent );
- virtual ~RecentDocsView();
void insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId);
diff --git a/include/sfx2/securitypage.hxx b/include/sfx2/securitypage.hxx
index 2777088ddc60..84ad9dc0e609 100644
--- a/include/sfx2/securitypage.hxx
+++ b/include/sfx2/securitypage.hxx
@@ -33,14 +33,12 @@ class SfxSecurityPage : public SfxTabPage
std::unique_ptr< SfxSecurityPage_Impl > m_pImpl;
protected:
- SfxSecurityPage( vcl::Window* pParent, const SfxItemSet& );
- virtual ~SfxSecurityPage();
-
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
public:
- static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* );
+ SfxSecurityPage( vcl::Window* pParent, const SfxItemSet& );
+ static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
};
diff --git a/include/sfx2/sidebar/ControlFactory.hxx b/include/sfx2/sidebar/ControlFactory.hxx
index a078e00c20c2..142f249c4627 100644
--- a/include/sfx2/sidebar/ControlFactory.hxx
+++ b/include/sfx2/sidebar/ControlFactory.hxx
@@ -22,6 +22,7 @@
#include <sfx2/dllapi.h>
#include <sfx2/sidebar/SidebarToolBox.hxx>
#include <vcl/button.hxx>
+#include <vcl/vclptr.hxx>
#include <com/sun/star/frame/XFrame.hpp>
class ToolBox;
@@ -39,9 +40,9 @@ class SFX2_DLLPUBLIC ControlFactory
public:
/** Create the menu button for the task bar.
*/
- static CheckBox* CreateMenuButton (vcl::Window* pParentWindow);
+ static VclPtr<CheckBox> CreateMenuButton (vcl::Window* pParentWindow);
- static ImageRadioButton* CreateTabItem (vcl::Window* pParentWindow);
+ static VclPtr<ImageRadioButton> CreateTabItem (vcl::Window* pParentWindow);
};
diff --git a/include/sfx2/sidebar/ControllerItem.hxx b/include/sfx2/sidebar/ControllerItem.hxx
index 7210dea31c3d..ef1a6db600fa 100644
--- a/include/sfx2/sidebar/ControllerItem.hxx
+++ b/include/sfx2/sidebar/ControllerItem.hxx
@@ -80,6 +80,9 @@ public:
SfxBindings &rBindings,
ItemUpdateReceiverInterface& rItemUpdateReceiver);
+ /// releases our action listener
+ virtual void dispose() SAL_OVERRIDE;
+
virtual ~ControllerItem();
/** Returns </TRUE> when the slot/command has not been disabled.
diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx b/include/sfx2/sidebar/SidebarPanelBase.hxx
index 2f34065a8480..a60f951b618f 100644
--- a/include/sfx2/sidebar/SidebarPanelBase.hxx
+++ b/include/sfx2/sidebar/SidebarPanelBase.hxx
@@ -33,6 +33,7 @@
#include <boost/noncopyable.hpp>
#include <boost/function.hpp>
+#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
@@ -111,7 +112,7 @@ protected:
throw (css::uno::RuntimeException) SAL_OVERRIDE;
private:
- vcl::Window* mpControl;
+ VclPtr<vcl::Window> mpControl;
const ::rtl::OUString msResourceURL;
const css::ui::LayoutSize maLayoutSize;
};
diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx
index a19e182f648a..129940de2ccf 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -41,6 +41,7 @@ class SFX2_DLLPUBLIC SidebarToolBox
public:
SidebarToolBox(vcl::Window* pParentWindow);
virtual ~SidebarToolBox();
+ virtual void dispose() SAL_OVERRIDE;
using ToolBox::InsertItem;
virtual void InsertItem(const OUString& rCommand,
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index 835fcff98b46..9e4850a46e15 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -59,9 +59,9 @@ class UserDrawEvent;
class SFX2_DLLPUBLIC SfxStatusBarControl: public svt::StatusbarController
{
- sal_uInt16 nSlotId;
- sal_uInt16 nId;
- StatusBar* pBar;
+ sal_uInt16 nSlotId;
+ sal_uInt16 nId;
+ VclPtr<StatusBar> pBar;
protected:
// new controller API
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index 9e9bef903aeb..e837c87d6ae1 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -41,6 +41,7 @@ public:
const OUString& rUIXMLDescription, SfxStyleSheetBase&);
virtual ~SfxStyleDialog();
+ virtual void dispose() SAL_OVERRIDE;
SfxStyleSheetBase& GetStyleSheet() { return *pStyle; }
const SfxStyleSheetBase& GetStyleSheet() const { return *pStyle; }
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index b54d974f306e..88a05b95ea30 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -37,7 +37,7 @@ class SfxViewFrame;
class SfxTabPage;
class SfxBindings;
-typedef SfxTabPage* (*CreateTabPage)(vcl::Window *pParent, const SfxItemSet *rAttrSet);
+typedef VclPtr<SfxTabPage> (*CreateTabPage)(vcl::Window *pParent, const SfxItemSet *rAttrSet);
typedef const sal_uInt16* (*GetTabPageRanges)(); // provides international Which-value
struct TabPageImpl;
@@ -64,16 +64,16 @@ friend class SfxTabDialogController;
SfxViewFrame* pFrame;
- VclBox *m_pBox;
- TabControl *m_pTabCtrl;
+ VclPtr<VclBox> m_pBox;
+ VclPtr<TabControl> m_pTabCtrl;
- PushButton* m_pOKBtn;
- PushButton* m_pApplyBtn;
- PushButton* m_pUserBtn;
- CancelButton* m_pCancelBtn;
- HelpButton* m_pHelpBtn;
- PushButton* m_pResetBtn;
- PushButton* m_pBaseFmtBtn;
+ VclPtr<PushButton> m_pOKBtn;
+ VclPtr<PushButton> m_pApplyBtn;
+ VclPtr<PushButton> m_pUserBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
+ VclPtr<HelpButton> m_pHelpBtn;
+ VclPtr<PushButton> m_pResetBtn;
+ VclPtr<PushButton> m_pBaseFmtBtn;
bool m_bOwnsOKBtn;
bool m_bOwnsCancelBtn;
@@ -106,7 +106,7 @@ protected:
virtual void RefreshInputSet();
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
- VclButtonBox* m_pActionArea;
+ VclPtr<VclButtonBox> m_pActionArea;
SfxItemSet* pExampleSet;
SfxItemSet* GetInputSetImpl();
SfxTabPage* GetTabPage( sal_uInt16 nPageId ) const;
@@ -129,6 +129,7 @@ public:
const OUString& rID, const OUString& rUIXMLDescription,
const SfxItemSet * = 0, bool bEditFmt = false);
virtual ~SfxTabDialog();
+ virtual void dispose() SAL_OVERRIDE;
sal_uInt16 AddTabPage( const OString& rName, // Name of the label for the page in the notebook .ui
CreateTabPage pCreateFunc, // != 0
@@ -249,6 +250,7 @@ protected:
public:
virtual ~SfxTabPage();
+ virtual void dispose() SAL_OVERRIDE;
const SfxItemSet& GetItemSet() const { return *pSet; }
diff --git a/include/sfx2/taskpane.hxx b/include/sfx2/taskpane.hxx
index dadbdf1d300f..21556961e85f 100644
--- a/include/sfx2/taskpane.hxx
+++ b/include/sfx2/taskpane.hxx
@@ -163,6 +163,8 @@ namespace sfx2
public:
TaskPaneDockingWindow( SfxBindings* i_pBindings, TaskPaneWrapper& i_rWrapper,
vcl::Window* i_pParent, WinBits i_nBits );
+ virtual ~TaskPaneDockingWindow();
+ virtual void dispose() SAL_OVERRIDE;
// ITaskPaneToolPanelAccess
virtual void ActivateToolPanel( const OUString& i_rPanelURL ) SAL_OVERRIDE;
@@ -175,8 +177,8 @@ namespace sfx2
virtual void onLayoutDone() SAL_OVERRIDE;
private:
- ModuleTaskPane m_aTaskPane;
- TaskPaneController m_aPaneController;
+ VclPtr<ModuleTaskPane> m_aTaskPane;
+ TaskPaneController m_aPaneController;
};
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index b76a9d06980b..402d0c1df6e6 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -151,8 +151,9 @@ public:
vcl::Window* pParentWindow,
WinBits nBits );
virtual ~SfxPopupWindow();
+ virtual void dispose() SAL_OVERRIDE;
- virtual SfxPopupWindow* Clone() const;
+ virtual VclPtr<SfxPopupWindow> Clone() const;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
void StartCascading();
@@ -200,9 +201,9 @@ protected:
virtual void DoubleClick();
virtual void Click();
virtual SfxPopupWindowType GetPopupWindowType() const;
- virtual SfxPopupWindow* CreatePopupWindow();
+ virtual VclPtr<SfxPopupWindow> CreatePopupWindow();
virtual SfxPopupWindow* CreatePopupWindowCascading();
- virtual vcl::Window* CreateItemWindow( vcl::Window *pParent );
+ virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent );
// Must be called by subclass to set a new popup window instance
void SetPopupWindow( SfxPopupWindow* pWindow );
@@ -305,7 +306,7 @@ class SfxDragToolBoxControl_Impl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
SfxDragToolBoxControl_Impl( sal_uInt16 nId, ToolBox& rBox );
- virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE;
virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE;
};
@@ -329,7 +330,7 @@ public:
virtual ~SfxRecentFilesToolBoxControl();
protected:
- virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE;
+ virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
};
class SfxReloadToolBoxControl_Impl : public SfxToolBoxControl
diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx
index 5509374c25b2..41979ca0dfc6 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -83,7 +83,8 @@ public:
TemplateAbstractView(vcl::Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren);
TemplateAbstractView(vcl::Window* pParent);
- virtual ~TemplateAbstractView ();
+ virtual ~TemplateAbstractView();
+ virtual void dispose() SAL_OVERRIDE;
void insertItem (const TemplateItemProperties &rTemplate);
@@ -137,8 +138,8 @@ protected:
sal_uInt16 mnCurRegionId;
OUString maCurRegionName;
- PushButton maAllButton;
- FixedText maFTName;
+ VclPtr<PushButton> maAllButton;
+ VclPtr<FixedText> maFTName;
Link maOpenRegionHdl;
Link maOpenTemplateHdl;
diff --git a/include/sfx2/templatedefaultview.hxx b/include/sfx2/templatedefaultview.hxx
index 005201b364d7..205083554d52 100644
--- a/include/sfx2/templatedefaultview.hxx
+++ b/include/sfx2/templatedefaultview.hxx
@@ -17,7 +17,6 @@ class SFX2_DLLPUBLIC TemplateDefaultView : public TemplateLocalView
{
public:
TemplateDefaultView(Window *pParent);
- virtual ~TemplateDefaultView();
virtual void reload() SAL_OVERRIDE;
protected:
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 17ba13a0b432..f26792bb0a04 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -50,7 +50,8 @@ public:
SfxTemplateManagerDlg(vcl::Window *parent = NULL);
- virtual ~SfxTemplateManagerDlg ();
+ virtual ~SfxTemplateManagerDlg();
+ virtual void dispose() SAL_OVERRIDE;
void setSaveMode();
@@ -142,16 +143,16 @@ private:
private:
- TabControl *mpTabControl;
+ VclPtr<TabControl> mpTabControl;
- Edit *mpSearchEdit;
- ToolBox *mpViewBar;
- ToolBox *mpActionBar;
- ToolBox *mpTemplateBar;
- TemplateSearchView *mpSearchView;
- TemplateAbstractView *mpCurView;
- TemplateLocalView *mpLocalView;
- TemplateRemoteView *mpRemoteView;
+ VclPtr<Edit> mpSearchEdit;
+ VclPtr<ToolBox> mpViewBar;
+ VclPtr<ToolBox> mpActionBar;
+ VclPtr<ToolBox> mpTemplateBar;
+ VclPtr<TemplateSearchView> mpSearchView;
+ VclPtr<TemplateAbstractView> mpCurView;
+ VclPtr<TemplateLocalView> mpLocalView;
+ VclPtr<TemplateRemoteView> mpRemoteView;
PopupMenu *mpActionMenu;
PopupMenu *mpRepositoryMenu;
PopupMenu *mpTemplateDefaultMenu;
diff --git a/include/sfx2/templateinfodlg.hxx b/include/sfx2/templateinfodlg.hxx
index 9f5d9dfd2965..97a711c58028 100644
--- a/include/sfx2/templateinfodlg.hxx
+++ b/include/sfx2/templateinfodlg.hxx
@@ -27,7 +27,8 @@ public:
SfxTemplateInfoDlg (vcl::Window *pParent = NULL);
- virtual ~SfxTemplateInfoDlg ();
+ virtual ~SfxTemplateInfoDlg();
+ virtual void dispose() SAL_OVERRIDE;
void loadDocument (const OUString &rURL);
@@ -37,11 +38,11 @@ protected:
private:
- PushButton* mpBtnClose;
- VclBox* mpBox;
+ VclPtr<PushButton> mpBtnClose;
+ VclPtr<VclBox> mpBox;
- vcl::Window *mpPreviewView; // gets released when xWindows get destroyed (dont delete in constructor)
- svtools::ODocumentInfoPreview *mpInfoView;
+ VclPtr<vcl::Window> mpPreviewView; // gets released when xWindows get destroyed (dont delete in constructor)
+ VclPtr<svtools::ODocumentInfoPreview> mpInfoView;
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 > m_xFrame;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index 6d2e1d044dcf..123a6f6f13b5 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -32,6 +32,7 @@ public:
TemplateLocalView ( vcl::Window* pParent );
virtual ~TemplateLocalView ();
+ virtual void dispose() SAL_OVERRIDE;
// Fill view with template folders thumbnails
virtual void Populate () SAL_OVERRIDE;
diff --git a/include/sfx2/templateremoteview.hxx b/include/sfx2/templateremoteview.hxx
index 6c64e9a6dcaf..ada041dcb85e 100644
--- a/include/sfx2/templateremoteview.hxx
+++ b/include/sfx2/templateremoteview.hxx
@@ -23,8 +23,6 @@ public:
TemplateRemoteView (vcl::Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren);
- virtual ~TemplateRemoteView ();
-
virtual void showRootRegion () SAL_OVERRIDE;
virtual void showRegion (ThumbnailViewItem *pItem) SAL_OVERRIDE;
diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx
index 280610ff3e14..4e9ada86b359 100644
--- a/include/sfx2/templdlg.hxx
+++ b/include/sfx2/templdlg.hxx
@@ -43,6 +43,7 @@ class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow
public:
SfxTemplatePanelControl (SfxBindings* pBindings, vcl::Window* pParentWindow);
virtual ~SfxTemplatePanelControl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& _rDCEvt ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
@@ -50,7 +51,7 @@ public:
void FreeResource();
private:
- const std::unique_ptr<SfxTemplateDialog_Impl> pImpl;
+ std::unique_ptr<SfxTemplateDialog_Impl> pImpl;
SfxBindings* mpBindings;
};
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 2c9967b601da..0e4a7e0af1cf 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -183,6 +183,7 @@ public:
ThumbnailView(vcl::Window* pParent, WinBits nWinStyle = WB_TABSTOP, bool bDisableTransientChildren = false);
virtual ~ThumbnailView();
+ virtual void dispose() SAL_OVERRIDE;
virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE;
@@ -308,7 +309,7 @@ protected:
ThumbnailValueItemList mItemList;
ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items
ThumbnailValueItemList::iterator mpStartSelRange;
- ScrollBar* mpScrBar;
+ VclPtr<ScrollBar> mpScrBar;
long mnHeaderHeight;
long mnItemWidth;
long mnItemHeight;
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index 9136a5688476..a4c7bbcdb920 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -138,7 +138,7 @@ protected:
Rectangle maDrawArea;
Link maClickHdl;
bool mbEditTitle;
- VclMultiLineEdit* mpTitleED;
+ VclPtr<VclMultiLineEdit> mpTitleED;
Rectangle maTextEditMaxArea;
};
diff --git a/include/sfx2/titledockwin.hxx b/include/sfx2/titledockwin.hxx
index 61db702d236c..44d8a68c511a 100644
--- a/include/sfx2/titledockwin.hxx
+++ b/include/sfx2/titledockwin.hxx
@@ -24,6 +24,7 @@
#include <sfx2/dockwin.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/vclptr.hxx>
#include <tools/svborder.hxx>
@@ -43,6 +44,7 @@ namespace sfx2
);
virtual ~TitledDockingWindow();
+ virtual void dispose() SAL_OVERRIDE;
/** sets a title to be displayed in the docking window
*/
@@ -77,11 +79,11 @@ namespace sfx2
/** returns the content window, which is to be used as parent window for any content to be displayed
in the docking window.
*/
- vcl::Window& GetContentWindow() { return m_aContentWindow; }
- const vcl::Window& GetContentWindow() const { return m_aContentWindow; }
+ vcl::Window& GetContentWindow() { return *m_aContentWindow.get(); }
+ const vcl::Window& GetContentWindow() const { return *m_aContentWindow.get(); }
- ToolBox& GetToolBox() { return m_aToolbox; }
- const ToolBox& GetToolBox() const { return m_aToolbox; }
+ ToolBox& GetToolBox() { return *m_aToolbox.get(); }
+ const ToolBox& GetToolBox() const { return *m_aToolbox.get(); }
/** Return the border that is painted around the inner window as
decoration.
@@ -126,8 +128,8 @@ namespace sfx2
private:
OUString m_sTitle;
- ToolBox m_aToolbox;
- Window m_aContentWindow;
+ VclPtr<ToolBox> m_aToolbox;
+ VclPtr<Window> m_aContentWindow;
Link m_aEndDockingHdl;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index c0f38d1fe436..39effbb31caf 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -37,6 +37,8 @@
#include <tools/errcode.hxx>
#include <vcl/jobset.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <vcl/vclptr.hxx>
+#include <sfx2/tabdlg.hxx>
class SfxBaseController;
class Size;
@@ -51,7 +53,6 @@ class SfxMedium;
class SfxModule;
class SfxViewFrame;
class SfxItemPool;
-class SfxTabPage;
class SfxFrameSetDescriptor;
class Printer;
class SfxPrinter;
@@ -145,7 +146,7 @@ friend class SfxPrinterController;
struct SfxViewShell_Impl* pImp;
SfxViewFrame* pFrame;
SfxShell* pSubShell;
- vcl::Window* pWindow;
+ VclPtr<vcl::Window> pWindow;
bool bNoNewWindow;
protected:
@@ -233,7 +234,7 @@ public:
virtual SfxPrinter* GetPrinter( bool bCreate = false );
virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
virtual bool HasPrintOptionsPage() const;
- virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions );
+ virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions );
static JobSetup GetJobSetup();
Printer* GetActivePrinter() const;
@@ -294,7 +295,7 @@ public:
SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient *pIP );
SAL_DLLPRIVATE void DiscardClients_Impl();
- SAL_DLLPRIVATE SfxPrinter* SetPrinter_Impl( SfxPrinter *pNewPrinter );
+ SAL_DLLPRIVATE SfxPrinter* SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
SAL_DLLPRIVATE bool IsShowView_Impl() const;
SAL_DLLPRIVATE bool HandleNotifyEvent_Impl( NotifyEvent& rEvent );