diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 11:41:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 15:08:48 +0100 |
commit | e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch) | |
tree | b322529f4a54a6427862cb20cb4cf87fb6a5d065 /include/svx | |
parent | 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff) | |
parent | 0cde74f788a054fa2b65107a030dd463b8d11c7a (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/svx')
64 files changed, 464 insertions, 436 deletions
diff --git a/include/svx/AccessibleShapeTreeInfo.hxx b/include/svx/AccessibleShapeTreeInfo.hxx index 65aae3bd00eb..aca3221ffc52 100644 --- a/include/svx/AccessibleShapeTreeInfo.hxx +++ b/include/svx/AccessibleShapeTreeInfo.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/frame/XController.hpp> #include <svx/IAccessibleViewForwarder.hxx> #include <svx/svxdllapi.h> +#include <vcl/vclptr.hxx> class SdrView; namespace vcl { class Window; } @@ -176,7 +177,7 @@ private: /** This window is necessary to construct an SvxTextEditSource which in turn is used to create an accessible edit engine. */ - vcl::Window* mpWindow; + VclPtr<vcl::Window> mpWindow; /** The view forwarder allows the transformation between internal and pixel coordinates and can be asked for the visible area. diff --git a/include/svx/ParaLineSpacingPopup.hxx b/include/svx/ParaLineSpacingPopup.hxx index ba8cebc6e103..1460c744f384 100644 --- a/include/svx/ParaLineSpacingPopup.hxx +++ b/include/svx/ParaLineSpacingPopup.hxx @@ -39,7 +39,7 @@ public: virtual ~ParaLineSpacingPopup(); virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; }; } // namespace svx diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx index 7be37ee40177..81bdd06253cd 100644 --- a/include/svx/bmpmask.hxx +++ b/include/svx/bmpmask.hxx @@ -81,33 +81,33 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxBmpMask : public SfxDockingWindow friend class MaskData; friend class MaskSet; - ToolBox* m_pTbxPipette; - ColorWindow* m_pCtlPipette; - PushButton* m_pBtnExec; - - CheckBox* m_pCbx1; - MaskSet* m_pQSet1; - MetricField* m_pSp1; - ColorLB* m_pLbColor1; - - CheckBox* m_pCbx2; - MaskSet* m_pQSet2; - MetricField* m_pSp2; - ColorLB* m_pLbColor2; - - CheckBox* m_pCbx3; - MaskSet* m_pQSet3; - MetricField* m_pSp3; - ColorLB* m_pLbColor3; - - CheckBox* m_pCbx4; - MaskSet* m_pQSet4; - MetricField* m_pSp4; - ColorLB* m_pLbColor4; + VclPtr<ToolBox> m_pTbxPipette; + VclPtr<ColorWindow> m_pCtlPipette; + VclPtr<PushButton> m_pBtnExec; + + VclPtr<CheckBox> m_pCbx1; + VclPtr<MaskSet> m_pQSet1; + VclPtr<MetricField> m_pSp1; + VclPtr<ColorLB> m_pLbColor1; + + VclPtr<CheckBox> m_pCbx2; + VclPtr<MaskSet> m_pQSet2; + VclPtr<MetricField> m_pSp2; + VclPtr<ColorLB> m_pLbColor2; + + VclPtr<CheckBox> m_pCbx3; + VclPtr<MaskSet> m_pQSet3; + VclPtr<MetricField> m_pSp3; + VclPtr<ColorLB> m_pLbColor3; + + VclPtr<CheckBox> m_pCbx4; + VclPtr<MaskSet> m_pQSet4; + VclPtr<MetricField> m_pSp4; + VclPtr<ColorLB> m_pLbColor4; MaskData* pData; - CheckBox* m_pCbxTrans; - ColorLB* m_pLbColorTrans; + VclPtr<CheckBox> m_pCbxTrans; + VclPtr<ColorLB> m_pLbColorTrans; XColorListRef pColLst; Color aPipetteColor; @@ -135,6 +135,7 @@ public: SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent); virtual ~SvxBmpMask(); + virtual void dispose() SAL_OVERRIDE; void SetColor( const Color& rColor ); void PipetteClicked(); diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index fd9a1d00c15d..cf05bf2764a3 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -22,6 +22,8 @@ #include <vcl/ctrl.hxx> #include <vcl/metric.hxx> #include <vcl/scrbar.hxx> +#include <vcl/vclptr.hxx> +#include <boost/shared_ptr.hpp> #include <map> #include <memory> #include <svx/svxdllapi.h> @@ -44,6 +46,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxShowCharSet : public Control public: SvxShowCharSet( vcl::Window* pParent ); virtual ~SvxShowCharSet(); + virtual void dispose() SAL_OVERRIDE; void SetFont( const vcl::Font& rFont ); @@ -71,7 +74,7 @@ public: static sal_uInt16 GetRowPos(sal_uInt16 _nPos); static sal_uInt16 GetColumnPos(sal_uInt16 _nPos); - ScrollBar& getScrollBar() { return aVscrollSB;} + ScrollBar& getScrollBar() { return *aVscrollSB.get();} void ReleaseAccessible(); sal_Int32 getMaxCharCount() const; @@ -112,7 +115,7 @@ private: sal_Int32 nSelectedIndex; FontCharMapPtr mpFontCharMap; - ScrollBar aVscrollSB; + VclPtr<ScrollBar> aVscrollSB; private: void DrawChars_Impl( int n1, int n2); diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx index dd15c8a66c07..63db8545c3bd 100644 --- a/include/svx/checklbx.hxx +++ b/include/svx/checklbx.hxx @@ -46,6 +46,7 @@ public: SvxCheckListBox( vcl::Window* pParent, WinBits nWinStyle = 0 ); void SetNormalStaticImage(const Image& rNormalStaticImage); virtual ~SvxCheckListBox(); + virtual void dispose() SAL_OVERRIDE; void InsertEntry ( const OUString& rStr, sal_uLong nPos = TREELIST_APPEND, diff --git a/include/svx/clipboardctl.hxx b/include/svx/clipboardctl.hxx index 07c5bbb0dc70..64ed0d94e832 100644 --- a/include/svx/clipboardctl.hxx +++ b/include/svx/clipboardctl.hxx @@ -45,7 +45,7 @@ public: virtual ~SvxClipBoardControl(); virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx index 0987da9dea53..04e67f1f0a9f 100644 --- a/include/svx/colrctrl.hxx +++ b/include/svx/colrctrl.hxx @@ -26,6 +26,7 @@ #include <svl/lstner.hxx> #include <svx/svxdllapi.h> #include <svx/xtable.hxx> +#include <vcl/vclptr.hxx> class SvData; @@ -75,7 +76,7 @@ friend class SvxColorChildWindow; private: XColorListRef pColorList; - SvxColorValueSet_docking aColorSet; + VclPtr<SvxColorValueSet_docking> aColorSet; sal_uInt16 nLeftSlot; sal_uInt16 nRightSlot; sal_uInt16 nCols; @@ -103,6 +104,7 @@ public: SfxChildWindow *pCW, vcl::Window* pParent); virtual ~SvxColorDockingWindow(); + virtual void dispose() SAL_OVERRIDE; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx index 17aa10ad09a2..ba5e51aa52c1 100644 --- a/include/svx/compressgraphicdialog.hxx +++ b/include/svx/compressgraphicdialog.hxx @@ -33,22 +33,22 @@ class SdrGrafObj; class SVX_DLLPUBLIC SAL_WARN_UNUSED CompressGraphicsDialog : public ModalDialog { private: - FixedText* m_pLabelGraphicType; - FixedText* m_pFixedText2; - FixedText* m_pFixedText3; - FixedText* m_pFixedText5; - FixedText* m_pFixedText6; - - CheckBox* m_pReduceResolutionCB; - NumericField* m_pMFNewWidth; - NumericField* m_pMFNewHeight; - ComboBox* m_pResolutionLB; - RadioButton* m_pLosslessRB; - RadioButton* m_pJpegCompRB; - NumericField* m_pCompressionMF; - NumericField* m_pQualityMF; - PushButton* m_pBtnCalculate; - ListBox* m_pInterpolationCombo; + VclPtr<FixedText> m_pLabelGraphicType; + VclPtr<FixedText> m_pFixedText2; + VclPtr<FixedText> m_pFixedText3; + VclPtr<FixedText> m_pFixedText5; + VclPtr<FixedText> m_pFixedText6; + + VclPtr<CheckBox> m_pReduceResolutionCB; + VclPtr<NumericField> m_pMFNewWidth; + VclPtr<NumericField> m_pMFNewHeight; + VclPtr<ComboBox> m_pResolutionLB; + VclPtr<RadioButton> m_pLosslessRB; + VclPtr<RadioButton> m_pJpegCompRB; + VclPtr<NumericField> m_pCompressionMF; + VclPtr<NumericField> m_pQualityMF; + VclPtr<PushButton> m_pBtnCalculate; + VclPtr<ListBox> m_pInterpolationCombo; SdrGrafObj* m_pGraphicObj; Graphic m_aGraphic; @@ -83,8 +83,8 @@ private: public: CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ); CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings ); - virtual ~CompressGraphicsDialog(); + virtual void dispose() SAL_OVERRIDE; SdrGrafObj* GetCompressedSdrGrafObj(); Graphic GetCompressedGraphic(); diff --git a/include/svx/connctrl.hxx b/include/svx/connctrl.hxx index 7febedffef35..1c037d88584c 100644 --- a/include/svx/connctrl.hxx +++ b/include/svx/connctrl.hxx @@ -46,6 +46,7 @@ private: public: SvxXConnectionPreview( vcl::Window* pParent, WinBits nStyle); virtual ~SvxXConnectionPreview(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx index 57080eb7da0f..de25491cb15c 100644 --- a/include/svx/contdlg.hxx +++ b/include/svx/contdlg.hxx @@ -47,18 +47,19 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxContourDlg : public SfxFloatingWindow { using Window::Update; - SvxSuperContourDlg* pSuperClass; + VclPtr<SvxSuperContourDlg> pSuperClass; protected: - void SetSuperClass( SvxSuperContourDlg& rSuperClass ) { pSuperClass = &rSuperClass; } + void SetSuperClass( SvxSuperContourDlg& rSuperClass ); public: SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window* pParent); - virtual ~SvxContourDlg(); + virtual ~SvxContourDlg(); + virtual void dispose() SAL_OVERRIDE; const Graphic& GetGraphic() const; bool IsGraphicChanged() const; diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index 160ef1000237..83c590d57ac0 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -116,6 +116,7 @@ public: SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER); virtual ~SvxRedlinTable(); + virtual void dispose() SAL_OVERRIDE; // For FilterPage only { void SetFilterDate(bool bFlag=true); @@ -179,25 +180,25 @@ private: Link aRefLink; Link aModifyComLink; - SvxRedlinTable* pRedlinTable; - CheckBox* m_pCbDate; - ListBox* m_pLbDate; - DateField* m_pDfDate; - TimeField* m_pTfDate; - PushButton* m_pIbClock; - FixedText* m_pFtDate2; - DateField* m_pDfDate2; - TimeField* m_pTfDate2; - PushButton* m_pIbClock2; - CheckBox* m_pCbAuthor; - ListBox* m_pLbAuthor; - CheckBox* m_pCbRange; - Edit* m_pEdRange; - PushButton* m_pBtnRange; - CheckBox* m_pCbAction; - ListBox* m_pLbAction; - CheckBox* m_pCbComment; - Edit* m_pEdComment; + VclPtr<SvxRedlinTable> pRedlinTable; + VclPtr<CheckBox> m_pCbDate; + VclPtr<ListBox> m_pLbDate; + VclPtr<DateField> m_pDfDate; + VclPtr<TimeField> m_pTfDate; + VclPtr<PushButton> m_pIbClock; + VclPtr<FixedText> m_pFtDate2; + VclPtr<DateField> m_pDfDate2; + VclPtr<TimeField> m_pTfDate2; + VclPtr<PushButton> m_pIbClock2; + VclPtr<CheckBox> m_pCbAuthor; + VclPtr<ListBox> m_pLbAuthor; + VclPtr<CheckBox> m_pCbRange; + VclPtr<Edit> m_pEdRange; + VclPtr<PushButton> m_pBtnRange; + VclPtr<CheckBox> m_pCbAction; + VclPtr<ListBox> m_pLbAction; + VclPtr<CheckBox> m_pCbComment; + VclPtr<Edit> m_pEdComment; bool bModified; DECL_LINK( SelDateHdl, ListBox* ); @@ -215,6 +216,8 @@ protected: public: SvxTPFilter( vcl::Window * pParent); + virtual ~SvxTPFilter(); + virtual void dispose() SAL_OVERRIDE; virtual void DeactivatePage() SAL_OVERRIDE; void SetRedlinTable(SvxRedlinTable*); @@ -304,12 +307,12 @@ private: Link RejectAllClickLk; Link UndoClickLk; - SvxRedlinTable* m_pViewData; - PushButton* m_pAccept; - PushButton* m_pReject; - PushButton* m_pAcceptAll; - PushButton* m_pRejectAll; - PushButton* m_pUndo; + VclPtr<SvxRedlinTable> m_pViewData; + VclPtr<PushButton> m_pAccept; + VclPtr<PushButton> m_pReject; + VclPtr<PushButton> m_pAcceptAll; + VclPtr<PushButton> m_pRejectAll; + VclPtr<PushButton> m_pUndo; bool bEnableAccept; bool bEnableAcceptAll; @@ -322,6 +325,7 @@ private: public: SvxTPView(vcl::Window * pParent, VclBuilderContainer *pTopLevel); virtual ~SvxTPView(); + virtual void dispose() SAL_OVERRIDE; void InsertWriterHeader(); void InsertCalcHeader(); @@ -370,8 +374,8 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxAcceptChgCtr { private: - SvxTPFilter* pTPFilter; - SvxTPView* pTPView; + VclPtr<SvxTPFilter> pTPFilter; + VclPtr<SvxTPView> pTPView; sal_uInt16 m_nViewPageId; sal_uInt16 m_nFilterPageId; @@ -380,6 +384,7 @@ public: SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTopLevel); virtual ~SvxAcceptChgCtr(); + virtual void dispose() SAL_OVERRIDE; void ShowFilterPage(); void ShowViewPage(); diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index 36ac077369d9..9477de1f7a9b 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -80,8 +80,6 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED DialControl : public Control public: explicit DialControl( vcl::Window* pParent, WinBits nBits ); - virtual ~DialControl(); - virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; @@ -126,11 +124,11 @@ public: protected: struct DialControl_Impl { - std::unique_ptr<DialControlBmp> mxBmpEnabled; - std::unique_ptr<DialControlBmp> mxBmpDisabled; - std::unique_ptr<DialControlBmp> mxBmpBuffered; + ScopedVclPtr<DialControlBmp> mxBmpEnabled; + ScopedVclPtr<DialControlBmp> mxBmpDisabled; + ScopedVclPtr<DialControlBmp> mxBmpBuffered; Link maModifyHdl; - NumericField* mpLinkField; + VclPtr<NumericField> mpLinkField; sal_Int32 mnLinkedFieldValueMultiplyer; Size maWinSize; vcl::Font maWinFont; diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx index 09b1c52c55d1..a9eab331774b 100644 --- a/include/svx/dlgctl3d.hxx +++ b/include/svx/dlgctl3d.hxx @@ -51,6 +51,7 @@ protected: public: Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle = 0); virtual ~Svx3DPreviewControl(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -104,7 +105,6 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED Svx3DLightControl : public Svx3DPreviewContr public: Svx3DLightControl(vcl::Window* pParent, WinBits nStyle = 0); - virtual ~Svx3DLightControl(); virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE; virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE; @@ -145,18 +145,19 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxLightCtl3D : public Control { private: // local controls - Svx3DLightControl maLightControl; - ScrollBar maHorScroller; - ScrollBar maVerScroller; - PushButton maSwitcher; + VclPtr<Svx3DLightControl> maLightControl; + VclPtr<ScrollBar> maHorScroller; + VclPtr<ScrollBar> maVerScroller; + VclPtr<PushButton> maSwitcher; // callback for interactive changes - Link maUserInteractiveChangeCallback; - Link maUserSelectionChangeCallback; + Link maUserInteractiveChangeCallback; + Link maUserSelectionChangeCallback; public: SvxLightCtl3D(vcl::Window* pParent); virtual ~SvxLightCtl3D(); + virtual void dispose() SAL_OVERRIDE; // react to size changes virtual void Resize() SAL_OVERRIDE; @@ -166,7 +167,7 @@ public: void CheckSelection(); // bring further settings to the outside world - Svx3DLightControl& GetSvx3DLightControl() { return maLightControl; } + Svx3DLightControl& GetSvx3DLightControl() { return *maLightControl.get(); } // register user callback void SetUserInteractiveChangeCallback(Link aNew) { maUserInteractiveChangeCallback = aNew; } diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index 95713734122a..119aafa84290 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -100,6 +100,7 @@ public: void SetControlSettings(RECT_POINT eRpt = RP_MM, sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80, CTL_STYLE eStyle = CS_RECT); virtual ~SvxRectCtl(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -179,6 +180,7 @@ public: SvxPixelCtl( vcl::Window* pParent, sal_uInt16 nNumber = 8 ); virtual ~SvxPixelCtl(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -322,7 +324,6 @@ private: public: LineLB(vcl::Window* pParent, WinBits aWB); - virtual ~LineLB(); void Fill(const XDashListRef &pList); bool getAddStandardFields() const { return mbAddStandardFields; } @@ -341,7 +342,6 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED LineEndLB : public ListBox public: LineEndLB( vcl::Window* pParent, WinBits aWB ); - virtual ~LineEndLB(); void Fill( const XLineEndListRef &pList, bool bStart = true ); @@ -350,7 +350,6 @@ public: }; - class SdrObject; class SdrPathObj; class SdrModel; @@ -358,8 +357,8 @@ class SdrModel; class SAL_WARN_UNUSED SvxPreviewBase : public Control { private: - SdrModel* mpModel; - VirtualDevice* mpBufferDevice; + SdrModel* mpModel; + VclPtr<VirtualDevice> mpBufferDevice; protected: void InitSettings(bool bForeground, bool bBackground); @@ -373,6 +372,7 @@ protected: public: SvxPreviewBase(vcl::Window* pParent); virtual ~SvxPreviewBase(); + virtual void dispose() SAL_OVERRIDE; // change support virtual void StateChanged(StateChangedType nStateChange) SAL_OVERRIDE; @@ -403,6 +403,7 @@ private: public: SvxXLinePreview( vcl::Window* pParent ); virtual ~SvxXLinePreview(); + virtual void dispose() SAL_OVERRIDE; void SetLineAttributes(const SfxItemSet& rItemSet); @@ -429,6 +430,7 @@ private: public: SvxXRectPreview(vcl::Window* pParent); virtual ~SvxXRectPreview(); + virtual void dispose() SAL_OVERRIDE; void SetAttributes(const SfxItemSet& rItemSet); @@ -454,6 +456,7 @@ public: SvxXShadowPreview(vcl::Window *pParent); virtual ~SvxXShadowPreview(); + virtual void dispose() SAL_OVERRIDE; void SetRectangleAttributes(const SfxItemSet& rItemSet); void SetShadowAttributes(const SfxItemSet& rItemSet); diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx index 60955a6a6219..d33c5e6c3739 100644 --- a/include/svx/fillctrl.hxx +++ b/include/svx/fillctrl.hxx @@ -50,9 +50,9 @@ private: XFillHatchItem* mpHatchItem; XFillBitmapItem* mpBitmapItem; - FillControl* mpFillControl; - SvxFillTypeBox* mpFillTypeLB; - SvxFillAttrBox* mpFillAttrLB; + VclPtr<FillControl> mpFillControl; + VclPtr<SvxFillTypeBox> mpFillTypeLB; + VclPtr<SvxFillAttrBox> mpFillAttrLB; css::drawing::FillStyle meLastXFS; @@ -67,7 +67,7 @@ public: virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE; void Update(const SfxPoolItem* pState); - virtual vcl::Window* CreateItemWindow(vcl::Window* pParent) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) SAL_OVERRIDE; }; @@ -77,8 +77,8 @@ class SAL_WARN_UNUSED FillControl : public vcl::Window private: friend class SvxFillToolBoxControl; - SvxFillTypeBox* mpLbFillType; - SvxFillAttrBox* mpLbFillAttr; + VclPtr<SvxFillTypeBox> mpLbFillType; + VclPtr<SvxFillAttrBox> mpLbFillAttr; Size maLogicalFillSize; Size maLogicalAttrSize; @@ -101,6 +101,7 @@ private: public: FillControl(vcl::Window* pParent, WinBits nStyle = 0); virtual ~FillControl(); + virtual void dispose() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; }; diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx index f538f7d53aed..04c166228a94 100644 --- a/include/svx/float3d.hxx +++ b/include/svx/float3d.hxx @@ -60,108 +60,108 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED Svx3DWin : public SfxDockingWindow using Window::Update; private: - PushButton* m_pBtnGeo; - PushButton* m_pBtnRepresentation; - PushButton* m_pBtnLight; - PushButton* m_pBtnTexture; - PushButton* m_pBtnMaterial; - PushButton* m_pBtnUpdate; - PushButton* m_pBtnAssign; + VclPtr<PushButton> m_pBtnGeo; + VclPtr<PushButton> m_pBtnRepresentation; + VclPtr<PushButton> m_pBtnLight; + VclPtr<PushButton> m_pBtnTexture; + VclPtr<PushButton> m_pBtnMaterial; + VclPtr<PushButton> m_pBtnUpdate; + VclPtr<PushButton> m_pBtnAssign; // geometry - VclContainer* m_pFLGeometrie; - FixedText* m_pFtPercentDiagonal; - MetricField* m_pMtrPercentDiagonal; - FixedText* m_pFtBackscale; - MetricField* m_pMtrBackscale; - FixedText* m_pFtEndAngle; - MetricField* m_pMtrEndAngle; - FixedText* m_pFtDepth; - MetricField* m_pMtrDepth; - - VclContainer* m_pFLSegments; - NumericField* m_pNumHorizontal; - NumericField* m_pNumVertical; - - VclContainer* m_pFLNormals; - PushButton* m_pBtnNormalsObj; - PushButton* m_pBtnNormalsFlat; - PushButton* m_pBtnNormalsSphere; - PushButton* m_pBtnNormalsInvert; - PushButton* m_pBtnTwoSidedLighting; - PushButton* m_pBtnDoubleSided; + VclPtr<VclContainer> m_pFLGeometrie; + VclPtr<FixedText> m_pFtPercentDiagonal; + VclPtr<MetricField> m_pMtrPercentDiagonal; + VclPtr<FixedText> m_pFtBackscale; + VclPtr<MetricField> m_pMtrBackscale; + VclPtr<FixedText> m_pFtEndAngle; + VclPtr<MetricField> m_pMtrEndAngle; + VclPtr<FixedText> m_pFtDepth; + VclPtr<MetricField> m_pMtrDepth; + + VclPtr<VclContainer> m_pFLSegments; + VclPtr<NumericField> m_pNumHorizontal; + VclPtr<NumericField> m_pNumVertical; + + VclPtr<VclContainer> m_pFLNormals; + VclPtr<PushButton> m_pBtnNormalsObj; + VclPtr<PushButton> m_pBtnNormalsFlat; + VclPtr<PushButton> m_pBtnNormalsSphere; + VclPtr<PushButton> m_pBtnNormalsInvert; + VclPtr<PushButton> m_pBtnTwoSidedLighting; + VclPtr<PushButton> m_pBtnDoubleSided; // presentation - VclContainer* m_pFLRepresentation; - ListBox* m_pLbShademode; + VclPtr<VclContainer> m_pFLRepresentation; + VclPtr<ListBox> m_pLbShademode; - VclContainer* m_pFLShadow; - PushButton* m_pBtnShadow3d; - FixedText* m_pFtSlant; - MetricField* m_pMtrSlant; + VclPtr<VclContainer> m_pFLShadow; + VclPtr<PushButton> m_pBtnShadow3d; + VclPtr<FixedText> m_pFtSlant; + VclPtr<MetricField> m_pMtrSlant; - VclContainer* m_pFLCamera; - MetricField* m_pMtrDistance; - MetricField* m_pMtrFocalLength; + VclPtr<VclContainer> m_pFLCamera; + VclPtr<MetricField> m_pMtrDistance; + VclPtr<MetricField> m_pMtrFocalLength; // lighting - VclContainer* m_pFLLight; - PushButton* m_pBtnLight1; - PushButton* m_pBtnLight2; - PushButton* m_pBtnLight3; - PushButton* m_pBtnLight4; - PushButton* m_pBtnLight5; - PushButton* m_pBtnLight6; - PushButton* m_pBtnLight7; - PushButton* m_pBtnLight8; - ColorLB* m_pLbLight1; - ColorLB* m_pLbLight2; - ColorLB* m_pLbLight3; - ColorLB* m_pLbLight4; - ColorLB* m_pLbLight5; - ColorLB* m_pLbLight6; - ColorLB* m_pLbLight7; - ColorLB* m_pLbLight8; - PushButton* m_pBtnLightColor; - ColorLB* m_pLbAmbientlight; // ListBox - PushButton* m_pBtnAmbientColor; // color button + VclPtr<VclContainer> m_pFLLight; + VclPtr<PushButton> m_pBtnLight1; + VclPtr<PushButton> m_pBtnLight2; + VclPtr<PushButton> m_pBtnLight3; + VclPtr<PushButton> m_pBtnLight4; + VclPtr<PushButton> m_pBtnLight5; + VclPtr<PushButton> m_pBtnLight6; + VclPtr<PushButton> m_pBtnLight7; + VclPtr<PushButton> m_pBtnLight8; + VclPtr<ColorLB> m_pLbLight1; + VclPtr<ColorLB> m_pLbLight2; + VclPtr<ColorLB> m_pLbLight3; + VclPtr<ColorLB> m_pLbLight4; + VclPtr<ColorLB> m_pLbLight5; + VclPtr<ColorLB> m_pLbLight6; + VclPtr<ColorLB> m_pLbLight7; + VclPtr<ColorLB> m_pLbLight8; + VclPtr<PushButton> m_pBtnLightColor; + VclPtr<ColorLB> m_pLbAmbientlight; // ListBox + VclPtr<PushButton> m_pBtnAmbientColor; // color button // Textures - VclContainer* m_pFLTexture; - PushButton* m_pBtnTexLuminance; - PushButton* m_pBtnTexColor; - PushButton* m_pBtnTexReplace; - PushButton* m_pBtnTexModulate; - PushButton* m_pBtnTexBlend; - PushButton* m_pBtnTexObjectX; - PushButton* m_pBtnTexParallelX; - PushButton* m_pBtnTexCircleX; - PushButton* m_pBtnTexObjectY; - PushButton* m_pBtnTexParallelY; - PushButton* m_pBtnTexCircleY; - PushButton* m_pBtnTexFilter; + VclPtr<VclContainer> m_pFLTexture; + VclPtr<PushButton> m_pBtnTexLuminance; + VclPtr<PushButton> m_pBtnTexColor; + VclPtr<PushButton> m_pBtnTexReplace; + VclPtr<PushButton> m_pBtnTexModulate; + VclPtr<PushButton> m_pBtnTexBlend; + VclPtr<PushButton> m_pBtnTexObjectX; + VclPtr<PushButton> m_pBtnTexParallelX; + VclPtr<PushButton> m_pBtnTexCircleX; + VclPtr<PushButton> m_pBtnTexObjectY; + VclPtr<PushButton> m_pBtnTexParallelY; + VclPtr<PushButton> m_pBtnTexCircleY; + VclPtr<PushButton> m_pBtnTexFilter; // material // material editor - VclContainer* m_pFLMaterial; - ListBox* m_pLbMatFavorites; - ColorLB* m_pLbMatColor; - PushButton* m_pBtnMatColor; - ColorLB* m_pLbMatEmission; - PushButton* m_pBtnEmissionColor; + VclPtr<VclContainer> m_pFLMaterial; + VclPtr<ListBox> m_pLbMatFavorites; + VclPtr<ColorLB> m_pLbMatColor; + VclPtr<PushButton> m_pBtnMatColor; + VclPtr<ColorLB> m_pLbMatEmission; + VclPtr<PushButton> m_pBtnEmissionColor; - VclContainer* m_pFLMatSpecular; - ColorLB* m_pLbMatSpecular; - PushButton* m_pBtnSpecularColor; - MetricField* m_pMtrMatSpecularIntensity; + VclPtr<VclContainer> m_pFLMatSpecular; + VclPtr<ColorLB> m_pLbMatSpecular; + VclPtr<PushButton> m_pBtnSpecularColor; + VclPtr<MetricField> m_pMtrMatSpecularIntensity; - Svx3DPreviewControl* m_pCtlPreview; - SvxLightCtl3D* m_pCtlLightPreview; + VclPtr<Svx3DPreviewControl> m_pCtlPreview; + VclPtr<SvxLightCtl3D> m_pCtlLightPreview; // bottom part - PushButton* m_pBtnConvertTo3D; - PushButton* m_pBtnLatheObject; - PushButton* m_pBtnPerspective; + VclPtr<PushButton> m_pBtnConvertTo3D; + VclPtr<PushButton> m_pBtnLatheObject; + VclPtr<PushButton> m_pBtnPerspective; // the rest ... Image aImgLightOn; @@ -171,7 +171,7 @@ private: // Model, Page, View etc. for favourites FmFormModel* pModel; - VirtualDevice* pVDev; + VclPtr<VirtualDevice> pVDev; E3dView* p3DView; SfxBindings* pBindings; @@ -189,8 +189,6 @@ private: bool bOnly3DChanged; - - DECL_LINK( ClickViewTypeHdl, void * ); DECL_LINK( ClickUpdateHdl, void * ); DECL_LINK( ClickAssignHdl, void * ); @@ -220,6 +218,7 @@ public: Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW, vcl::Window* pParent ); virtual ~Svx3DWin(); + virtual void dispose() SAL_OVERRIDE; void InitColorLB( const SdrModel* pDoc ); bool IsUpdateMode() const { return bUpdate; } diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx index 0bcb6124e7ff..7bb356852b28 100644 --- a/include/svx/fmgridcl.hxx +++ b/include/svx/fmgridcl.hxx @@ -43,6 +43,7 @@ protected: public: FmGridHeader( BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG ); virtual ~FmGridHeader(); + virtual void dispose() SAL_OVERRIDE; public: struct AccessControl { friend class FmGridControl; private: AccessControl() { } }; @@ -153,7 +154,7 @@ public: protected: virtual void Command(const CommandEvent& rEvt) SAL_OVERRIDE; - virtual BrowserHeader* imp_CreateHeaderBar(BrowseBox* pParent) SAL_OVERRIDE; + virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) SAL_OVERRIDE; virtual long QueryMinimumRowHeight() SAL_OVERRIDE; virtual void RowHeightChanged() SAL_OVERRIDE; virtual void ColumnResized(sal_uInt16 nId) SAL_OVERRIDE; diff --git a/include/svx/fmgridif.hxx b/include/svx/fmgridif.hxx index bb9d2fcfa18c..d752b881e064 100644 --- a/include/svx/fmgridif.hxx +++ b/include/svx/fmgridif.hxx @@ -501,7 +501,7 @@ public: virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: - virtual FmGridControl* imp_CreateControl(vcl::Window* pParent, WinBits nStyle); + virtual VclPtr<FmGridControl> imp_CreateControl(vcl::Window* pParent, WinBits nStyle); static ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& getSupportedURLs(); static ::com::sun::star::uno::Sequence<sal_uInt16>& getSupportedGridSlots(); diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx index 462c304590d1..8249ef9c46b7 100644 --- a/include/svx/fmshell.hxx +++ b/include/svx/fmshell.hxx @@ -88,7 +88,7 @@ class SVX_DLLPUBLIC FmFormShell : public SfxShell class FormShellWaitObject { - vcl::Window* m_pWindow; + VclPtr<vcl::Window> m_pWindow; public: FormShellWaitObject(const FmFormShell* _pShell); ~FormShellWaitObject(); diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx index a9ad36d99855..2278f0c3f755 100644 --- a/include/svx/fntctrl.hxx +++ b/include/svx/fntctrl.hxx @@ -49,6 +49,7 @@ public: SvxFontPrevWindow( vcl::Window* pParent, const ResId& rId ); SvxFontPrevWindow(vcl::Window* pParent, WinBits nStyle); virtual ~SvxFontPrevWindow(); + virtual void dispose() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx index 6760ace56b0e..8905b76b9511 100644 --- a/include/svx/fontwork.hxx +++ b/include/svx/fontwork.hxx @@ -92,20 +92,22 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxFontWorkDialog : public SfxDockingWindow SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT]; - ToolBox* m_pTbxStyle; - ToolBox* m_pTbxAdjust; + VclPtr<ToolBox> m_pTbxStyle; + VclPtr<ToolBox> m_pTbxAdjust; - MetricField* m_pMtrFldDistance; - MetricField* m_pMtrFldTextStart; + VclPtr<FixedImage> m_pFbDistance; + VclPtr<MetricField> m_pMtrFldDistance; + VclPtr<FixedImage> m_pFbTextStart; + VclPtr<MetricField> m_pMtrFldTextStart; - ToolBox* m_pTbxShadow; + VclPtr<ToolBox> m_pTbxShadow; - FixedImage* m_pFbShadowX; - MetricField* m_pMtrFldShadowX; - FixedImage* m_pFbShadowY; - MetricField* m_pMtrFldShadowY; + VclPtr<FixedImage> m_pFbShadowX; + VclPtr<MetricField> m_pMtrFldShadowX; + VclPtr<FixedImage> m_pFbShadowY; + VclPtr<MetricField> m_pMtrFldShadowY; - ColorLB* m_pShadowColorLB; + VclPtr<ColorLB> m_pShadowColorLB; SfxBindings& rBindings; Idle aInputIdle; @@ -172,6 +174,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxFontWorkDialog : public SfxDockingWindow SvxFontWorkDialog(SfxBindings *pBinding, SfxChildWindow *pCW, vcl::Window* pParent); virtual ~SvxFontWorkDialog(); + virtual void dispose() SAL_OVERRIDE; void SetColorList(const XColorListRef &pTable); }; diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx index 56787ec3df65..dfae49d09336 100644 --- a/include/svx/fontworkgallery.hxx +++ b/include/svx/fontworkgallery.hxx @@ -57,23 +57,25 @@ public: virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE; virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; }; class SAL_WARN_UNUSED FontworkCharacterSpacingDialog : public ModalDialog { - MetricField* m_pMtrScale; + VclPtr<MetricField> m_pMtrScale; public: FontworkCharacterSpacingDialog( vcl::Window* pParent, sal_Int32 nScale ); + virtual ~FontworkCharacterSpacingDialog(); + virtual void dispose() SAL_OVERRIDE; sal_Int32 getScale() const; }; class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkGalleryDialog : public ModalDialog { - ValueSet* mpCtlFavorites; - OKButton* mpOKButton; + VclPtr<ValueSet> mpCtlFavorites; + VclPtr<OKButton> mpOKButton; sal_uInt16 mnThemeId; @@ -96,6 +98,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkGalleryDialog : public ModalDialog public: FontWorkGalleryDialog( SdrView* pView, vcl::Window* pParent, sal_uInt16 nSID ); virtual ~FontWorkGalleryDialog(); + virtual void dispose() SAL_OVERRIDE; // SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog void SetSdrObjectRef( SdrObject**, SdrModel* pModel ); diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx index d584acc91104..d4df82a607c8 100644 --- a/include/svx/frmdirlbox.hxx +++ b/include/svx/frmdirlbox.hxx @@ -40,7 +40,6 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED FrameDirectionListBox : public ListBox { public: explicit FrameDirectionListBox( vcl::Window* pParent, WinBits nBits ); - virtual ~FrameDirectionListBox(); /** Inserts a string with corresponding direction enum into the listbox. */ void InsertEntryValue( diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx index aa34ef62c504..48bb2f90d785 100644 --- a/include/svx/frmsel.hxx +++ b/include/svx/frmsel.hxx @@ -84,7 +84,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED FrameSelector : public Control { public: FrameSelector(vcl::Window* pParent); - virtual ~FrameSelector(); + virtual ~FrameSelector(); /** Initializes the control, enables/disables frame borders according to flags. */ void Initialize( FrameSelFlags nFlags ); diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 4508e283cc6f..d0ccb6c62323 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -109,7 +109,6 @@ private: public: GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme ); - virtual ~GalleryIconView(); }; class GalleryListView : public BrowseBox @@ -144,7 +143,6 @@ private: public: GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme ); - virtual ~GalleryListView(); void SetSelectHdl( const Link& rSelectHdl ) { maSelectHdl = rSelectHdl; } diff --git a/include/svx/grafctrl.hxx b/include/svx/grafctrl.hxx index acfd5f356cfa..ba4124de41e1 100644 --- a/include/svx/grafctrl.hxx +++ b/include/svx/grafctrl.hxx @@ -54,7 +54,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; }; @@ -68,7 +68,7 @@ public: virtual ~SvxGrafToolBoxControl(); virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; }; @@ -160,7 +160,7 @@ public: virtual ~SvxGrafModeToolBoxControl(); virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; }; diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index d941b6fbb581..3d646afa2baf 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -80,8 +80,9 @@ protected: public: - GraphCtrl( vcl::Window* pParent, WinBits nStyle ); - virtual ~GraphCtrl(); + GraphCtrl( vcl::Window* pParent, WinBits nStyle ); + virtual ~GraphCtrl(); + virtual void dispose() SAL_OVERRIDE; void SetWinStyle( WinBits nWinBits ); WinBits GetWinStyle() const { return nWinStyle; } diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index bf42c434ea13..94bbad044a2b 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -151,20 +151,20 @@ public: friend class NavigationBar::AbsolutePos; // zusaetzliche Controls - FixedText m_aRecordText; - AbsolutePos m_aAbsolute; // absolute positioning - FixedText m_aRecordOf; - FixedText m_aRecordCount; + VclPtr<FixedText> m_aRecordText; + VclPtr<AbsolutePos> m_aAbsolute; // absolute positioning + VclPtr<FixedText> m_aRecordOf; + VclPtr<FixedText> m_aRecordCount; - ImageButton m_aFirstBtn; // ImageButton for 'go to the first record' - ImageButton m_aPrevBtn; // ImageButton for 'go to the previous record' - ImageButton m_aNextBtn; // ImageButton for 'go to the next record' - ImageButton m_aLastBtn; // ImageButton for 'go to the last record' - ImageButton m_aNewBtn; // ImageButton for 'go to a new record' - sal_uInt16 m_nDefaultWidth; - sal_Int32 m_nCurrentPos; + VclPtr<ImageButton> m_aFirstBtn; // ImageButton for 'go to the first record' + VclPtr<ImageButton> m_aPrevBtn; // ImageButton for 'go to the previous record' + VclPtr<ImageButton> m_aNextBtn; // ImageButton for 'go to the next record' + VclPtr<ImageButton> m_aLastBtn; // ImageButton for 'go to the last record' + VclPtr<ImageButton> m_aNewBtn; // ImageButton for 'go to a new record' + sal_uInt16 m_nDefaultWidth; + sal_Int32 m_nCurrentPos; - bool m_bPositioning; // protect PositionDataSource against recursion + bool m_bPositioning; // protect PositionDataSource against recursion public: // StatusIds for Controls of the Bar @@ -183,6 +183,8 @@ public: }; NavigationBar(vcl::Window* pParent, WinBits nStyle = 0); + virtual ~NavigationBar(); + virtual void dispose() SAL_OVERRIDE; // Status methods for Controls void InvalidateAll(sal_Int32 nCurrentPos = -1, bool bAll = false); @@ -225,7 +227,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; DbGridColumns m_aColumns; // Column description - NavigationBar m_aBar; + VclPtr<NavigationBar> m_aBar; DbGridRowRef m_xDataRow; // Row which can be modified // comes from the data cursor DbGridRowRef m_xSeekRow, // Row to which the iterator can set @@ -370,6 +372,7 @@ public: WinBits nBits = WB_BORDER); virtual ~DbGridControl(); + virtual void dispose() SAL_OVERRIDE; virtual void Init() SAL_OVERRIDE; virtual void InitColumnsByFields(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xFields) = 0; @@ -431,7 +434,7 @@ public: bool HasNavigationBar() const {return m_bNavigationBar;} sal_uInt16 GetOptions() const {return m_nOptions;} - NavigationBar& GetNavigationBar() {return m_aBar;} + NavigationBar& GetNavigationBar() {return *m_aBar.get();} sal_uInt16 SetOptions(sal_uInt16 nOpt); // The new options are interpreted with respect to the current data source. If it is unable // to update, to insert or to restore, the according options are ignored. If the grid isn't diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx index 53450d36491a..7df23df2dc70 100644 --- a/include/svx/hdft.hxx +++ b/include/svx/hdft.hxx @@ -52,6 +52,7 @@ public: virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; virtual ~SvxHFPage(); + virtual void dispose() SAL_OVERRIDE; void DisableDeleteQueryBox() { mbDisableQueryBox = true; } void EnableBackgroundSelector(bool bNew) { mbEnableBackgroundSelector = bNew; } @@ -69,22 +70,22 @@ protected: SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId ); - FixedText* m_pPageLbl; - CheckBox* m_pTurnOnBox; - CheckBox* m_pCntSharedBox; - CheckBox* m_pCntSharedFirstBox; - FixedText* m_pLMLbl; - MetricField* m_pLMEdit; - FixedText* m_pRMLbl; - MetricField* m_pRMEdit; - FixedText* m_pDistFT; - MetricField* m_pDistEdit; - CheckBox* m_pDynSpacingCB; - FixedText* m_pHeightFT; - MetricField* m_pHeightEdit; - CheckBox* m_pHeightDynBtn; - SvxPageWindow* m_pBspWin; - PushButton* m_pBackgroundBtn; + VclPtr<FixedText> m_pPageLbl; + VclPtr<CheckBox> m_pTurnOnBox; + VclPtr<CheckBox> m_pCntSharedBox; + VclPtr<CheckBox> m_pCntSharedFirstBox; + VclPtr<FixedText> m_pLMLbl; + VclPtr<MetricField> m_pLMEdit; + VclPtr<FixedText> m_pRMLbl; + VclPtr<MetricField> m_pRMEdit; + VclPtr<FixedText> m_pDistFT; + VclPtr<MetricField> m_pDistEdit; + VclPtr<CheckBox> m_pDynSpacingCB; + VclPtr<FixedText> m_pHeightFT; + VclPtr<MetricField> m_pHeightEdit; + VclPtr<CheckBox> m_pHeightDynBtn; + VclPtr<SvxPageWindow> m_pBspWin; + VclPtr<PushButton> m_pBackgroundBtn; sal_uInt16 nId; SfxItemSet* pBBSet; @@ -112,12 +113,10 @@ private: class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); // returns the Which values to the range - static const sal_uInt16* GetRanges() { return pRanges; } - -private: - SvxHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet ); + static const sal_uInt16* GetRanges() { return pRanges; } + SVX_DLLPRIVATE SvxHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet ); }; // class SvxFooterPage --------------------------------------------------- @@ -125,10 +124,8 @@ private: class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); - static const sal_uInt16* GetRanges() { return pRanges; } - -private: + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static const sal_uInt16* GetRanges() { return pRanges; } SVX_DLLPRIVATE SvxFooterPage( vcl::Window* pParent, const SfxItemSet& rSet ); }; diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx index 7c288fed577a..fc0b758d3c37 100644 --- a/include/svx/imapdlg.hxx +++ b/include/svx/imapdlg.hxx @@ -82,14 +82,14 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow friend class IMapOwnData; friend class IMapWindow; - ToolBox *m_pTbxIMapDlg1; - FixedText *m_pFtURL; - SvtURLBox *m_pURLBox; - FixedText *m_pFtText; - Edit *m_pEdtText; - FixedText *m_pFtTarget; - ComboBox *m_pCbbTarget; - StatusBar *m_pStbStatus; + VclPtr<ToolBox> m_pTbxIMapDlg1; + VclPtr<FixedText> m_pFtURL; + VclPtr<SvtURLBox> m_pURLBox; + VclPtr<FixedText> m_pFtText; + VclPtr<Edit> m_pEdtText; + VclPtr<FixedText> m_pFtTarget; + VclPtr<ComboBox> m_pCbbTarget; + VclPtr<StatusBar> m_pStbStatus; sal_uInt16 mnApplyId; sal_uInt16 mnOpenId; @@ -110,7 +110,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow sal_uInt16 mnPropertyId; Size aLastSize; - IMapWindow* pIMapWnd; + VclPtr<IMapWindow> pIMapWnd; IMapOwnData* pOwnData; void* pCheckObj; SvxIMapDlgItem aIMapItem; @@ -136,6 +136,7 @@ public: SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window* pParent ); virtual ~SvxIMapDlg(); + virtual void dispose() SAL_OVERRIDE; void SetExecState( bool bEnable ); diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index a71d9bcb0026..8d2c1bfb6726 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -49,7 +49,6 @@ public: SvxLineBox( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); - virtual ~SvxLineBox(); void FillControl(); @@ -87,7 +86,6 @@ public: SvxMetricField( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, WinBits nBits = WB_BORDER | WB_SPIN | WB_REPEAT ); - virtual ~SvxMetricField(); void Update( const XLineWidthItem* pItem ); void SetCoreUnit( SfxMapUnit eUnit ); @@ -100,7 +98,6 @@ class SvxFillTypeBox : public FillTypeLB { public: SvxFillTypeBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); - virtual ~SvxFillTypeBox(); void Selected() { bSelect = true; } bool IsRelease() { return bRelease;} @@ -123,7 +120,6 @@ class SvxFillAttrBox : public FillAttrLB { public: SvxFillAttrBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); - virtual ~SvxFillAttrBox(); bool IsRelease() { return bRelease;} diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx index f804f32b0d33..7cc8a3e9afe5 100644 --- a/include/svx/langbox.hxx +++ b/include/svx/langbox.hxx @@ -116,7 +116,6 @@ class SVX_DLLPUBLIC SvxLanguageBox : public ListBox, public SvxLanguageBoxBase { public: SvxLanguageBox( vcl::Window* pParent, WinBits nBits, bool bCheck = false ); - virtual ~SvxLanguageBox(); private: SVX_DLLPRIVATE virtual sal_Int32 ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked ) SAL_OVERRIDE; @@ -143,7 +142,6 @@ class SVX_DLLPUBLIC SvxLanguageComboBox : public ComboBox, public SvxLanguageBox { public: SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits, bool bCheck = false ); - virtual ~SvxLanguageComboBox(); enum EditedAndValid { diff --git a/include/svx/layctrl.hxx b/include/svx/layctrl.hxx index 9652aea57322..05eaf5dec50d 100644 --- a/include/svx/layctrl.hxx +++ b/include/svx/layctrl.hxx @@ -31,7 +31,7 @@ private: public: virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual SfxPopupWindow* CreatePopupWindowCascading() SAL_OVERRIDE; virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, @@ -50,7 +50,7 @@ class SVX_DLLPUBLIC SvxColumnsToolBoxControl : public SfxToolBoxControl bool bEnabled; public: virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual SfxPopupWindow* CreatePopupWindowCascading() SAL_OVERRIDE; SFX_DECL_TOOLBOX_CONTROL(); diff --git a/include/svx/lboxctrl.hxx b/include/svx/lboxctrl.hxx index 30a21b37f71a..fe3062d18a40 100644 --- a/include/svx/lboxctrl.hxx +++ b/include/svx/lboxctrl.hxx @@ -34,7 +34,7 @@ class SvxListBoxControl : public SfxToolBoxControl { protected: OUString aActionStr; - SvxPopupWindowListBox * pPopupWin; + VclPtr<SvxPopupWindowListBox> pPopupWin; void Impl_SetInfo( sal_uInt16 nCount ); @@ -46,7 +46,7 @@ public: virtual ~SvxListBoxControl(); virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; @@ -69,7 +69,7 @@ public: SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; }; #endif diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx index 1c3a90ee50ca..a6576387bef5 100644 --- a/include/svx/linectrl.hxx +++ b/include/svx/linectrl.hxx @@ -52,7 +52,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; void Update( const SfxPoolItem* pState ); - virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; }; @@ -69,7 +69,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; }; @@ -82,7 +82,7 @@ class SvxLineEndWindow : public SfxPopupWindow private: XLineEndListRef pLineEndList; - ValueSet aLineEndSet; + VclPtr<ValueSet> aLineEndSet; sal_uInt16 nCols; sal_uInt16 nLines; sal_uIntPtr nLineEndWidth; @@ -118,12 +118,13 @@ public: vcl::Window* pParentWindow, const OUString& rWndTitle ); virtual ~SvxLineEndWindow(); + virtual void dispose() SAL_OVERRIDE; void StartSelection(); virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual SfxPopupWindow* Clone() const SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> Clone() const SAL_OVERRIDE; }; @@ -140,7 +141,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; }; diff --git a/include/svx/linkwarn.hxx b/include/svx/linkwarn.hxx index 8fc66afffb18..b832637fc8b9 100644 --- a/include/svx/linkwarn.hxx +++ b/include/svx/linkwarn.hxx @@ -27,11 +27,12 @@ class SVX_DLLPUBLIC SvxLinkWarningDialog : public MessageDialog { private: - CheckBox* m_pWarningOnBox; + VclPtr<CheckBox> m_pWarningOnBox; public: SvxLinkWarningDialog(vcl::Window* pParent, const OUString& _rFileName); virtual ~SvxLinkWarningDialog(); + virtual void dispose() SAL_OVERRIDE; }; #endif // INCLUDED_SVX_LINKWARN_HXX diff --git a/include/svx/measctrl.hxx b/include/svx/measctrl.hxx index 83161ca627ed..4753ab17a671 100644 --- a/include/svx/measctrl.hxx +++ b/include/svx/measctrl.hxx @@ -43,6 +43,7 @@ private: public: SvxXMeasurePreview(vcl::Window* pParent, WinBits nStyle); virtual ~SvxXMeasurePreview(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx index f5e3781e6642..d4a13cb1d3b8 100644 --- a/include/svx/numvset.hxx +++ b/include/svx/numvset.hxx @@ -53,7 +53,7 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet sal_uInt16 nPageType; bool bHTMLMode; Rectangle aOrgRect; - VirtualDevice* pVDev; + VclPtr<VirtualDevice> pVDev; com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; com::sun::star::lang::Locale aLocale; @@ -66,27 +66,26 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess> > aOutlineSettings; - public: +public: SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP); void init(sal_uInt16 nType); virtual ~SvxNumValueSet(); + virtual void dispose() SAL_OVERRIDE; virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; void SetHTMLMode(bool bSet) {bHTMLMode = bSet;} void SetNumberingSettings( - const com::sun::star::uno::Sequence< - com::sun::star::uno::Sequence< - com::sun::star::beans::PropertyValue> >& aNum, - com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, - const com::sun::star::lang::Locale& rLocale ); + const css::uno::Sequence< + css::uno::Sequence<css::beans::PropertyValue> >& aNum, + css::uno::Reference<css::text::XNumberingFormatter>& xFormatter, + const css::lang::Locale& rLocale ); void SetOutlineNumberingSettings( - com::sun::star::uno::Sequence< - com::sun::star::uno::Reference< - com::sun::star::container::XIndexAccess> >& rOutline, - com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, - const com::sun::star::lang::Locale& rLocale); + css::uno::Sequence< + css::uno::Reference<css::container::XIndexAccess> >& rOutline, + css::uno::Reference<css::text::XNumberingFormatter>& xFormatter, + const css::lang::Locale& rLocale); }; class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet @@ -96,7 +95,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet void init(); - protected: +protected: DECL_LINK(FormatHdl_Impl, void *); void SetGrfNotFound(bool bSet) {bGrfNotFound = bSet;} @@ -104,9 +103,10 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet Idle& GetFormatIdle() {return aFormatIdle;} - public: +public: SvxBmpNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP); virtual ~SvxBmpNumValueSet(); + virtual void dispose() SAL_OVERRIDE; virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx index 02c74ca42b05..9aeee8d1c8c1 100644 --- a/include/svx/optgrid.hxx +++ b/include/svx/optgrid.hxx @@ -101,8 +101,10 @@ class SVX_DLLPUBLIC SvxGridTabPage : public SfxTabPage public: SvxGridTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + virtual ~SvxGridTabPage(); + virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet& rAttrSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet& rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; @@ -111,30 +113,30 @@ public: virtual sfxpg DeactivatePage( SfxItemSet* pSet ) SAL_OVERRIDE; private: - CheckBox* pCbxUseGridsnap; - CheckBox* pCbxGridVisible; + VclPtr<CheckBox> pCbxUseGridsnap; + VclPtr<CheckBox> pCbxGridVisible; - MetricField* pMtrFldDrawX; - MetricField* pMtrFldDrawY; + VclPtr<MetricField> pMtrFldDrawX; + VclPtr<MetricField> pMtrFldDrawY; - NumericField* pNumFldDivisionX; - NumericField* pNumFldDivisionY; + VclPtr<NumericField> pNumFldDivisionX; + VclPtr<NumericField> pNumFldDivisionY; - CheckBox* pCbxSynchronize; + VclPtr<CheckBox> pCbxSynchronize; protected: //these controls are used in draw and impress - VclContainer* pSnapFrames; - CheckBox* pCbxSnapHelplines; - CheckBox* pCbxSnapBorder; - CheckBox* pCbxSnapFrame; - CheckBox* pCbxSnapPoints; - MetricField* pMtrFldSnapArea; - - CheckBox* pCbxOrtho; - CheckBox* pCbxBigOrtho; - CheckBox* pCbxRotate; - MetricField* pMtrFldAngle; - MetricField* pMtrFldBezAngle; + VclPtr<VclContainer> pSnapFrames; + VclPtr<CheckBox> pCbxSnapHelplines; + VclPtr<CheckBox> pCbxSnapBorder; + VclPtr<CheckBox> pCbxSnapFrame; + VclPtr<CheckBox> pCbxSnapPoints; + VclPtr<MetricField> pMtrFldSnapArea; + + VclPtr<CheckBox> pCbxOrtho; + VclPtr<CheckBox> pCbxBigOrtho; + VclPtr<CheckBox> pCbxRotate; + VclPtr<MetricField> pMtrFldAngle; + VclPtr<MetricField> pMtrFldBezAngle; private: bool bAttrModified; diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx index 8b6da4dd29f0..007d4caf5634 100644 --- a/include/svx/pagectrl.hxx +++ b/include/svx/pagectrl.hxx @@ -89,6 +89,7 @@ protected: public: SvxPageWindow( vcl::Window* pParent ); virtual ~SvxPageWindow(); + virtual void dispose() SAL_OVERRIDE; //UUUU void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maHeaderFillAttributes = rFillAttributes; } diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx index 920fa19c7c68..89fbbded5221 100644 --- a/include/svx/passwd.hxx +++ b/include/svx/passwd.hxx @@ -33,12 +33,12 @@ class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog { private: - FixedText* m_pOldFL; - FixedText* m_pOldPasswdFT; - Edit* m_pOldPasswdED; - Edit* m_pNewPasswdED; - Edit* m_pRepeatPasswdED; - OKButton* m_pOKBtn; + VclPtr<FixedText> m_pOldFL; + VclPtr<FixedText> m_pOldPasswdFT; + VclPtr<Edit> m_pOldPasswdED; + VclPtr<Edit> m_pNewPasswdED; + VclPtr<Edit> m_pRepeatPasswdED; + VclPtr<OKButton> m_pOKBtn; OUString aOldPasswdErrStr; OUString aRepeatPasswdErrStr; @@ -52,7 +52,8 @@ private: public: SvxPasswordDialog( vcl::Window* pParent, bool bAllowEmptyPasswords = false, bool bDisableOldPassword = false ); - virtual ~SvxPasswordDialog(); + virtual ~SvxPasswordDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetOldPassword() const { return m_pOldPasswdED->GetText(); } OUString GetNewPassword() const { return m_pNewPasswdED->GetText(); } diff --git a/include/svx/prtqry.hxx b/include/svx/prtqry.hxx index afe6b9b6d85a..a2f4e9298262 100644 --- a/include/svx/prtqry.hxx +++ b/include/svx/prtqry.hxx @@ -26,7 +26,6 @@ class SVX_DLLPUBLIC SvxPrtQryBox : public MessBox { public: SvxPrtQryBox(vcl::Window* pParent); - virtual ~SvxPrtQryBox(); }; #endif diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx index d0e9429501a2..4ea04bcd041d 100644 --- a/include/svx/rubydialog.hxx +++ b/include/svx/rubydialog.hxx @@ -44,10 +44,12 @@ class RubyPreview : public vcl::Window { protected: virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; - SvxRubyDialog* m_pParentDlg; + VclPtr<SvxRubyDialog> m_pParentDlg; public: RubyPreview(vcl::Window *pParent); + virtual ~RubyPreview(); + virtual void dispose() SAL_OVERRIDE; void setRubyDialog(SvxRubyDialog* pParentDlg) { m_pParentDlg = pParentDlg; @@ -89,33 +91,33 @@ class SvxRubyDialog : public SfxModelessDialog { friend class RubyPreview; - FixedText* m_pLeftFT; - FixedText* m_pRightFT; - RubyEdit* m_pLeft1ED; - RubyEdit* m_pRight1ED; - RubyEdit* m_pLeft2ED; - RubyEdit* m_pRight2ED; - RubyEdit* m_pLeft3ED; - RubyEdit* m_pRight3ED; - RubyEdit* m_pLeft4ED; - RubyEdit* m_pRight4ED; + VclPtr<FixedText> m_pLeftFT; + VclPtr<FixedText> m_pRightFT; + VclPtr<RubyEdit> m_pLeft1ED; + VclPtr<RubyEdit> m_pRight1ED; + VclPtr<RubyEdit> m_pLeft2ED; + VclPtr<RubyEdit> m_pRight2ED; + VclPtr<RubyEdit> m_pLeft3ED; + VclPtr<RubyEdit> m_pRight3ED; + VclPtr<RubyEdit> m_pLeft4ED; + VclPtr<RubyEdit> m_pRight4ED; - RubyEdit* aEditArr[8]; - VclScrolledWindow* m_pScrolledWindow; - ScrollBar* m_pScrollSB; + VclPtr<RubyEdit> aEditArr[8]; + VclPtr<VclScrolledWindow> m_pScrolledWindow; + VclPtr<ScrollBar> m_pScrollSB; - ListBox* m_pAdjustLB; + VclPtr<ListBox> m_pAdjustLB; - ListBox* m_pPositionLB; + VclPtr<ListBox> m_pPositionLB; - FixedText* m_pCharStyleFT; - ListBox* m_pCharStyleLB; - PushButton* m_pStylistPB; + VclPtr<FixedText> m_pCharStyleFT; + VclPtr<ListBox> m_pCharStyleLB; + VclPtr<PushButton> m_pStylistPB; - RubyPreview* m_pPreviewWin; + VclPtr<RubyPreview> m_pPreviewWin; - PushButton* m_pApplyPB; - PushButton* m_pClosePB; + VclPtr<PushButton> m_pApplyPB; + VclPtr<PushButton> m_pClosePB; long nLastPos; long nCurrentEdit; @@ -143,7 +145,7 @@ class SvxRubyDialog : public SfxModelessDialog void AssertOneEntry(); void Update(); - virtual bool Close() SAL_OVERRIDE; + virtual bool Close() SAL_OVERRIDE; long GetLastPos() const {return nLastPos;} void SetLastPos(long nSet) {nLastPos = nSet;} @@ -163,6 +165,7 @@ public: SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window* pParent); virtual ~SvxRubyDialog(); + virtual void dispose() SAL_OVERRIDE; virtual void Activate() SAL_OVERRIDE; virtual void Deactivate() SAL_OVERRIDE; diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx index 2cef64f3691d..007f4d89c378 100644 --- a/include/svx/ruler.hxx +++ b/include/svx/ruler.hxx @@ -57,7 +57,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener std::unique_ptr<SvxColumnItem> mxColumnItem; // columns std::unique_ptr<SvxObjectItem> mxObjectItem; // object - vcl::Window* pEditWin; + VclPtr<vcl::Window> pEditWin; std::unique_ptr<SvxRuler_Impl> mxRulerImpl; @@ -254,6 +254,7 @@ public: SvxRuler(vcl::Window* pParent, vcl::Window *pEditWin, sal_uInt16 nRulerFlags, SfxBindings &rBindings, WinBits nWinStyle = WB_STDRULER); virtual ~SvxRuler(); + virtual void dispose() SAL_OVERRIDE; void SetMinFrameSize(long lSize); long GetMinFrameSize() const ; diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx index 3a1f1ef7f986..d8f091885c95 100644 --- a/include/svx/sdrpaintwindow.hxx +++ b/include/svx/sdrpaintwindow.hxx @@ -50,10 +50,10 @@ PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect); class SdrPreRenderDevice { // The original OutputDevice - OutputDevice& mrOutputDevice; + OutputDevice& mrOutputDevice; // The VirtualDevice for PreRendering - VirtualDevice maPreRenderDevice; + VclPtr<VirtualDevice> mpPreRenderDevice; public: explicit SdrPreRenderDevice(OutputDevice& rOriginal); @@ -63,7 +63,7 @@ public: void OutputPreRenderDevice(const vcl::Region& rExpandedRegion); OutputDevice& GetOriginalOutputDevice() const { return mrOutputDevice; } - OutputDevice& GetPreRenderDevice() { return maPreRenderDevice; } + OutputDevice& GetPreRenderDevice() { return *mpPreRenderDevice.get(); } }; diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 6eac3d3eef90..82790a402e62 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -16,6 +16,7 @@ #include <vcl/ctrl.hxx> #include <vcl/timer.hxx> #include <vcl/idle.hxx> +#include <vcl/vclptr.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XFrame.hpp> @@ -34,6 +35,7 @@ public: PanelLayout(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &rFrame); virtual ~PanelLayout(); + virtual void dispose() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE; diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx index 7f0d804f78c2..4fd74d14db8a 100644 --- a/include/svx/sidebar/Popup.hxx +++ b/include/svx/sidebar/Popup.hxx @@ -22,6 +22,9 @@ #include <svx/svxdllapi.h> #include <rtl/ustring.hxx> #include <tools/link.hxx> +#include <vcl/vclptr.hxx> +#include <svx/sidebar/PopupContainer.hxx> +#include <svx/sidebar/PopupControl.hxx> #include <boost/function.hpp> @@ -30,9 +33,6 @@ class ToolBox; namespace svx { namespace sidebar { -class PopupContainer; -class PopupControl; - /** A wrapper around a PopupContainer and a PopupControl object. Usually used as drop down for a toolbox. Use Show() to start drop down mode and Hide() to end it. @@ -76,7 +76,7 @@ public : void SetPopupModeEndHandler (const ::boost::function<void()>& rCallback); protected: - std::unique_ptr<PopupControl> mxControl; + VclPtr<PopupControl> mxControl; /** Make sure that both PopupContainer and PopupControl objects exist. Calls the maControlCreator functor if necessary. @@ -89,11 +89,11 @@ protected: void CreateContainerAndControl(); private: - vcl::Window* mpParent; - ::boost::function<PopupControl*(PopupContainer*)> maControlCreator; + VclPtr<vcl::Window> mpParent; + ::boost::function<VclPtr<PopupControl>(PopupContainer*)> maControlCreator; ::boost::function<void()> maPopupModeEndCallback; const ::rtl::OUString msAccessibleName; - std::unique_ptr<PopupContainer> mxContainer; + VclPtr<PopupContainer> mxContainer; DECL_LINK(PopupModeEndHandler, void*); }; diff --git a/include/svx/sidebar/PopupControl.hxx b/include/svx/sidebar/PopupControl.hxx index 32658b3ae4d7..626e7074501d 100644 --- a/include/svx/sidebar/PopupControl.hxx +++ b/include/svx/sidebar/PopupControl.hxx @@ -38,7 +38,6 @@ public : PopupControl ( vcl::Window* pParent, const ResId& rResId); - virtual ~PopupControl(); virtual void Paint (const Rectangle& rect) SAL_OVERRIDE; }; diff --git a/include/svx/sidebar/SidebarDialControl.hxx b/include/svx/sidebar/SidebarDialControl.hxx index 1d829d27fe76..52d798e2ab89 100644 --- a/include/svx/sidebar/SidebarDialControl.hxx +++ b/include/svx/sidebar/SidebarDialControl.hxx @@ -29,7 +29,6 @@ class SVX_DLLPUBLIC SidebarDialControl : public svx::DialControl { public: SidebarDialControl (vcl::Window* pParent, WinBits nBits = 0); - virtual ~SidebarDialControl(); virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void MouseButtonDown (const MouseEvent& rMEvt) SAL_OVERRIDE; diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx index e6724b278c9c..e0c941d19645 100644 --- a/include/svx/sidebar/ValueSetWithTextControl.hxx +++ b/include/svx/sidebar/ValueSetWithTextControl.hxx @@ -52,8 +52,6 @@ public: vcl::Window* pParent, const ResId& rResId); - virtual ~ValueSetWithTextControl(); - // add item for control type IMAGE_TEXT // if control type does not match IMAGE_TEXT no item is added. // @param pSelectedItemImage diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 5750ca0857da..ec241902877b 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -89,7 +89,7 @@ enum SearchLabel class SvxSearchDialog; class SVX_DLLPUBLIC SvxSearchDialogWrapper : public SfxChildWindow { - SvxSearchDialog *dialog; + VclPtr<SvxSearchDialog> dialog; public: SvxSearchDialogWrapper( vcl::Window*pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); @@ -120,6 +120,7 @@ friend class SvxJSearchOptionsDialog; public: SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind ); virtual ~SvxSearchDialog(); + virtual void dispose() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE; @@ -150,57 +151,57 @@ public: void SetSearchLabel(const OUString& rStr) { m_pSearchLabel->SetText(rStr); } private: - vcl::Window* mpDocWin; + VclPtr<vcl::Window> mpDocWin; bool mbSuccess; - VclFrame* m_pSearchFrame; - ComboBox* m_pSearchLB; - ListBox* m_pSearchTmplLB; - FixedText* m_pSearchAttrText; - FixedText* m_pSearchLabel; - - VclFrame* m_pReplaceFrame; - ComboBox* m_pReplaceLB; - ListBox* m_pReplaceTmplLB; - FixedText* m_pReplaceAttrText; - - PushButton* m_pSearchBtn; - PushButton* m_pSearchAllBtn; - PushButton* m_pReplaceBtn; - PushButton* m_pReplaceAllBtn; - - VclFrame* m_pComponentFrame; - PushButton* m_pSearchComponent1PB; - PushButton* m_pSearchComponent2PB; - - CheckBox* m_pMatchCaseCB; - CheckBox* m_pWordBtn; - - PushButton* m_pCloseBtn; - CheckBox* m_pIgnoreDiacritics; - CheckBox* m_pIgnoreKashida; - CheckBox* m_pSelectionBtn; - CheckBox* m_pBackwardsBtn; - CheckBox* m_pRegExpBtn; - CheckBox* m_pSimilarityBox; - PushButton* m_pSimilarityBtn; - CheckBox* m_pLayoutBtn; - CheckBox* m_pNotesBtn; - CheckBox* m_pJapMatchFullHalfWidthCB; - CheckBox* m_pJapOptionsCB; - PushButton* m_pJapOptionsBtn; - - PushButton* m_pAttributeBtn; - PushButton* m_pFormatBtn; - PushButton* m_pNoFormatBtn; - - VclContainer* m_pCalcGrid; - FixedText* m_pCalcSearchInFT; - ListBox* m_pCalcSearchInLB; - FixedText* m_pCalcSearchDirFT; - RadioButton* m_pRowsBtn; - RadioButton* m_pColumnsBtn; - CheckBox* m_pAllSheetsCB; + VclPtr<VclFrame> m_pSearchFrame; + VclPtr<ComboBox> m_pSearchLB; + VclPtr<ListBox> m_pSearchTmplLB; + VclPtr<FixedText> m_pSearchAttrText; + VclPtr<FixedText> m_pSearchLabel; + + VclPtr<VclFrame> m_pReplaceFrame; + VclPtr<ComboBox> m_pReplaceLB; + VclPtr<ListBox> m_pReplaceTmplLB; + VclPtr<FixedText> m_pReplaceAttrText; + + VclPtr<PushButton> m_pSearchBtn; + VclPtr<PushButton> m_pSearchAllBtn; + VclPtr<PushButton> m_pReplaceBtn; + VclPtr<PushButton> m_pReplaceAllBtn; + + VclPtr<VclFrame> m_pComponentFrame; + VclPtr<PushButton> m_pSearchComponent1PB; + VclPtr<PushButton> m_pSearchComponent2PB; + + VclPtr<CheckBox> m_pMatchCaseCB; + VclPtr<CheckBox> m_pWordBtn; + + VclPtr<PushButton> m_pCloseBtn; + VclPtr<CheckBox> m_pIgnoreDiacritics; + VclPtr<CheckBox> m_pIgnoreKashida; + VclPtr<CheckBox> m_pSelectionBtn; + VclPtr<CheckBox> m_pBackwardsBtn; + VclPtr<CheckBox> m_pRegExpBtn; + VclPtr<CheckBox> m_pSimilarityBox; + VclPtr<PushButton> m_pSimilarityBtn; + VclPtr<CheckBox> m_pLayoutBtn; + VclPtr<CheckBox> m_pNotesBtn; + VclPtr<CheckBox> m_pJapMatchFullHalfWidthCB; + VclPtr<CheckBox> m_pJapOptionsCB; + VclPtr<PushButton> m_pJapOptionsBtn; + + VclPtr<PushButton> m_pAttributeBtn; + VclPtr<PushButton> m_pFormatBtn; + VclPtr<PushButton> m_pNoFormatBtn; + + VclPtr<VclContainer> m_pCalcGrid; + VclPtr<FixedText> m_pCalcSearchInFT; + VclPtr<ListBox> m_pCalcSearchInLB; + VclPtr<FixedText> m_pCalcSearchDirFT; + VclPtr<RadioButton> m_pRowsBtn; + VclPtr<RadioButton> m_pColumnsBtn; + VclPtr<CheckBox> m_pAllSheetsCB; SfxBindings& rBindings; bool bWriter; diff --git a/include/svx/stddlg.hxx b/include/svx/stddlg.hxx index 85cdf46c5b52..a3e3df05f628 100644 --- a/include/svx/stddlg.hxx +++ b/include/svx/stddlg.hxx @@ -28,7 +28,6 @@ class SVX_DLLPUBLIC SvxStandardDialog: public SfxModalDialog { public: SvxStandardDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription ); - virtual ~SvxStandardDialog(); short Execute() SAL_OVERRIDE; diff --git a/include/svx/subtoolboxcontrol.hxx b/include/svx/subtoolboxcontrol.hxx index e7f2904a456f..7921a270f405 100644 --- a/include/svx/subtoolboxcontrol.hxx +++ b/include/svx/subtoolboxcontrol.hxx @@ -36,7 +36,7 @@ public: virtual ~SvxSubToolBoxControl(); virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; }; diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index 08231959c61f..ed0ce097989c 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -65,12 +65,12 @@ protected: SdrPageView* pTextEditPV; SdrOutliner* pTextEditOutliner; // outliner for the TextEdit OutlinerView* pTextEditOutlinerView; // current view of the outliners - vcl::Window* pTextEditWin; // matching window to pTextEditOutlinerView + VclPtr<vcl::Window> pTextEditWin; // matching window to pTextEditOutlinerView vcl::Cursor* pTextEditCursorMerker; // to restore the cursor in each window ImpSdrEditPara* pEditPara; // trashbin for everything else to stay compatible SdrObject* pMacroObj; SdrPageView* pMacroPV; - vcl::Window* pMacroWin; + VclPtr<vcl::Window> pMacroWin; Rectangle aTextEditArea; Rectangle aMinTextEditArea; diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 917182aface2..ea9e4c222919 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -170,7 +170,7 @@ protected: SdrOutliner* pDrawOutliner; // an Outliner for outputting text SdrOutliner* pHitTestOutliner;// an Outliner for the HitTest sal_uIntPtr nDefTextHgt; // Default text heigth in logical units - OutputDevice* pRefOutDev; // ReferenceDevice for the EditEngine + VclPtr<OutputDevice> pRefOutDev; // ReferenceDevice for the EditEngine /// Set if we are doing tiled rendering. bool mbTiledRendering; LibreOfficeKitCallback mpLibreOfficeKitCallback; @@ -335,7 +335,7 @@ public: // ReferenceDevice for the EditEngine void SetRefDevice(OutputDevice* pDev); - OutputDevice* GetRefDevice() const { return pRefOutDev; } + OutputDevice* GetRefDevice() const { return pRefOutDev.get(); } /// Set if we are doing tiled rendering. void setTiledRendering(bool bTiledRendering); /// Are we doing tiled rendering? diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index ffa7f29ea5fb..74b5a18ee290 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/uno/Any.hxx> #include <cppuhelper/weakref.hxx> #include <rtl/ustring.hxx> +#include <vcl/vclptr.hxx> #include <svl/lstner.hxx> #include <svl/poolitem.hxx> #include <svx/svdtypes.hxx> @@ -174,7 +175,7 @@ class SVX_DLLPUBLIC SdrObjMacroHitRec public: Point aPos; Point aDownPos; - OutputDevice* pOut; + VclPtr<OutputDevice> pOut; const SetOfByte* pVisiLayer; const SdrPageView* pPageView; sal_uInt16 nTol; diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index f228a1c308f1..cdb2ea62c7ba 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -134,10 +134,10 @@ class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, p protected: SdrModel* pMod; #ifdef DBG_UTIL - SdrItemBrowser* pItemBrowser; + VclPtr<SdrItemBrowser> pItemBrowser; #endif - const OutputDevice* pActualOutDev; // Nur zum vergleichen - OutputDevice* pDragWin; + VclPtr<OutputDevice> pActualOutDev; // Nur zum vergleichen + VclPtr<OutputDevice> pDragWin; SfxStyleSheet* pDefaultStyleSheet; OUString aAktLayer; // Aktueller Zeichenlayer @@ -517,7 +517,7 @@ public: // bei bShow=sal_False wird der Browser destruiert #ifdef DBG_UTIL void ShowItemBrowser(bool bShow=true); - bool IsItemBrowserVisible() const { return pItemBrowser!=NULL && GetItemBrowser()->IsVisible(); } + bool IsItemBrowserVisible() const { return pItemBrowser!=nullptr && GetItemBrowser()->IsVisible(); } vcl::Window* GetItemBrowser() const; #endif diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 080c807aa562..87ada7aa6c11 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -42,8 +42,8 @@ namespace linguistic2{ }}}} class SvxSpellWrapper; -typedef SfxTabPage* (*CreateSvxDistributePage)(vcl::Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer); -typedef const sal_uInt16* (*DialogGetRanges)(); +typedef VclPtr<SfxTabPage> (*CreateSvxDistributePage)(vcl::Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer); +typedef const sal_uInt16* (*DialogGetRanges)(); struct ExchangeData; class INetURLObject; diff --git a/include/svx/swframeexample.hxx b/include/svx/swframeexample.hxx index 45bb9098c83a..494c241f74e9 100644 --- a/include/svx/swframeexample.hxx +++ b/include/svx/swframeexample.hxx @@ -74,7 +74,6 @@ protected: public: SvxSwFrameExample(vcl::Window* pParent, WinBits nStyle); - virtual ~SvxSwFrameExample(); inline void SetWrap(sal_uInt16 nW) { nWrap = nW; } diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index 329bb208145b..42c79454ee20 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -163,7 +163,7 @@ public: SvxStyleToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rToolBox); virtual ~SvxStyleToolBoxControl(); - virtual vcl::Window* CreateItemWindow(vcl::Window* pParent) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) SAL_OVERRIDE; virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE; @@ -210,7 +210,7 @@ public: virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE; - virtual vcl::Window* CreateItemWindow(vcl::Window* pParent) SAL_OVERRIDE; + virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) SAL_OVERRIDE; }; class BorderColorStatus @@ -242,7 +242,7 @@ public: virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE; virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE; }; @@ -253,7 +253,7 @@ public: SvxFrameToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rToolBox); virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE; }; @@ -265,7 +265,7 @@ public: SvxFrameLineStyleToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rToolBox); virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) SAL_OVERRIDE; }; diff --git a/include/svx/tbxalign.hxx b/include/svx/tbxalign.hxx index 00a98d1eaf80..71322ee67bcf 100644 --- a/include/svx/tbxalign.hxx +++ b/include/svx/tbxalign.hxx @@ -32,7 +32,7 @@ public: virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; SFX_DECL_TOOLBOX_CONTROL(); diff --git a/include/svx/tbxcolorupdate.hxx b/include/svx/tbxcolorupdate.hxx index 343d0fe768f5..9f00d1386a64 100644 --- a/include/svx/tbxcolorupdate.hxx +++ b/include/svx/tbxcolorupdate.hxx @@ -24,6 +24,7 @@ #include <tools/gen.hxx> #include <tools/color.hxx> +#include <vcl/vclptr.hxx> class ToolBox; class VirtualDevice; @@ -44,8 +45,8 @@ namespace svx { public: ToolboxButtonColorUpdater( sal_uInt16 nSlotId, - sal_uInt16 nTbxBtnId, - ToolBox* ptrTbx); + sal_uInt16 nTbxBtnId, + ToolBox* ptrTbx); ~ToolboxButtonColorUpdater(); void Update( const Color& rColor ); @@ -53,7 +54,7 @@ namespace svx private: sal_uInt16 mnBtnId; sal_uInt16 mnSlotId; - ToolBox* mpTbx; + VclPtr<ToolBox> mpTbx; Color maCurColor; Rectangle maUpdRect; Size maBmpSize; diff --git a/include/svx/tbxcustomshapes.hxx b/include/svx/tbxcustomshapes.hxx index c4ebc1b5dd9f..2be1ac8807c9 100644 --- a/include/svx/tbxcustomshapes.hxx +++ b/include/svx/tbxcustomshapes.hxx @@ -35,7 +35,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; - virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; SFX_DECL_TOOLBOX_CONTROL(); diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx index e0df5adeef38..43f028bcaae7 100644 --- a/include/svx/txencbox.hxx +++ b/include/svx/txencbox.hxx @@ -35,6 +35,7 @@ private: public: SvxTextEncodingBox( vcl::Window* pParent, WinBits nBits ); virtual ~SvxTextEncodingBox(); + virtual void dispose() SAL_OVERRIDE; /** Fill with all known encodings but exclude those matching one or more given flags as defined in rtl/tencinfo.h |