diff options
Diffstat (limited to 'sc/source/ui/inc')
122 files changed, 1323 insertions, 1162 deletions
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 74753391a62c..a8f3180b3090 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -29,6 +29,7 @@ #include <cppuhelper/implbase2.hxx> #include <editeng/AccessibleStaticTextBase.hxx> #include <comphelper/uno3.hxx> +#include <vcl/vclptr.hxx> #include "AccessibleContextBase.hxx" class ScCsvControl; @@ -50,7 +51,7 @@ protected: typedef ::com::sun::star::awt::Rectangle AwtRectangle; private: - ScCsvControl* mpControl; /// Pointer to the VCL control. + VclPtr<ScCsvControl> mpControl; /// Pointer to the VCL control. public: explicit ScAccessibleCsvControl( diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx index 919a896a561f..4e6501929d18 100644 --- a/sc/source/ui/inc/AccessibleEditObject.hxx +++ b/sc/source/ui/inc/AccessibleEditObject.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/accessibility/XAccessibleSelection.hpp> #include "global.hxx" +#include <vcl/window.hxx> namespace accessibility { @@ -188,7 +189,7 @@ public: private: accessibility::AccessibleTextHelper* mpTextHelper; EditView* mpEditView; - vcl::Window* mpWindow; + VclPtr<vcl::Window> mpWindow; EditObjectType meObjectType; bool mbHasFocus; diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index 9be73428bd3b..2d4601b6c92b 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -134,7 +134,7 @@ protected: EditView* mpEditView; EditEngine* mpEditEngine; SvxEditEngineForwarder* mpForwarder; - vcl::Window* mpWindow; + VclPtr<vcl::Window> mpWindow; bool mbIsCloned; }; @@ -274,7 +274,7 @@ private: typedef ::std::unique_ptr< SvxTextForwarder > TextForwarderPtr; typedef ::std::unique_ptr< ScCsvViewForwarder > ViewForwarderPtr; - vcl::Window* mpWindow; + VclPtr<vcl::Window> mpWindow; EditEngine* mpEditEngine; TextForwarderPtr mpTextForwarder; ViewForwarderPtr mpViewForwarder; diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx index a6808a53b3e5..0b1d068149aa 100644 --- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx +++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx @@ -33,10 +33,10 @@ private: TWO_FACTOR }; - NumericField* mpAlphaField; - RadioButton* mpSingleFactorRadio; - RadioButton* mpTwoFactorRadio; - NumericField* mpRowsPerSampleField; + VclPtr<NumericField> mpAlphaField; + VclPtr<RadioButton> mpSingleFactorRadio; + VclPtr<RadioButton> mpTwoFactorRadio; + VclPtr<NumericField> mpRowsPerSampleField; DECL_LINK(FactorChanged, void*); @@ -55,6 +55,7 @@ public: vcl::Window* pParent, ScViewData* pViewData ); virtual ~ScAnalysisOfVarianceDialog(); + virtual void dispose() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx index 9012c6755435..0f186b4f4252 100644 --- a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx +++ b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx @@ -24,7 +24,7 @@ class ScExponentialSmoothingDialog : public ScStatisticsInputOutputDialog { private: - NumericField* mpSmoothingFactor; + VclPtr<NumericField> mpSmoothingFactor; public: ScExponentialSmoothingDialog( @@ -32,6 +32,7 @@ public: vcl::Window* pParent, ScViewData* pViewData ); virtual ~ScExponentialSmoothingDialog(); + virtual void dispose() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/MovingAverageDialog.hxx b/sc/source/ui/inc/MovingAverageDialog.hxx index dab6acc8e5a2..f6aa85eb079b 100644 --- a/sc/source/ui/inc/MovingAverageDialog.hxx +++ b/sc/source/ui/inc/MovingAverageDialog.hxx @@ -24,7 +24,7 @@ class ScMovingAverageDialog : public ScStatisticsInputOutputDialog { private: - NumericField* mpIntervalSpin; + VclPtr<NumericField> mpIntervalSpin; public: ScMovingAverageDialog( @@ -32,6 +32,7 @@ public: vcl::Window* pParent, ScViewData* pViewData ); virtual ~ScMovingAverageDialog(); + virtual void dispose() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index c806a8ccb2ff..765990615a98 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -44,8 +44,8 @@ class ScPivotLayoutDialog : public ScAnyRefDlg public: ScDPObject maPivotTableObject; - ScPivotLayoutTreeListBase* mpPreviouslyFocusedListBox; - ScPivotLayoutTreeListBase* mpCurrentlyFocusedListBox; + VclPtr<ScPivotLayoutTreeListBase> mpPreviouslyFocusedListBox; + VclPtr<ScPivotLayoutTreeListBase> mpCurrentlyFocusedListBox; private: ScViewData* mpViewData; @@ -53,38 +53,38 @@ private: bool mbNewPivotTable; - ScPivotLayoutTreeListLabel* mpListBoxField; - ScPivotLayoutTreeList* mpListBoxPage; - ScPivotLayoutTreeList* mpListBoxColumn; - ScPivotLayoutTreeList* mpListBoxRow; - ScPivotLayoutTreeListData* mpListBoxData; + VclPtr<ScPivotLayoutTreeListLabel> mpListBoxField; + VclPtr<ScPivotLayoutTreeList> mpListBoxPage; + VclPtr<ScPivotLayoutTreeList> mpListBoxColumn; + VclPtr<ScPivotLayoutTreeList> mpListBoxRow; + VclPtr<ScPivotLayoutTreeListData> mpListBoxData; - CheckBox* mpCheckIgnoreEmptyRows; - CheckBox* mpCheckTotalColumns; - CheckBox* mpCheckAddFilter; - CheckBox* mpCheckIdentifyCategories; - CheckBox* mpCheckTotalRows; - CheckBox* mpCheckDrillToDetail; + VclPtr<CheckBox> mpCheckIgnoreEmptyRows; + VclPtr<CheckBox> mpCheckTotalColumns; + VclPtr<CheckBox> mpCheckAddFilter; + VclPtr<CheckBox> mpCheckIdentifyCategories; + VclPtr<CheckBox> mpCheckTotalRows; + VclPtr<CheckBox> mpCheckDrillToDetail; - RadioButton* mpSourceRadioNamedRange; - RadioButton* mpSourceRadioSelection; + VclPtr<RadioButton> mpSourceRadioNamedRange; + VclPtr<RadioButton> mpSourceRadioSelection; - ListBox* mpSourceListBox; - formula::RefEdit* mpSourceEdit; - formula::RefButton* mpSourceButton; + VclPtr<ListBox> mpSourceListBox; + VclPtr<formula::RefEdit> mpSourceEdit; + VclPtr<formula::RefButton> mpSourceButton; - RadioButton* mpDestinationRadioNewSheet; - RadioButton* mpDestinationRadioNamedRange; - RadioButton* mpDestinationRadioSelection; + VclPtr<RadioButton> mpDestinationRadioNewSheet; + VclPtr<RadioButton> mpDestinationRadioNamedRange; + VclPtr<RadioButton> mpDestinationRadioSelection; - ListBox* mpDestinationListBox; - formula::RefEdit* mpDestinationEdit; - formula::RefButton* mpDestinationButton; + VclPtr<ListBox> mpDestinationListBox; + VclPtr<formula::RefEdit> mpDestinationEdit; + VclPtr<formula::RefButton> mpDestinationButton; - PushButton* mpBtnOK; - CancelButton* mpBtnCancel; + VclPtr<PushButton> mpBtnOK; + VclPtr<CancelButton> mpBtnCancel; - formula::RefEdit* mpActiveEdit; + VclPtr<formula::RefEdit> mpActiveEdit; ScAddress::Details maAddressDetails; bool mbDialogLostFocus; @@ -111,6 +111,7 @@ public: ScPivotLayoutDialog(SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow, vcl::Window* pParent, ScViewData* pViewData, const ScDPObject* pPivotTableObject, bool bCreateNewPivotTable); virtual ~ScPivotLayoutDialog(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference(const ScRange& rReferenceRange, ScDocument* pDocument) SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx index 7812674a351c..4ce7740f2bb9 100644 --- a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx +++ b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx @@ -35,13 +35,14 @@ public: protected: SvPivotTreeListType meType; - ScPivotLayoutDialog* mpParent; + VclPtr<ScPivotLayoutDialog> mpParent; public: void Setup(ScPivotLayoutDialog* pParent); ScPivotLayoutTreeListBase(vcl::Window* pParent, WinBits nBits, SvPivotTreeListType eType = UNDEFINED); virtual ~ScPivotLayoutTreeListBase(); + virtual void dispose() SAL_OVERRIDE; virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvent) SAL_OVERRIDE; virtual bool NotifyAcceptDrop(SvTreeListEntry* pEntry) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index b1736b2661c0..6d791c27c2a4 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -29,6 +29,7 @@ public: vcl::Window* pParent, ScViewData* pViewData ); virtual ~ScRandomNumberGeneratorDialog(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; @@ -36,21 +37,21 @@ public: private: // Widgets - FixedText* mpInputRangeText; - formula::RefEdit* mpInputRangeEdit; - formula::RefButton* mpInputRangeButton; - ListBox* mpDistributionCombo; - FixedText* mpParameter1Text; - NumericField* mpParameter1Value; - FixedText* mpParameter2Text; - NumericField* mpParameter2Value; - NumericField* mpSeed; - CheckBox* mpEnableSeed; - NumericField* mpDecimalPlaces; - CheckBox* mpEnableRounding; - PushButton* mpButtonApply; - OKButton* mpButtonOk; - CloseButton* mpButtonClose; + VclPtr<FixedText> mpInputRangeText; + VclPtr<formula::RefEdit> mpInputRangeEdit; + VclPtr<formula::RefButton> mpInputRangeButton; + VclPtr<ListBox> mpDistributionCombo; + VclPtr<FixedText> mpParameter1Text; + VclPtr<NumericField> mpParameter1Value; + VclPtr<FixedText> mpParameter2Text; + VclPtr<NumericField> mpParameter2Value; + VclPtr<NumericField> mpSeed; + VclPtr<CheckBox> mpEnableSeed; + VclPtr<NumericField> mpDecimalPlaces; + VclPtr<CheckBox> mpEnableRounding; + VclPtr<PushButton> mpButtonApply; + VclPtr<OKButton> mpButtonOk; + VclPtr<CloseButton> mpButtonClose; // Data ScViewData* mpViewData; diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx index 022b5e8075d0..6622ad90cd4c 100644 --- a/sc/source/ui/inc/SamplingDialog.hxx +++ b/sc/source/ui/inc/SamplingDialog.hxx @@ -27,30 +27,31 @@ public: vcl::Window* pParent, ScViewData* pViewData ); virtual ~ScSamplingDialog(); + virtual void dispose() SAL_OVERRIDE; - virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; - virtual void SetActive() SAL_OVERRIDE; + virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; + virtual void SetActive() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE; private: // Widgets - FixedText* mpInputRangeLabel; - formula::RefEdit* mpInputRangeEdit; - formula::RefButton* mpInputRangeButton; + VclPtr<FixedText> mpInputRangeLabel; + VclPtr<formula::RefEdit> mpInputRangeEdit; + VclPtr<formula::RefButton> mpInputRangeButton; - FixedText* mpOutputRangeLabel; - formula::RefEdit* mpOutputRangeEdit; - formula::RefButton* mpOutputRangeButton; + VclPtr<FixedText> mpOutputRangeLabel; + VclPtr<formula::RefEdit> mpOutputRangeEdit; + VclPtr<formula::RefButton> mpOutputRangeButton; - NumericField* mpSampleSize; - NumericField* mpPeriod; + VclPtr<NumericField> mpSampleSize; + VclPtr<NumericField> mpPeriod; - RadioButton* mpRandomMethodRadio; - RadioButton* mpPeriodicMethodRadio; + VclPtr<RadioButton> mpRandomMethodRadio; + VclPtr<RadioButton> mpPeriodicMethodRadio; - OKButton* mpButtonOk; + VclPtr<OKButton> mpButtonOk; - formula::RefEdit* mpActiveEdit; + VclPtr<formula::RefEdit> mpActiveEdit; // Data ScViewData* mViewData; diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx index 520ec223a784..c18119c0b4ec 100644 --- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx +++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx @@ -33,6 +33,7 @@ public: const OUString& rID, const OUString& rUIXMLDescription ); virtual ~ScStatisticsInputOutputDialog(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; @@ -44,16 +45,16 @@ protected: virtual sal_Int16 GetUndoNameId() = 0; // Widgets - FixedText* mpInputRangeLabel; - formula::RefEdit* mpInputRangeEdit; - formula::RefButton* mpInputRangeButton; + VclPtr<FixedText> mpInputRangeLabel; + VclPtr<formula::RefEdit> mpInputRangeEdit; + VclPtr<formula::RefButton> mpInputRangeButton; - FixedText* mpOutputRangeLabel; - formula::RefEdit* mpOutputRangeEdit; - formula::RefButton* mpOutputRangeButton; + VclPtr<FixedText> mpOutputRangeLabel; + VclPtr<formula::RefEdit> mpOutputRangeEdit; + VclPtr<formula::RefButton> mpOutputRangeButton; - RadioButton* mpGroupByColumnsRadio; - RadioButton* mpGroupByRowsRadio; + VclPtr<RadioButton> mpGroupByColumnsRadio; + VclPtr<RadioButton> mpGroupByRowsRadio; // Data ScViewData* mViewData; @@ -69,9 +70,9 @@ protected: private: // Widgets - OKButton* mpButtonOk; + VclPtr<OKButton> mpButtonOk; - formula::RefEdit* mpActiveEdit; + VclPtr<formula::RefEdit> mpActiveEdit; ScAddress mCurrentAddress; bool mDialogLostFocus; diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx index db4514ab49f9..b0a48e1dcbc7 100644 --- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx +++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx @@ -33,6 +33,7 @@ public: const OUString& rID, const OUString& rUIXMLDescription ); virtual ~ScStatisticsTwoVariableDialog(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; @@ -44,17 +45,17 @@ protected: virtual sal_Int16 GetUndoNameId() = 0; // Widgets - FixedText* mpVariable1RangeLabel; - formula::RefEdit* mpVariable1RangeEdit; - formula::RefButton* mpVariable1RangeButton; + VclPtr<FixedText> mpVariable1RangeLabel; + VclPtr<formula::RefEdit> mpVariable1RangeEdit; + VclPtr<formula::RefButton> mpVariable1RangeButton; - FixedText* mpVariable2RangeLabel; - formula::RefEdit* mpVariable2RangeEdit; - formula::RefButton* mpVariable2RangeButton; + VclPtr<FixedText> mpVariable2RangeLabel; + VclPtr<formula::RefEdit> mpVariable2RangeEdit; + VclPtr<formula::RefButton> mpVariable2RangeButton; - FixedText* mpOutputRangeLabel; - formula::RefEdit* mpOutputRangeEdit; - formula::RefButton* mpOutputRangeButton; + VclPtr<FixedText> mpOutputRangeLabel; + VclPtr<formula::RefEdit> mpOutputRangeEdit; + VclPtr<formula::RefButton> mpOutputRangeButton; // Data ScViewData* mViewData; @@ -69,12 +70,12 @@ protected: private: // Widgets - OKButton* mpButtonOk; + VclPtr<OKButton> mpButtonOk; - RadioButton* mpGroupByColumnsRadio; - RadioButton* mpGroupByRowsRadio; + VclPtr<RadioButton> mpGroupByColumnsRadio; + VclPtr<RadioButton> mpGroupByRowsRadio; - formula::RefEdit* mpActiveEdit; + VclPtr<formula::RefEdit> mpActiveEdit; ScAddress mCurrentAddress; bool mDialogLostFocus; diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index 5f10898ba278..c8252fd9db0b 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -98,13 +98,13 @@ private: Idle aSelectionIdle; Idle aReOpenIdle; - SvxAcceptChgCtr* m_pAcceptChgCtr; + VclPtr<SvxAcceptChgCtr> m_pAcceptChgCtr; ScViewData* pViewData; ScDocument* pDoc; ScRangeName aLocalRangeName; - SvxTPFilter* pTPFilter; - SvxTPView* pTPView; - SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox + VclPtr<SvxTPFilter> pTPFilter; + VclPtr<SvxTPView> pTPView; + VclPtr<SvxRedlinTable> pTheView; // #i48648 now SvHeaderTabListBox ScRangeList aRangeList; ScChangeViewSettings aChangeViewSet; OUString aStrInsertCols; @@ -206,6 +206,7 @@ public: ScViewData* ptrViewData); virtual ~ScAcceptChgDlg(); + virtual void dispose() SAL_OVERRIDE; void ReInit(ScViewData* ptrViewData); diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 4a7ee80233f9..833b541709dc 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -45,13 +45,13 @@ class ScFormulaReferenceHelper { IAnyRefDialog* m_pDlg; ::std::unique_ptr<ScCompiler> pRefComp; - formula::RefEdit* pRefEdit; // active input field - formula::RefButton* pRefBtn; // associated button - vcl::Window* m_pWindow; + VclPtr<formula::RefEdit> pRefEdit; // active input field + VclPtr<formula::RefButton> pRefBtn; // associated button + VclPtr<vcl::Window> m_pWindow; SfxBindings* m_pBindings; ::std::unique_ptr<Accelerator> pAccel; // for Enter/Escape - ::std::vector<vcl::Window*> m_aHiddenWidgets; // vector of hidden Controls + ::std::vector<VclPtr<vcl::Window> > m_aHiddenWidgets; // vector of hidden Controls sal_Int32 m_nOldBorderWidth; // border width for expanded dialog SCTAB nRefTab; // used for ShowReference @@ -61,7 +61,7 @@ class ScFormulaReferenceHelper Size aOldEditSize; // Original size of the input field long mnOldEditWidthReq; Point aOldButtonPos; // Original position of the button - vcl::Window* mpOldEditParent; // Original parent of the edit field and the button + VclPtr<vcl::Window> mpOldEditParent; // Original parent of the edit field and the button bool mbOldDlgLayoutEnabled; // Original layout state of parent dialog bool mbOldEditParentLayoutEnabled; // Original layout state of edit widget parent @@ -106,11 +106,11 @@ public: class SC_DLLPUBLIC ScRefHandler : public IAnyRefDialog { - vcl::Window & m_rWindow; - bool m_bInRefMode; + VclPtr<vcl::Window> m_rWindow; + bool m_bInRefMode; public: - operator vcl::Window *(){ return &m_rWindow; } + operator vcl::Window *(){ return m_rWindow.get(); } vcl::Window* operator ->() { return static_cast<vcl::Window *>(*this); } friend class formula::RefButton; friend class formula::RefEdit; @@ -120,7 +120,7 @@ private: m_aHelper; SfxBindings* pMyBindings; - vcl::Window* pActiveWin; + VclPtr<vcl::Window> pActiveWin; Idle aIdle; OUString aDocName; // document on which the dialog was opened diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index dab930898c55..dbc09faa4467 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -35,6 +34,7 @@ class ScPrintAreasDlg : public ScAnyRefDlg public: ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent ); virtual ~ScPrintAreasDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual void AddRefEntry() SAL_OVERRIDE; @@ -46,23 +46,23 @@ public: virtual bool Close() SAL_OVERRIDE; private: - ListBox* pLbPrintArea; - formula::RefEdit* pEdPrintArea; - formula::RefButton* pRbPrintArea; + VclPtr<ListBox> pLbPrintArea; + VclPtr<formula::RefEdit> pEdPrintArea; + VclPtr<formula::RefButton> pRbPrintArea; - ListBox* pLbRepeatRow; - formula::RefEdit* pEdRepeatRow; - formula::RefButton* pRbRepeatRow; + VclPtr<ListBox> pLbRepeatRow; + VclPtr<formula::RefEdit> pEdRepeatRow; + VclPtr<formula::RefButton> pRbRepeatRow; - ListBox* pLbRepeatCol; - formula::RefEdit* pEdRepeatCol; - formula::RefButton* pRbRepeatCol; + VclPtr<ListBox> pLbRepeatCol; + VclPtr<formula::RefEdit> pEdRepeatCol; + VclPtr<formula::RefButton> pRbRepeatCol; - OKButton* pBtnOk; - CancelButton* pBtnCancel; + VclPtr<OKButton> pBtnOk; + VclPtr<CancelButton> pBtnCancel; bool bDlgLostFocus; - formula::RefEdit* pRefInputEdit; + VclPtr<formula::RefEdit> pRefInputEdit; ScDocument* pDoc; ScViewData* pViewData; SCTAB nCurTab; diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx index 59879825d07b..8227376434f3 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -46,6 +46,7 @@ public: ScAutoFmtPreview(vcl::Window* pParent); void DetectRTL(ScViewData *pViewData); virtual ~ScAutoFmtPreview(); + virtual void dispose() SAL_OVERRIDE; void NotifyChange( ScAutoFormatData* pNewData ); @@ -55,7 +56,7 @@ protected: private: ScAutoFormatData* pCurData; - VirtualDevice aVD; + ScopedVclPtrInstance<VirtualDevice> aVD; SvtScriptedTextHelper aScriptedText; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBreakIter; bool bFitWidth; diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx index f6b15a68ccea..2e8c8b1eac53 100644 --- a/sc/source/ui/inc/cbutton.hxx +++ b/sc/source/ui/inc/cbutton.hxx @@ -22,6 +22,7 @@ #include <tools/gen.hxx> #include <tools/color.hxx> +#include <vcl/vclptr.hxx> class OutputDevice; @@ -60,7 +61,7 @@ private: bool bState ); protected: - OutputDevice* pOut; + VclPtr<OutputDevice> pOut; Point aBtnPos; Size aBtnSize; }; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index aea85074aba1..11dc8ddf0108 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -48,6 +48,7 @@ public: explicit ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel = 0); virtual ~ScMenuFloatingWindow(); + void dispose() SAL_OVERRIDE; virtual void PopupModeEnd() SAL_OVERRIDE; virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE; @@ -148,7 +149,7 @@ private: bool mbSeparator:1; ::boost::shared_ptr<Action> mpAction; - ::boost::shared_ptr<ScMenuFloatingWindow> mpSubMenuWin; + VclPtr<ScMenuFloatingWindow> mpSubMenuWin; MenuItemData(); }; @@ -158,7 +159,7 @@ private: struct SubMenuItemData { Timer maTimer; - ScMenuFloatingWindow* mpSubMenu; + VclPtr<ScMenuFloatingWindow> mpSubMenu; size_t mnMenuPos; DECL_LINK( TimeoutHdl, void* ); @@ -167,7 +168,7 @@ private: void reset(); private: - ScMenuFloatingWindow* mpParent; + VclPtr<ScMenuFloatingWindow> mpParent; }; SubMenuItemData maOpenTimer; SubMenuItemData maCloseTimer; @@ -184,7 +185,7 @@ private: ScDocument* mpDoc; - ScMenuFloatingWindow* mpParentMenu; + VclPtr<ScMenuFloatingWindow> mpParentMenu; }; class ScCheckListBox : public SvTreeListBox @@ -196,7 +197,8 @@ class ScCheckListBox : public SvTreeListBox public: ScCheckListBox( vcl::Window* pParent, WinBits nWinStyle = 0 ); - virtual ~ScCheckListBox() { delete mpCheckButton; } + virtual ~ScCheckListBox() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE { delete mpCheckButton; SvTreeListBox::dispose(); } void Init(); void CheckEntry( const OUString& sName, SvTreeListEntry* pParent, bool bCheck = true ); void CheckEntry( SvTreeListEntry* pEntry, bool bCheck = true ); @@ -238,6 +240,7 @@ public: explicit ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc); virtual ~ScCheckListMenuWindow(); + virtual void dispose() SAL_OVERRIDE; virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE; virtual bool Notify(NotifyEvent& rNEvt) SAL_OVERRIDE; @@ -291,11 +294,13 @@ private: { public: CancelButton(ScCheckListMenuWindow* pParent); + virtual ~CancelButton(); + virtual void dispose() SAL_OVERRIDE; virtual void Click() SAL_OVERRIDE; private: - ScCheckListMenuWindow* mpParent; + VclPtr<ScCheckListMenuWindow> mpParent; }; enum SectionType { @@ -329,18 +334,17 @@ private: private: SvTreeListEntry* findEntry( SvTreeListEntry* pParent, const OUString& rText ); - Edit maEdSearch; + VclPtr<Edit> maEdSearch; + VclPtr<ScCheckListBox> maChecks; - ScCheckListBox maChecks; + VclPtr<TriStateBox> maChkToggleAll; + VclPtr<ImageButton> maBtnSelectSingle; + VclPtr<ImageButton> maBtnUnselectSingle; - TriStateBox maChkToggleAll; - ImageButton maBtnSelectSingle; - ImageButton maBtnUnselectSingle; + VclPtr<OKButton> maBtnOk; + VclPtr<CancelButton> maBtnCancel; - OKButton maBtnOk; - CancelButton maBtnCancel; - - ::std::vector<vcl::Window*> maTabStopCtrls; + ::std::vector<VclPtr<vcl::Window> > maTabStopCtrls; size_t mnCurTabStop; ::std::vector<Member> maMembers; diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx index a3003755ca4b..9c0dca889596 100644 --- a/sc/source/ui/inc/colorformat.hxx +++ b/sc/source/ui/inc/colorformat.hxx @@ -23,24 +23,24 @@ class ScDocument; class ScDataBarSettingsDlg : public ModalDialog { private: - OKButton* mpBtnOk; - CancelButton* mpBtnCancel; + VclPtr<OKButton> mpBtnOk; + VclPtr<CancelButton> mpBtnCancel; - ColorListBox* mpLbPos; - ColorListBox* mpLbNeg; - ColorListBox* mpLbAxisCol; + VclPtr<ColorListBox> mpLbPos; + VclPtr<ColorListBox> mpLbNeg; + VclPtr<ColorListBox> mpLbFillType; + VclPtr<ColorListBox> mpLbAxisCol; - ListBox* mpLbTypeMin; - ListBox* mpLbTypeMax; - ListBox* mpLbFillType; - ListBox* mpLbAxisPos; + VclPtr<ListBox> mpLbTypeMin; + VclPtr<ListBox> mpLbTypeMax; + VclPtr<ListBox> mpLbAxisPos; - Edit* mpEdMin; - Edit* mpEdMax; - Edit* mpLenMin; - Edit* mpLenMax; + VclPtr<Edit> mpEdMin; + VclPtr<Edit> mpEdMax; + VclPtr<Edit> mpLenMin; + VclPtr<Edit> mpLenMax; - CheckBox *mpCbOnlyBar; + VclPtr<CheckBox> mpCbOnlyBar; OUString maStrWarnSameValue; SvNumberFormatter* mpNumberFormatter; @@ -56,6 +56,8 @@ private: public: ScDataBarSettingsDlg(vcl::Window* pParent, const ScDataBarFormatData& rData, ScDocument* pDoc, const ScAddress& rPos); + virtual ~ScDataBarSettingsDlg(); + virtual void dispose() SAL_OVERRIDE; ScDataBarFormatData* GetData(); }; diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 6f6d2c0c7d04..eaf90aa2dcfb 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -22,8 +22,6 @@ #include "rangelst.hxx" #include "condformathelper.hxx" -#include <boost/ptr_container/ptr_vector.hpp> -#include <boost/scoped_ptr.hpp> #include "anyrefdg.hxx" class ScDocument; @@ -56,21 +54,23 @@ class ScCondFormatDlg; class ScCondFormatList : public Control { private: - typedef boost::ptr_vector<ScCondFrmtEntry> EntryContainer; + typedef std::vector<VclPtr<ScCondFrmtEntry>> EntryContainer; EntryContainer maEntries; bool mbHasScrollBar; - boost::scoped_ptr<ScrollBar> mpScrollBar; + VclPtr<ScrollBar> mpScrollBar; ScDocument* mpDoc; ScAddress maPos; ScRangeList maRanges; - ScCondFormatDlg* mpDialogParent; + VclPtr<ScCondFormatDlg> mpDialogParent; void DoScroll(long nDiff); public: ScCondFormatList(vcl::Window* pParent, WinBits nStyle); + virtual ~ScCondFormatList(); + virtual void dispose() SAL_OVERRIDE; void init(ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScConditionalFormat* pFormat, const ScRangeList& rRanges, const ScAddress& rPos, @@ -95,18 +95,18 @@ public: class ScCondFormatDlg : public ScAnyRefModalDlg { private: - PushButton* mpBtnAdd; - PushButton* mpBtnRemove; - FixedText* mpFtRange; - formula::RefEdit* mpEdRange; - formula::RefButton* mpRbRange; + VclPtr<PushButton> mpBtnAdd; + VclPtr<PushButton> mpBtnRemove; + VclPtr<FixedText> mpFtRange; + VclPtr<formula::RefEdit> mpEdRange; + VclPtr<formula::RefButton> mpRbRange; - ScCondFormatList* mpCondFormList; + VclPtr<ScCondFormatList> mpCondFormList; ScAddress maPos; ScDocument* mpDoc; - formula::RefEdit* mpLastEdit; + VclPtr<formula::RefEdit> mpLastEdit; DECL_LINK( EdRangeModifyHdl, Edit* ); protected: @@ -117,6 +117,7 @@ public: SC_DLLPUBLIC ScCondFormatDlg(vcl::Window* pWindow, ScDocument* pDoc, const ScConditionalFormat* pFormat, const ScRangeList& rRange, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType); virtual ~ScCondFormatDlg(); + virtual void dispose() SAL_OVERRIDE; SC_DLLPUBLIC ScConditionalFormat* GetConditionalFormat() const; diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index 0ed7a5b40717..168b6927cbfc 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -46,13 +46,13 @@ private: Link maClickHdl; //general ui elements - FixedText maFtCondNr; - FixedText maFtCondition; + VclPtr<FixedText> maFtCondNr; + VclPtr<FixedText> maFtCondition; sal_Int32 mnIndex; OUString maStrCondition; protected: - ListBox maLbType; + VclPtr<ListBox> maLbType; ScDocument* mpDoc; ScAddress maPos; @@ -67,6 +67,7 @@ protected: public: ScCondFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos ); virtual ~ScCondFrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; @@ -85,13 +86,13 @@ public: class ScConditionFrmtEntry : public ScCondFrmtEntry, public SfxListener { //cond format ui elements - ListBox maLbCondType; - formula::RefEdit maEdVal1; - formula::RefEdit maEdVal2; - FixedText maFtVal; - FixedText maFtStyle; - ListBox maLbStyle; - SvxFontPrevWindow maWdPreview; + VclPtr<ListBox> maLbCondType; + VclPtr<formula::RefEdit> maEdVal1; + VclPtr<formula::RefEdit> maEdVal2; + VclPtr<FixedText> maFtVal; + VclPtr<FixedText> maFtStyle; + VclPtr<ListBox> maLbStyle; + VclPtr<SvxFontPrevWindow> maWdPreview; bool mbIsInStyleCreate; static const sal_Int32 NUM_COND_ENTRIES = 24; @@ -120,6 +121,8 @@ protected: public: ScConditionFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL ); + virtual ~ScConditionFrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; @@ -133,10 +136,10 @@ public: class ScFormulaFrmtEntry : public ScCondFrmtEntry { - FixedText maFtStyle; - ListBox maLbStyle; - SvxFontPrevWindow maWdPreview; - formula::RefEdit maEdFormula; + VclPtr<FixedText> maFtStyle; + VclPtr<ListBox> maLbStyle; + VclPtr<SvxFontPrevWindow> maWdPreview; + VclPtr<formula::RefEdit> maEdFormula; ScFormatEntry* createFormulaEntry() const; virtual OUString GetExpressionString() SAL_OVERRIDE; @@ -146,6 +149,8 @@ class ScFormulaFrmtEntry : public ScCondFrmtEntry public: ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* PDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL ); + virtual ~ScFormulaFrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; @@ -157,17 +162,17 @@ class ScColorScale2FrmtEntry : public ScCondFrmtEntry { //color format ui elements - ListBox maLbColorFormat; + VclPtr<ListBox> maLbColorFormat; //color scale ui elements - ListBox maLbEntryTypeMin; - ListBox maLbEntryTypeMax; + VclPtr<ListBox> maLbEntryTypeMin; + VclPtr<ListBox> maLbEntryTypeMax; - Edit maEdMin; - Edit maEdMax; + VclPtr<Edit> maEdMin; + VclPtr<Edit> maEdMax; - ColorListBox maLbColMin; - ColorListBox maLbColMax; + VclPtr<ColorListBox> maLbColMin; + VclPtr<ColorListBox> maLbColMax; ScFormatEntry* createColorscaleEntry() const; @@ -177,6 +182,8 @@ class ScColorScale2FrmtEntry : public ScCondFrmtEntry DECL_LINK( EntryTypeHdl, ListBox* ); public: ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = NULL ); + virtual ~ScColorScale2FrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; virtual void SetInactive() SAL_OVERRIDE; @@ -187,20 +194,20 @@ class ScColorScale3FrmtEntry : public ScCondFrmtEntry { //color format ui elements - ListBox maLbColorFormat; + VclPtr<ListBox> maLbColorFormat; //color scale ui elements - ListBox maLbEntryTypeMin; - ListBox maLbEntryTypeMiddle; - ListBox maLbEntryTypeMax; + VclPtr<ListBox> maLbEntryTypeMin; + VclPtr<ListBox> maLbEntryTypeMiddle; + VclPtr<ListBox> maLbEntryTypeMax; - Edit maEdMin; - Edit maEdMiddle; - Edit maEdMax; + VclPtr<Edit> maEdMin; + VclPtr<Edit> maEdMiddle; + VclPtr<Edit> maEdMax; - ColorListBox maLbColMin; - ColorListBox maLbColMiddle; - ColorListBox maLbColMax; + VclPtr<ColorListBox> maLbColMin; + VclPtr<ColorListBox> maLbColMiddle; + VclPtr<ColorListBox> maLbColMax; ScFormatEntry* createColorscaleEntry() const; @@ -210,6 +217,8 @@ class ScColorScale3FrmtEntry : public ScCondFrmtEntry DECL_LINK( EntryTypeHdl, ListBox* ); public: ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = NULL ); + virtual ~ScColorScale3FrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; virtual void SetInactive() SAL_OVERRIDE; @@ -219,15 +228,15 @@ public: class ScDataBarFrmtEntry : public ScCondFrmtEntry { //color format ui elements - ListBox maLbColorFormat; + VclPtr<ListBox> maLbColorFormat; //data bar ui elements - ListBox maLbDataBarMinType; - ListBox maLbDataBarMaxType; - Edit maEdDataBarMin; - Edit maEdDataBarMax; + VclPtr<ListBox> maLbDataBarMinType; + VclPtr<ListBox> maLbDataBarMaxType; + VclPtr<Edit> maEdDataBarMin; + VclPtr<Edit> maEdDataBarMax; - PushButton maBtOptions; + VclPtr<PushButton> maBtOptions; boost::scoped_ptr<ScDataBarFormatData> mpDataBarData; @@ -240,6 +249,8 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry DECL_LINK( DataBarTypeSelectHdl, void* ); public: ScDataBarFrmtEntry( vcl::Window* pParemt, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat = NULL ); + virtual ~ScDataBarFrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; virtual void SetInactive() SAL_OVERRIDE; @@ -251,6 +262,8 @@ class ScDateFrmtEntry : public ScCondFrmtEntry, public SfxListener { public: ScDateFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat = NULL ); + virtual ~ScDateFrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; virtual void SetInactive() SAL_OVERRIDE; @@ -266,10 +279,10 @@ private: DECL_LINK( StyleSelectHdl, void* ); - ListBox maLbDateEntry; - FixedText maFtStyle; - ListBox maLbStyle; - SvxFontPrevWindow maWdPreview; + VclPtr<ListBox> maLbDateEntry; + VclPtr<FixedText> maFtStyle; + VclPtr<ListBox> maLbStyle; + VclPtr<SvxFontPrevWindow> maWdPreview; bool mbIsInStyleCreate; }; @@ -277,12 +290,12 @@ private: class ScIconSetFrmtEntry : public ScCondFrmtEntry { //color format ui elements - ListBox maLbColorFormat; + VclPtr<ListBox> maLbColorFormat; // icon set ui elements - ListBox maLbIconSetType; + VclPtr<ListBox> maLbIconSetType; - typedef boost::ptr_vector<ScIconSetFrmtDataEntry> ScIconSetFrmtDataEntriesType; + typedef std::vector<VclPtr<ScIconSetFrmtDataEntry>> ScIconSetFrmtDataEntriesType; ScIconSetFrmtDataEntriesType maEntries; virtual OUString GetExpressionString() SAL_OVERRIDE; @@ -293,6 +306,8 @@ class ScIconSetFrmtEntry : public ScCondFrmtEntry public: ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScIconSetFormat* pFormat = NULL ); + virtual ~ScIconSetFrmtEntry(); + virtual void dispose() SAL_OVERRIDE; virtual ScFormatEntry* GetEntry() const SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; virtual void SetInactive() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx index 6f577e4cf5b1..1d339884e19a 100644 --- a/sc/source/ui/inc/condformatmgr.hxx +++ b/sc/source/ui/inc/condformatmgr.hxx @@ -50,17 +50,18 @@ class ScCondFormatManagerDlg : public ModalDialog public: ScCondFormatManagerDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList, const ScAddress& rPos); virtual ~ScCondFormatManagerDlg(); + virtual void dispose() SAL_OVERRIDE; ScConditionalFormatList* GetConditionalFormatList(); bool CondFormatsChanged() { return mbModified;} private: - PushButton *m_pBtnAdd; - PushButton *m_pBtnRemove; - PushButton *m_pBtnEdit; + VclPtr<PushButton> m_pBtnAdd; + VclPtr<PushButton> m_pBtnRemove; + VclPtr<PushButton> m_pBtnEdit; ScConditionalFormatList* mpFormatList; - ScCondFormatManagerWindow *m_pCtrlManager; + VclPtr<ScCondFormatManagerWindow> m_pCtrlManager; ScDocument* mpDoc; ScAddress maPos; diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index 3e9ebd64fdbe..3c429d11a021 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -117,12 +117,12 @@ public: class ScConflictsDlg : public ModalDialog { private: - SvSimpleTableContainer *m_pLbConflictsContainer; - boost::scoped_ptr<SvxRedlinTable> m_pLbConflicts; - PushButton *m_pBtnKeepMine; - PushButton *m_pBtnKeepOther; - PushButton *m_pBtnKeepAllMine; - PushButton *m_pBtnKeepAllOthers; + VclPtr<SvSimpleTableContainer> m_pLbConflictsContainer; + VclPtr<SvxRedlinTable> m_pLbConflicts; + VclPtr<PushButton> m_pBtnKeepMine; + VclPtr<PushButton> m_pBtnKeepOther; + VclPtr<PushButton> m_pBtnKeepAllMine; + VclPtr<PushButton> m_pBtnKeepAllOthers; OUString maStrTitleConflict; OUString maStrTitleAuthor; @@ -160,6 +160,7 @@ private: public: ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScDocument* pSharedDoc, ScConflictsList& rConflictsList ); virtual ~ScConflictsDlg(); + virtual void dispose() SAL_OVERRIDE; void UpdateView(); }; diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index 0f3c60c69781..c71f7e979927 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -39,6 +39,7 @@ public: ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScConsolidateDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; @@ -51,27 +52,27 @@ protected: virtual void Deactivate() SAL_OVERRIDE; private: - ListBox* pLbFunc; - ListBox* pLbConsAreas; + VclPtr<ListBox> pLbFunc; + VclPtr<ListBox> pLbConsAreas; - ListBox* pLbDataArea; - formula::RefEdit* pEdDataArea; - formula::RefButton* pRbDataArea; + VclPtr<ListBox> pLbDataArea; + VclPtr<formula::RefEdit> pEdDataArea; + VclPtr<formula::RefButton> pRbDataArea; - ListBox* pLbDestArea; - formula::RefEdit* pEdDestArea; - formula::RefButton* pRbDestArea; + VclPtr<ListBox> pLbDestArea; + VclPtr<formula::RefEdit> pEdDestArea; + VclPtr<formula::RefButton> pRbDestArea; - VclExpander* pExpander; - CheckBox* pBtnByRow; - CheckBox* pBtnByCol; + VclPtr<VclExpander> pExpander; + VclPtr<CheckBox> pBtnByRow; + VclPtr<CheckBox> pBtnByCol; - CheckBox* pBtnRefs; + VclPtr<CheckBox> pBtnRefs; - OKButton* pBtnOk; - CancelButton* pBtnCancel; - PushButton* pBtnAdd; - PushButton* pBtnRemove; + VclPtr<OKButton> pBtnOk; + VclPtr<CancelButton> pBtnCancel; + VclPtr<PushButton> pBtnAdd; + VclPtr<PushButton> pBtnRemove; OUString aStrUndefined; @@ -83,7 +84,7 @@ private: size_t nAreaDataCount; sal_uInt16 nWhichCons; - formula::RefEdit* pRefInputEdit; + VclPtr<formula::RefEdit> pRefInputEdit; bool bDlgLostFocus; void Init (); diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index d98bdb825053..11ff60501331 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -46,7 +46,7 @@ const sal_uLong SC_CONTENT_NOCHILD = ~0UL; class ScContentTree : public SvTreeListBox { - ScNavigatorDlg* pParentWindow; + VclPtr<ScNavigatorDlg> pParentWindow; ImageList aEntryImages; SvTreeListEntry* pRootNodes[SC_CONTENT_COUNT]; sal_uInt16 nRootType; // set as Root @@ -124,6 +124,7 @@ protected: public: ScContentTree( vcl::Window* pParent, const ResId& rResId ); virtual ~ScContentTree(); + virtual void dispose() SAL_OVERRIDE; OUString getAltLongDescText(SvTreeListEntry* pEntry, bool isAltText) const; OUString GetEntryAltText( SvTreeListEntry* pEntry ) const SAL_OVERRIDE; diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx index 1f6de3df6b05..dbc8dcc34f4f 100644 --- a/sc/source/ui/inc/corodlg.hxx +++ b/sc/source/ui/inc/corodlg.hxx @@ -37,13 +37,20 @@ public: m_pBtnCol->Check(bCol); m_pBtnRow->Check(bRow); } + virtual ~ScColRowLabelDlg() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE + { + m_pBtnRow.clear(); + m_pBtnCol.clear(); + ModalDialog::dispose(); + } bool IsCol() const { return m_pBtnCol->IsChecked(); } bool IsRow() const { return m_pBtnRow->IsChecked(); } private: - CheckBox* m_pBtnRow; - CheckBox* m_pBtnCol; + VclPtr<CheckBox> m_pBtnRow; + VclPtr<CheckBox> m_pBtnCol; }; #endif diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx index 571d04a20bea..cc0b941e7da2 100644 --- a/sc/source/ui/inc/crdlg.hxx +++ b/sc/source/ui/inc/crdlg.hxx @@ -30,11 +30,13 @@ class ScColOrRowDlg : public ModalDialog public: ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle, const OUString& rStrLabel, bool bColDefault = true); + virtual ~ScColOrRowDlg(); + virtual void dispose() SAL_OVERRIDE; private: - VclFrame* m_pFrame; - RadioButton* m_pBtnRows; - RadioButton* m_pBtnCols; - OKButton* m_pBtnOk; + VclPtr<VclFrame> m_pFrame; + VclPtr<RadioButton> m_pBtnRows; + VclPtr<RadioButton> m_pBtnCols; + VclPtr<OKButton> m_pBtnOk; DECL_LINK(OkHdl, void *); }; diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index b2d97ab9035d..f23f5dd51d7e 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -36,6 +36,7 @@ public: ScColRowNameRangesDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScViewData* ptrViewData ); virtual ~ScColRowNameRangesDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; @@ -44,19 +45,19 @@ public: virtual bool Close() SAL_OVERRIDE; private: - ListBox* pLbRange; + VclPtr<ListBox> pLbRange; - formula::RefEdit* pEdAssign; - formula::RefButton* pRbAssign; - RadioButton* pBtnColHead; - RadioButton* pBtnRowHead; - formula::RefEdit* pEdAssign2; - formula::RefButton* pRbAssign2; + VclPtr<formula::RefEdit> pEdAssign; + VclPtr<formula::RefButton> pRbAssign; + VclPtr<RadioButton> pBtnColHead; + VclPtr<RadioButton> pBtnRowHead; + VclPtr<formula::RefEdit> pEdAssign2; + VclPtr<formula::RefButton> pRbAssign2; - OKButton* pBtnOk; - CancelButton* pBtnCancel; - PushButton* pBtnAdd; - PushButton* pBtnRemove; + VclPtr<OKButton> pBtnOk; + VclPtr<CancelButton> pBtnCancel; + VclPtr<PushButton> pBtnAdd; + VclPtr<PushButton> pBtnRemove; ScRange theCurArea; ScRange theCurData; @@ -68,7 +69,7 @@ private: NameRangeMap aRangeMap; ScViewData* pViewData; ScDocument* pDoc; - formula::RefEdit* pEdActive; + VclPtr<formula::RefEdit> pEdActive; bool bDlgLostFocus; void Init (); diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx index c66bac55d988..fee07ecba715 100644 --- a/sc/source/ui/inc/csvcontrol.hxx +++ b/sc/source/ui/inc/csvcontrol.hxx @@ -241,6 +241,7 @@ public: explicit ScCsvControl( ScCsvControl& rParent ); explicit ScCsvControl( vcl::Window* pParent, const ScCsvLayoutData& rData, WinBits nBits ); virtual ~ScCsvControl(); + virtual void dispose() SAL_OVERRIDE; // event handling --------------------------------------------------------- diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index bab6dda53287..1c5b1dcab4db 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -75,8 +75,8 @@ class SC_DLLPUBLIC ScCsvGrid : public ScCsvControl, public utl::ConfigurationLis private: typedef ::std::unique_ptr< ScEditEngineDefaulter > ScEditEnginePtr; - VirtualDevice maBackgrDev; /// Grid background, headers, cell texts. - VirtualDevice maGridDev; /// Data grid with selection and cursor. + VclPtr<VirtualDevice> mpBackgrDev; /// Grid background, headers, cell texts. + VclPtr<VirtualDevice> mpGridDev; /// Data grid with selection and cursor. PopupMenu maPopup; /// Popup menu for column types. ::svtools::ColorConfig* mpColorConfig; /// Application color configuration. @@ -109,6 +109,7 @@ private: public: explicit ScCsvGrid( ScCsvControl& rParent ); virtual ~ScCsvGrid(); + virtual void dispose() SAL_OVERRIDE; /** Finishes initialization. Must be called after constructing a new object. */ void Init(); diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx index ef73cae674c4..991111525b02 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -32,8 +32,8 @@ class ScAccessibleCsvControl; class SC_DLLPUBLIC ScCsvRuler : public ScCsvControl { private: - VirtualDevice maBackgrDev; /// Ruler background, scaling. - VirtualDevice maRulerDev; /// Ruler with splits and cursor. + ScopedVclPtr<VirtualDevice> maBackgrDev; /// Ruler background, scaling. + ScopedVclPtr<VirtualDevice> maRulerDev; /// Ruler with splits and cursor. Color maBackColor; /// Background color. Color maActiveColor; /// Color for active part of ruler. @@ -55,6 +55,7 @@ private: public: explicit ScCsvRuler( ScCsvControl& rParent ); virtual ~ScCsvRuler(); + virtual void dispose() SAL_OVERRIDE; // common ruler handling -------------------------------------------------- public: diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx index cda528abf86c..2c5b458b5fcc 100644 --- a/sc/source/ui/inc/csvtablebox.hxx +++ b/sc/source/ui/inc/csvtablebox.hxx @@ -22,6 +22,7 @@ #include <vcl/ctrl.hxx> #include <vcl/scrbar.hxx> +#include <vcl/vclptr.hxx> #include "scdllapi.h" #include "csvcontrol.hxx" #include "csvruler.hxx" @@ -44,11 +45,11 @@ class SC_DLLPUBLIC ScCsvTableBox : public ScCsvControl private: ScCsvLayoutData maData; /// Current layout data of the controls. - ScCsvRuler maRuler; /// The ruler for fixed width mode. - ScCsvGrid maGrid; /// Calc-like data table for fixed width mode. - ScrollBar maHScroll; /// Horizontal scroll bar. - ScrollBar maVScroll; /// Vertical scroll bar. - ScrollBarBox maScrollBox; /// For the bottom right edge. + VclPtr<ScCsvRuler> maRuler; /// The ruler for fixed width mode. + VclPtr<ScCsvGrid> maGrid; /// Calc-like data table for fixed width mode. + VclPtr<ScrollBar> maHScroll; /// Horizontal scroll bar. + VclPtr<ScrollBar> maVScroll; /// Vertical scroll bar. + VclPtr<ScrollBarBox> maScrollBox; /// For the bottom right edge. Link maUpdateTextHdl; /// Updates all cell texts. Link maColTypeHdl; /// Handler for exporting the column type. @@ -62,6 +63,8 @@ private: public: explicit ScCsvTableBox( vcl::Window* pParent, WinBits nBits ); + virtual ~ScCsvTableBox(); + virtual void dispose() SAL_OVERRIDE; /** Finishes initialization. Must be called after constructing a new object. */ void Init(); @@ -102,7 +105,7 @@ public: /** Reads UI strings for data types from the list box. */ void InitTypes( const ListBox& rListBox ); /** Returns the data type of the selected columns. */ - inline sal_Int32 GetSelColumnType() const { return maGrid.GetSelColumnType(); } + inline sal_Int32 GetSelColumnType() const { return maGrid->GetSelColumnType(); } /** Fills the options object with current column data. */ void FillColumnData( ScAsciiOptions& rOptions ) const; diff --git a/sc/source/ui/inc/dapidata.hxx b/sc/source/ui/inc/dapidata.hxx index b157c05cf6e4..02c76e0dc8ae 100644 --- a/sc/source/ui/inc/dapidata.hxx +++ b/sc/source/ui/inc/dapidata.hxx @@ -30,9 +30,9 @@ struct ScImportSourceDesc; class ScDataPilotDatabaseDlg : public ModalDialog { private: - ListBox* m_pLbDatabase; - ComboBox* m_pCbObject; - ListBox* m_pLbType; + VclPtr<ListBox> m_pLbDatabase; + VclPtr<ComboBox> m_pCbObject; + VclPtr<ListBox> m_pLbType; void FillObjects(); @@ -40,6 +40,8 @@ private: public: ScDataPilotDatabaseDlg(vcl::Window* pParent); + virtual ~ScDataPilotDatabaseDlg(); + virtual void dispose() SAL_OVERRIDE; void GetValues( ScImportSourceDesc& rDesc ); }; diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx index e024ba3f5451..fb85f0e47687 100644 --- a/sc/source/ui/inc/dapitype.hxx +++ b/sc/source/ui/inc/dapitype.hxx @@ -30,16 +30,16 @@ class ScDataPilotSourceTypeDlg : public ModalDialog { private: - RadioButton* m_pBtnSelection; - RadioButton* m_pBtnNamedRange; - RadioButton* m_pBtnDatabase; - RadioButton* m_pBtnExternal; - ListBox* m_pLbNamedRange; + VclPtr<RadioButton> m_pBtnSelection; + VclPtr<RadioButton> m_pBtnNamedRange; + VclPtr<RadioButton> m_pBtnDatabase; + VclPtr<RadioButton> m_pBtnExternal; + VclPtr<ListBox> m_pLbNamedRange; public: ScDataPilotSourceTypeDlg(vcl::Window* pParent, bool bEnableExternal); virtual ~ScDataPilotSourceTypeDlg(); - + virtual void dispose() SAL_OVERRIDE; bool IsDatabase() const; bool IsExternal() const; bool IsNamedRange() const; @@ -53,16 +53,17 @@ private: class ScDataPilotServiceDlg : public ModalDialog { private: - ListBox *m_pLbService; - Edit *m_pEdSource; - Edit *m_pEdName; - Edit *m_pEdUser; - Edit *m_pEdPasswd; + VclPtr<ListBox> m_pLbService; + VclPtr<Edit> m_pEdSource; + VclPtr<Edit> m_pEdName; + VclPtr<Edit> m_pEdUser; + VclPtr<Edit> m_pEdPasswd; public: ScDataPilotServiceDlg( vcl::Window* pParent, const com::sun::star::uno::Sequence<OUString>& rServices ); virtual ~ScDataPilotServiceDlg(); + virtual void dispose() SAL_OVERRIDE; OUString GetServiceName() const; OUString GetParSource() const; diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx index 00460ece6b8f..762b0cd5d761 100644 --- a/sc/source/ui/inc/datafdlg.hxx +++ b/sc/source/ui/inc/datafdlg.hxx @@ -20,8 +20,6 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> -#include <boost/ptr_container/ptr_vector.hpp> - #define MAX_DATAFORM_COLS 256 #define MAX_DATAFORM_ROWS 32000 @@ -29,15 +27,15 @@ class ScDataFormDlg : public ModalDialog { private: - PushButton* m_pBtnNew; - PushButton* m_pBtnDelete; - PushButton* m_pBtnRestore; - PushButton* m_pBtnPrev; - PushButton* m_pBtnNext; - PushButton* m_pBtnClose; - ScrollBar* m_pSlider; - VclGrid* m_pGrid; - FixedText* m_pFixedText; + VclPtr<PushButton> m_pBtnNew; + VclPtr<PushButton> m_pBtnDelete; + VclPtr<PushButton> m_pBtnRestore; + VclPtr<PushButton> m_pBtnPrev; + VclPtr<PushButton> m_pBtnNext; + VclPtr<PushButton> m_pBtnClose; + VclPtr<ScrollBar> m_pSlider; + VclPtr<VclGrid> m_pGrid; + VclPtr<FixedText> m_pFixedText; OUString sNewRecord; ScTabViewShell* pTabViewShell; @@ -51,12 +49,13 @@ private: SCTAB nTab; bool bNoSelection; - boost::ptr_vector<boost::nullable<FixedText> > maFixedTexts; - boost::ptr_vector<boost::nullable<Edit> > maEdits; + std::vector<VclPtr<FixedText> > maFixedTexts; + std::vector<VclPtr<Edit> > maEdits; public: ScDataFormDlg( vcl::Window* pParent, ScTabViewShell* pTabViewShell); virtual ~ScDataFormDlg(); + virtual void dispose() SAL_OVERRIDE; void FillCtrls(SCROW nCurrentRow); private: diff --git a/sc/source/ui/inc/datastreamdlg.hxx b/sc/source/ui/inc/datastreamdlg.hxx index 09b461fa8635..0b8bf8c38966 100644 --- a/sc/source/ui/inc/datastreamdlg.hxx +++ b/sc/source/ui/inc/datastreamdlg.hxx @@ -28,23 +28,23 @@ class DataStreamDlg : public ModalDialog { ScDocShell *mpDocShell; - SvtURLBox* m_pCbUrl; - PushButton* m_pBtnBrowse; - RadioButton* m_pRBDirectData; - RadioButton* m_pRBScriptData; - RadioButton* m_pRBValuesInLine; - RadioButton* m_pRBAddressValue; - CheckBox* m_pCBRefreshOnEmpty; - RadioButton* m_pRBDataDown; - RadioButton* m_pRBRangeDown; - RadioButton* m_pRBNoMove; - RadioButton* m_pRBMaxLimit; - RadioButton* m_pRBUnlimited; - Edit* m_pEdRange; - Edit* m_pEdLimit; - OKButton* m_pBtnOk; - VclFrame* m_pVclFrameLimit; - VclFrame* m_pVclFrameMove; + VclPtr<SvtURLBox> m_pCbUrl; + VclPtr<PushButton> m_pBtnBrowse; + VclPtr<RadioButton> m_pRBDirectData; + VclPtr<RadioButton> m_pRBScriptData; + VclPtr<RadioButton> m_pRBValuesInLine; + VclPtr<RadioButton> m_pRBAddressValue; + VclPtr<CheckBox> m_pCBRefreshOnEmpty; + VclPtr<RadioButton> m_pRBDataDown; + VclPtr<RadioButton> m_pRBRangeDown; + VclPtr<RadioButton> m_pRBNoMove; + VclPtr<RadioButton> m_pRBMaxLimit; + VclPtr<RadioButton> m_pRBUnlimited; + VclPtr<Edit> m_pEdRange; + VclPtr<Edit> m_pEdLimit; + VclPtr<OKButton> m_pBtnOk; + VclPtr<VclFrame> m_pVclFrameLimit; + VclPtr<VclFrame> m_pVclFrameMove; DECL_LINK(UpdateHdl, void *); DECL_LINK(BrowseHdl, void *); @@ -54,6 +54,8 @@ class DataStreamDlg : public ModalDialog public: DataStreamDlg(ScDocShell *pDocShell, vcl::Window* pParent); + virtual ~DataStreamDlg(); + virtual void dispose() SAL_OVERRIDE; void Init( const DataStream& rStrm ); diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx index 6b6d68384a0a..032b8e9df704 100644 --- a/sc/source/ui/inc/dbnamdlg.hxx +++ b/sc/source/ui/inc/dbnamdlg.hxx @@ -38,6 +38,7 @@ public: ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScViewData* ptrViewData ); virtual ~ScDbNameDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; @@ -46,24 +47,24 @@ public: virtual bool Close() SAL_OVERRIDE; private: - ComboBox* m_pEdName; - - VclFrame* m_pAssignFrame; - formula::RefEdit* m_pEdAssign; - formula::RefButton* m_pRbAssign; - - VclContainer* m_pOptions; - CheckBox* m_pBtnHeader; - CheckBox* m_pBtnDoSize; - CheckBox* m_pBtnKeepFmt; - CheckBox* m_pBtnStripData; - FixedText* m_pFTSource; - FixedText* m_pFTOperations; - - OKButton* m_pBtnOk; - CancelButton* m_pBtnCancel; - PushButton* m_pBtnAdd; - PushButton* m_pBtnRemove; + VclPtr<ComboBox> m_pEdName; + + VclPtr<VclFrame> m_pAssignFrame; + VclPtr<formula::RefEdit> m_pEdAssign; + VclPtr<formula::RefButton> m_pRbAssign; + + VclPtr<VclContainer> m_pOptions; + VclPtr<CheckBox> m_pBtnHeader; + VclPtr<CheckBox> m_pBtnDoSize; + VclPtr<CheckBox> m_pBtnKeepFmt; + VclPtr<CheckBox> m_pBtnStripData; + VclPtr<FixedText> m_pFTSource; + VclPtr<FixedText> m_pFTOperations; + + VclPtr<OKButton> m_pBtnOk; + VclPtr<CancelButton> m_pBtnCancel; + VclPtr<PushButton> m_pBtnAdd; + VclPtr<PushButton> m_pBtnRemove; bool bSaved; diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx index 6683fcb81a02..676d93b242cc 100644 --- a/sc/source/ui/inc/delcldlg.hxx +++ b/sc/source/ui/inc/delcldlg.hxx @@ -29,13 +29,15 @@ class ScDeleteCellDlg : public ModalDialog { private: - RadioButton* m_pBtnCellsUp; - RadioButton* m_pBtnCellsLeft; - RadioButton* m_pBtnDelRows; - RadioButton* m_pBtnDelCols; + VclPtr<RadioButton> m_pBtnCellsUp; + VclPtr<RadioButton> m_pBtnCellsLeft; + VclPtr<RadioButton> m_pBtnDelRows; + VclPtr<RadioButton> m_pBtnDelCols; public: ScDeleteCellDlg(vcl::Window* pParent, bool bDisallowCellMove = false); + virtual ~ScDeleteCellDlg(); + virtual void dispose() SAL_OVERRIDE; DelCellCmd GetDelCellCmd() const; }; diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx index 6bc898a82134..a2741a6448a5 100644 --- a/sc/source/ui/inc/delcodlg.hxx +++ b/sc/source/ui/inc/delcodlg.hxx @@ -27,15 +27,15 @@ class ScDeleteContentsDlg : public ModalDialog { private: - CheckBox* aBtnDelAll; - CheckBox* aBtnDelStrings; - CheckBox* aBtnDelNumbers; - CheckBox* aBtnDelDateTime; - CheckBox* aBtnDelFormulas; - CheckBox* aBtnDelNotes; - CheckBox* aBtnDelAttrs; - CheckBox* aBtnDelObjects; - OKButton* aBtnOk; + VclPtr<CheckBox> aBtnDelAll; + VclPtr<CheckBox> aBtnDelStrings; + VclPtr<CheckBox> aBtnDelNumbers; + VclPtr<CheckBox> aBtnDelDateTime; + VclPtr<CheckBox> aBtnDelFormulas; + VclPtr<CheckBox> aBtnDelNotes; + VclPtr<CheckBox> aBtnDelAttrs; + VclPtr<CheckBox> aBtnDelObjects; + VclPtr<OKButton> aBtnOk; bool bObjectsDisabled; @@ -49,6 +49,7 @@ public: ScDeleteContentsDlg( vcl::Window* pParent, InsertDeleteFlags nCheckDefaults = IDF_NONE ); virtual ~ScDeleteContentsDlg(); + virtual void dispose() SAL_OVERRIDE; void DisableObjects(); InsertDeleteFlags GetDelContentsCmdBits() const; diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 5cd1d00d04fc..f0c8be5e8374 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -224,7 +224,7 @@ public: void SetVisAreaOrSize( const Rectangle& rVisArea, bool bModifyStart ); - virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( vcl::Window *pParent, + virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog( vcl::Window *pParent, const SfxItemSet &rSet ) SAL_OVERRIDE; void GetDocStat( ScDocStat& rDocStat ); diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx index e574f672429b..e4030752386a 100644 --- a/sc/source/ui/inc/dpcontrol.hxx +++ b/sc/source/ui/inc/dpcontrol.hxx @@ -23,6 +23,7 @@ #include <rtl/ustring.hxx> #include <tools/gen.hxx> #include <tools/fract.hxx> +#include <vcl/vclptr.hxx> class OutputDevice; class Point; @@ -62,7 +63,7 @@ private: Fraction maZoomX; Fraction maZoomY; ScDocument* mpDoc; - OutputDevice* mpOutDev; + VclPtr<OutputDevice> mpOutDev; const StyleSettings* mpStyle; bool mbBaseButton; bool mbPopupButton; diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx index 3066f41a610c..3ba0db194083 100644 --- a/sc/source/ui/inc/dpgroupdlg.hxx +++ b/sc/source/ui/inc/dpgroupdlg.hxx @@ -49,9 +49,9 @@ private: DECL_LINK( ClickHdl, RadioButton* ); private: - RadioButton* mpRbAuto; - RadioButton* mpRbMan; - Edit* mpEdValue; + VclPtr<RadioButton> mpRbAuto; + VclPtr<RadioButton> mpRbMan; + VclPtr<Edit> mpEdValue; }; class ScDPNumGroupEditHelper : public ScDPGroupEditHelper @@ -61,14 +61,13 @@ public: RadioButton* pRbAuto, RadioButton* pRbMan, ScDoubleField* pEdValue ); - virtual ~ScDPNumGroupEditHelper() {} - + virtual ~ScDPNumGroupEditHelper() {} private: virtual bool ImplGetValue( double& rfValue ) const SAL_OVERRIDE; virtual void ImplSetValue( double fValue ) SAL_OVERRIDE; private: - ScDoubleField* mpEdValue; + VclPtr<ScDoubleField> mpEdValue; }; class ScDPDateGroupEditHelper : public ScDPGroupEditHelper @@ -85,7 +84,7 @@ private: virtual void ImplSetValue( double fValue ) SAL_OVERRIDE; private: - DateField* mpEdValue; + VclPtr<DateField> mpEdValue; Date maNullDate; }; @@ -93,17 +92,18 @@ class ScDPNumGroupDlg : public ModalDialog { public: explicit ScDPNumGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo ); - + virtual ~ScDPNumGroupDlg(); + virtual void dispose() SAL_OVERRIDE; ScDPNumGroupInfo GetGroupInfo() const; private: - RadioButton* mpRbAutoStart; - RadioButton* mpRbManStart; - ScDoubleField* mpEdStart; - RadioButton* mpRbAutoEnd; - RadioButton* mpRbManEnd; - ScDoubleField* mpEdEnd; - ScDoubleField* mpEdBy; + VclPtr<RadioButton> mpRbAutoStart; + VclPtr<RadioButton> mpRbManStart; + VclPtr<ScDoubleField> mpEdStart; + VclPtr<RadioButton> mpRbAutoEnd; + VclPtr<RadioButton> mpRbManEnd; + VclPtr<ScDoubleField> mpEdEnd; + VclPtr<ScDoubleField> mpEdBy; ScDPNumGroupEditHelper maStartHelper; ScDPNumGroupEditHelper maEndHelper; }; @@ -113,7 +113,8 @@ class ScDPDateGroupDlg : public ModalDialog public: explicit ScDPDateGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate ); - + virtual ~ScDPDateGroupDlg(); + virtual void dispose() SAL_OVERRIDE; ScDPNumGroupInfo GetGroupInfo() const; sal_Int32 GetDatePart() const; @@ -122,17 +123,17 @@ private: DECL_LINK( CheckHdl, SvxCheckListBox* ); private: - RadioButton* mpRbAutoStart; - RadioButton* mpRbManStart; - DateField* mpEdStart; - RadioButton* mpRbAutoEnd; - RadioButton* mpRbManEnd; - DateField* mpEdEnd; - RadioButton* mpRbNumDays; - RadioButton* mpRbUnits; - NumericField* mpEdNumDays; - SvxCheckListBox* mpLbUnits; - OKButton* mpBtnOk; + VclPtr<RadioButton> mpRbAutoStart; + VclPtr<RadioButton> mpRbManStart; + VclPtr<DateField> mpEdStart; + VclPtr<RadioButton> mpRbAutoEnd; + VclPtr<RadioButton> mpRbManEnd; + VclPtr<DateField> mpEdEnd; + VclPtr<RadioButton> mpRbNumDays; + VclPtr<RadioButton> mpRbUnits; + VclPtr<NumericField> mpEdNumDays; + VclPtr<SvxCheckListBox> mpLbUnits; + VclPtr<OKButton> mpBtnOk; ScDPDateGroupEditHelper maStartHelper; ScDPDateGroupEditHelper maEndHelper; }; diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index baf0fa89e295..54f20bde7eba 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -34,7 +34,7 @@ class SdrUndoManager; class ScDrawView: public FmFormView { ScViewData* pViewData; - OutputDevice* pDev; //! needed ? + VclPtr<OutputDevice> pDev; //! needed ? ScDocument* pDoc; SCTAB nTab; Fraction aScaleX; // Factor for Drawing-MapMode diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index 07b532f58718..bef700938a8f 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -47,16 +47,16 @@ class ScFunctionDockWin : public SfxDockingWindow, public SfxListener private: Idle aIdle; - ScPrivatSplit aPrivatSplit; - ListBox aCatBox; - ListBox aFuncList; - ListBox aDDFuncList; - ListBox* pAllFuncList; + VclPtr<ScPrivatSplit> aPrivatSplit; + VclPtr<ListBox> aCatBox; + VclPtr<ListBox> aFuncList; + VclPtr<ListBox> aDDFuncList; + VclPtr<ListBox> pAllFuncList; SfxChildAlignment eSfxNewAlignment; SfxChildAlignment eSfxOldAlignment; - ImageButton aInsertButton; - FixedText aFiFuncDesc; + VclPtr<ImageButton> aInsertButton; + VclPtr<FixedText> aFiFuncDesc; sal_uLong nMinWidth; sal_uLong nMinHeight; Size aOldSize; @@ -105,6 +105,7 @@ public: const ResId& rResId ); virtual ~ScFunctionDockWin(); + virtual void dispose() SAL_OVERRIDE; using SfxDockingWindow::Notify; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx index c68b604cee46..70a2d086bb45 100644 --- a/sc/source/ui/inc/filldlg.hxx +++ b/sc/source/ui/inc/filldlg.hxx @@ -43,6 +43,7 @@ public: double fMax, sal_uInt16 nPossDir ); virtual ~ScFillSeriesDlg(); + virtual void dispose() SAL_OVERRIDE; FillDir GetFillDir() const { return theFillDir; } FillCmd GetFillCmd() const { return theFillCmd; } @@ -56,32 +57,32 @@ public: void SetEdStartValEnabled(bool bFlag = false); private: - FixedText* m_pFtStartVal; - Edit* m_pEdStartVal; + VclPtr<FixedText> m_pFtStartVal; + VclPtr<Edit> m_pEdStartVal; const OUString aStartStrVal; - FixedText* m_pFtEndVal; - Edit* m_pEdEndVal; + VclPtr<FixedText> m_pFtEndVal; + VclPtr<Edit> m_pEdEndVal; - FixedText* m_pFtIncrement; - Edit* m_pEdIncrement; - RadioButton* m_pBtnDown; - RadioButton* m_pBtnRight; - RadioButton* m_pBtnUp; - RadioButton* m_pBtnLeft; + VclPtr<FixedText> m_pFtIncrement; + VclPtr<Edit> m_pEdIncrement; + VclPtr<RadioButton> m_pBtnDown; + VclPtr<RadioButton> m_pBtnRight; + VclPtr<RadioButton> m_pBtnUp; + VclPtr<RadioButton> m_pBtnLeft; - RadioButton* m_pBtnArithmetic; - RadioButton* m_pBtnGeometric; - RadioButton* m_pBtnDate; - RadioButton* m_pBtnAutoFill; + VclPtr<RadioButton> m_pBtnArithmetic; + VclPtr<RadioButton> m_pBtnGeometric; + VclPtr<RadioButton> m_pBtnDate; + VclPtr<RadioButton> m_pBtnAutoFill; - FixedText* m_pFtTimeUnit; - RadioButton* m_pBtnDay; - RadioButton* m_pBtnDayOfWeek; - RadioButton* m_pBtnMonth; - RadioButton* m_pBtnYear; + VclPtr<FixedText> m_pFtTimeUnit; + VclPtr<RadioButton> m_pBtnDay; + VclPtr<RadioButton> m_pBtnDayOfWeek; + VclPtr<RadioButton> m_pBtnMonth; + VclPtr<RadioButton> m_pBtnYear; - OKButton* m_pBtnOk; + VclPtr<OKButton> m_pBtnOk; const OUString aErrMsgInvalidVal; diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index e7e89cc9fcab..44d48c228524 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -56,6 +56,7 @@ public: ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScFilterDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; @@ -68,43 +69,43 @@ public: void RefreshEditRow( size_t nOffset ); private: - ListBox* pLbConnect1; - ListBox* pLbField1; - ListBox* pLbCond1; - ComboBox* pEdVal1; - - ListBox* pLbConnect2; - ListBox* pLbField2; - ListBox* pLbCond2; - ComboBox* pEdVal2; - - ListBox* pLbConnect3; - ListBox* pLbField3; - ListBox* pLbCond3; - ComboBox* pEdVal3; - - ListBox* pLbConnect4; - ListBox* pLbField4; - ListBox* pLbCond4; - ComboBox* pEdVal4; - - ScrollBar* pScrollBar; - VclExpander* pExpander; - - OKButton* pBtnOk; - CancelButton* pBtnCancel; - - CheckBox* pBtnCase; - CheckBox* pBtnRegExp; - CheckBox* pBtnHeader; - CheckBox* pBtnUnique; - CheckBox* pBtnCopyResult; - ListBox* pLbCopyArea; - formula::RefEdit* pEdCopyArea; - formula::RefButton* pRbCopyArea; - CheckBox* pBtnDestPers; - FixedText* pFtDbAreaLabel; - FixedText* pFtDbArea; + VclPtr<ListBox> pLbConnect1; + VclPtr<ListBox> pLbField1; + VclPtr<ListBox> pLbCond1; + VclPtr<ComboBox> pEdVal1; + + VclPtr<ListBox> pLbConnect2; + VclPtr<ListBox> pLbField2; + VclPtr<ListBox> pLbCond2; + VclPtr<ComboBox> pEdVal2; + + VclPtr<ListBox> pLbConnect3; + VclPtr<ListBox> pLbField3; + VclPtr<ListBox> pLbCond3; + VclPtr<ComboBox> pEdVal3; + + VclPtr<ListBox> pLbConnect4; + VclPtr<ListBox> pLbField4; + VclPtr<ListBox> pLbCond4; + VclPtr<ComboBox> pEdVal4; + + VclPtr<ScrollBar> pScrollBar; + VclPtr<VclExpander> pExpander; + + VclPtr<OKButton> pBtnOk; + VclPtr<CancelButton> pBtnCancel; + + VclPtr<CheckBox> pBtnCase; + VclPtr<CheckBox> pBtnRegExp; + VclPtr<CheckBox> pBtnHeader; + VclPtr<CheckBox> pBtnUnique; + VclPtr<CheckBox> pBtnCopyResult; + VclPtr<ListBox> pLbCopyArea; + VclPtr<formula::RefEdit> pEdCopyArea; + VclPtr<formula::RefButton> pRbCopyArea; + VclPtr<CheckBox> pBtnDestPers; + VclPtr<FixedText> pFtDbAreaLabel; + VclPtr<FixedText> pFtDbArea; const OUString aStrUndefined; const OUString aStrNone; @@ -121,10 +122,10 @@ private: ScDocument* pDoc; SCTAB nSrcTab; - std::vector<ComboBox*> maValueEdArr; - std::vector<ListBox*> maFieldLbArr; - std::vector<ListBox*> maCondLbArr; - std::vector<ListBox*> maConnLbArr; + std::vector<VclPtr<ComboBox>> maValueEdArr; + std::vector<VclPtr<ListBox>> maFieldLbArr; + std::vector<VclPtr<ListBox>> maCondLbArr; + std::vector<VclPtr<ListBox>> maConnLbArr; std::deque<bool> maHasDates; std::deque<bool> maRefreshExceptQuery; @@ -163,6 +164,7 @@ public: ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScSpecialFilterDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; @@ -172,27 +174,27 @@ public: virtual bool Close() SAL_OVERRIDE; private: - ListBox* pLbFilterArea; - formula::RefEdit* pEdFilterArea; - formula::RefButton* pRbFilterArea; - - VclExpander* pExpander; - CheckBox* pBtnCase; - CheckBox* pBtnRegExp; - CheckBox* pBtnHeader; - CheckBox* pBtnUnique; - CheckBox* pBtnCopyResult; - ListBox* pLbCopyArea; - formula::RefEdit* pEdCopyArea; - formula::RefButton* pRbCopyArea; - CheckBox* pBtnDestPers; - FixedText* pFtDbAreaLabel; - FixedText* pFtDbArea; + VclPtr<ListBox> pLbFilterArea; + VclPtr<formula::RefEdit> pEdFilterArea; + VclPtr<formula::RefButton> pRbFilterArea; + + VclPtr<VclExpander> pExpander; + VclPtr<CheckBox> pBtnCase; + VclPtr<CheckBox> pBtnRegExp; + VclPtr<CheckBox> pBtnHeader; + VclPtr<CheckBox> pBtnUnique; + VclPtr<CheckBox> pBtnCopyResult; + VclPtr<ListBox> pLbCopyArea; + VclPtr<formula::RefEdit> pEdCopyArea; + VclPtr<formula::RefButton> pRbCopyArea; + VclPtr<CheckBox> pBtnDestPers; + VclPtr<FixedText> pFtDbAreaLabel; + VclPtr<FixedText> pFtDbArea; const OUString aStrUndefined; const OUString aStrNoName; - OKButton* pBtnOk; - CancelButton* pBtnCancel; + VclPtr<OKButton> pBtnOk; + VclPtr<CancelButton> pBtnCancel; ScFilterOptionsMgr* pOptionsMgr; @@ -202,7 +204,7 @@ private: ScViewData* pViewData; ScDocument* pDoc; - formula::RefEdit* pRefInputEdit; + VclPtr<formula::RefEdit> pRefInputEdit; bool bRefInputMode; // Hack: RefInput control diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx index fae7f16a8520..ee27b40f5fc5 100644 --- a/sc/source/ui/inc/foptmgr.hxx +++ b/sc/source/ui/inc/foptmgr.hxx @@ -46,7 +46,7 @@ public: CheckBox* refBtnDestPers, ListBox* refLbCopyArea, Edit* refEdCopyArea, - formula::RefButton* refRbCopyArea, + formula::RefButton* refRbCopyArea, FixedText* refFtDbAreaLabel, FixedText* refFtDbArea, const OUString& refStrUndefined ); @@ -57,17 +57,17 @@ private: ScViewData* pViewData; ScDocument* pDoc; - CheckBox* pBtnCase; - CheckBox* pBtnRegExp; - CheckBox* pBtnHeader; - CheckBox* pBtnUnique; - CheckBox* pBtnCopyResult; - CheckBox* pBtnDestPers; - ListBox* pLbCopyArea; - Edit* pEdCopyArea; - formula::RefButton* pRbCopyArea; - FixedText* pFtDbAreaLabel; - FixedText* pFtDbArea; + VclPtr<CheckBox> pBtnCase; + VclPtr<CheckBox> pBtnRegExp; + VclPtr<CheckBox> pBtnHeader; + VclPtr<CheckBox> pBtnUnique; + VclPtr<CheckBox> pBtnCopyResult; + VclPtr<CheckBox> pBtnDestPers; + VclPtr<ListBox> pLbCopyArea; + VclPtr<Edit> pEdCopyArea; + VclPtr<formula::RefButton> pRbCopyArea; + VclPtr<FixedText> pFtDbAreaLabel; + VclPtr<FixedText> pFtDbArea; const OUString& rStrUndefined; diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx index 66db8807c815..b525b189c18f 100644 --- a/sc/source/ui/inc/formula.hxx +++ b/sc/source/ui/inc/formula.hxx @@ -55,6 +55,7 @@ public: ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScViewData* pViewData ,formula::IFunctionManager* _pFunctionMgr); virtual ~ScFormulaDlg(); + virtual void dispose() SAL_OVERRIDE; // IFormulaEditorHelper virtual void notifyChange() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index 131edf61ed68..e38ca5c08f74 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -43,11 +43,11 @@ class FuPoor protected: ScDrawView* pView; ScTabViewShell* pViewShell; - vcl::Window* pWindow; + VclPtr<vcl::Window> pWindow; SdrModel* pDrDoc; SfxRequest aSfxRequest; - Dialog* pDialog; + VclPtr<Dialog> pDialog; Timer aScrollTimer; // for Autoscrolling DECL_LINK( ScrollHdl, void * ); diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx index f98d76fd8982..94e8994df881 100644 --- a/sc/source/ui/inc/gridmerg.hxx +++ b/sc/source/ui/inc/gridmerg.hxx @@ -25,7 +25,7 @@ class OutputDevice; class ScGridMerger { private: - OutputDevice* pDev; + VclPtr<OutputDevice> pDev; long nOneX; long nOneY; long nFixStart; diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index a9d54d0e7426..8a0f5d4f7237 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -136,10 +136,10 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou std::unique_ptr<ScNoteMarker> mpNoteMarker; - std::unique_ptr<ScFilterListBox> mpFilterBox; - std::unique_ptr<FloatingWindow> mpFilterFloat; - std::unique_ptr<ScCheckListMenuWindow> mpAutoFilterPopup; - std::unique_ptr<ScCheckListMenuWindow> mpDPFieldPopup; + VclPtr<ScFilterListBox> mpFilterBox; + VclPtr<FloatingWindow> mpFilterFloat; + VclPtr<ScCheckListMenuWindow> mpAutoFilterPopup; + VclPtr<ScCheckListMenuWindow> mpDPFieldPopup; std::unique_ptr<ScDPFieldButton> mpFilterButton; sal_uInt16 nCursorHideCount; @@ -310,6 +310,7 @@ public: ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos eWhichPos ); virtual ~ScGridWindow(); + virtual void dispose() SAL_OVERRIDE; virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE; // #i70788# flush and get overlay diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx index 04a98c6a15c5..2fdee6c08855 100644 --- a/sc/source/ui/inc/groupdlg.hxx +++ b/sc/source/ui/inc/groupdlg.hxx @@ -29,12 +29,12 @@ class ScGroupDlg : public ModalDialog public: ScGroupDlg(vcl::Window* pParent, bool bUnGroup = false, bool bRows = true); virtual ~ScGroupDlg(); - + virtual void dispose() SAL_OVERRIDE; bool GetColsChecked() const; private: - RadioButton* m_pBtnRows; - RadioButton* m_pBtnCols; + VclPtr<RadioButton> m_pBtnRows; + VclPtr<RadioButton> m_pBtnCols; }; #endif // INCLUDED_SC_SOURCE_UI_INC_GROUPDLG_HXX diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx index 0b0039dd9ca6..d384c1caf23a 100644 --- a/sc/source/ui/inc/highred.hxx +++ b/sc/source/ui/inc/highred.hxx @@ -51,14 +51,14 @@ class ScDocument; class ScHighlightChgDlg : public ScAnyRefDlg { private: - CheckBox* m_pHighlightBox; - SvxTPFilter* m_pFilterCtr; - CheckBox* m_pCbAccept; - CheckBox* m_pCbReject; - OKButton* m_pOkButton; + VclPtr<CheckBox> m_pHighlightBox; + VclPtr<SvxTPFilter> m_pFilterCtr; + VclPtr<CheckBox> m_pCbAccept; + VclPtr<CheckBox> m_pCbReject; + VclPtr<OKButton> m_pOkButton; - formula::RefEdit* m_pEdAssign; - formula::RefButton* m_pRbAssign; + VclPtr<formula::RefEdit> m_pEdAssign; + VclPtr<formula::RefButton> m_pRbAssign; ScViewData* pViewData; ScDocument* pDoc; @@ -81,6 +81,7 @@ public: ScViewData* ptrViewData); virtual ~ScHighlightChgDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetActive() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index 829ec975f875..dfad789dcf40 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -28,6 +28,7 @@ #include <tools/gen.hxx> #include <tools/link.hxx> #include <vcl/vclevent.hxx> +#include <vcl/vclptr.hxx> #include <editeng/svxenum.hxx> #include <set> @@ -54,7 +55,7 @@ struct ESelection; class ScInputHandler : boost::noncopyable { private: - ScInputWindow* pInputWin; + VclPtr<ScInputWindow> pInputWin; ScEditEngineDefaulter* pEngine; ///< Edited data in the sheet (when the user clicks into the sheet, and starts writing there). EditView* pTableView; // associated active EditView @@ -66,9 +67,9 @@ private: ScTypedCaseStrSet::const_iterator miAutoPosColumn; ScTypedCaseStrSet::const_iterator miAutoPosFormula; - vcl::Window* pTipVisibleParent; + VclPtr<vcl::Window> pTipVisibleParent; sal_uLong nTipVisible; - vcl::Window* pTipVisibleSecParent; + VclPtr<vcl::Window> pTipVisibleSecParent; sal_uLong nTipVisibleSec; OUString aManualTip; OUString aAutoSearch; @@ -240,7 +241,7 @@ public: bool IsFormulaMode() const { return bFormulaMode; } ScInputWindow* GetInputWindow() { return pInputWin; } - void SetInputWindow( ScInputWindow* pNew ) { pInputWin = pNew; } + void SetInputWindow( ScInputWindow* pNew ); void StopInputWinEngine( bool bAll ); bool IsInEnterHandler() const { return bInEnterHandler; } diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index a1c9478ff104..f846d7b9b8c0 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -62,6 +62,7 @@ class ScTextWnd : public ScTextWndBase, public DragSourceHelper // edit wind public: ScTextWnd( vcl::Window* pParent, ScTabViewShell* pViewSh ); virtual ~ScTextWnd(); + virtual void dispose() SAL_OVERRIDE; virtual void SetTextString( const OUString& rString ) SAL_OVERRIDE; virtual const OUString& GetTextString() const SAL_OVERRIDE; @@ -139,6 +140,7 @@ private: public: ScPosWnd( vcl::Window* pParent ); virtual ~ScPosWnd(); + virtual void dispose() SAL_OVERRIDE; void SetPos( const OUString& rPosStr ); // Displayed Text void SetFormulaMode( bool bSet ); @@ -201,8 +203,9 @@ class ScInputBarGroup : public ScTextWndBase public: ScInputBarGroup( vcl::Window* Parent, ScTabViewShell* pViewSh ); virtual ~ScInputBarGroup(); - virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) SAL_OVERRIDE; - virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) SAL_OVERRIDE; + virtual void dispose() SAL_OVERRIDE; + virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) SAL_OVERRIDE; + virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) SAL_OVERRIDE; // virtual void Paint(const Rectangle& rRect ); void SetTextString( const OUString& rString ) SAL_OVERRIDE; void StartEditEngine() SAL_OVERRIDE; @@ -217,16 +220,16 @@ public: bool IsFocus(); void MakeDialogEditView() SAL_OVERRIDE; bool IsInputActive() SAL_OVERRIDE; - ScrollBar& GetScrollBar() { return aScrollBar; } + ScrollBar& GetScrollBar() { return *aScrollBar.get(); } void IncrementVerticalSize(); void DecrementVerticalSize(); - long GetNumLines() { return aMultiTextWnd.GetNumLines(); } + long GetNumLines() { return aMultiTextWnd->GetNumLines(); } long GetVertOffset() { return nVertOffset; } private: void TriggerToolboxLayout(); - ScMultiTextWnd aMultiTextWnd; - ImageButton aButton; - ScrollBar aScrollBar; + VclPtr<ScMultiTextWnd> aMultiTextWnd; + VclPtr<ImageButton> aButton; + VclPtr<ScrollBar> aScrollBar; long nVertOffset; DECL_LINK( ClickHdl, void* ); DECL_LINK( Impl_ScrollHdl, void* ); @@ -238,6 +241,7 @@ class ScInputWindow : public ToolBox // Parent toolbox public: ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ); virtual ~ScInputWindow(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; @@ -284,8 +288,8 @@ protected: bool UseSubTotal( ScRangeList* pRangeList ) const; bool IsPointerAtResizePos(); private: - ScPosWnd aWndPos; - std::unique_ptr<ScTextWndBase> pRuntimeWindow; + VclPtr<ScPosWnd> aWndPos; + VclPtr<ScTextWndBase> pRuntimeWindow; ScTextWndBase& aTextWindow; ScInputHandler* pInputHdl; OUString aTextOk; diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx index dd9a250f7acb..e89d68d9bdb3 100644 --- a/sc/source/ui/inc/inscldlg.hxx +++ b/sc/source/ui/inc/inscldlg.hxx @@ -29,14 +29,15 @@ class ScInsertCellDlg : public ModalDialog { private: - RadioButton* m_pBtnCellsDown; - RadioButton* m_pBtnCellsRight; - RadioButton* m_pBtnInsRow; - RadioButton* m_pBtnInsCol; + VclPtr<RadioButton> m_pBtnCellsDown; + VclPtr<RadioButton> m_pBtnCellsRight; + VclPtr<RadioButton> m_pBtnInsRow; + VclPtr<RadioButton> m_pBtnInsCol; public: ScInsertCellDlg( vcl::Window* pParent,bool bDisallowCellMove = false ); virtual ~ScInsertCellDlg(); + virtual void dispose() SAL_OVERRIDE; InsCellCmd GetInsCellCmd() const; }; diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx index 30f89fe35eda..65ea1d9d5f6f 100644 --- a/sc/source/ui/inc/inscodlg.hxx +++ b/sc/source/ui/inc/inscodlg.hxx @@ -34,6 +34,7 @@ public: InsertDeleteFlags nCheckDefaults = IDF_NONE, const OUString* pStrTitle = NULL ); virtual ~ScInsertContentsDlg(); + virtual void dispose() SAL_OVERRIDE; InsertDeleteFlags GetInsContentsCmdBits() const; sal_uInt16 GetFormulaCmdBits() const; @@ -48,32 +49,32 @@ public: void SetCellShiftDisabled( int nDisable ); private: - CheckBox* mpBtnInsAll; - CheckBox* mpBtnInsStrings; - CheckBox* mpBtnInsNumbers; - CheckBox* mpBtnInsDateTime; - CheckBox* mpBtnInsFormulas; - CheckBox* mpBtnInsNotes; - CheckBox* mpBtnInsAttrs; - CheckBox* mpBtnInsObjects; - - CheckBox* mpBtnSkipEmptyCells; - CheckBox* mpBtnTranspose; - CheckBox* mpBtnLink; - - RadioButton* mpRbNoOp; - RadioButton* mpRbAdd; - RadioButton* mpRbSub; - RadioButton* mpRbMul; - RadioButton* mpRbDiv; - - RadioButton* mpRbMoveNone; - RadioButton* mpRbMoveDown; - RadioButton* mpRbMoveRight; - - PushButton* mpBtnShortCutPasteValuesOnly; - PushButton* mpBtnShortCutPasteValuesFormats; - PushButton* mpBtnShortCutPasteTranspose; + VclPtr<CheckBox> mpBtnInsAll; + VclPtr<CheckBox> mpBtnInsStrings; + VclPtr<CheckBox> mpBtnInsNumbers; + VclPtr<CheckBox> mpBtnInsDateTime; + VclPtr<CheckBox> mpBtnInsFormulas; + VclPtr<CheckBox> mpBtnInsNotes; + VclPtr<CheckBox> mpBtnInsAttrs; + VclPtr<CheckBox> mpBtnInsObjects; + + VclPtr<CheckBox> mpBtnSkipEmptyCells; + VclPtr<CheckBox> mpBtnTranspose; + VclPtr<CheckBox> mpBtnLink; + + VclPtr<RadioButton> mpRbNoOp; + VclPtr<RadioButton> mpRbAdd; + VclPtr<RadioButton> mpRbSub; + VclPtr<RadioButton> mpRbMul; + VclPtr<RadioButton> mpRbDiv; + + VclPtr<RadioButton> mpRbMoveNone; + VclPtr<RadioButton> mpRbMoveDown; + VclPtr<RadioButton> mpRbMoveRight; + + VclPtr<PushButton> mpBtnShortCutPasteValuesOnly; + VclPtr<PushButton> mpBtnShortCutPasteValuesFormats; + VclPtr<PushButton> mpBtnShortCutPasteTranspose; bool bOtherDoc; bool bFillMode; diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index 7bc1dd590b7f..64bc24f5bc17 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -44,6 +44,7 @@ class ScInsertTableDlg : public ModalDialog public: ScInsertTableDlg( vcl::Window* pParent, ScViewData& rViewData, SCTAB nTabCount, bool bFromFile ); virtual ~ScInsertTableDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; // override to set parent dialog @@ -57,19 +58,19 @@ public: SCTAB GetTableCount() const { return nTableCount;} private: - RadioButton* m_pBtnBefore; - RadioButton* m_pBtnBehind; - RadioButton* m_pBtnNew; - RadioButton* m_pBtnFromFile; - FixedText* m_pFtCount; - NumericField* m_pNfCount; - FixedText* m_pFtName; - Edit* m_pEdName; - ListBox* m_pLbTables; - FixedText* m_pFtPath; - PushButton* m_pBtnBrowse; - CheckBox* m_pBtnLink; - OKButton* m_pBtnOk; + VclPtr<RadioButton> m_pBtnBefore; + VclPtr<RadioButton> m_pBtnBehind; + VclPtr<RadioButton> m_pBtnNew; + VclPtr<RadioButton> m_pBtnFromFile; + VclPtr<FixedText> m_pFtCount; + VclPtr<NumericField> m_pNfCount; + VclPtr<FixedText> m_pFtName; + VclPtr<Edit> m_pEdName; + VclPtr<ListBox> m_pLbTables; + VclPtr<FixedText> m_pFtPath; + VclPtr<PushButton> m_pBtnBrowse; + VclPtr<CheckBox> m_pBtnLink; + VclPtr<OKButton> m_pBtnOk; Timer aBrowseTimer; ScViewData& rViewData; diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx index 39c2fd61a67b..ab52b76318fd 100644 --- a/sc/source/ui/inc/lbseldlg.hxx +++ b/sc/source/ui/inc/lbseldlg.hxx @@ -30,12 +30,14 @@ class ScSelEntryDlg : public ModalDialog { private: - ListBox* m_pLb; + VclPtr<ListBox> m_pLb; DECL_LINK( DblClkHdl, void * ); public: ScSelEntryDlg(vcl::Window* pParent, const std::vector<OUString> &rEntryList); + virtual ~ScSelEntryDlg(); + virtual void dispose() SAL_OVERRIDE; OUString GetSelectEntry() const; }; diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index 6c11b2f0053b..d88b17d76b41 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -37,13 +37,13 @@ class ScDocShell; class ScLinkedAreaDlg : public ModalDialog { private: - SvtURLBox* m_pCbUrl; - PushButton* m_pBtnBrowse; - ListBox* m_pLbRanges; - CheckBox* m_pBtnReload; - NumericField* m_pNfDelay; - FixedText* m_pFtSeconds; - OKButton* m_pBtnOk; + VclPtr<SvtURLBox> m_pCbUrl; + VclPtr<PushButton> m_pBtnBrowse; + VclPtr<ListBox> m_pLbRanges; + VclPtr<CheckBox> m_pBtnReload; + VclPtr<NumericField> m_pNfDelay; + VclPtr<FixedText> m_pFtSeconds; + VclPtr<OKButton> m_pBtnOk; ScDocShell* pSourceShell; sfx2::DocumentInserter* pDocInserter; @@ -64,6 +64,7 @@ private: public: ScLinkedAreaDlg( vcl::Window* pParent ); virtual ~ScLinkedAreaDlg(); + virtual void dispose() SAL_OVERRIDE; void InitFromOldLink( const OUString& rFile, const OUString& rFilter, const OUString& rOptions, const OUString& rSource, diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx index ab422cf22819..72b106fd3504 100644 --- a/sc/source/ui/inc/mtrindlg.hxx +++ b/sc/source/ui/inc/mtrindlg.hxx @@ -38,12 +38,14 @@ public: long nMinimum = 0, long nFirst = 1, long nLast = 100 ); + virtual ~ScMetricInputDlg(); + virtual void dispose() SAL_OVERRIDE; long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const; private: - MetricField* m_pEdValue; - CheckBox* m_pBtnDefVal; + VclPtr<MetricField> m_pEdValue; + VclPtr<CheckBox> m_pBtnDefVal; long nDefaultValue; long nCurrentValue; diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index 0087e42927e6..cef3d5f8160b 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -32,6 +32,7 @@ class ScMoveTableDlg : public ModalDialog public: ScMoveTableDlg(vcl::Window* pParent, const OUString& rDefault); virtual ~ScMoveTableDlg(); + virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetSelectedDocument () const { return nDocument; } SCTAB GetSelectedTable () const { return nTable; } @@ -49,13 +50,13 @@ private: bool IsCurrentDocSelected() const; private: - RadioButton* pBtnMove; - RadioButton* pBtnCopy; - ListBox* pLbDoc; - ListBox* pLbTable; - Edit* pEdTabName; - FixedText* pFtWarn; - OKButton* pBtnOk; + VclPtr<RadioButton> pBtnMove; + VclPtr<RadioButton> pBtnCopy; + VclPtr<ListBox> pLbDoc; + VclPtr<ListBox> pLbTable; + VclPtr<Edit> pEdTabName; + VclPtr<FixedText> pFtWarn; + VclPtr<OKButton> pBtnOk; OUString msCurrentDoc; OUString msNewDoc; diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx index ef8762605dbc..7a53cd85a4a7 100644 --- a/sc/source/ui/inc/namecrea.hxx +++ b/sc/source/ui/inc/namecrea.hxx @@ -28,13 +28,14 @@ class ScNameCreateDlg : public ModalDialog { protected: - CheckBox* m_pTopBox; - CheckBox* m_pLeftBox; - CheckBox* m_pBottomBox; - CheckBox* m_pRightBox; + VclPtr<CheckBox> m_pTopBox; + VclPtr<CheckBox> m_pLeftBox; + VclPtr<CheckBox> m_pBottomBox; + VclPtr<CheckBox> m_pRightBox; public: ScNameCreateDlg( vcl::Window * pParent, sal_uInt16 nFlags ); - + virtual ~ScNameCreateDlg(); + virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetFlags() const; }; diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx index b21a0be4924b..acdb9ed31e52 100644 --- a/sc/source/ui/inc/namedefdlg.hxx +++ b/sc/source/ui/inc/namedefdlg.hxx @@ -26,21 +26,21 @@ class ScViewData; class ScNameDefDlg : public ScAnyRefDlg { private: - Edit* m_pEdName; + VclPtr<Edit> m_pEdName; - formula::RefEdit* m_pEdRange; - formula::RefButton* m_pRbRange; + VclPtr<formula::RefEdit> m_pEdRange; + VclPtr<formula::RefButton> m_pRbRange; - ListBox* m_pLbScope; + VclPtr<ListBox> m_pLbScope; - CheckBox* m_pBtnRowHeader; - CheckBox* m_pBtnColHeader; - CheckBox* m_pBtnPrintArea; - CheckBox* m_pBtnCriteria; + VclPtr<CheckBox> m_pBtnRowHeader; + VclPtr<CheckBox> m_pBtnColHeader; + VclPtr<CheckBox> m_pBtnPrintArea; + VclPtr<CheckBox> m_pBtnCriteria; - PushButton* m_pBtnAdd; - PushButton* m_pBtnCancel; - FixedText* m_pFtInfo; + VclPtr<PushButton> m_pBtnAdd; + VclPtr<PushButton> m_pBtnCancel; + VclPtr<FixedText> m_pFtInfo; bool mbUndo; //if true we need to add an undo action after creating a range name ScDocument* mpDoc; @@ -77,7 +77,8 @@ public: ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap, const ScAddress& aCursorPos, const bool bUndo); - virtual ~ScNameDefDlg() {}; + virtual ~ScNameDefDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual bool IsRefInputMode() const SAL_OVERRIDE; diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index cb586b928554..cad2f9d8d364 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -43,24 +43,24 @@ class ScDocument; class ScNameDlg : public ScAnyRefDlg, public ScRangeManagerTable::InitListener { private: - Edit* m_pEdName; - formula::RefEdit* m_pEdAssign; - formula::RefButton* m_pRbAssign; - ListBox* m_pLbScope; + VclPtr<Edit> m_pEdName; + VclPtr<formula::RefEdit> m_pEdAssign; + VclPtr<formula::RefButton> m_pRbAssign; + VclPtr<ListBox> m_pLbScope; - CheckBox* m_pBtnPrintArea; - CheckBox* m_pBtnColHeader; - CheckBox* m_pBtnCriteria; - CheckBox* m_pBtnRowHeader; + VclPtr<CheckBox> m_pBtnPrintArea; + VclPtr<CheckBox> m_pBtnColHeader; + VclPtr<CheckBox> m_pBtnCriteria; + VclPtr<CheckBox> m_pBtnRowHeader; - PushButton* m_pBtnAdd; - PushButton* m_pBtnDelete; - PushButton* m_pBtnOk; - PushButton* m_pBtnCancel; + VclPtr<PushButton> m_pBtnAdd; + VclPtr<PushButton> m_pBtnDelete; + VclPtr<PushButton> m_pBtnOk; + VclPtr<PushButton> m_pBtnCancel; - FixedText* m_pFtInfo; + VclPtr<FixedText> m_pFtInfo; - ScRangeManagerTable* m_pRangeManagerTable; + VclPtr<ScRangeManagerTable> m_pRangeManagerTable; const OUString maGlobalNameStr; const OUString maErrInvalidNameStr; @@ -123,6 +123,7 @@ public: ScViewData* ptrViewData, const ScAddress& aCursorPos, boost::ptr_map<OUString, ScRangeName>* pRangeMap = NULL ); virtual ~ScNameDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual bool IsRefInputMode() const SAL_OVERRIDE; diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx index f50b7bd8a47e..f87e3dd99519 100644 --- a/sc/source/ui/inc/namemgrtable.hxx +++ b/sc/source/ui/inc/namemgrtable.hxx @@ -66,6 +66,7 @@ private: public: ScRangeManagerTable( SvSimpleTableContainer& rParent, boost::ptr_map<OUString, ScRangeName>& aTabRangeNames, const ScAddress& rPos ); virtual ~ScRangeManagerTable(); + virtual void dispose() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx index 866ffc79ee04..a71a95b23e9c 100644 --- a/sc/source/ui/inc/namepast.hxx +++ b/sc/source/ui/inc/namepast.hxx @@ -37,11 +37,11 @@ class ScNamePasteDlg : public ModalDialog DECL_LINK( ButtonHdl, Button * ); private: - PushButton* m_pBtnPasteAll; - PushButton* m_pBtnPaste; - PushButton* m_pBtnClose; + VclPtr<PushButton> m_pBtnPasteAll; + VclPtr<PushButton> m_pBtnPaste; + VclPtr<PushButton> m_pBtnClose; - ScRangeManagerTable* mpTable; + VclPtr<ScRangeManagerTable> mpTable; std::vector<OUString> maSelectedNames; boost::ptr_map<OUString, ScRangeName> maRangeMap; @@ -49,6 +49,7 @@ public: ScNamePasteDlg( vcl::Window * pParent, ScDocShell* pShell, bool bInsList=true ); virtual ~ScNamePasteDlg(); + virtual void dispose() SAL_OVERRIDE; std::vector<OUString> GetSelectedNames() const; }; diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index f966fba1b9ff..8445a094019c 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -97,10 +97,11 @@ class ScScenarioWindow : public vcl::Window public: ScScenarioWindow( vcl::Window* pParent, const OUString& aQH_List, const OUString& aQH_Comment); virtual ~ScScenarioWindow(); + virtual void dispose() SAL_OVERRIDE; void NotifyState( const SfxPoolItem* pState ); void SetComment( const OUString& rComment ) - { aEdComment.SetText( rComment ); } + { aEdComment->SetText( rComment ); } void SetSizePixel( const Size& rNewSize ) SAL_OVERRIDE; @@ -109,8 +110,8 @@ protected: virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; private: - ScScenarioListBox aLbScenario; - MultiLineEdit aEdComment; + VclPtr<ScScenarioListBox> aLbScenario; + VclPtr<MultiLineEdit> aEdComment; }; // class ColumnEdit @@ -220,14 +221,14 @@ private: SfxBindings& rBindings; // must be first member ImageList aCmdImageList; // must be before aTbxCmd - FixedInfo aFtCol; - ColumnEdit aEdCol; - FixedInfo aFtRow; - RowEdit aEdRow; - CommandToolBox aTbxCmd; - ScContentTree aLbEntries; - ScScenarioWindow aWndScenarios; - ScDocListBox aLbDocuments; + VclPtr<FixedInfo> aFtCol; + VclPtr<ColumnEdit> aEdCol; + VclPtr<FixedInfo> aFtRow; + VclPtr<RowEdit> aEdRow; + VclPtr<CommandToolBox> aTbxCmd; + VclPtr<ScContentTree> aLbEntries; + VclPtr<ScScenarioWindow> aWndScenarios; + VclPtr<ScDocListBox> aLbDocuments; Idle aContentIdle; @@ -309,6 +310,7 @@ public: ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl::Window* pParent, const bool bUseStyleSettingsBackground); virtual ~ScNavigatorDlg(); + virtual void dispose() SAL_OVERRIDE; using Window::Notify; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; @@ -329,7 +331,7 @@ public: virtual void Resizing( Size& rSize ) SAL_OVERRIDE; private: - ScNavigatorDlg* pNavigator; + VclPtr<ScNavigatorDlg> pNavigator; }; #endif // INCLUDED_SC_SOURCE_UI_INC_NAVIPI_HXX diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index 537837aa7af3..ee8af56338f0 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -31,10 +31,10 @@ class SdrObject; class ScNoteMarker { private: - vcl::Window* pWindow; - vcl::Window* pRightWin; - vcl::Window* pBottomWin; - vcl::Window* pDiagWin; + VclPtr<vcl::Window> pWindow; + VclPtr<vcl::Window> pRightWin; + VclPtr<vcl::Window> pBottomWin; + VclPtr<vcl::Window> pDiagWin; ScDocument* pDoc; ScAddress aDocPos; OUString aUserText; diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx index 107447d8529e..c95dffef4229 100644 --- a/sc/source/ui/inc/olinewin.hxx +++ b/sc/source/ui/inc/olinewin.hxx @@ -62,6 +62,7 @@ public: ScViewData* pViewData, ScSplitPos eWhich ); virtual ~ScOutlineWindow(); + virtual void dispose() SAL_OVERRIDE; /** Sets the size of the header area (width/height dep. on window type). */ void SetHeaderSize( long nNewSize ); diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx index 0e5e07c6b518..adfb4062a266 100644 --- a/sc/source/ui/inc/opredlin.hxx +++ b/sc/source/ui/inc/opredlin.hxx @@ -36,10 +36,10 @@ class ScRedlineOptionsTabPage : public SfxTabPage { - ColorListBox* m_pContentColorLB; - ColorListBox* m_pRemoveColorLB; - ColorListBox* m_pInsertColorLB; - ColorListBox* m_pMoveColorLB; + VclPtr<ColorListBox> m_pContentColorLB; + VclPtr<ColorListBox> m_pRemoveColorLB; + VclPtr<ColorListBox> m_pInsertColorLB; + VclPtr<ColorListBox> m_pMoveColorLB; OUString aAuthorStr; DECL_LINK(ColorHdl, void *); @@ -47,8 +47,8 @@ public: ScRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~ScRedlineOptionsTabPage(); - - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); + virtual void dispose() SAL_OVERRIDE; + 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; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 6d1fd0f35f1b..1a9acfa1f072 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -96,6 +96,7 @@ public: ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScDocShell* pDocSh, ScAddress aCursorPos ); virtual ~ScOptSolverDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual bool IsRefInputMode() const SAL_OVERRIDE; @@ -103,56 +104,56 @@ public: virtual bool Close() SAL_OVERRIDE; private: - FixedText* m_pFtObjectiveCell; - formula::RefEdit* m_pEdObjectiveCell; - formula::RefButton* m_pRBObjectiveCell; - - RadioButton* m_pRbMax; - RadioButton* m_pRbMin; - RadioButton* m_pRbValue; - formula::RefEdit* m_pEdTargetValue; - formula::RefButton* m_pRBTargetValue; - - FixedText* m_pFtVariableCells; - formula::RefEdit* m_pEdVariableCells; - formula::RefButton* m_pRBVariableCells; - - FixedText* m_pFtCellRef; // labels are together with controls for the first row - ScCursorRefEdit* m_pEdLeft1; - formula::RefButton* m_pRBLeft1; - FixedText* m_pFtOperator; - ListBox* m_pLbOp1; - FixedText* m_pFtConstraint; - ScCursorRefEdit* m_pEdRight1; - formula::RefButton* m_pRBRight1; - PushButton* m_pBtnDel1; - - ScCursorRefEdit* m_pEdLeft2; - formula::RefButton* m_pRBLeft2; - ListBox* m_pLbOp2; - ScCursorRefEdit* m_pEdRight2; - formula::RefButton* m_pRBRight2; - PushButton* m_pBtnDel2; - - ScCursorRefEdit* m_pEdLeft3; - formula::RefButton* m_pRBLeft3; - ListBox* m_pLbOp3; - ScCursorRefEdit* m_pEdRight3; - formula::RefButton* m_pRBRight3; - PushButton* m_pBtnDel3; - - ScCursorRefEdit* m_pEdLeft4; - formula::RefButton* m_pRBLeft4; - ListBox* m_pLbOp4; - ScCursorRefEdit* m_pEdRight4; - formula::RefButton* m_pRBRight4; - PushButton* m_pBtnDel4; - - ScrollBar* m_pScrollBar; - - PushButton* m_pBtnOpt; - PushButton* m_pBtnCancel; - PushButton* m_pBtnSolve; + VclPtr<FixedText> m_pFtObjectiveCell; + VclPtr<formula::RefEdit> m_pEdObjectiveCell; + VclPtr<formula::RefButton> m_pRBObjectiveCell; + + VclPtr<RadioButton> m_pRbMax; + VclPtr<RadioButton> m_pRbMin; + VclPtr<RadioButton> m_pRbValue; + VclPtr<formula::RefEdit> m_pEdTargetValue; + VclPtr<formula::RefButton> m_pRBTargetValue; + + VclPtr<FixedText> m_pFtVariableCells; + VclPtr<formula::RefEdit> m_pEdVariableCells; + VclPtr<formula::RefButton> m_pRBVariableCells; + + VclPtr<FixedText> m_pFtCellRef; // labels are together with controls for the first row + VclPtr<ScCursorRefEdit> m_pEdLeft1; + VclPtr<formula::RefButton> m_pRBLeft1; + VclPtr<FixedText> m_pFtOperator; + VclPtr<ListBox> m_pLbOp1; + VclPtr<FixedText> m_pFtConstraint; + VclPtr<ScCursorRefEdit> m_pEdRight1; + VclPtr<formula::RefButton> m_pRBRight1; + VclPtr<PushButton> m_pBtnDel1; + + VclPtr<ScCursorRefEdit> m_pEdLeft2; + VclPtr<formula::RefButton> m_pRBLeft2; + VclPtr<ListBox> m_pLbOp2; + VclPtr<ScCursorRefEdit> m_pEdRight2; + VclPtr<formula::RefButton> m_pRBRight2; + VclPtr<PushButton> m_pBtnDel2; + + VclPtr<ScCursorRefEdit> m_pEdLeft3; + VclPtr<formula::RefButton> m_pRBLeft3; + VclPtr<ListBox> m_pLbOp3; + VclPtr<ScCursorRefEdit> m_pEdRight3; + VclPtr<formula::RefButton> m_pRBRight3; + VclPtr<PushButton> m_pBtnDel3; + + VclPtr<ScCursorRefEdit> m_pEdLeft4; + VclPtr<formula::RefButton> m_pRBLeft4; + VclPtr<ListBox> m_pLbOp4; + VclPtr<ScCursorRefEdit> m_pEdRight4; + VclPtr<formula::RefButton> m_pRBRight4; + VclPtr<PushButton> m_pBtnDel4; + + VclPtr<ScrollBar> m_pScrollBar; + + VclPtr<PushButton> m_pBtnOpt; + VclPtr<PushButton> m_pBtnCancel; + VclPtr<PushButton> m_pBtnSolve; OUString maInputError; OUString maConditionError; @@ -160,16 +161,16 @@ private: ScDocShell* mpDocShell; ScDocument& mrDoc; const SCTAB mnCurTab; - formula::RefEdit* mpEdActive; + VclPtr<formula::RefEdit> mpEdActive; bool mbDlgLostFocus; static const sal_uInt16 EDIT_ROW_COUNT = 4; - ScCursorRefEdit* mpLeftEdit[EDIT_ROW_COUNT]; - formula::RefButton* mpLeftButton[EDIT_ROW_COUNT]; - ScCursorRefEdit* mpRightEdit[EDIT_ROW_COUNT]; - formula::RefButton* mpRightButton[EDIT_ROW_COUNT]; - ListBox* mpOperator[EDIT_ROW_COUNT]; - PushButton* mpDelButton[EDIT_ROW_COUNT]; + VclPtr<ScCursorRefEdit> mpLeftEdit[EDIT_ROW_COUNT]; + VclPtr<formula::RefButton> mpLeftButton[EDIT_ROW_COUNT]; + VclPtr<ScCursorRefEdit> mpRightEdit[EDIT_ROW_COUNT]; + VclPtr<formula::RefButton> mpRightButton[EDIT_ROW_COUNT]; + VclPtr<ListBox> mpOperator[EDIT_ROW_COUNT]; + VclPtr<PushButton> mpDelButton[EDIT_ROW_COUNT]; std::vector<ScOptConditionRow> maConditions; long nScrollPos; @@ -202,10 +203,12 @@ private: class ScSolverProgressDialog : public ModelessDialog { - FixedText* m_pFtTime; + VclPtr<FixedText> m_pFtTime; public: ScSolverProgressDialog( vcl::Window* pParent ); + virtual ~ScSolverProgressDialog(); + virtual void dispose() SAL_OVERRIDE; void HideTimeLimit(); void SetTimeLimit( sal_Int32 nSeconds ); @@ -213,22 +216,26 @@ public: class ScSolverNoSolutionDialog : public ModalDialog { - FixedText* m_pFtErrorText; + VclPtr<FixedText> m_pFtErrorText; public: ScSolverNoSolutionDialog(vcl::Window* pParent, const OUString& rErrorText); + virtual ~ScSolverNoSolutionDialog(); + virtual void dispose() SAL_OVERRIDE; }; class ScSolverSuccessDialog : public ModalDialog { - FixedText* m_pFtResult; - PushButton* m_pBtnOk; - PushButton* m_pBtnCancel; + VclPtr<FixedText> m_pFtResult; + VclPtr<PushButton> m_pBtnOk; + VclPtr<PushButton> m_pBtnCancel; DECL_LINK(ClickHdl, PushButton*); public: ScSolverSuccessDialog( vcl::Window* pParent, const OUString& rSolution ); + virtual ~ScSolverSuccessDialog(); + virtual void dispose() SAL_OVERRIDE; }; #endif diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index 7d8ef814651e..8873af7bd287 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -141,9 +141,9 @@ private: void adjustForHyperlinkInPDF(Point aURLStart, OutputDevice* pDev); }; - OutputDevice* mpDev; // Device - OutputDevice* mpRefDevice; // printer if used for preview - OutputDevice* pFmtDevice; // reference for text formatting + VclPtr<OutputDevice> mpDev; // Device + VclPtr<OutputDevice> mpRefDevice; // printer if used for preview + VclPtr<OutputDevice> pFmtDevice; // reference for text formatting ScTableInfo& mrTabInfo; RowInfo* pRowInfo; // Info block SCSIZE nArrCount; // occupied lines in info block diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index 55b3fa8625c2..c2272b311c76 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -40,28 +40,29 @@ class ScPivotFilterDlg : public ModalDialog public: ScPivotFilterDlg(vcl::Window* pParent, const SfxItemSet& rArgSet, SCTAB nSourceTab); virtual ~ScPivotFilterDlg(); + virtual void dispose() SAL_OVERRIDE; const ScQueryItem& GetOutputItem(); private: - ListBox* m_pLbField1; - ListBox* m_pLbCond1; - ComboBox* m_pEdVal1; - - ListBox* m_pLbConnect1; - ListBox* m_pLbField2; - ListBox* m_pLbCond2; - ComboBox* m_pEdVal2; - - ListBox* m_pLbConnect2; - ListBox* m_pLbField3; - ListBox* m_pLbCond3; - ComboBox* m_pEdVal3; - - CheckBox* m_pBtnCase; - CheckBox* m_pBtnRegExp; - CheckBox* m_pBtnUnique; - FixedText* m_pFtDbArea; + VclPtr<ListBox> m_pLbField1; + VclPtr<ListBox> m_pLbCond1; + VclPtr<ComboBox> m_pEdVal1; + + VclPtr<ListBox> m_pLbConnect1; + VclPtr<ListBox> m_pLbField2; + VclPtr<ListBox> m_pLbCond2; + VclPtr<ComboBox> m_pEdVal2; + + VclPtr<ListBox> m_pLbConnect2; + VclPtr<ListBox> m_pLbField3; + VclPtr<ListBox> m_pLbCond3; + VclPtr<ComboBox> m_pEdVal3; + + VclPtr<CheckBox> m_pBtnCase; + VclPtr<CheckBox> m_pBtnRegExp; + VclPtr<CheckBox> m_pBtnUnique; + VclPtr<FixedText> m_pFtDbArea; const OUString aStrNone; const OUString aStrEmpty; const OUString aStrNotEmpty; @@ -75,9 +76,9 @@ private: SCTAB nSrcTab; sal_uInt16 nFieldCount; - ComboBox* aValueEdArr[3]; - ListBox* aFieldLbArr[3]; - ListBox* aCondLbArr[3]; + VclPtr<ComboBox> aValueEdArr[3]; + VclPtr<ListBox> aFieldLbArr[3]; + VclPtr<ListBox> aCondLbArr[3]; std::vector<ScTypedStrData>* pEntryLists[MAXCOLCOUNT]; diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index bcf4fbc66d15..7be36eeca8a3 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -118,6 +118,7 @@ protected: public: ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pViewSh ); virtual ~ScPreview(); + virtual void dispose() SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx index 3a4b5bbbefee..3f59e330725e 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -82,7 +82,7 @@ public: class ScPreviewLocationData { - OutputDevice* pWindow; + VclPtr<OutputDevice> pWindow; ScDocument* pDoc; MapMode aCellMapMode; MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES]; diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index b17ff47669cc..448b3f514151 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -40,11 +40,11 @@ class ScPreviewShell: public SfxViewShell { ScDocShell* pDocShell; - SystemWindow* mpFrameWindow; - ScPreview* pPreview; // Output window - ScrollBar* pHorScroll; - ScrollBar* pVerScroll; - vcl::Window* pCorner; + VclPtr<SystemWindow> mpFrameWindow; + VclPtr<ScPreview> pPreview; // Output window + VclPtr<ScrollBar> pHorScroll; + VclPtr<ScrollBar> pVerScroll; + VclPtr<vcl::Window> pCorner; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData TriState nSourceDesignMode; // form design mode from TabView @@ -109,7 +109,7 @@ public: virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; - virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; + virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; void AddAccessibilityObject( SfxListener& rObject ); void RemoveAccessibilityObject( SfxListener& rObject ); diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx index 2e8d51eb575e..265789578cca 100644 --- a/sc/source/ui/inc/printfun.hxx +++ b/sc/source/ui/inc/printfun.hxx @@ -130,8 +130,8 @@ class ScPrintFunc private: ScDocShell* pDocShell; ScDocument* pDoc; - SfxPrinter* pPrinter; - OutputDevice* pDev; + VclPtr<SfxPrinter> pPrinter; + VclPtr<OutputDevice> pDev; FmFormView* pDrawView; MapMode aOldPrinterMode; // MapMode before the call diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx index 812b40258dc7..32a0b724c466 100644 --- a/sc/source/ui/inc/protectiondlg.hxx +++ b/sc/source/ui/inc/protectiondlg.hxx @@ -35,6 +35,7 @@ class ScTableProtectionDlg : public ModalDialog public: explicit ScTableProtectionDlg(vcl::Window* pParent); virtual ~ScTableProtectionDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; @@ -49,16 +50,16 @@ private: void EnableOptionalWidgets(bool bEnable = true); - CheckBox* m_pBtnProtect; + VclPtr<CheckBox> m_pBtnProtect; - VclContainer* m_pPasswords; - VclContainer* m_pOptions; - Edit* m_pPassword1Edit; - Edit* m_pPassword2Edit; + VclPtr<VclContainer> m_pPasswords; + VclPtr<VclContainer> m_pOptions; + VclPtr<Edit> m_pPassword1Edit; + VclPtr<Edit> m_pPassword2Edit; - SvxCheckListBox* m_pOptionsListBox; + VclPtr<SvxCheckListBox> m_pOptionsListBox; - OKButton* m_pBtnOk; + VclPtr<OKButton> m_pBtnOk; OUString m_aSelectLockedCells; OUString m_aSelectUnlockedCells; diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 4718e5e5e026..bfebea6b8439 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -60,7 +60,8 @@ class ScDPFunctionDlg : public ModalDialog public: explicit ScDPFunctionDlg( vcl::Window* pParent, const ScDPLabelDataVector& rLabelVec, const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ); - + virtual ~ScDPFunctionDlg(); + virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetFuncMask() const; ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const; @@ -77,14 +78,14 @@ private: DECL_LINK( DblClickHdl, void* ); private: - ScDPFunctionListBox* mpLbFunc; - FixedText* mpFtName; - ListBox* mpLbType; - FixedText* mpFtBaseField; - ListBox* mpLbBaseField; - FixedText* mpFtBaseItem; - ListBox* mpLbBaseItem; - OKButton* mpBtnOk; + VclPtr<ScDPFunctionListBox> mpLbFunc; + VclPtr<FixedText> mpFtName; + VclPtr<ListBox> mpLbType; + VclPtr<FixedText> mpFtBaseField; + VclPtr<ListBox> mpLbBaseField; + VclPtr<FixedText> mpFtBaseItem; + VclPtr<ListBox> mpLbBaseItem; + VclPtr<OKButton> mpBtnOk; NameMapType maBaseFieldNameMap; // cache for base field display -> original name. NameMapType maBaseItemNameMap; // cache for base item display -> original name. @@ -101,8 +102,9 @@ public: explicit ScDPSubtotalDlg( vcl::Window* pParent, ScDPObject& rDPObj, const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData, const ScDPNameVec& rDataFields, bool bEnableLayout ); - - sal_uInt16 GetFuncMask() const; + virtual ~ScDPSubtotalDlg(); + virtual void dispose() SAL_OVERRIDE; + sal_uInt16 GetFuncMask() const; void FillLabelData( ScDPLabelData& rLabelData ) const; @@ -114,14 +116,14 @@ private: DECL_LINK( ClickHdl, PushButton* ); private: - RadioButton* mpRbNone; - RadioButton* mpRbAuto; - RadioButton* mpRbUser; - ScDPFunctionListBox* mpLbFunc; - FixedText* mpFtName; - CheckBox* mpCbShowAll; - OKButton* mpBtnOk; - PushButton* mpBtnOptions; + VclPtr<RadioButton> mpRbNone; + VclPtr<RadioButton> mpRbAuto; + VclPtr<RadioButton> mpRbUser; + VclPtr<ScDPFunctionListBox> mpLbFunc; + VclPtr<FixedText> mpFtName; + VclPtr<CheckBox> mpCbShowAll; + VclPtr<OKButton> mpBtnOk; + VclPtr<PushButton> mpBtnOptions; ScDPObject& mrDPObj; /// The DataPilot object (for member names). const ScDPNameVec& mrDataFields; /// The list of all data field names. @@ -136,7 +138,8 @@ public: explicit ScDPSubtotalOptDlg( vcl::Window* pParent, ScDPObject& rDPObj, const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields, bool bEnableLayout ); - + virtual ~ScDPSubtotalOptDlg(); + virtual void dispose() SAL_OVERRIDE; void FillLabelData( ScDPLabelData& rLabelData ) const; private: @@ -153,25 +156,25 @@ private: DECL_LINK( SelectHdl, ListBox* ); private: - ListBox* m_pLbSortBy; - RadioButton* m_pRbSortAsc; - RadioButton* m_pRbSortDesc; - RadioButton* m_pRbSortMan; - VclContainer* m_pLayoutFrame; - ListBox* m_pLbLayout; - CheckBox* m_pCbLayoutEmpty; - CheckBox* m_pCbRepeatItemLabels; - CheckBox* m_pCbShow; - NumericField* m_pNfShow; - FixedText* m_pFtShow; - FixedText* m_pFtShowFrom; - ListBox* m_pLbShowFrom; - FixedText* m_pFtShowUsing; - ListBox* m_pLbShowUsing; - VclContainer* m_pHideFrame; - SvxCheckListBox* m_pLbHide; - FixedText* m_pFtHierarchy; - ListBox* m_pLbHierarchy; + VclPtr<ListBox> m_pLbSortBy; + VclPtr<RadioButton> m_pRbSortAsc; + VclPtr<RadioButton> m_pRbSortDesc; + VclPtr<RadioButton> m_pRbSortMan; + VclPtr<VclContainer> m_pLayoutFrame; + VclPtr<ListBox> m_pLbLayout; + VclPtr<CheckBox> m_pCbLayoutEmpty; + VclPtr<CheckBox> m_pCbRepeatItemLabels; + VclPtr<CheckBox> m_pCbShow; + VclPtr<NumericField> m_pNfShow; + VclPtr<FixedText> m_pFtShow; + VclPtr<FixedText> m_pFtShowFrom; + VclPtr<ListBox> m_pLbShowFrom; + VclPtr<FixedText> m_pFtShowUsing; + VclPtr<ListBox> m_pLbShowUsing; + VclPtr<VclContainer> m_pHideFrame; + VclPtr<SvxCheckListBox> m_pLbHide; + VclPtr<FixedText> m_pFtHierarchy; + VclPtr<ListBox> m_pLbHierarchy; boost::scoped_ptr<ScDPListBoxWrapper> m_xLbLayoutWrp; /// Wrapper for direct usage of API constants. boost::scoped_ptr<ScDPListBoxWrapper> m_xLbShowFromWrp; /// Wrapper for direct usage of API constants. @@ -187,7 +190,8 @@ class ScDPShowDetailDlg : public ModalDialog { public: explicit ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ); - + virtual ~ScDPShowDetailDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; /** @@ -201,8 +205,8 @@ private: DECL_LINK( DblClickHdl, ListBox* ); private: - ListBox* mpLbDims; - OKButton* mpBtnOk; + VclPtr<ListBox> mpLbDims; + VclPtr<OKButton> mpBtnOk; typedef std::unordered_map<OUString, long, OUStringHash> DimNameIndexMap; DimNameIndexMap maNameIndexMap; diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index 1388bde13b5b..650ac840d8b7 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -173,7 +173,7 @@ class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow { bool m_bVisibleLock:1; bool m_bFreeWindowLock:1; - vcl::Window * m_pSavedWndParent; + VclPtr<vcl::Window> m_pSavedWndParent; public: ScValidityRefChildWin( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); SFX_DECL_CHILDWINDOW_WITHID(ScValidityRefChildWin); diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx index 2763202b0395..8c746c1438f0 100644 --- a/sc/source/ui/inc/retypepassdlg.hxx +++ b/sc/source/ui/inc/retypepassdlg.hxx @@ -46,6 +46,7 @@ public: explicit ScRetypePassDlg(vcl::Window* pParent); virtual ~ScRetypePassDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; @@ -71,12 +72,12 @@ private: void DeleteSheets(); private: - OKButton* mpBtnOk; - FixedText* mpTextDocStatus; - PushButton* mpBtnRetypeDoc; - VclVBox* mpSheetsBox; + VclPtr<OKButton> mpBtnOk; + VclPtr<FixedText> mpTextDocStatus; + VclPtr<PushButton> mpBtnRetypeDoc; + VclPtr<VclVBox> mpSheetsBox; - std::vector<VclHBox*> maSheets; + std::vector<VclPtr<VclHBox>> maSheets; OUString maTextNotProtected; OUString maTextNotPassProtected; @@ -104,6 +105,7 @@ class ScRetypePassInputDlg : public ModalDialog public: explicit ScRetypePassInputDlg(vcl::Window* pParent, ScPassHashProtectable* pProtected); virtual ~ScRetypePassInputDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; @@ -117,17 +119,17 @@ private: void CheckPasswordInput(); private: - OKButton* m_pBtnOk; + VclPtr<OKButton> m_pBtnOk; - RadioButton* m_pBtnRetypePassword; + VclPtr<RadioButton> m_pBtnRetypePassword; - VclContainer* m_pPasswordGrid; - Edit* m_pPassword1Edit; - Edit* m_pPassword2Edit; + VclPtr<VclContainer> m_pPasswordGrid; + VclPtr<Edit> m_pPassword1Edit; + VclPtr<Edit> m_pPassword2Edit; - CheckBox* m_pBtnMatchOldPass; + VclPtr<CheckBox> m_pBtnMatchOldPass; - RadioButton* m_pBtnRemovePassword; + VclPtr<RadioButton> m_pBtnRemovePassword; DECL_LINK( OKHdl, void* ); DECL_LINK( RadioBtnHdl, RadioButton* ); diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx index 2675f3b346a3..96bc48d9add2 100644 --- a/sc/source/ui/inc/scendlg.hxx +++ b/sc/source/ui/inc/scendlg.hxx @@ -31,7 +31,8 @@ class ScNewScenarioDlg : public ModalDialog { public: ScNewScenarioDlg(vcl::Window* pParent, const OUString& rName, bool bEdit = false, bool bSheetProtected = false); - + virtual ~ScNewScenarioDlg(); + virtual void dispose() SAL_OVERRIDE; void SetScenarioData( const OUString& rName, const OUString& rComment, const Color& rColor, sal_uInt16 nFlags ); @@ -39,14 +40,14 @@ public: Color& rColor, sal_uInt16& rFlags ) const; private: - Edit* m_pEdName; - VclMultiLineEdit* m_pEdComment; - CheckBox* m_pCbShowFrame; - ColorListBox* m_pLbColor; - CheckBox* m_pCbTwoWay; - CheckBox* m_pCbCopyAll; - CheckBox* m_pCbProtect; - OKButton* m_pBtnOk; + VclPtr<Edit> m_pEdName; + VclPtr<VclMultiLineEdit> m_pEdComment; + VclPtr<CheckBox> m_pCbShowFrame; + VclPtr<ColorListBox> m_pLbColor; + VclPtr<CheckBox> m_pCbTwoWay; + VclPtr<CheckBox> m_pCbCopyAll; + VclPtr<CheckBox> m_pCbProtect; + VclPtr<OKButton> m_pBtnOk; const OUString aDefScenarioName; bool bIsEdit; diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index 646e4ef4bf77..c05237a49984 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -32,38 +32,38 @@ class ScImportAsciiDlg : public ModalDialog OUString maPreviewLine[ CSV_PREVIEW_LINES ]; - FixedText* pFtCharSet; + VclPtr<FixedText> pFtCharSet; - SvxTextEncodingBox* pLbCharSet; + VclPtr<SvxTextEncodingBox> pLbCharSet; - FixedText* pFtCustomLang; + VclPtr<FixedText> pFtCustomLang; - SvxLanguageBox* pLbCustomLang; + VclPtr<SvxLanguageBox> pLbCustomLang; - FixedText* pFtRow; - NumericField* pNfRow; + VclPtr<FixedText> pFtRow; + VclPtr<NumericField> pNfRow; - RadioButton* pRbFixed; - RadioButton* pRbSeparated; + VclPtr<RadioButton> pRbFixed; + VclPtr<RadioButton> pRbSeparated; - CheckBox* pCkbTab; - CheckBox* pCkbSemicolon; - CheckBox* pCkbComma; - CheckBox* pCkbSpace; - CheckBox* pCkbOther; - Edit* pEdOther; - CheckBox* pCkbAsOnce; + VclPtr<CheckBox> pCkbTab; + VclPtr<CheckBox> pCkbSemicolon; + VclPtr<CheckBox> pCkbComma; + VclPtr<CheckBox> pCkbSpace; + VclPtr<CheckBox> pCkbOther; + VclPtr<Edit> pEdOther; + VclPtr<CheckBox> pCkbAsOnce; - FixedText* pFtTextSep; - ComboBox* pCbTextSep; + VclPtr<FixedText> pFtTextSep; + VclPtr<ComboBox> pCbTextSep; - CheckBox* pCkbQuotedAsText; - CheckBox* pCkbDetectNumber; + VclPtr<CheckBox> pCkbQuotedAsText; + VclPtr<CheckBox> pCkbDetectNumber; - FixedText* pFtType; - ListBox* pLbType; + VclPtr<FixedText> pFtType; + VclPtr<ListBox> pLbType; - ScCsvTableBox* mpTableBox; + VclPtr<ScCsvTableBox> mpTableBox; OUString aCharSetUser; OUString aColumnUser; @@ -80,6 +80,7 @@ public: vcl::Window* pParent, const OUString& aDatName, SvStream* pInStream, ScImportAsciiCall eCall ); virtual ~ScImportAsciiDlg(); + virtual void dispose() SAL_OVERRIDE; void GetOptions( ScAsciiOptions& rOpt ); void SaveParameters(); diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx index b0460bb2bbbe..10bfe1f98752 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -27,24 +27,26 @@ public: ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, ScViewData *pViewData); + virtual ~ScAutoFormatDlg(); + virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetIndex() const { return nIndex; } OUString GetCurrFormatName(); private: - ListBox* m_pLbFormat; - ScAutoFmtPreview* m_pWndPreview; - OKButton* m_pBtnOk; - CancelButton* m_pBtnCancel; - PushButton* m_pBtnAdd; - PushButton* m_pBtnRemove; - PushButton* m_pBtnRename; - CheckBox* m_pBtnNumFormat; - CheckBox* m_pBtnBorder; - CheckBox* m_pBtnFont; - CheckBox* m_pBtnPattern; - CheckBox* m_pBtnAlignment; - CheckBox* m_pBtnAdjust; + VclPtr<ListBox> m_pLbFormat; + VclPtr<ScAutoFmtPreview> m_pWndPreview; + VclPtr<OKButton> m_pBtnOk; + VclPtr<CancelButton> m_pBtnCancel; + VclPtr<PushButton> m_pBtnAdd; + VclPtr<PushButton> m_pBtnRemove; + VclPtr<PushButton> m_pBtnRename; + VclPtr<CheckBox> m_pBtnNumFormat; + VclPtr<CheckBox> m_pBtnBorder; + VclPtr<CheckBox> m_pBtnFont; + VclPtr<CheckBox> m_pBtnPattern; + VclPtr<CheckBox> m_pBtnAlignment; + VclPtr<CheckBox> m_pBtnAdjust; OUString aStrTitle; OUString aStrLabel; OUString aStrClose; diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index adb8f2032725..348d27878dae 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -37,22 +37,23 @@ public: bool bImport = true ); virtual ~ScImportOptionsDlg(); + virtual void dispose() SAL_OVERRIDE; void GetImportOptions( ScImportOptions& rOptions ) const; private: - VclFrame* m_pFieldFrame; - FixedText* m_pFtCharset; - SvxTextEncodingBox* m_pLbCharset; - FixedText* m_pFtFieldSep; - ComboBox* m_pEdFieldSep; - FixedText* m_pFtTextSep; - ComboBox* m_pEdTextSep; - CheckBox* m_pCbShown; - CheckBox* m_pCbFormulas; - CheckBox* m_pCbQuoteAll; - CheckBox* m_pCbFixed; - OKButton* m_pBtnOk; + VclPtr<VclFrame> m_pFieldFrame; + VclPtr<FixedText> m_pFtCharset; + VclPtr<SvxTextEncodingBox> m_pLbCharset; + VclPtr<FixedText> m_pFtFieldSep; + VclPtr<ComboBox> m_pEdFieldSep; + VclPtr<FixedText> m_pFtTextSep; + VclPtr<ComboBox> m_pEdTextSep; + VclPtr<CheckBox> m_pCbShown; + VclPtr<CheckBox> m_pCbFormulas; + VclPtr<CheckBox> m_pCbQuoteAll; + VclPtr<CheckBox> m_pCbFixed; + VclPtr<OKButton> m_pBtnOk; ScDelimiterTable* pFieldSepTab; ScDelimiterTable* pTextSepTab; diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx index b2d133c2cdb8..a5f25ec50955 100644 --- a/sc/source/ui/inc/scuitphfedit.hxx +++ b/sc/source/ui/inc/scuitphfedit.hxx @@ -57,29 +57,30 @@ protected: sal_uInt16 nWhich, bool bHeader ); virtual ~ScHFEditPage(); + virtual void dispose() SAL_OVERRIDE; private: - ScEditWindow* m_pWndLeft; - ScEditWindow* m_pWndCenter; - ScEditWindow* m_pWndRight; - FixedText* m_pFtDefinedHF; - ListBox* m_pLbDefined; - FixedText* m_pFtCustomHF; - PushButton* m_pBtnText; - ScExtIButton* m_pBtnFile; - PushButton* m_pBtnTable; - PushButton* m_pBtnPage; - PushButton* m_pBtnLastPage; - PushButton* m_pBtnDate; - PushButton* m_pBtnTime; - - FixedText* m_pFtConfidential; - FixedText* m_pFtPage; - FixedText* m_pFtOfQuestion; - FixedText* m_pFtOf; - FixedText* m_pFtNone; - FixedText* m_pFtCreatedBy; - FixedText* m_pFtCustomized; + VclPtr<ScEditWindow> m_pWndLeft; + VclPtr<ScEditWindow> m_pWndCenter; + VclPtr<ScEditWindow> m_pWndRight; + VclPtr<FixedText> m_pFtDefinedHF; + VclPtr<ListBox> m_pLbDefined; + VclPtr<FixedText> m_pFtCustomHF; + VclPtr<PushButton> m_pBtnText; + VclPtr<ScExtIButton> m_pBtnFile; + VclPtr<PushButton> m_pBtnTable; + VclPtr<PushButton> m_pBtnPage; + VclPtr<PushButton> m_pBtnLastPage; + VclPtr<PushButton> m_pBtnDate; + VclPtr<PushButton> m_pBtnTime; + + VclPtr<FixedText> m_pFtConfidential; + VclPtr<FixedText> m_pFtPage; + VclPtr<FixedText> m_pFtOfQuestion; + VclPtr<FixedText> m_pFtOf; + VclPtr<FixedText> m_pFtNone; + VclPtr<FixedText> m_pFtCreatedBy; + VclPtr<FixedText> m_pFtCustomized; sal_uInt16 nWhich; OUString aCmdArr[6]; @@ -104,7 +105,7 @@ private: class ScRightHeaderEditPage : public ScHFEditPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScRightHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); @@ -113,7 +114,7 @@ private: class ScLeftHeaderEditPage : public ScHFEditPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScLeftHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); @@ -122,7 +123,7 @@ private: class ScRightFooterEditPage : public ScHFEditPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScRightFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); @@ -131,7 +132,7 @@ private: class ScLeftFooterEditPage : public ScHFEditPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); private: ScLeftFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet ); diff --git a/sc/source/ui/inc/searchresults.hxx b/sc/source/ui/inc/searchresults.hxx index 437d90a3adc8..22af42940f1c 100644 --- a/sc/source/ui/inc/searchresults.hxx +++ b/sc/source/ui/inc/searchresults.hxx @@ -21,7 +21,7 @@ namespace sc { class SearchResultsDlg : public ModelessDialog { - SvSimpleTable *mpList; + VclPtr<SvSimpleTable> mpList; SfxBindings* mpBindings; ScDocument* mpDoc; @@ -29,6 +29,7 @@ class SearchResultsDlg : public ModelessDialog public: SearchResultsDlg( SfxBindings* _pBindings, vcl::Window* pParent, sal_uInt16 nId ); virtual ~SearchResultsDlg(); + virtual void dispose() SAL_OVERRIDE; void FillResults( ScDocument* pDoc, const ScRangeList& rMatchedRanges ); diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx index f8d746fd4cc9..41f53111b40a 100644 --- a/sc/source/ui/inc/sharedocdlg.hxx +++ b/sc/source/ui/inc/sharedocdlg.hxx @@ -33,9 +33,9 @@ class ScDocShell; class ScShareDocumentDlg : public ModalDialog { private: - CheckBox* m_pCbShare; - FixedText* m_pFtWarning; - SvSimpleTable* m_pLbUsers; + VclPtr<CheckBox> m_pCbShare; + VclPtr<FixedText> m_pFtWarning; + VclPtr<SvSimpleTable> m_pLbUsers; OUString m_aStrNoUserData; OUString m_aStrUnknownUser; @@ -49,6 +49,7 @@ private: public: ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewData ); virtual ~ScShareDocumentDlg(); + virtual void dispose() SAL_OVERRIDE; bool IsShareDocumentChecked() const; void UpdateView(); diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx index 6c55a64d51f7..d0109a2735d4 100644 --- a/sc/source/ui/inc/shtabdlg.hxx +++ b/sc/source/ui/inc/shtabdlg.hxx @@ -28,13 +28,15 @@ class ScShowTabDlg : public ModalDialog { private: - VclFrame* m_pFrame; - ListBox* m_pLb; + VclPtr<VclFrame> m_pFrame; + VclPtr<ListBox> m_pLb; DECL_LINK( DblClkHdl, void * ); public: ScShowTabDlg( vcl::Window* pParent ); + virtual ~ScShowTabDlg(); + virtual void dispose() SAL_OVERRIDE; /** Sets dialog title, fixed text for listbox and help IDs. */ void SetDescription( diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx index a78a9e13ed5a..9a4d66c3a173 100644 --- a/sc/source/ui/inc/simpref.hxx +++ b/sc/source/ui/inc/simpref.hxx @@ -40,12 +40,12 @@ private: Link aAbortedHdl; Link aChangeHdl; - FixedText* m_pFtAssign; - formula::RefEdit* m_pEdAssign; - formula::RefButton* m_pRbAssign; + VclPtr<FixedText> m_pFtAssign; + VclPtr<formula::RefEdit> m_pEdAssign; + VclPtr<formula::RefButton> m_pRbAssign; - OKButton* m_pBtnOk; - CancelButton* m_pBtnCancel; + VclPtr<OKButton> m_pBtnOk; + VclPtr<CancelButton> m_pBtnCancel; ScRange theCurArea; bool bCloseFlag; @@ -66,6 +66,7 @@ protected: public: ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent); virtual ~ScSimpleRefDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx index 770279f0b2ca..95bfac3a44e0 100644 --- a/sc/source/ui/inc/sizedev.hxx +++ b/sc/source/ui/inc/sizedev.hxx @@ -27,17 +27,17 @@ class ScDocShell; class ScSizeDeviceProvider { - OutputDevice* pDevice; - bool bOwner; - double nPPTX; - double nPPTY; - MapMode aOldMapMode; + VclPtr<OutputDevice> pDevice; + bool bOwner; + double nPPTX; + double nPPTY; + MapMode aOldMapMode; public: ScSizeDeviceProvider( ScDocShell* pDocSh ); ~ScSizeDeviceProvider(); - OutputDevice* GetDevice() const { return pDevice; } + OutputDevice* GetDevice() const { return pDevice.get(); } double GetPPTX() const { return nPPTX; } double GetPPTY() const { return nPPTY; } bool IsPrinter() const { return !bOwner; } diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx index eb03c6e61e5f..28e557e08b3f 100644 --- a/sc/source/ui/inc/solveroptions.hxx +++ b/sc/source/ui/inc/solveroptions.hxx @@ -35,9 +35,9 @@ namespace com { namespace sun { namespace star { class ScSolverOptionsDialog : public ModalDialog { - ListBox* m_pLbEngine; - SvxCheckListBox* m_pLbSettings; - PushButton* m_pBtnEdit; + VclPtr<ListBox> m_pLbEngine; + VclPtr<SvxCheckListBox> m_pLbSettings; + VclPtr<PushButton> m_pBtnEdit; SvLBoxButtonData* mpCheckButtonData; com::sun::star::uno::Sequence<OUString> maImplNames; @@ -61,6 +61,7 @@ public: const OUString& rEngine, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties ); virtual ~ScSolverOptionsDialog(); + virtual void dispose() SAL_OVERRIDE; // already updated in selection handler const OUString& GetEngine() const { return maEngine; } @@ -69,11 +70,13 @@ public: class ScSolverIntegerDialog : public ModalDialog { - VclFrame* m_pFrame; - NumericField* m_pNfValue; + VclPtr<VclFrame> m_pFrame; + VclPtr<NumericField> m_pNfValue; public: ScSolverIntegerDialog( vcl::Window * pParent ); + virtual ~ScSolverIntegerDialog(); + virtual void dispose() SAL_OVERRIDE; void SetOptionName( const OUString& rName ); void SetValue( sal_Int32 nValue ); @@ -82,11 +85,13 @@ public: class ScSolverValueDialog : public ModalDialog { - VclFrame* m_pFrame; - Edit* m_pEdValue; + VclPtr<VclFrame> m_pFrame; + VclPtr<Edit> m_pEdValue; public: ScSolverValueDialog( vcl::Window * pParent ); + virtual ~ScSolverValueDialog(); + virtual void dispose() SAL_OVERRIDE; void SetOptionName( const OUString& rName ); void SetValue( double fValue ); diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx index 2799c58975a8..253067a20d95 100644 --- a/sc/source/ui/inc/solvrdlg.hxx +++ b/sc/source/ui/inc/solvrdlg.hxx @@ -42,6 +42,7 @@ public: ScDocument* pDocument, ScAddress aCursorPos ); virtual ~ScSolverDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual bool IsRefInputMode() const SAL_OVERRIDE; @@ -49,18 +50,18 @@ public: virtual bool Close() SAL_OVERRIDE; private: - FixedText* m_pFtFormulaCell; - formula::RefEdit* m_pEdFormulaCell; - formula::RefButton* m_pRBFormulaCell; + VclPtr<FixedText> m_pFtFormulaCell; + VclPtr<formula::RefEdit> m_pEdFormulaCell; + VclPtr<formula::RefButton> m_pRBFormulaCell; - Edit* m_pEdTargetVal; + VclPtr<Edit> m_pEdTargetVal; - FixedText* m_pFtVariableCell; - formula::RefEdit* m_pEdVariableCell; - formula::RefButton* m_pRBVariableCell; + VclPtr<FixedText> m_pFtVariableCell; + VclPtr<formula::RefEdit> m_pEdVariableCell; + VclPtr<formula::RefButton> m_pRBVariableCell; - OKButton* m_pBtnOk; - CancelButton* m_pBtnCancel; + VclPtr<OKButton> m_pBtnOk; + VclPtr<CancelButton> m_pBtnCancel; ScAddress theFormulaCell; ScAddress theVariableCell; @@ -68,7 +69,7 @@ private: ScDocument* pDoc; const SCTAB nCurTab; - formula::RefEdit* pEdActive; + VclPtr<formula::RefEdit> pEdActive; bool bDlgLostFocus; const OUString errMsgInvalidVar; const OUString errMsgInvalidForm; diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx index d627f02623bb..c514aaffd8e9 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -45,11 +45,13 @@ class ScSortWarningDlg : public ModalDialog { public: ScSortWarningDlg( vcl::Window* pParent, const OUString& rExtendText,const OUString& rCurrentText ); + virtual ~ScSortWarningDlg(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( BtnHdl, PushButton* ); private: - FixedText* aFtText; - PushButton* aBtnExtSort; - PushButton* aBtnCurSort; + VclPtr<FixedText> aFtText; + VclPtr<PushButton> aBtnExtSort; + VclPtr<PushButton> aBtnCurSort; }; #endif // INCLUDED_SC_SOURCE_UI_INC_SORTDLG_HXX diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 5c9c1fa833bc..a0a027c0f81d 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -25,11 +25,11 @@ struct ScSortKeyItem : public VclBuilderContainer { - VclFrame* m_pFrame; - FixedText* m_pFlSort; - ListBox* m_pLbSort; - RadioButton* m_pBtnUp; - RadioButton* m_pBtnDown; + VclPtr<VclFrame> m_pFrame; + VclPtr<FixedText> m_pFlSort; + VclPtr<ListBox> m_pLbSort; + VclPtr<RadioButton> m_pBtnUp; + VclPtr<RadioButton> m_pBtnDown; ScSortKeyItem(vcl::Window* pParent); @@ -44,7 +44,7 @@ typedef boost::ptr_vector<ScSortKeyItem> ScSortKeyItems; class ScSortKeyWindow { private: - VclBox* m_pBox; + VclPtr<VclBox> m_pBox; sal_Int32 nItemHeight; ScSortKeyItems& mrSortKeyItems; diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx index 367d32d8811e..1863869203fb 100644 --- a/sc/source/ui/inc/strindlg.hxx +++ b/sc/source/ui/inc/strindlg.hxx @@ -32,15 +32,16 @@ public: const OUString& rEditTitle, const OUString& rDefault, const OString& sHelpId, const OString& sEditHelpId); - + virtual ~ScStringInputDlg(); + virtual void dispose() SAL_OVERRIDE; OUString GetInputString() const { return m_pEdInput->GetText(); } private: - FixedText* m_pFtEditTitle; - Edit* m_pEdInput; + VclPtr<FixedText> m_pFtEditTitle; + VclPtr<Edit> m_pEdInput; }; #endif // INCLUDED_SC_SOURCE_UI_INC_STRINDLG_HXX diff --git a/sc/source/ui/inc/subtdlg.hxx b/sc/source/ui/inc/subtdlg.hxx index 6496689d3a75..749e9d94dfcb 100644 --- a/sc/source/ui/inc/subtdlg.hxx +++ b/sc/source/ui/inc/subtdlg.hxx @@ -28,8 +28,10 @@ class ScSubTotalDlg : public SfxTabDialog { public: ScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet); + virtual ~ScSubTotalDlg(); + virtual void dispose() SAL_OVERRIDE; private: - PushButton* m_pBtnRemove; + VclPtr<PushButton> m_pBtnRemove; DECL_LINK( RemoveHdl, PushButton * ); }; diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx index 40dcca180920..122f112c068b 100644 --- a/sc/source/ui/inc/tabbgcolordlg.hxx +++ b/sc/source/ui/inc/tabbgcolordlg.hxx @@ -33,6 +33,8 @@ public: const OUString& rTabBgColorNoColorText, const Color& rDefaultColor, const OString& nHelpId ); + virtual ~ScTabBgColorDlg(); + virtual void dispose() SAL_OVERRIDE; void GetSelectedColor( Color& rColor ) const; @@ -40,6 +42,9 @@ public: { public: ScTabBgColorValueSet(vcl::Window* pParent, WinBits nStyle); + virtual ~ScTabBgColorValueSet(); + virtual void dispose() SAL_OVERRIDE; + void SetDialog(ScTabBgColorDlg* pTabBgColorDlg) { m_pTabBgColorDlg = pTabBgColorDlg; @@ -47,12 +52,12 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; private: - ScTabBgColorDlg* m_pTabBgColorDlg; + VclPtr<ScTabBgColorDlg> m_pTabBgColorDlg; }; private: - ScTabBgColorValueSet* m_pTabBgColorSet; - OKButton* m_pBtnOk; + VclPtr<ScTabBgColorValueSet> m_pTabBgColorSet; + VclPtr<OKButton> m_pBtnOk; Color m_aTabBgColor; const OUString m_aTabBgColorNoColorText; diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx index a1806c1153c9..33c247f7cfcd 100644 --- a/sc/source/ui/inc/tabopdlg.hxx +++ b/sc/source/ui/inc/tabopdlg.hxx @@ -44,6 +44,7 @@ public: ScDocument* pDocument, const ScRefAddress& rCursorPos ); virtual ~ScTabOpDlg(); + virtual void dispose() SAL_OVERRIDE; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE; virtual bool IsRefInputMode() const SAL_OVERRIDE { return true; } @@ -52,20 +53,20 @@ public: virtual bool Close() SAL_OVERRIDE; private: - FixedText* m_pFtFormulaRange; - formula::RefEdit* m_pEdFormulaRange; - formula::RefButton* m_pRBFormulaRange; + VclPtr<FixedText> m_pFtFormulaRange; + VclPtr<formula::RefEdit> m_pEdFormulaRange; + VclPtr<formula::RefButton> m_pRBFormulaRange; - FixedText* m_pFtRowCell; - formula::RefEdit* m_pEdRowCell; - formula::RefButton* m_pRBRowCell; + VclPtr<FixedText> m_pFtRowCell; + VclPtr<formula::RefEdit> m_pEdRowCell; + VclPtr<formula::RefButton> m_pRBRowCell; - FixedText* m_pFtColCell; - formula::RefEdit* m_pEdColCell; - formula::RefButton* m_pRBColCell; + VclPtr<FixedText> m_pFtColCell; + VclPtr<formula::RefEdit> m_pEdColCell; + VclPtr<formula::RefButton> m_pRBColCell; - OKButton* m_pBtnOk; - CancelButton* m_pBtnCancel; + VclPtr<OKButton> m_pBtnOk; + VclPtr<CancelButton> m_pBtnCancel; ScRefAddress theFormulaCell; ScRefAddress theFormulaEnd; @@ -74,7 +75,7 @@ private: ScDocument* pDoc; const SCTAB nCurTab; - formula::RefEdit* pEdActive; + VclPtr<formula::RefEdit> pEdActive; bool bDlgLostFocus; const OUString errMsgNoFormula; const OUString errMsgNoColRow; diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx index 69f12bd23592..c2f9c38d1e66 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -28,12 +28,15 @@ class ScTabPageProtection : public SfxTabPage { static const sal_uInt16 pProtectionRanges[]; public: - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rAttrSet ); static const sal_uInt16* GetRanges () { return pProtectionRanges; } virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* ) SAL_OVERRIDE; + virtual ~ScTabPageProtection(); + virtual void dispose() SAL_OVERRIDE; + protected: using SfxTabPage::DeactivatePage; virtual sfxpg DeactivatePage ( SfxItemSet* pSet = NULL ) SAL_OVERRIDE; @@ -42,10 +45,10 @@ private: ScTabPageProtection( vcl::Window* pParent, const SfxItemSet& rCoreAttrs ); private: - TriStateBox* m_pBtnHideCell; - TriStateBox* m_pBtnProtect; - TriStateBox* m_pBtnHideFormula; - TriStateBox* m_pBtnHidePrint; + VclPtr<TriStateBox> m_pBtnHideCell; + VclPtr<TriStateBox> m_pBtnProtect; + VclPtr<TriStateBox> m_pBtnHideFormula; + VclPtr<TriStateBox> m_pBtnHidePrint; // current status: bool bTriEnabled; // if before - DontCare bool bDontCare; // all in TriState diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index ddb45e281de8..bb06d01fe813 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -85,7 +85,7 @@ class ScTabView : boost::noncopyable private: enum BlockMode { None = 0, Normal = 1, Own = 2 }; - vcl::Window* pFrameWin; // First !!! + VclPtr<vcl::Window> pFrameWin; // First !!! ScViewData aViewData; // must be at the front ! ScViewSelectionEngine* pSelEngine; @@ -102,23 +102,23 @@ private: FuPoor* pDrawActual; FuPoor* pDrawOld; - ScGridWindow* pGridWin[4]; - ScColBar* pColBar[2]; - ScRowBar* pRowBar[2]; - ScOutlineWindow* pColOutline[2]; - ScOutlineWindow* pRowOutline[2]; - ScTabSplitter* pHSplitter; - ScTabSplitter* pVSplitter; - ScTabControl* pTabControl; - ScrollBar aVScrollTop; - ScrollBar aVScrollBottom; // initially visible - ScrollBar aHScrollLeft; // initially visible - ScrollBar aHScrollRight; - ScCornerButton aCornerButton; - ScCornerButton aTopButton; - ScrollBarBox aScrollBarBox; - - boost::scoped_ptr<ScHintWindow> mpInputHintWindow; // popup window for data validation + VclPtr<ScGridWindow> pGridWin[4]; + VclPtr<ScColBar> pColBar[2]; + VclPtr<ScRowBar> pRowBar[2]; + VclPtr<ScOutlineWindow> pColOutline[2]; + VclPtr<ScOutlineWindow> pRowOutline[2]; + VclPtr<ScTabSplitter> pHSplitter; + VclPtr<ScTabSplitter> pVSplitter; + VclPtr<ScTabControl> pTabControl; + VclPtr<ScrollBar> aVScrollTop; + VclPtr<ScrollBar> aVScrollBottom; // initially visible + VclPtr<ScrollBar> aHScrollLeft; // initially visible + VclPtr<ScrollBar> aHScrollRight; + VclPtr<ScCornerButton> aCornerButton; + VclPtr<ScCornerButton> aTopButton; + VclPtr<ScrollBarBox> aScrollBarBox; + + VclPtr<ScHintWindow> mpInputHintWindow; // popup window for data validation ScPageBreakData* pPageBreakData; std::vector<ScHighlightEntry> maHighlightRanges; @@ -127,7 +127,7 @@ private: SfxItemSet* pDrawBrushSet; // drawing object attributes for paint brush Timer aScrollTimer; - ScGridWindow* pTimerWindow; + VclPtr<ScGridWindow> pTimerWindow; MouseEvent aTimerMEvt; sal_uLong nTipVisible; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 06476e3fe8d2..c06fdf2a44d9 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -348,7 +348,7 @@ public: SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ) SAL_OVERRIDE; virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; - virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; + virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; void ConnectObject( SdrOle2Obj* pObj ); bool ActivateObject( SdrOle2Obj* pObj, long nVerb ); diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx index d8880ad4716f..dda701868ab2 100644 --- a/sc/source/ui/inc/tbinsert.hxx +++ b/sc/source/ui/inc/tbinsert.hxx @@ -36,7 +36,7 @@ public: virtual ~ScTbxInsertCtrl(); 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/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index d2c6cbccaaaf..0768db7dba2f 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -34,7 +34,7 @@ public: virtual ~ScZoomSliderControl(); 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 ScZoomSliderWnd: public vcl::Window @@ -54,6 +54,7 @@ public: ScZoomSliderWnd( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom ); virtual ~ScZoomSliderWnd(); + virtual void dispose() SAL_OVERRIDE; void UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ); protected: diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx index b944ce19a8d3..d7c8a5dec970 100644 --- a/sc/source/ui/inc/textimportoptions.hxx +++ b/sc/source/ui/inc/textimportoptions.hxx @@ -31,7 +31,7 @@ class ScTextImportOptionsDlg : public ModalDialog public: ScTextImportOptionsDlg(vcl::Window* pParent); virtual ~ScTextImportOptionsDlg(); - + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; LanguageType getLanguageType() const; @@ -41,14 +41,14 @@ private: void init(); private: - OKButton* m_pBtnOk; + VclPtr<OKButton> m_pBtnOk; - RadioButton* m_pRbAutomatic; - RadioButton* m_pRbCustom; + VclPtr<RadioButton> m_pRbAutomatic; + VclPtr<RadioButton> m_pRbCustom; - SvxLanguageBox* m_pLbCustomLang; + VclPtr<SvxLanguageBox> m_pLbCustomLang; - CheckBox* m_pBtnConvertDate; + VclPtr<CheckBox> m_pBtnConvertDate; DECL_LINK(OKHdl, void *); diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index 034e49f22e1c..25bd390fed20 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -32,7 +32,7 @@ class ScDocOptions; class ScTpCalcOptions : public SfxTabPage { public: - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rCoreSet ); virtual bool FillItemSet ( SfxItemSet* rCoreSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rCoreSet ) SAL_OVERRIDE; @@ -43,27 +43,28 @@ private: ScTpCalcOptions( vcl::Window* pParent, const SfxItemSet& rCoreSet ); virtual ~ScTpCalcOptions(); + virtual void dispose() SAL_OVERRIDE; private: - CheckBox* m_pBtnIterate; - FixedText* m_pFtSteps; - NumericField* m_pEdSteps; - FixedText* m_pFtEps; - ScDoubleField* m_pEdEps; + VclPtr<CheckBox> m_pBtnIterate; + VclPtr<FixedText> m_pFtSteps; + VclPtr<NumericField> m_pEdSteps; + VclPtr<FixedText> m_pFtEps; + VclPtr<ScDoubleField> m_pEdEps; - RadioButton* m_pBtnDateStd; - RadioButton* m_pBtnDateSc10; - RadioButton* m_pBtnDate1904; + VclPtr<RadioButton> m_pBtnDateStd; + VclPtr<RadioButton> m_pBtnDateSc10; + VclPtr<RadioButton> m_pBtnDate1904; - CheckBox* m_pBtnCase; - CheckBox* m_pBtnCalc; - CheckBox* m_pBtnMatch; - CheckBox* m_pBtnRegex; - CheckBox* m_pBtnLookUp; - CheckBox* m_pBtnGeneralPrec; + VclPtr<CheckBox> m_pBtnCase; + VclPtr<CheckBox> m_pBtnCalc; + VclPtr<CheckBox> m_pBtnMatch; + VclPtr<CheckBox> m_pBtnRegex; + VclPtr<CheckBox> m_pBtnLookUp; + VclPtr<CheckBox> m_pBtnGeneralPrec; - FixedText* m_pFtPrec; - NumericField* m_pEdPrec; + VclPtr<FixedText> m_pFtPrec; + VclPtr<NumericField> m_pEdPrec; ScDocOptions* pOldOptions; ScDocOptions* pLocalOptions; diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx index 5ab6e547ee26..550bd9b0836c 100644 --- a/sc/source/ui/inc/tpcompatibility.hxx +++ b/sc/source/ui/inc/tpcompatibility.hxx @@ -19,18 +19,18 @@ class ScTpCompatOptions : public SfxTabPage public: using SfxTabPage::DeactivatePage; - static SfxTabPage* Create (vcl::Window* pParent, const SfxItemSet* rCoreAttrs); + static VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreAttrs); virtual bool FillItemSet(SfxItemSet* rCoreAttrs) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rCoreAttrs) SAL_OVERRIDE; virtual sfxpg DeactivatePage(SfxItemSet* pSet = NULL) SAL_OVERRIDE; + virtual ~ScTpCompatOptions(); + virtual void dispose() SAL_OVERRIDE; private: explicit ScTpCompatOptions(vcl::Window* pParent, const SfxItemSet& rCoreAttrs); - virtual ~ScTpCompatOptions(); - private: - ListBox* m_pLbKeyBindings; + VclPtr<ListBox> m_pLbKeyBindings; }; #endif diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx index 6580efd1e582..429cbabde87f 100644 --- a/sc/source/ui/inc/tpdefaults.hxx +++ b/sc/source/ui/inc/tpdefaults.hxx @@ -19,7 +19,7 @@ class ScTpDefaultsOptions : public SfxTabPage public: using SfxTabPage::DeactivatePage; - static SfxTabPage* Create (vcl::Window* pParent, const SfxItemSet* rCoreSet); + static VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreSet); virtual bool FillItemSet(SfxItemSet* rCoreSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rCoreSet) SAL_OVERRIDE; @@ -28,6 +28,7 @@ public: private: explicit ScTpDefaultsOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet); virtual ~ScTpDefaultsOptions(); + virtual void dispose() SAL_OVERRIDE; void CheckNumSheets(); void CheckPrefix(Edit* pEdit); @@ -38,8 +39,8 @@ private: DECL_LINK( PrefixEditOnFocusHdl, Edit* ); private: - NumericField* m_pEdNSheets; - Edit* m_pEdSheetPrefix; + VclPtr<NumericField> m_pEdNSheets; + VclPtr<Edit> m_pEdSheetPrefix; // Stores old Sheet Prefix OUString maOldPrefixValue; diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx index cf901f130d4e..7397d062d31d 100644 --- a/sc/source/ui/inc/tpformula.hxx +++ b/sc/source/ui/inc/tpformula.hxx @@ -33,7 +33,7 @@ class ScTpFormulaOptions : public SfxTabPage public: using SfxTabPage::DeactivatePage; - static SfxTabPage* Create (vcl::Window* pParent, const SfxItemSet* rCoreSet); + static VclPtr<SfxTabPage> Create (vcl::Window* pParent, const SfxItemSet* rCoreSet); virtual bool FillItemSet(SfxItemSet* rCoreSet) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rCoreSet ) SAL_OVERRIDE; @@ -42,7 +42,7 @@ public: private: explicit ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& rCoreSet); virtual ~ScTpFormulaOptions(); - + virtual void dispose() SAL_OVERRIDE; void ResetSeparators(); void OnFocusSeparatorInput(Edit* pEdit); void UpdateCustomCalcRadioButtons(bool bDefault); @@ -56,20 +56,20 @@ private: DECL_LINK( SepEditOnFocusHdl, Edit* ); private: - ListBox* mpLbFormulaSyntax; - CheckBox* mpCbEnglishFuncName; + VclPtr<ListBox> mpLbFormulaSyntax; + VclPtr<CheckBox> mpCbEnglishFuncName; - RadioButton* mpBtnCustomCalcDefault; - RadioButton* mpBtnCustomCalcCustom; - PushButton* mpBtnCustomCalcDetails; + VclPtr<RadioButton> mpBtnCustomCalcDefault; + VclPtr<RadioButton> mpBtnCustomCalcCustom; + VclPtr<PushButton> mpBtnCustomCalcDetails; - Edit* mpEdSepFuncArg; - Edit* mpEdSepArrayCol; - Edit* mpEdSepArrayRow; - PushButton* mpBtnSepReset; + VclPtr<Edit> mpEdSepFuncArg; + VclPtr<Edit> mpEdSepArrayCol; + VclPtr<Edit> mpEdSepArrayRow; + VclPtr<PushButton> mpBtnSepReset; - ListBox* mpLbOOXMLRecalcOptions; - ListBox* mpLbODFRecalcOptions; + VclPtr<ListBox> mpLbOOXMLRecalcOptions; + VclPtr<ListBox> mpLbODFRecalcOptions; /** Stores old separator value of currently focused separator edit box. This value is used to revert undesired value change. */ diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx index c16d69b535de..da972cbd44a9 100644 --- a/sc/source/ui/inc/tphf.hxx +++ b/sc/source/ui/inc/tphf.hxx @@ -28,12 +28,13 @@ class ScHFPage : public SvxHFPage { public: virtual ~ScHFPage(); + virtual void dispose() SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; virtual bool FillItemSet( SfxItemSet* rOutSet ) SAL_OVERRIDE; void SetPageStyle( const OUString& rName ) { aStrPageStyle = rName; } - void SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; } + void SetStyleDlg ( ScStyleDlg* pDlg ) { pStyleDlg = pDlg; } protected: ScHFPage( vcl::Window* pParent, @@ -46,11 +47,11 @@ protected: virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; private: - PushButton* m_pBtnEdit; - SfxItemSet aDataSet; - OUString aStrPageStyle; - sal_uInt16 nPageUsage; - const ScStyleDlg* pStyleDlg; + VclPtr<PushButton> m_pBtnEdit; + SfxItemSet aDataSet; + OUString aStrPageStyle; + sal_uInt16 nPageUsage; + VclPtr<ScStyleDlg> pStyleDlg; DECL_LINK(BtnHdl, void *); DECL_LINK( HFEditHdl, void* ); @@ -60,7 +61,7 @@ private: class ScHeaderPage : public ScHFPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); private: @@ -70,7 +71,7 @@ private: class ScFooterPage : public ScHFPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); private: diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index f6c218162537..8a392d1a5b3a 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -55,6 +55,7 @@ class SC_DLLPUBLIC ScEditWindow : public Control public: ScEditWindow( vcl::Window* pParent, WinBits nBits , ScEditWindowLocation eLoc ); virtual ~ScEditWindow(); + virtual void dispose() SAL_OVERRIDE; using Control::SetFont; void SetFont( const ScPatternAttr& rPattern ); diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx index f40137682c75..5b8370f13267 100644 --- a/sc/source/ui/inc/tpprint.hxx +++ b/sc/source/ui/inc/tpprint.hxx @@ -25,15 +25,15 @@ class ScTpPrintOptions : public SfxTabPage { - CheckBox* m_pSkipEmptyPagesCB; - CheckBox* m_pSelectedSheetsCB; - CheckBox* m_pForceBreaksCB; + VclPtr<CheckBox> m_pSkipEmptyPagesCB; + VclPtr<CheckBox> m_pSelectedSheetsCB; + VclPtr<CheckBox> m_pForceBreaksCB; ScTpPrintOptions( vcl::Window* pParent, const SfxItemSet& rCoreSet ); - virtual ~ScTpPrintOptions(); - public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); + virtual ~ScTpPrintOptions(); + virtual void dispose() SAL_OVERRIDE; + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rCoreSet ); virtual bool FillItemSet( SfxItemSet* rCoreSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rCoreSet ) SAL_OVERRIDE; using SfxTabPage::DeactivatePage; diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index d4ad19165103..82ad52ddddff 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -50,8 +50,8 @@ public: ScTabPageSortFields( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTabPageSortFields(); - - static SfxTabPage* Create ( vcl::Window* pParent, + virtual void dispose() SAL_OVERRIDE; + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; @@ -72,7 +72,7 @@ private: OUString aStrRow; const sal_uInt16 nWhichSort; - ScSortDlg* pDlg; + VclPtr<ScSortDlg> pDlg; ScViewData* pViewData; ScSortParam aSortData; std::vector<SCCOLROW> nFieldArr; @@ -109,10 +109,11 @@ public: ScTabPageSortOptions( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTabPageSortOptions(); + virtual void dispose() SAL_OVERRIDE; #undef SfxTabPage #define SfxTabPage ::SfxTabPage - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; @@ -125,24 +126,24 @@ protected: private: - CheckBox* m_pBtnCase; - CheckBox* m_pBtnHeader; - CheckBox* m_pBtnFormats; - CheckBox* m_pBtnNaturalSort; + VclPtr<CheckBox> m_pBtnCase; + VclPtr<CheckBox> m_pBtnHeader; + VclPtr<CheckBox> m_pBtnFormats; + VclPtr<CheckBox> m_pBtnNaturalSort; - CheckBox* m_pBtnCopyResult; - ListBox* m_pLbOutPos; - Edit* m_pEdOutPos; + VclPtr<CheckBox> m_pBtnCopyResult; + VclPtr<ListBox> m_pLbOutPos; + VclPtr<Edit> m_pEdOutPos; - CheckBox* m_pBtnSortUser; - ListBox* m_pLbSortUser; + VclPtr<CheckBox> m_pBtnSortUser; + VclPtr<ListBox> m_pLbSortUser; - SvxLanguageBox* m_pLbLanguage; - FixedText* m_pFtAlgorithm; - ListBox* m_pLbAlgorithm; + VclPtr<SvxLanguageBox> m_pLbLanguage; + VclPtr<FixedText> m_pFtAlgorithm; + VclPtr<ListBox> m_pLbAlgorithm; - RadioButton* m_pBtnTopDown; - RadioButton* m_pBtnLeftRight; + VclPtr<RadioButton> m_pBtnTopDown; + VclPtr<RadioButton> m_pBtnLeftRight; OUString aStrRowLabel; OUString aStrColLabel; @@ -153,7 +154,7 @@ private: ScSortParam aSortData; ScViewData* pViewData; ScDocument* pDoc; - ScSortDlg* pDlg; + VclPtr<ScSortDlg> pDlg; ScAddress theOutPos; CollatorResource* pColRes; diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx index 96f141fdbdd8..a5cbdf7a925e 100644 --- a/sc/source/ui/inc/tpstat.hxx +++ b/sc/source/ui/inc/tpstat.hxx @@ -27,20 +27,20 @@ class ScDocStatPage: public SfxTabPage { public: - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet ); + virtual ~ScDocStatPage(); + virtual void dispose() SAL_OVERRIDE; private: ScDocStatPage( vcl::Window *pParent, const SfxItemSet& rSet ); - virtual ~ScDocStatPage(); - protected: virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rSet ) SAL_OVERRIDE; private: - FixedText* m_pFtTables; - FixedText* m_pFtCells; - FixedText* m_pFtPages; + VclPtr<FixedText> m_pFtTables; + VclPtr<FixedText> m_pFtCells; + VclPtr<FixedText> m_pFtPages; }; #endif diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx index ffff1e061ba3..ecc8e0305483 100644 --- a/sc/source/ui/inc/tpsubt.hxx +++ b/sc/source/ui/inc/tpsubt.hxx @@ -41,15 +41,16 @@ protected: public: virtual ~ScTpSubTotalGroup(); + virtual void dispose() SAL_OVERRIDE; bool DoReset ( sal_uInt16 nGroupNo, const SfxItemSet& rArgSet ); bool DoFillItemSet ( sal_uInt16 nGroupNo, SfxItemSet& rArgSet ); protected: - ListBox* mpLbGroup; - SvxCheckListBox* mpLbColumns; - ListBox* mpLbFunctions; + VclPtr<ListBox> mpLbGroup; + VclPtr<SvxCheckListBox> mpLbColumns; + VclPtr<ListBox> mpLbFunctions; const OUString aStrNone; const OUString aStrColumn; @@ -82,7 +83,7 @@ protected: public: virtual ~ScTpSubTotalGroup1(); - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; @@ -97,7 +98,7 @@ protected: public: virtual ~ScTpSubTotalGroup2(); - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; @@ -112,7 +113,7 @@ protected: public: virtual ~ScTpSubTotalGroup3(); - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; @@ -126,22 +127,22 @@ protected: public: virtual ~ScTpSubTotalOptions(); - - static SfxTabPage* Create ( vcl::Window* pParent, + virtual void dispose() SAL_OVERRIDE; + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; private: - CheckBox* pBtnPagebreak; - CheckBox* pBtnCase; - CheckBox* pBtnSort; - FixedText* pFlSort; - RadioButton* pBtnAscending; - RadioButton* pBtnDescending; - CheckBox* pBtnFormats; - CheckBox* pBtnUserDef; - ListBox* pLbUserDef; + VclPtr<CheckBox> pBtnPagebreak; + VclPtr<CheckBox> pBtnCase; + VclPtr<CheckBox> pBtnSort; + VclPtr<FixedText> pFlSort; + VclPtr<RadioButton> pBtnAscending; + VclPtr<RadioButton> pBtnDescending; + VclPtr<CheckBox> pBtnFormats; + VclPtr<CheckBox> pBtnUserDef; + VclPtr<ListBox> pLbUserDef; ScViewData* pViewData; ScDocument* pDoc; diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx index a1021b3b5911..e135c91ea4ef 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -29,7 +29,7 @@ class ScTablePage : public SfxTabPage { static const sal_uInt16 pPageTableRanges[]; public: - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rCoreSet ); static const sal_uInt16* GetRanges () { return pPageTableRanges; } virtual bool FillItemSet ( SfxItemSet* rCoreSet ) SAL_OVERRIDE; @@ -38,42 +38,42 @@ public: virtual sfxpg DeactivatePage ( SfxItemSet* pSet = NULL ) SAL_OVERRIDE; virtual void DataChanged ( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; + virtual ~ScTablePage(); + virtual void dispose() SAL_OVERRIDE; private: ScTablePage( vcl::Window* pParent, const SfxItemSet& rCoreSet ); - virtual ~ScTablePage(); - void ShowImage(); private: - RadioButton* m_pBtnTopDown; - RadioButton* m_pBtnLeftRight; - FixedImage* m_pBmpPageDir; - CheckBox* m_pBtnPageNo; - NumericField* m_pEdPageNo; + VclPtr<RadioButton> m_pBtnTopDown; + VclPtr<RadioButton> m_pBtnLeftRight; + VclPtr<FixedImage> m_pBmpPageDir; + VclPtr<CheckBox> m_pBtnPageNo; + VclPtr<NumericField> m_pEdPageNo; - CheckBox* m_pBtnHeaders; - CheckBox* m_pBtnGrid; - CheckBox* m_pBtnNotes; - CheckBox* m_pBtnObjects; - CheckBox* m_pBtnCharts; - CheckBox* m_pBtnDrawings; - CheckBox* m_pBtnFormulas; - CheckBox* m_pBtnNullVals; + VclPtr<CheckBox> m_pBtnHeaders; + VclPtr<CheckBox> m_pBtnGrid; + VclPtr<CheckBox> m_pBtnNotes; + VclPtr<CheckBox> m_pBtnObjects; + VclPtr<CheckBox> m_pBtnCharts; + VclPtr<CheckBox> m_pBtnDrawings; + VclPtr<CheckBox> m_pBtnFormulas; + VclPtr<CheckBox> m_pBtnNullVals; - ListBox* m_pLbScaleMode; - VclHBox* m_pBxScaleAll; - MetricField* m_pEdScaleAll; - VclGrid* m_pGrHeightWidth; - NumericField* m_pEdScalePageWidth; - NumericField* m_pEdScalePageHeight; - VclHBox* m_pBxScalePageNum; - NumericField* m_pEdScalePageNum; + VclPtr<ListBox> m_pLbScaleMode; + VclPtr<VclHBox> m_pBxScaleAll; + VclPtr<MetricField> m_pEdScaleAll; + VclPtr<VclGrid> m_pGrHeightWidth; + VclPtr<NumericField> m_pEdScalePageWidth; + VclPtr<NumericField> m_pEdScalePageHeight; + VclPtr<VclHBox> m_pBxScalePageNum; + VclPtr<NumericField> m_pEdScalePageNum; private: // Handler: DECL_LINK(PageDirHdl, void *); - DECL_LINK( PageNoHdl, CheckBox* ); + DECL_LINK( PageNoHdl, CheckBox* ); DECL_LINK(ScaleHdl, void *); }; diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx index c3286a23ad4d..682fc0c3421f 100644 --- a/sc/source/ui/inc/tpusrlst.hxx +++ b/sc/source/ui/inc/tpusrlst.hxx @@ -33,7 +33,7 @@ class ScRangeUtil; class ScTpUserLists : public SfxTabPage { public: - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rCoreAttrs ) SAL_OVERRIDE; @@ -44,24 +44,25 @@ private: ScTpUserLists( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTpUserLists(); + virtual void dispose() SAL_OVERRIDE; private: - FixedText* mpFtLists; - ListBox* mpLbLists; - FixedText* mpFtEntries; - VclMultiLineEdit* mpEdEntries; - FixedText* mpFtCopyFrom; - Edit* mpEdCopyFrom; + VclPtr<FixedText> mpFtLists; + VclPtr<ListBox> mpLbLists; + VclPtr<FixedText> mpFtEntries; + VclPtr<VclMultiLineEdit> mpEdEntries; + VclPtr<FixedText> mpFtCopyFrom; + VclPtr<Edit> mpEdCopyFrom; - PushButton* mpBtnNew; - PushButton* mpBtnDiscard; + VclPtr<PushButton> mpBtnNew; + VclPtr<PushButton> mpBtnDiscard; - PushButton* mpBtnAdd; - PushButton* mpBtnModify; + VclPtr<PushButton> mpBtnAdd; + VclPtr<PushButton> mpBtnModify; - PushButton* mpBtnRemove; + VclPtr<PushButton> mpBtnRemove; - PushButton* mpBtnCopy; + VclPtr<PushButton> mpBtnCopy; const OUString aStrQueryRemove; const OUString aStrCopyList; diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index 28778a16f783..f31c850a5eb7 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -31,31 +31,31 @@ class ScViewOptions; class ScTpContentOptions : public SfxTabPage { - ListBox* pGridLB; - FixedText* pColorFT; - ColorListBox* pColorLB; - CheckBox* pBreakCB; - CheckBox* pGuideLineCB; - - CheckBox* pFormulaCB; - CheckBox* pNilCB; - CheckBox* pAnnotCB; - CheckBox* pValueCB; - CheckBox* pAnchorCB; - CheckBox* pClipMarkCB; - CheckBox* pRangeFindCB; - - ListBox* pObjGrfLB; - ListBox* pDiagramLB; - ListBox* pDrawLB; - - CheckBox* pSyncZoomCB; - - CheckBox* pRowColHeaderCB; - CheckBox* pHScrollCB; - CheckBox* pVScrollCB; - CheckBox* pTblRegCB; - CheckBox* pOutlineCB; + VclPtr<ListBox> pGridLB; + VclPtr<FixedText> pColorFT; + VclPtr<ColorListBox> pColorLB; + VclPtr<CheckBox> pBreakCB; + VclPtr<CheckBox> pGuideLineCB; + + VclPtr<CheckBox> pFormulaCB; + VclPtr<CheckBox> pNilCB; + VclPtr<CheckBox> pAnnotCB; + VclPtr<CheckBox> pValueCB; + VclPtr<CheckBox> pAnchorCB; + VclPtr<CheckBox> pClipMarkCB; + VclPtr<CheckBox> pRangeFindCB; + + VclPtr<ListBox> pObjGrfLB; + VclPtr<ListBox> pDiagramLB; + VclPtr<ListBox> pDrawLB; + + VclPtr<CheckBox> pSyncZoomCB; + + VclPtr<CheckBox> pRowColHeaderCB; + VclPtr<CheckBox> pHScrollCB; + VclPtr<CheckBox> pVScrollCB; + VclPtr<CheckBox> pTblRegCB; + VclPtr<CheckBox> pOutlineCB; ScViewOptions* pLocalOptions; @@ -67,9 +67,10 @@ class ScTpContentOptions : public SfxTabPage ScTpContentOptions( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTpContentOptions(); + virtual void dispose() SAL_OVERRIDE; public: - static SfxTabPage* Create ( vcl::Window* pParent, + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rCoreSet ); virtual bool FillItemSet ( SfxItemSet* rCoreSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rCoreSet ) SAL_OVERRIDE; @@ -83,23 +84,23 @@ public: class ScDocument; class ScTpLayoutOptions : public SfxTabPage { - ListBox* m_pUnitLB; - MetricField* m_pTabMF; - - RadioButton* m_pAlwaysRB; - RadioButton* m_pRequestRB; - RadioButton* m_pNeverRB; - - CheckBox* m_pAlignCB; - ListBox* m_pAlignLB; - CheckBox* m_pEditModeCB; - CheckBox* m_pFormatCB; - CheckBox* m_pExpRefCB; - CheckBox* m_pSortRefUpdateCB; - CheckBox* m_pMarkHdrCB; - CheckBox* m_pTextFmtCB; - CheckBox* m_pReplWarnCB; - CheckBox* m_pLegacyCellSelectionCB; + VclPtr<ListBox> m_pUnitLB; + VclPtr<MetricField> m_pTabMF; + + VclPtr<RadioButton> m_pAlwaysRB; + VclPtr<RadioButton> m_pRequestRB; + VclPtr<RadioButton> m_pNeverRB; + + VclPtr<CheckBox> m_pAlignCB; + VclPtr<ListBox> m_pAlignLB; + VclPtr<CheckBox> m_pEditModeCB; + VclPtr<CheckBox> m_pFormatCB; + VclPtr<CheckBox> m_pExpRefCB; + VclPtr<CheckBox> m_pSortRefUpdateCB; + VclPtr<CheckBox> m_pMarkHdrCB; + VclPtr<CheckBox> m_pTextFmtCB; + VclPtr<CheckBox> m_pReplWarnCB; + VclPtr<CheckBox> m_pLegacyCellSelectionCB; SvxStringArray aUnitArr; @@ -114,10 +115,10 @@ class ScTpLayoutOptions : public SfxTabPage ScTpLayoutOptions( vcl::Window* pParent, const SfxItemSet& rArgSet ); - virtual ~ScTpLayoutOptions(); - public: - static SfxTabPage* Create ( vcl::Window* pParent, + virtual ~ScTpLayoutOptions(); + virtual void dispose() SAL_OVERRIDE; + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rCoreSet ); virtual bool FillItemSet ( SfxItemSet* rCoreSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rCoreSet ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index ebc6d92ffa37..0cf1d9370e1f 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -85,8 +85,9 @@ class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage static const sal_uInt16 pValueRanges[]; public: explicit ScTPValidationValue( vcl::Window* pParent, const SfxItemSet& rArgSet ); - - static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rArgSet ); + virtual ~ScTPValidationValue(); + virtual void dispose() SAL_OVERRIDE; + static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rArgSet ); static const sal_uInt16* GetRanges() { return pValueRanges; } virtual bool FillItemSet( SfxItemSet* rArgSet ) SAL_OVERRIDE; @@ -104,19 +105,19 @@ private: DECL_LINK(SelectHdl, void *); DECL_LINK(CheckHdl, void *); - ListBox* m_pLbAllow; - CheckBox* m_pCbAllow; /// Allow blank cells. - CheckBox* m_pCbShow; /// Show selection list in cell. - CheckBox* m_pCbSort; /// Sort selection list in cell. - FixedText* m_pFtValue; - ListBox* m_pLbValue; - FixedText* m_pFtMin; - VclContainer* m_pMinGrid; - formula::RefEdit* m_pEdMin; - VclMultiLineEdit* m_pEdList; /// Entries for explicit list - FixedText* m_pFtMax; - formula::RefEdit* m_pEdMax; - FixedText* m_pFtHint; /// Hint text for cell range validity. + VclPtr<ListBox> m_pLbAllow; + VclPtr<CheckBox> m_pCbAllow; /// Allow blank cells. + VclPtr<CheckBox> m_pCbShow; /// Show selection list in cell. + VclPtr<CheckBox> m_pCbSort; /// Sort selection list in cell. + VclPtr<FixedText> m_pFtValue; + VclPtr<ListBox> m_pLbValue; + VclPtr<FixedText> m_pFtMin; + VclPtr<VclContainer> m_pMinGrid; + VclPtr<formula::RefEdit> m_pEdMin; + VclPtr<VclMultiLineEdit> m_pEdList; /// Entries for explicit list + VclPtr<FixedText> m_pFtMax; + VclPtr<formula::RefEdit> m_pEdMax; + VclPtr<FixedText> m_pFtHint; /// Hint text for cell range validity. OUString maStrMin; OUString maStrMax; @@ -128,11 +129,11 @@ private: DECL_LINK(EditSetFocusHdl, void *); DECL_LINK( KillFocusHdl, vcl::Window *); void OnClick( Button *pBtn ); - formula::RefEdit* m_pRefEdit; + VclPtr<formula::RefEdit> m_pRefEdit; public: class ScRefButtonEx : public ::formula::RefButton { - ScTPValidationValue* m_pPage; + VclPtr<ScTPValidationValue> m_pPage; virtual void Click() SAL_OVERRIDE; public: ScRefButtonEx(vcl::Window* pParent, WinBits nStyle) @@ -140,6 +141,8 @@ public: , m_pPage(NULL) { } + virtual ~ScRefButtonEx(); + virtual void dispose() SAL_OVERRIDE; void SetParentPage(ScTPValidationValue *pPage) { m_pPage = pPage; @@ -150,8 +153,8 @@ public: } }; private: - ScRefButtonEx* m_pBtnRef; - VclContainer* m_pRefGrid; + VclPtr<ScRefButtonEx> m_pBtnRef; + VclPtr<VclContainer> m_pRefGrid; friend class ScRefButtonEx; void SetReferenceHdl( const ScRange& , ScDocument* ); void SetActiveHdl(); @@ -175,7 +178,7 @@ class ScValidationDlg DECL_LINK( OkHdl, Button * ); ScTabViewShell *m_pTabVwSh; - VclHBox* m_pHBox; + VclPtr<VclHBox> m_pHBox; sal_uInt16 m_nValuePageId; bool m_bOwnRefHdlr:1; bool m_bRefInputting:1; @@ -185,10 +188,13 @@ class ScValidationDlg public: explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL ); - virtual ~ScValidationDlg() + virtual ~ScValidationDlg() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE { if( m_bOwnRefHdlr ) RemoveRefDlg( false ); + m_pHBox.clear(); + ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false>::dispose(); } static ScValidationDlg * Find1AliveObject( vcl::Window *pAncestor ) { @@ -276,9 +282,9 @@ public: class ScTPValidationHelp : public SfxTabPage { private: - TriStateBox* pTsbHelp; - Edit* pEdtTitle; - VclMultiLineEdit* pEdInputHelp; + VclPtr<TriStateBox> pTsbHelp; + VclPtr<Edit> pEdtTitle; + VclPtr<VclMultiLineEdit> pEdInputHelp; void Init(); @@ -288,8 +294,9 @@ private: public: ScTPValidationHelp( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTPValidationHelp(); + virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; }; @@ -297,12 +304,12 @@ public: class ScTPValidationError : public SfxTabPage { private: - TriStateBox* m_pTsbShow; - ListBox* m_pLbAction; - PushButton* m_pBtnSearch; - Edit* m_pEdtTitle; - FixedText* m_pFtError; - VclMultiLineEdit* m_pEdError; + VclPtr<TriStateBox> m_pTsbShow; + VclPtr<ListBox> m_pLbAction; + VclPtr<PushButton> m_pBtnSearch; + VclPtr<Edit> m_pEdtTitle; + VclPtr<FixedText> m_pFtError; + VclPtr<VclMultiLineEdit> m_pEdError; void Init(); @@ -313,8 +320,9 @@ private: public: ScTPValidationError( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTPValidationError(); + virtual void dispose() SAL_OVERRIDE; - static SfxTabPage* Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); + static VclPtr<SfxTabPage> Create ( vcl::Window* pParent, const SfxItemSet* rArgSet ); virtual bool FillItemSet ( SfxItemSet* rArgSet ) SAL_OVERRIDE; virtual void Reset ( const SfxItemSet* rArgSet ) SAL_OVERRIDE; }; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 1c90a1e7a4b3..c768dbcfc393 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -335,7 +335,7 @@ public: DataFormPutData( SCROW nCurrentRow , SCROW nStartRow , SCCOL nStartCol , SCROW nEndRow , SCCOL nEndCol , - boost::ptr_vector<boost::nullable<Edit> >& aEdits, + std::vector<VclPtr<Edit> >& aEdits, sal_uInt16 aColLength ); void UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAttr = NULL ); // Internal helper functions diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx index efabb35b024f..1bc0c375c936 100644 --- a/sc/source/ui/inc/xmlsourcedlg.hxx +++ b/sc/source/ui/inc/xmlsourcedlg.hxx @@ -28,17 +28,17 @@ class ScOrcusXMLContext; class ScXMLSourceDlg : public ScAnyRefDlg { - PushButton* mpBtnSelectSource; - FixedText* mpFtSourceFile; + VclPtr<PushButton> mpBtnSelectSource; + VclPtr<FixedText> mpFtSourceFile; - VclContainer* mpMapGrid; + VclPtr<VclContainer> mpMapGrid; - SvTreeListBox* mpLbTree; - formula::RefEdit* mpRefEdit; - formula::RefButton* mpRefBtn; + VclPtr<SvTreeListBox> mpLbTree; + VclPtr<formula::RefEdit> mpRefEdit; + VclPtr<formula::RefButton> mpRefBtn; - PushButton* mpBtnOk; - CancelButton* mpBtnCancel; + VclPtr<PushButton> mpBtnOk; + VclPtr<CancelButton> mpBtnCancel; OUString maSrcPath; @@ -51,12 +51,14 @@ class ScXMLSourceDlg : public ScAnyRefDlg ScDocument* mpDoc; - formula::RefEdit* mpActiveEdit; + VclPtr<formula::RefEdit> mpActiveEdit; bool mbDlgLostFocus; public: ScXMLSourceDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent, ScDocument* pDoc); + virtual ~ScXMLSourceDlg(); + virtual void dispose() SAL_OVERRIDE; virtual bool IsRefInputMode() const SAL_OVERRIDE; virtual void SetReference(const ScRange& rRange, ScDocument* pDoc) SAL_OVERRIDE; |