summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/inc/ChartModel.hxx2
-rw-r--r--chart2/source/controller/accessibility/AccessibleViewForwarder.hxx3
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.hxx4
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType.cxx3
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx12
-rw-r--r--chart2/source/controller/dialogs/dlg_DataEditor.cxx1
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.cxx10
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx17
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.cxx14
-rw-r--r--chart2/source/controller/dialogs/res_BarGeometry.hxx4
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.hxx38
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.hxx46
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx14
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx10
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx18
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx16
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx15
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx32
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx17
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx34
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.hxx38
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx63
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx6
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx28
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx42
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx12
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.hxx4
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.cxx16
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.hxx14
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx28
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx35
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.hxx66
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.hxx36
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx7
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.hxx14
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx13
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx8
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx8
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx14
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx8
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx54
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx10
-rw-r--r--chart2/source/controller/inc/res_Titles.hxx28
-rw-r--r--chart2/source/controller/main/ChartController.hxx2
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx5
-rw-r--r--chart2/source/controller/main/ChartWindow.hxx2
-rw-r--r--chart2/source/controller/main/ShapeController.cxx12
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx2
-rw-r--r--chart2/source/view/inc/GL3DBarChart.hxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
56 files changed, 632 insertions, 335 deletions
diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx
index 1fe210fc2a43..529d9ed1769a 100644
--- a/chart2/inc/ChartModel.hxx
+++ b/chart2/inc/ChartModel.hxx
@@ -622,7 +622,7 @@ private:
sal_Int32 mnStart;
sal_Int32 mnEnd;
bool bSet;
- OpenGLWindow* mpOpenGLWindow;
+ VclPtr<OpenGLWindow> mpOpenGLWindow;
};
} // namespace chart
diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
index e0b65406b31e..b2d55cb8784f 100644
--- a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
+++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_ACCESSIBILITY_ACCESSIBLEVIEWFORWARDER_HXX
#include <vcl/mapmod.hxx>
+#include <vcl/vclptr.hxx>
#include <svx/IAccessibleViewForwarder.hxx>
namespace vcl { class Window; }
@@ -48,7 +49,7 @@ private:
AccessibleViewForwarder& operator=( AccessibleViewForwarder& ) SAL_DELETED_FUNCTION;
AccessibleChartView* m_pAccChartView;
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
MapMode m_aMapMode;
};
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index 14ce8e13b5da..7ea6c1c4b0c7 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -281,8 +281,8 @@ private:
DECL_LINK( ChangeLineCountHdl, void* );
private:
- FixedText* m_pFT_NumberOfLines;
- NumericField* m_pMF_NumberOfLines;
+ VclPtr<FixedText> m_pFT_NumberOfLines;
+ VclPtr<NumericField> m_pMF_NumberOfLines;
};
class BubbleChartDialogController : public ChartTypeDialogController
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 33cf74763515..44436109dddd 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -60,8 +60,7 @@ ChartTypeDialog::~ChartTypeDialog()
void ChartTypeDialog::dispose()
{
- delete m_pChartTypeTabPage;
- m_pChartTypeTabPage = NULL;
+ m_pChartTypeTabPage.clear();
ModalDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 5a777db94004..66af10a37ccb 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -54,11 +54,7 @@ CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponen
CreationWizardUnoDlg::~CreationWizardUnoDlg()
{
SolarMutexGuard aSolarGuard;
- if( m_pDialog )
- {
- delete m_pDialog;
- m_pDialog = 0;
- }
+ m_pDialog.clear();
}
// lang::XServiceInfo
OUString SAL_CALL CreationWizardUnoDlg::getImplementationName()
@@ -272,11 +268,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing()
m_xParentWindow.clear();
SolarMutexGuard aSolarGuard;
- if( m_pDialog )
- {
- delete m_pDialog;
- m_pDialog = 0;
- }
+ m_pDialog.clear();
try
{
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 02a5578b99a0..5230792f51f2 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -106,6 +106,7 @@ void DataEditor::dispose()
aMiscOptions.RemoveListenerLink( LINK( this, DataEditor, MiscHdl ) );
OSL_TRACE( "DataEditor: DTOR" );
+ m_pTbxData.clear();
ModalDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 88c1a41f64fd..09e55375e734 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -164,16 +164,14 @@ DataSourceDialog::~DataSourceDialog()
void DataSourceDialog::dispose()
{
- delete m_pRangeChooserTabePage;
- m_pRangeChooserTabePage = NULL;
- delete m_pDataSourceTabPage;
- m_pDataSourceTabPage = NULL;
if (m_pTabControl)
{
m_nLastPageId = m_pTabControl->GetCurPageId();
- delete m_pTabControl;
- m_pTabControl = NULL;
}
+ m_pRangeChooserTabePage.clear();
+ m_pDataSourceTabPage.clear();
+ m_pTabControl.clear();
+ m_pBtnOK.clear();
TabDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
index 345a6d79f150..670979af96ee 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
@@ -81,6 +81,23 @@ SchAxisDlg::SchAxisDlg(vcl::Window* pWindow,
m_pCbSecondaryZ->Enable( rInput.aPossibilityList[5] );
}
+SchAxisDlg::~SchAxisDlg()
+{
+ dispose();
+}
+
+void SchAxisDlg::dispose()
+{
+ m_pCbPrimaryX.clear();
+ m_pCbPrimaryY.clear();
+ m_pCbPrimaryZ.clear();
+ m_pCbSecondaryX.clear();
+ m_pCbSecondaryY.clear();
+ m_pCbSecondaryZ.clear();
+ ModalDialog::dispose();
+}
+
+
void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput )
{
rOutput.aExistenceList[0]=m_pCbPrimaryX->IsChecked();
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 3769f2ef91c6..bb28a878bbb3 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -71,14 +71,12 @@ View3DDialog::~View3DDialog()
void View3DDialog::dispose()
{
- delete m_pGeometry;
- m_pGeometry = NULL;
- delete m_pAppearance;
- m_pAppearance = NULL;
- delete m_pIllumination;
- m_pIllumination = NULL;
-
- m_nLastPageId = m_pTabControl->GetCurPageId();
+ if (m_pTabControl)
+ m_nLastPageId = m_pTabControl->GetCurPageId();
+ m_pGeometry.clear();
+ m_pAppearance.clear();
+ m_pIllumination.clear();
+ m_pTabControl.clear();
TabDialog::dispose();
}
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.hxx b/chart2/source/controller/dialogs/res_BarGeometry.hxx
index 60af3af3ccd8..7a9eeb8c17f8 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.hxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.hxx
@@ -41,8 +41,8 @@ public:
void SetSelectHdl( const Link& rLink );
private:
- FixedText* m_pFT_Geometry;
- ListBox* m_pLB_Geometry;
+ VclPtr<FixedText> m_pFT_Geometry;
+ VclPtr<ListBox> m_pLB_Geometry;
};
} //namespace chart
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 9d6d0e01cd90..cfb4758cc29b 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -45,28 +45,28 @@ public:
void SetNumberFormatter( SvNumberFormatter* pFormatter );
private:
- CheckBox* m_pCBNumber;
- PushButton* m_pPB_NumberFormatForValue;
- CheckBox* m_pCBPercent;
- PushButton* m_pPB_NumberFormatForPercent;
- FixedText* m_pFT_NumberFormatForPercent;
- CheckBox* m_pCBCategory;
- CheckBox* m_pCBSymbol;
-
- VclHBox* m_pSeparatorResources;
- ListBox* m_pLB_Separator;
+ VclPtr<CheckBox> m_pCBNumber;
+ VclPtr<PushButton> m_pPB_NumberFormatForValue;
+ VclPtr<CheckBox> m_pCBPercent;
+ VclPtr<PushButton> m_pPB_NumberFormatForPercent;
+ VclPtr<FixedText> m_pFT_NumberFormatForPercent;
+ VclPtr<CheckBox> m_pCBCategory;
+ VclPtr<CheckBox> m_pCBSymbol;
+
+ VclPtr<VclHBox> m_pSeparatorResources;
+ VclPtr<ListBox> m_pLB_Separator;
OUString m_aEntryMap[NUMBER_SEPARATORS];
- VclHBox* m_pBxLabelPlacement;
- ListBox* m_pLB_LabelPlacement;
+ VclPtr<VclHBox> m_pBxLabelPlacement;
+ VclPtr<ListBox> m_pLB_LabelPlacement;
- VclHBox* m_pBxOrientation;
- svx::DialControl* m_pDC_Dial;
- FixedText* m_pFT_Dial;
- NumericField* m_pNF_Degrees;
+ VclPtr<VclHBox> m_pBxOrientation;
+ VclPtr<svx::DialControl> m_pDC_Dial;
+ VclPtr<FixedText> m_pFT_Dial;
+ VclPtr<NumericField> m_pNF_Degrees;
- VclHBox* m_pBxTextDirection;
- TextDirectionListBox* m_pLB_TextDirection;
+ VclPtr<VclHBox> m_pBxTextDirection;
+ VclPtr<TextDirectionListBox> m_pLB_TextDirection;
::std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap;
::std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap;
@@ -82,7 +82,7 @@ private:
bool m_bSourceFormatForValue;
bool m_bSourceFormatForPercent;
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
SfxItemPool* m_pPool;
DECL_LINK(NumberFormatDialogHdl, PushButton * );
diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx
index 0d4be04cdf4d..03c3ebe3bd87 100644
--- a/chart2/source/controller/dialogs/res_Trendline.hxx
+++ b/chart2/source/controller/dialogs/res_Trendline.hxx
@@ -46,29 +46,29 @@ public:
void SetNbPoints( sal_Int32 nNbPoints );
private:
- RadioButton* m_pRB_Linear;
- RadioButton* m_pRB_Logarithmic;
- RadioButton* m_pRB_Exponential;
- RadioButton* m_pRB_Power;
- RadioButton* m_pRB_Polynomial;
- RadioButton* m_pRB_MovingAverage;
-
- FixedImage* m_pFI_Linear;
- FixedImage* m_pFI_Logarithmic;
- FixedImage* m_pFI_Exponential;
- FixedImage* m_pFI_Power;
- FixedImage* m_pFI_Polynomial;
- FixedImage* m_pFI_MovingAverage;
-
- NumericField* m_pNF_Degree;
- NumericField* m_pNF_Period;
- Edit* m_pEE_Name;
- FormattedField* m_pFmtFld_ExtrapolateForward;
- FormattedField* m_pFmtFld_ExtrapolateBackward;
- CheckBox* m_pCB_SetIntercept;
- FormattedField* m_pFmtFld_InterceptValue;
- CheckBox* m_pCB_ShowEquation;
- CheckBox* m_pCB_ShowCorrelationCoeff;
+ VclPtr<RadioButton> m_pRB_Linear;
+ VclPtr<RadioButton> m_pRB_Logarithmic;
+ VclPtr<RadioButton> m_pRB_Exponential;
+ VclPtr<RadioButton> m_pRB_Power;
+ VclPtr<RadioButton> m_pRB_Polynomial;
+ VclPtr<RadioButton> m_pRB_MovingAverage;
+
+ VclPtr<FixedImage> m_pFI_Linear;
+ VclPtr<FixedImage> m_pFI_Logarithmic;
+ VclPtr<FixedImage> m_pFI_Exponential;
+ VclPtr<FixedImage> m_pFI_Power;
+ VclPtr<FixedImage> m_pFI_Polynomial;
+ VclPtr<FixedImage> m_pFI_MovingAverage;
+
+ VclPtr<NumericField> m_pNF_Degree;
+ VclPtr<NumericField> m_pNF_Period;
+ VclPtr<Edit> m_pEE_Name;
+ VclPtr<FormattedField> m_pFmtFld_ExtrapolateForward;
+ VclPtr<FormattedField> m_pFmtFld_ExtrapolateBackward;
+ VclPtr<CheckBox> m_pCB_SetIntercept;
+ VclPtr<FormattedField> m_pFmtFld_InterceptValue;
+ VclPtr<CheckBox> m_pCB_ShowEquation;
+ VclPtr<CheckBox> m_pCB_ShowCorrelationCoeff;
SvxChartRegress m_eTrendLineType;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
index ff20319c8eb9..d25e226fb19d 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx
@@ -120,6 +120,20 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage(
initControlsFromModel();
}
+ThreeD_SceneAppearance_TabPage::~ThreeD_SceneAppearance_TabPage()
+{
+ dispose();
+}
+
+void ThreeD_SceneAppearance_TabPage::dispose()
+{
+ m_pLB_Scheme.clear();
+ m_pCB_Shading.clear();
+ m_pCB_ObjectLines.clear();
+ m_pCB_RoundedEdge.clear();
+ TabPage::dispose();
+}
+
void ThreeD_SceneAppearance_TabPage::ActivatePage()
{
updateScheme();
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
index 23749c9da5d3..80720d031e87 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx
@@ -38,6 +38,8 @@ public:
vcl::Window* pWindow,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel,
ControllerLockHelper & rControllerLockHelper );
+ virtual ~ThreeD_SceneAppearance_TabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void ActivatePage() SAL_OVERRIDE;
@@ -55,11 +57,11 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
m_xChartModel;
- ListBox* m_pLB_Scheme;
+ VclPtr<ListBox> m_pLB_Scheme;
- CheckBox* m_pCB_Shading;
- CheckBox* m_pCB_ObjectLines;
- CheckBox* m_pCB_RoundedEdge;
+ VclPtr<CheckBox> m_pCB_Shading;
+ VclPtr<CheckBox> m_pCB_ObjectLines;
+ VclPtr<CheckBox> m_pCB_RoundedEdge;
bool m_bUpdateOtherControls;
bool m_bCommitToModel;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index 0428b2d892be..b1f4dba975b1 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -147,6 +147,24 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( vcl::Window* pWindow
m_pMFPerspective->SetAccessibleRelationLabeledBy(m_pCbxPerspective);
}
+ThreeD_SceneGeometry_TabPage::~ThreeD_SceneGeometry_TabPage()
+{
+ dispose();
+}
+
+void ThreeD_SceneGeometry_TabPage::dispose()
+{
+ m_pCbxRightAngledAxes.clear();
+ m_pMFXRotation.clear();
+ m_pMFYRotation.clear();
+ m_pFtZRotation.clear();
+ m_pMFZRotation.clear();
+ m_pCbxPerspective.clear();
+ m_pMFPerspective.clear();
+ TabPage::dispose();
+}
+
+
void ThreeD_SceneGeometry_TabPage::commitPendingChanges()
{
ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
index bc19444f6403..cfd16ff23bd6 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
@@ -39,6 +39,8 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & xSceneProperties,
ControllerLockHelper & rControllerLockHelper );
+ virtual ~ThreeD_SceneGeometry_TabPage();
+ virtual void dispose() SAL_OVERRIDE;
// has to be called in case the dialog was closed with OK
void commitPendingChanges();
@@ -63,17 +65,17 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > m_xSceneProperties;
- CheckBox* m_pCbxRightAngledAxes;
+ VclPtr<CheckBox> m_pCbxRightAngledAxes;
- MetricField* m_pMFXRotation;
+ VclPtr<MetricField> m_pMFXRotation;
- MetricField* m_pMFYRotation;
+ VclPtr<MetricField> m_pMFYRotation;
- FixedText* m_pFtZRotation;
- MetricField* m_pMFZRotation;
+ VclPtr<FixedText> m_pFtZRotation;
+ VclPtr<MetricField> m_pMFZRotation;
- CheckBox* m_pCbxPerspective;
- MetricField* m_pMFPerspective;
+ VclPtr<CheckBox> m_pCbxPerspective;
+ VclPtr<MetricField> m_pMFPerspective;
//to keep old values when switching to right angled axes
sal_Int64 m_nXRotation;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 2c92a7521c1f..a4683a5b5cdb 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -78,7 +78,7 @@ struct LightSource
struct LightSourceInfo
{
- LightButton* pButton;
+ VclPtr<LightButton> pButton;
LightSource aLightSource;
LightSourceInfo();
@@ -301,6 +301,19 @@ void ThreeD_SceneIllumination_TabPage::dispose()
{
delete[] m_pLightSourceInfoList;
m_pLightSourceInfoList = NULL;
+ m_pBtn_Light1.clear();
+ m_pBtn_Light2.clear();
+ m_pBtn_Light3.clear();
+ m_pBtn_Light4.clear();
+ m_pBtn_Light5.clear();
+ m_pBtn_Light6.clear();
+ m_pBtn_Light7.clear();
+ m_pBtn_Light8.clear();
+ m_pLB_LightSource.clear();
+ m_pBtn_LightSource_Color.clear();
+ m_pLB_AmbientLight.clear();
+ m_pBtn_AmbientLight_Color.clear();
+ m_pCtl_Preview.clear();
TabPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 06e27ae02650..b7f46f26e964 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -74,22 +74,22 @@ private:
void applyLightSourceToModel( sal_uInt32 nLightNumber );
void applyLightSourcesToModel();
- LightButton* m_pBtn_Light1;
- LightButton* m_pBtn_Light2;
- LightButton* m_pBtn_Light3;
- LightButton* m_pBtn_Light4;
- LightButton* m_pBtn_Light5;
- LightButton* m_pBtn_Light6;
- LightButton* m_pBtn_Light7;
- LightButton* m_pBtn_Light8;
-
- ColorLB* m_pLB_LightSource;
- PushButton* m_pBtn_LightSource_Color;
-
- ColorLB* m_pLB_AmbientLight;
- PushButton* m_pBtn_AmbientLight_Color;
-
- SvxLightCtl3D* m_pCtl_Preview;
+ VclPtr<LightButton> m_pBtn_Light1;
+ VclPtr<LightButton> m_pBtn_Light2;
+ VclPtr<LightButton> m_pBtn_Light3;
+ VclPtr<LightButton> m_pBtn_Light4;
+ VclPtr<LightButton> m_pBtn_Light5;
+ VclPtr<LightButton> m_pBtn_Light6;
+ VclPtr<LightButton> m_pBtn_Light7;
+ VclPtr<LightButton> m_pBtn_Light8;
+
+ VclPtr<ColorLB> m_pLB_LightSource;
+ VclPtr<PushButton> m_pBtn_LightSource_Color;
+
+ VclPtr<ColorLB> m_pLB_AmbientLight;
+ VclPtr<PushButton> m_pBtn_AmbientLight_Color;
+
+ VclPtr<SvxLightCtl3D> m_pCtl_Preview;
LightSourceInfo* m_pLightSourceInfoList;
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 0cded264a300..06d810b47815 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -79,6 +79,23 @@ void SchAxisLabelTabPage::dispose()
{
delete m_pOrientHlp;
m_pOrientHlp = NULL;
+ m_pCbShowDescription.clear();
+ m_pFlOrder.clear();
+ m_pRbSideBySide.clear();
+ m_pRbUpDown.clear();
+ m_pRbDownUp.clear();
+ m_pRbAuto.clear();
+ m_pFlTextFlow.clear();
+ m_pCbTextOverlap.clear();
+ m_pCbTextBreak.clear();
+ m_pFtABCD.clear();
+ m_pFlOrient.clear();
+ m_pCtrlDial.clear();
+ m_pFtRotate.clear();
+ m_pNfRotate.clear();
+ m_pCbStacked.clear();
+ m_pFtTextDirection.clear();
+ m_pLbTextDirection.clear();
SfxTabPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 95474b805941..2f01f32e5ae8 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -35,27 +35,27 @@ namespace chart
class SchAxisLabelTabPage : public SfxTabPage
{
private:
- CheckBox* m_pCbShowDescription;
+ VclPtr<CheckBox> m_pCbShowDescription;
- FixedText* m_pFlOrder;
- RadioButton* m_pRbSideBySide;
- RadioButton* m_pRbUpDown;
- RadioButton* m_pRbDownUp;
- RadioButton* m_pRbAuto;
+ VclPtr<FixedText> m_pFlOrder;
+ VclPtr<RadioButton> m_pRbSideBySide;
+ VclPtr<RadioButton> m_pRbUpDown;
+ VclPtr<RadioButton> m_pRbDownUp;
+ VclPtr<RadioButton> m_pRbAuto;
- FixedText* m_pFlTextFlow;
- CheckBox* m_pCbTextOverlap;
- CheckBox* m_pCbTextBreak;
- FixedText* m_pFtABCD;
- FixedText* m_pFlOrient;
- svx::DialControl* m_pCtrlDial;
- FixedText* m_pFtRotate;
- NumericField* m_pNfRotate;
- TriStateBox* m_pCbStacked;
+ VclPtr<FixedText> m_pFlTextFlow;
+ VclPtr<CheckBox> m_pCbTextOverlap;
+ VclPtr<CheckBox> m_pCbTextBreak;
+ VclPtr<FixedText> m_pFtABCD;
+ VclPtr<FixedText> m_pFlOrient;
+ VclPtr<svx::DialControl> m_pCtrlDial;
+ VclPtr<FixedText> m_pFtRotate;
+ VclPtr<NumericField> m_pNfRotate;
+ VclPtr<TriStateBox> m_pCbStacked;
svx::OrientationHelper* m_pOrientHlp;
- FixedText* m_pFtTextDirection;
- TextDirectionListBox* m_pLbTextDirection;
+ VclPtr<FixedText> m_pFtTextDirection;
+ VclPtr<TextDirectionListBox> m_pLbTextDirection;
bool m_bShowStaggeringControls;
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 9bcb6e8e2938..0d33af228b69 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -84,6 +84,30 @@ AxisPositionsTabPage::AxisPositionsTabPage(vcl::Window* pWindow,const SfxItemSet
m_pLB_PlaceTicks->SetDropDownLineCount( m_pLB_PlaceTicks->GetEntryCount() );
}
+AxisPositionsTabPage::~AxisPositionsTabPage()
+{
+ dispose();
+}
+
+void AxisPositionsTabPage::dispose()
+{
+ m_pFL_AxisLine.clear();
+ m_pLB_CrossesAt.clear();
+ m_pED_CrossesAt.clear();
+ m_pED_CrossesAtCategory.clear();
+ m_pCB_AxisBetweenCategories.clear();
+ m_pFL_Labels.clear();
+ m_pLB_PlaceLabels.clear();
+ m_pED_LabelDistance.clear();
+ m_pCB_TicksInner.clear();
+ m_pCB_TicksOuter.clear();
+ m_pCB_MinorInner.clear();
+ m_pCB_MinorOuter.clear();
+ m_pBxPlaceTicks.clear();
+ m_pLB_PlaceTicks.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* AxisPositionsTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs)
{
return new AxisPositionsTabPage(pWindow, *rOutAttrs);
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
index 3dfeecd8f3ff..ee73d5240366 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx
@@ -33,6 +33,8 @@ class AxisPositionsTabPage : public SfxTabPage
{
public:
AxisPositionsTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~AxisPositionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
@@ -52,30 +54,30 @@ private: //methods:
DECL_LINK( PlaceLabelsSelectHdl, void* );
private: //member:
- VclFrame* m_pFL_AxisLine;
- ListBox* m_pLB_CrossesAt;
- FormattedField* m_pED_CrossesAt;
- ComboBox* m_pED_CrossesAtCategory;
- CheckBox* m_pCB_AxisBetweenCategories;
+ VclPtr<VclFrame> m_pFL_AxisLine;
+ VclPtr<ListBox> m_pLB_CrossesAt;
+ VclPtr<FormattedField> m_pED_CrossesAt;
+ VclPtr<ComboBox> m_pED_CrossesAtCategory;
+ VclPtr<CheckBox> m_pCB_AxisBetweenCategories;
- VclFrame* m_pFL_Labels;
- ListBox* m_pLB_PlaceLabels;
- FormattedField* m_pED_LabelDistance;
+ VclPtr<VclFrame> m_pFL_Labels;
+ VclPtr<ListBox> m_pLB_PlaceLabels;
+ VclPtr<FormattedField> m_pED_LabelDistance;
- CheckBox* m_pCB_TicksInner;
- CheckBox* m_pCB_TicksOuter;
+ VclPtr<CheckBox> m_pCB_TicksInner;
+ VclPtr<CheckBox> m_pCB_TicksOuter;
- CheckBox* m_pCB_MinorInner;
- CheckBox* m_pCB_MinorOuter;
+ VclPtr<CheckBox> m_pCB_MinorInner;
+ VclPtr<CheckBox> m_pCB_MinorOuter;
- VclBox* m_pBxPlaceTicks;
- ListBox* m_pLB_PlaceTicks;
+ VclPtr<VclBox> m_pBxPlaceTicks;
+ VclPtr<ListBox> m_pLB_PlaceTicks;
// Not implemented
-// CheckBox* m_pCB_MajorGrid;
-// PushButton* m_pPB_MajorGrid;
-// CheckBox* m_pCB_MinorGrid;
-// PushButton* m_pPB_MinorGrid;
+// VclPtr<CheckBox> m_pCB_MajorGrid;
+// VclPtr<PushButton> m_pPB_MajorGrid;
+// VclPtr<CheckBox> m_pCB_MinorGrid;
+// VclPtr<PushButton> m_pPB_MinorGrid;
SvNumberFormatter* m_pNumFormatter;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index c7179039ae66..7618ef79adb0 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -56,8 +56,8 @@ private:
DECL_LINK( SelectSchemeHdl, void* );
private:
- CheckBox* m_pCB_3DLook;
- ListBox* m_pLB_Scheme;
+ VclPtr<CheckBox> m_pCB_3DLook;
+ VclPtr<ListBox> m_pLB_Scheme;
};
Dim3DLookResourceGroup::Dim3DLookResourceGroup(VclBuilderContainer* pWindow)
@@ -129,7 +129,7 @@ private:
DECL_LINK( SortByXValuesCheckHdl, void* );
private:
- CheckBox* m_pCB_XValueSorting;
+ VclPtr<CheckBox> m_pCB_XValueSorting;
};
SortByXValuesResourceGroup::SortByXValuesResourceGroup(VclBuilderContainer* pWindow )
@@ -176,10 +176,10 @@ private:
DECL_LINK( StackingEnableHdl, void* );
private:
- CheckBox* m_pCB_Stacked;
- RadioButton* m_pRB_Stack_Y;
- RadioButton* m_pRB_Stack_Y_Percent;
- RadioButton* m_pRB_Stack_Z;
+ VclPtr<CheckBox> m_pCB_Stacked;
+ VclPtr<RadioButton> m_pRB_Stack_Y;
+ VclPtr<RadioButton> m_pRB_Stack_Y_Percent;
+ VclPtr<RadioButton> m_pRB_Stack_Z;
bool m_bShowDeepStacking;
};
@@ -278,7 +278,7 @@ public:
private:
DECL_LINK( SettingChangedHdl, void* );
private:
- CheckBox* m_pCB_RoundedEdge;
+ VclPtr<CheckBox> m_pCB_RoundedEdge;
};
GL3DResourceGroup::GL3DResourceGroup( VclBuilderContainer* pWindow )
@@ -313,6 +313,8 @@ class SplinePropertiesDialog : public ModalDialog
{
public:
SplinePropertiesDialog( vcl::Window* pParent );
+ virtual ~SplinePropertiesDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
void fillControls( const ChartTypeParameter& rParameter );
void fillParameter( ChartTypeParameter& rParameter, bool bSmoothLines );
@@ -323,11 +325,11 @@ private:
DECL_LINK( SplineTypeListBoxHdl, void* );
private:
- ListBox* m_pLB_Spline_Type;
+ VclPtr<ListBox> m_pLB_Spline_Type;
- NumericField* m_pMF_SplineResolution;
- FixedText* m_pFT_SplineOrder;
- NumericField* m_pMF_SplineOrder;
+ VclPtr<NumericField> m_pMF_SplineResolution;
+ VclPtr<FixedText> m_pFT_SplineOrder;
+ VclPtr<NumericField> m_pMF_SplineOrder;
};
const sal_uInt16 CUBIC_SPLINE_POS = 0;
@@ -346,6 +348,15 @@ SplinePropertiesDialog::SplinePropertiesDialog( vcl::Window* pParent )
m_pLB_Spline_Type->SetSelectHdl( LINK (this, SplinePropertiesDialog, SplineTypeListBoxHdl ) );
}
+void SplinePropertiesDialog::dispose()
+{
+ m_pLB_Spline_Type.clear();
+ m_pMF_SplineResolution.clear();
+ m_pFT_SplineOrder.clear();
+ m_pMF_SplineOrder.clear();
+ ModalDialog::dispose();
+}
+
void SplinePropertiesDialog::StateChanged( StateChangedType nType )
{
Dialog::StateChanged( nType );
@@ -395,6 +406,8 @@ class SteppedPropertiesDialog : public ModalDialog
{
public:
SteppedPropertiesDialog( vcl::Window* pParent );
+ virtual ~SteppedPropertiesDialog() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
void fillControls( const ChartTypeParameter& rParameter );
void fillParameter( ChartTypeParameter& rParameter, bool bSteppedLines );
@@ -404,10 +417,10 @@ public:
private:
private:
- RadioButton* m_pRB_Start;
- RadioButton* m_pRB_End;
- RadioButton* m_pRB_CenterX;
- RadioButton* m_pRB_CenterY;
+ VclPtr<RadioButton> m_pRB_Start;
+ VclPtr<RadioButton> m_pRB_End;
+ VclPtr<RadioButton> m_pRB_CenterX;
+ VclPtr<RadioButton> m_pRB_CenterY;
};
SteppedPropertiesDialog::SteppedPropertiesDialog( vcl::Window* pParent )
@@ -421,6 +434,15 @@ SteppedPropertiesDialog::SteppedPropertiesDialog( vcl::Window* pParent )
SetText(SCH_RESSTR(STR_DLG_STEPPED_LINE_PROPERTIES));
}
+void SteppedPropertiesDialog::dispose()
+{
+ m_pRB_Start.clear();
+ m_pRB_End.clear();
+ m_pRB_CenterX.clear();
+ m_pRB_CenterY.clear();
+ ModalDialog::dispose();
+}
+
void SteppedPropertiesDialog::StateChanged( StateChangedType nType )
{
Dialog::StateChanged( nType );
@@ -480,9 +502,9 @@ private:
SteppedPropertiesDialog& getSteppedPropertiesDialog();
private:
- FixedText* m_pFT_LineType;
- ListBox* m_pLB_LineType;
- PushButton* m_pPB_DetailsDialog;
+ VclPtr<FixedText> m_pFT_LineType;
+ VclPtr<ListBox> m_pLB_LineType;
+ VclPtr<PushButton> m_pPB_DetailsDialog;
boost::scoped_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog;
boost::scoped_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog;
};
@@ -791,6 +813,9 @@ void ChartTypeTabPage::dispose()
m_pSortByXValuesResourceGroup = NULL;
delete m_pGL3DResourceGroup;
m_pGL3DResourceGroup = NULL;
+ m_pFT_ChooseType.clear();
+ m_pMainTypeList.clear();
+ m_pSubTypeList.clear();
svt::OWizardPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index a8cb43c97703..4ed830b10535 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -78,9 +78,9 @@ protected:
DECL_LINK( SelectSubTypeHdl, void* );
protected:
- FixedText* m_pFT_ChooseType;
- ListBox* m_pMainTypeList;
- ValueSet* m_pSubTypeList;
+ VclPtr<FixedText> m_pFT_ChooseType;
+ VclPtr<ListBox> m_pMainTypeList;
+ VclPtr<ValueSet> m_pSubTypeList;
Dim3DLookResourceGroup* m_pDim3DLookResourceGroup;
StackingResourceGroup* m_pStackingResourceGroup;
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 0aec36a88576..f59465a4460c 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -273,6 +273,34 @@ DataSourceTabPage::DataSourceTabPage(
m_pBTN_DOWN->SetAccessibleName(SCH_RESSTR(STR_BUTTON_DOWN));
}
+DataSourceTabPage::~DataSourceTabPage()
+{
+ dispose();
+}
+
+void DataSourceTabPage::dispose()
+{
+ m_pFT_CAPTION.clear();
+ m_pFT_SERIES.clear();
+ m_pLB_SERIES.clear();
+ m_pBTN_ADD.clear();
+ m_pBTN_REMOVE.clear();
+ m_pBTN_UP.clear();
+ m_pBTN_DOWN.clear();
+ m_pFT_ROLE.clear();
+ m_pLB_ROLE.clear();
+ m_pFT_RANGE.clear();
+ m_pEDT_RANGE.clear();
+ m_pIMB_RANGE_MAIN.clear();
+ m_pFT_CATEGORIES.clear();
+ m_pFT_DATALABELS.clear();
+ m_pEDT_CATEGORIES.clear();
+ m_pIMB_RANGE_CAT.clear();
+ m_pCurrentRangeChoosingField.clear();
+ m_pParentDialog.clear();
+ ::svt::OWizardPage::dispose();
+}
+
void DataSourceTabPage::ActivatePage()
{
OWizardPage::ActivatePage();
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index b1ad81353d9e..59b92bf840c3 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -58,6 +58,8 @@ public:
ChartTypeTemplateProvider* pTemplateProvider,
Dialog * pParentDialog,
bool bHideDescription = false );
+ virtual ~DataSourceTabPage();
+ virtual void dispose() SAL_OVERRIDE;
void commitPage();
@@ -117,34 +119,34 @@ protected:
void fillRoleListBox();
private:
- FixedText* m_pFT_CAPTION;
- FixedText* m_pFT_SERIES;
- SvTreeListBox* m_pLB_SERIES;
- PushButton* m_pBTN_ADD;
- PushButton* m_pBTN_REMOVE;
- PushButton* m_pBTN_UP;
- PushButton* m_pBTN_DOWN;
-
- FixedText* m_pFT_ROLE;
- SvTabListBox* m_pLB_ROLE;
- FixedText* m_pFT_RANGE;
- Edit* m_pEDT_RANGE;
- PushButton* m_pIMB_RANGE_MAIN;
-
- FixedText* m_pFT_CATEGORIES;
- FixedText* m_pFT_DATALABELS;//used for xy charts
- Edit* m_pEDT_CATEGORIES;
- PushButton* m_pIMB_RANGE_CAT;
+ VclPtr<FixedText> m_pFT_CAPTION;
+ VclPtr<FixedText> m_pFT_SERIES;
+ VclPtr<SvTreeListBox> m_pLB_SERIES;
+ VclPtr<PushButton> m_pBTN_ADD;
+ VclPtr<PushButton> m_pBTN_REMOVE;
+ VclPtr<PushButton> m_pBTN_UP;
+ VclPtr<PushButton> m_pBTN_DOWN;
+
+ VclPtr<FixedText> m_pFT_ROLE;
+ VclPtr<SvTabListBox> m_pLB_ROLE;
+ VclPtr<FixedText> m_pFT_RANGE;
+ VclPtr<Edit> m_pEDT_RANGE;
+ VclPtr<PushButton> m_pIMB_RANGE_MAIN;
+
+ VclPtr<FixedText> m_pFT_CATEGORIES;
+ VclPtr<FixedText> m_pFT_DATALABELS;//used for xy charts
+ VclPtr<Edit> m_pEDT_CATEGORIES;
+ VclPtr<PushButton> m_pIMB_RANGE_CAT;
OUString m_aFixedTextRange;
ChartTypeTemplateProvider * m_pTemplateProvider;
DialogModel & m_rDialogModel;
- Edit * m_pCurrentRangeChoosingField;
+ VclPtr<Edit> m_pCurrentRangeChoosingField;
bool m_bIsDirty;
sal_Int32 m_nLastChartTypeGroupIndex;
- Dialog * m_pParentDialog;
+ VclPtr<Dialog> m_pParentDialog;
TabPageNotifiable * m_pTabPageNotifiable;
};
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index 707324fb8610..31aef92a297f 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -41,6 +41,18 @@ SchLegendPosTabPage::SchLegendPosTabPage(vcl::Window* pWindow, const SfxItemSet&
m_pLbTextDirection->SetDropDownLineCount(3);
}
+SchLegendPosTabPage::~SchLegendPosTabPage()
+{
+ dispose();
+}
+
+void SchLegendPosTabPage::dispose()
+{
+ m_pLbTextDirection.clear();
+ SfxTabPage::dispose();
+}
+
+
SfxTabPage* SchLegendPosTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs)
{
return new SchLegendPosTabPage(pWindow, *rOutAttrs);
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
index 0d4f4acf0d07..bbf8e1d54f2b 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx
@@ -33,10 +33,12 @@ class SchLegendPosTabPage : public SfxTabPage
private:
LegendPositionResources m_aLegendPositionResources;
- TextDirectionListBox* m_pLbTextDirection;
+ VclPtr<TextDirectionListBox> m_pLbTextDirection;
public:
SchLegendPosTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs);
+ virtual ~SchLegendPosTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index ff9db6088675..00fc6fe96a62 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -44,6 +44,22 @@ PolarOptionsTabPage::PolarOptionsTabPage( vcl::Window* pWindow,const SfxItemSet&
m_pAngleDial->SetLinkedField( m_pNF_StartingAngle );
}
+PolarOptionsTabPage::~PolarOptionsTabPage()
+{
+ dispose();
+}
+
+void PolarOptionsTabPage::dispose()
+{
+ m_pCB_Clockwise.clear();
+ m_pFL_StartingAngle.clear();
+ m_pAngleDial.clear();
+ m_pNF_StartingAngle.clear();
+ m_pFL_PlotOptions.clear();
+ m_pCB_IncludeHiddenCells.clear();
+ SfxTabPage::dispose();
+}
+
SfxTabPage* PolarOptionsTabPage::Create( vcl::Window* pWindow,const SfxItemSet* rOutAttrs )
{
return new PolarOptionsTabPage( pWindow, *rOutAttrs );
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
index 4ade72189cf4..29e672857bb1 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
@@ -33,18 +33,20 @@ class PolarOptionsTabPage : public SfxTabPage
public:
PolarOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~PolarOptionsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE;
private:
- CheckBox* m_pCB_Clockwise;
- VclFrame* m_pFL_StartingAngle;
- svx::DialControl* m_pAngleDial;
- NumericField* m_pNF_StartingAngle;
- VclFrame* m_pFL_PlotOptions;
- CheckBox* m_pCB_IncludeHiddenCells;
+ VclPtr<CheckBox> m_pCB_Clockwise;
+ VclPtr<VclFrame> m_pFL_StartingAngle;
+ VclPtr<svx::DialControl> m_pAngleDial;
+ VclPtr<NumericField> m_pNF_StartingAngle;
+ VclPtr<VclFrame> m_pFL_PlotOptions;
+ VclPtr<CheckBox> m_pCB_IncludeHiddenCells;
};
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 108aac0c77a8..700c3e04556f 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -122,6 +122,30 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent
m_pEd_TimeEnd->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
}
+RangeChooserTabPage::~RangeChooserTabPage()
+{
+ dispose();
+}
+
+void RangeChooserTabPage::dispose()
+{
+ m_pFT_Caption.clear();
+ m_pFT_Range.clear();
+ m_pED_Range.clear();
+ m_pIB_Range.clear();
+ m_pRB_Rows.clear();
+ m_pRB_Columns.clear();
+ m_pCB_FirstRowAsLabel.clear();
+ m_pCB_FirstColumnAsLabel.clear();
+ m_pFTTitle.clear();
+ m_pCB_TimeBased.clear();
+ m_pEd_TimeStart.clear();
+ m_pEd_TimeEnd.clear();
+ m_pParentDialog.clear();
+ OWizardPage::dispose();
+}
+
+
void RangeChooserTabPage::ActivatePage()
{
OWizardPage::ActivatePage();
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index f7a0791fd6ff..5bcda3593f8b 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -48,6 +48,8 @@ public:
, ChartTypeTemplateProvider* pTemplateProvider
, Dialog * pParentDialog
, bool bHideDescription = false );
+ virtual ~RangeChooserTabPage();
+ virtual void dispose() SAL_OVERRIDE;
//RangeSelectionListenerParent
virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE;
@@ -75,21 +77,21 @@ protected: //methods
protected: //member
- FixedText* m_pFT_Caption;
- FixedText* m_pFT_Range;
- Edit* m_pED_Range;
- PushButton* m_pIB_Range;
+ VclPtr<FixedText> m_pFT_Caption;
+ VclPtr<FixedText> m_pFT_Range;
+ VclPtr<Edit> m_pED_Range;
+ VclPtr<PushButton> m_pIB_Range;
- RadioButton* m_pRB_Rows;
- RadioButton* m_pRB_Columns;
+ VclPtr<RadioButton> m_pRB_Rows;
+ VclPtr<RadioButton> m_pRB_Columns;
- CheckBox* m_pCB_FirstRowAsLabel;
- CheckBox* m_pCB_FirstColumnAsLabel;
- FixedText* m_pFTTitle;
+ VclPtr<CheckBox> m_pCB_FirstRowAsLabel;
+ VclPtr<CheckBox> m_pCB_FirstColumnAsLabel;
+ VclPtr<FixedText> m_pFTTitle;
- CheckBox* m_pCB_TimeBased;
- Edit* m_pEd_TimeStart;
- Edit* m_pEd_TimeEnd;
+ VclPtr<CheckBox> m_pCB_TimeBased;
+ VclPtr<Edit> m_pEd_TimeStart;
+ VclPtr<Edit> m_pEd_TimeEnd;
sal_Int32 m_nChangingControlCalls;
bool m_bIsDirty;
@@ -105,7 +107,7 @@ protected: //member
ChartTypeTemplateProvider* m_pTemplateProvider;
DialogModel & m_rDialogModel;
- Dialog * m_pParentDialog;
+ VclPtr<Dialog> m_pParentDialog;
TabPageNotifiable * m_pTabPageNotifiable;
};
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index bb92e78c095d..9db6bda24daf 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -122,6 +122,41 @@ ScaleTabPage::ScaleTabPage(vcl::Window* pWindow,const SfxItemSet& rInAttrs) :
HideAllControls();
}
+ScaleTabPage::~ScaleTabPage()
+{
+ dispose();
+}
+
+void ScaleTabPage::dispose()
+{
+ m_pCbxReverse.clear();
+ m_pCbxLogarithm.clear();
+ m_pBxType.clear();
+ m_pLB_AxisType.clear();
+ m_pBxMinMax.clear();
+ m_pFmtFldMin.clear();
+ m_pCbxAutoMin.clear();
+ m_pFmtFldMax.clear();
+ m_pCbxAutoMax.clear();
+ m_pBxResolution.clear();
+ m_pLB_TimeResolution.clear();
+ m_pCbx_AutoTimeResolution.clear();
+ m_pTxtMain.clear();
+ m_pFmtFldStepMain.clear();
+ m_pMt_MainDateStep.clear();
+ m_pLB_MainTimeUnit.clear();
+ m_pCbxAutoStepMain.clear();
+ m_pTxtHelpCount.clear();
+ m_pTxtHelp.clear();
+ m_pMtStepHelp.clear();
+ m_pLB_HelpTimeUnit.clear();
+ m_pCbxAutoStepHelp.clear();
+ m_pFmtFldOrigin.clear();
+ m_pCbxAutoOrigin.clear();
+ m_pBxOrigin.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField*, pFmtFied )
{
if( pFmtFied )
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index ff8bbe7e9d1b..529641da2a6e 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -33,6 +33,8 @@ class ScaleTabPage : public SfxTabPage
{
public:
ScaleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ virtual ~ScaleTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs );
virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE;
@@ -48,38 +50,38 @@ public:
virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE;
private:
- CheckBox* m_pCbxReverse;
- CheckBox* m_pCbxLogarithm;
-
- VclBox* m_pBxType;
- ListBox* m_pLB_AxisType;
-
- VclGrid* m_pBxMinMax;
- FormattedField* m_pFmtFldMin;
- CheckBox* m_pCbxAutoMin;
-
- FormattedField* m_pFmtFldMax;
- CheckBox* m_pCbxAutoMax;
-
- VclBox* m_pBxResolution;
- ListBox* m_pLB_TimeResolution;
- CheckBox* m_pCbx_AutoTimeResolution;
-
- FixedText* m_pTxtMain;
- FormattedField* m_pFmtFldStepMain;
- MetricField* m_pMt_MainDateStep;
- ListBox* m_pLB_MainTimeUnit;
- CheckBox* m_pCbxAutoStepMain;
-
- FixedText* m_pTxtHelpCount;
- FixedText* m_pTxtHelp;
- MetricField* m_pMtStepHelp;
- ListBox* m_pLB_HelpTimeUnit;
- CheckBox* m_pCbxAutoStepHelp;
-
- FormattedField* m_pFmtFldOrigin;
- CheckBox* m_pCbxAutoOrigin;
- VclBox* m_pBxOrigin;
+ VclPtr<CheckBox> m_pCbxReverse;
+ VclPtr<CheckBox> m_pCbxLogarithm;
+
+ VclPtr<VclBox> m_pBxType;
+ VclPtr<ListBox> m_pLB_AxisType;
+
+ VclPtr<VclGrid> m_pBxMinMax;
+ VclPtr<FormattedField> m_pFmtFldMin;
+ VclPtr<CheckBox> m_pCbxAutoMin;
+
+ VclPtr<FormattedField> m_pFmtFldMax;
+ VclPtr<CheckBox> m_pCbxAutoMax;
+
+ VclPtr<VclBox> m_pBxResolution;
+ VclPtr<ListBox> m_pLB_TimeResolution;
+ VclPtr<CheckBox> m_pCbx_AutoTimeResolution;
+
+ VclPtr<FixedText> m_pTxtMain;
+ VclPtr<FormattedField> m_pFmtFldStepMain;
+ VclPtr<MetricField> m_pMt_MainDateStep;
+ VclPtr<ListBox> m_pLB_MainTimeUnit;
+ VclPtr<CheckBox> m_pCbxAutoStepMain;
+
+ VclPtr<FixedText> m_pTxtHelpCount;
+ VclPtr<FixedText> m_pTxtHelp;
+ VclPtr<MetricField> m_pMtStepHelp;
+ VclPtr<ListBox> m_pLB_HelpTimeUnit;
+ VclPtr<CheckBox> m_pCbxAutoStepHelp;
+
+ VclPtr<FormattedField> m_pFmtFldOrigin;
+ VclPtr<CheckBox> m_pCbxAutoOrigin;
+ VclPtr<VclBox> m_pBxOrigin;
double fMin;
double fMax;
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 4f4a986df57a..0a5b50485d71 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -63,6 +63,30 @@ SchOptionTabPage::SchOptionTabPage(vcl::Window* pWindow,const SfxItemSet& rInAtt
m_pRbtAxis2->SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl ));
}
+SchOptionTabPage::~SchOptionTabPage()
+{
+ dispose();
+}
+
+void SchOptionTabPage::dispose()
+{
+ m_pGrpAxis.clear();
+ m_pRbtAxis1.clear();
+ m_pRbtAxis2.clear();
+ m_pGrpBar.clear();
+ m_pMTGap.clear();
+ m_pMTOverlap.clear();
+ m_pCBConnect.clear();
+ m_pCBAxisSideBySide.clear();
+ m_pGrpPlotOptions.clear();
+ m_pGridPlotOptions.clear();
+ m_pRB_DontPaint.clear();
+ m_pRB_AssumeZero.clear();
+ m_pRB_ContinueLine.clear();
+ m_pCBIncludeHiddenCells.clear();
+ SfxTabPage::dispose();
+}
+
IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl)
{
if( m_nAllSeriesAxisIndex == 0 )
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
index f11c8e5ea24a..b50f90fff4fe 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
@@ -31,6 +31,8 @@ class SchOptionTabPage : public SfxTabPage
{
public:
SchOptionTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs);
+ virtual ~SchOptionTabPage();
+ virtual void dispose() SAL_OVERRIDE;
static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs);
virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE;
@@ -42,23 +44,23 @@ private: //methods
void AdaptControlPositionsAndVisibility();
private: //member
- VclFrame* m_pGrpAxis;
- RadioButton* m_pRbtAxis1;
- RadioButton* m_pRbtAxis2;
-
- VclFrame* m_pGrpBar;
- MetricField* m_pMTGap;
- MetricField* m_pMTOverlap;
- CheckBox* m_pCBConnect;
- CheckBox* m_pCBAxisSideBySide;
-
- VclFrame* m_pGrpPlotOptions;
- VclGrid* m_pGridPlotOptions;
- RadioButton* m_pRB_DontPaint;
- RadioButton* m_pRB_AssumeZero;
- RadioButton* m_pRB_ContinueLine;
-
- CheckBox* m_pCBIncludeHiddenCells;
+ VclPtr<VclFrame> m_pGrpAxis;
+ VclPtr<RadioButton> m_pRbtAxis1;
+ VclPtr<RadioButton> m_pRbtAxis2;
+
+ VclPtr<VclFrame> m_pGrpBar;
+ VclPtr<MetricField> m_pMTGap;
+ VclPtr<MetricField> m_pMTOverlap;
+ VclPtr<CheckBox> m_pCBConnect;
+ VclPtr<CheckBox> m_pCBAxisSideBySide;
+
+ VclPtr<VclGrid> m_pGrpPlotOptions;
+ VclPtr<VclGrid> m_pGridPlotOptions;
+ VclPtr<RadioButton> m_pRB_DontPaint;
+ VclPtr<RadioButton> m_pRB_AssumeZero;
+ VclPtr<RadioButton> m_pRB_ContinueLine;
+
+ VclPtr<CheckBox> m_pCBIncludeHiddenCells;
DECL_LINK(EnableHdl, void * );
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index a83373dcbc8b..c69eb46a482b 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -64,6 +64,13 @@ void SchAlignmentTabPage::dispose()
{
delete m_pOrientHlp;
m_pOrientHlp = NULL;
+ m_pCtrlDial.clear();
+ m_pFtRotate.clear();
+ m_pNfRotate.clear();
+ m_pCbStacked.clear();
+ m_pFtTextDirection.clear();
+ m_pLbTextDirection.clear();
+ m_pFtABCD.clear();
SfxTabPage::dispose();
}
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
index e5d2e240a153..8450d6a4a202 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx
@@ -31,14 +31,14 @@ namespace chart
class SchAlignmentTabPage : public SfxTabPage
{
private:
- svx::DialControl* m_pCtrlDial;
- FixedText* m_pFtRotate;
- NumericField* m_pNfRotate;
- TriStateBox* m_pCbStacked;
+ VclPtr<svx::DialControl> m_pCtrlDial;
+ VclPtr<FixedText> m_pFtRotate;
+ VclPtr<NumericField> m_pNfRotate;
+ VclPtr<TriStateBox> m_pCbStacked;
svx::OrientationHelper* m_pOrientHlp;
- FixedText* m_pFtTextDirection;
- TextDirectionListBox* m_pLbTextDirection;
- FixedText* m_pFtABCD;
+ VclPtr<FixedText> m_pFtTextDirection;
+ VclPtr<TextDirectionListBox> m_pLbTextDirection;
+ VclPtr<FixedText> m_pFtABCD;
public:
SchAlignmentTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bWithRotation = true);
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 90088b0b66ae..23986e1f2690 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -57,6 +57,19 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage( svt::OWizardMachine* pParent
m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
}
+TitlesAndObjectsTabPage::~TitlesAndObjectsTabPage()
+{
+ dispose();
+}
+
+void TitlesAndObjectsTabPage::dispose()
+{
+ m_pCB_Grid_X.clear();
+ m_pCB_Grid_Y.clear();
+ m_pCB_Grid_Z.clear();
+ OWizardPage::dispose();
+}
+
void TitlesAndObjectsTabPage::initializePage()
{
m_bCommitToModel = false;
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index 26e2cb2aebae..520453ce0452 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -44,6 +44,8 @@ public:
::com::sun::star::chart2::XChartDocument >& xChartModel
, const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& xContext );
+ virtual ~TitlesAndObjectsTabPage();
+ virtual void dispose() SAL_OVERRIDE;
virtual void initializePage() SAL_OVERRIDE;
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) SAL_OVERRIDE;
@@ -57,9 +59,9 @@ protected:
boost::scoped_ptr< TitleResources > m_xTitleResources;
boost::scoped_ptr< LegendPositionResources > m_xLegendPositionResources;
- CheckBox* m_pCB_Grid_X;
- CheckBox* m_pCB_Grid_Y;
- CheckBox* m_pCB_Grid_Z;
+ VclPtr<CheckBox> m_pCB_Grid_X;
+ VclPtr<CheckBox> m_pCB_Grid_Y;
+ VclPtr<CheckBox> m_pCB_Grid_Z;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartModel;
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
index 008ba07b3310..d8fecf56782e 100644
--- a/chart2/source/controller/inc/dlg_ChartType.hxx
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -41,7 +41,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ChartTypeTabPage* m_pChartTypeTabPage;
+ VclPtr<ChartTypeTabPage> m_pChartTypeTabPage;
::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel > m_xChartModel;
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
index ce4f638dd442..a71d86aaf3ac 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -119,7 +119,7 @@ private:
com::sun::star::uno::Reference<
com::sun::star::awt::XWindow > m_xParentWindow;
- CreationWizard* m_pDialog;
+ VclPtr<CreationWizard> m_pDialog;
bool m_bUnlockControllersOnExecute;
};
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index 4432674fe6be..cff3f4fbbdc0 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -67,7 +67,7 @@ private:
bool m_bReadOnly;
boost::scoped_ptr<DataBrowser> m_xBrwData;
- ToolBox* m_pTbxData;
+ VclPtr<ToolBox> m_pTbxData;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > m_xChartDoc;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index 5c6a60d72c36..bc3d22da9c8b 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -68,11 +68,11 @@ protected:
::std::unique_ptr< DialogModel > m_apDialogModel;
private:
- DataSourceTabControl* m_pTabControl;
- OKButton* m_pBtnOK;
+ VclPtr<DataSourceTabControl> m_pTabControl;
+ VclPtr<OKButton> m_pBtnOK;
- RangeChooserTabPage * m_pRangeChooserTabePage;
- DataSourceTabPage * m_pDataSourceTabPage;
+ VclPtr<RangeChooserTabPage> m_pRangeChooserTabePage;
+ VclPtr<DataSourceTabPage> m_pDataSourceTabPage;
bool m_bRangeChooserTabIsValid;
bool m_bDataSourceTabIsValid;
diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
index 960edffe422d..1ec0829f4eac 100644
--- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -43,15 +43,17 @@ struct InsertAxisOrGridDialogData
class SchAxisDlg : public ModalDialog
{
protected:
- CheckBox* m_pCbPrimaryX;
- CheckBox* m_pCbPrimaryY;
- CheckBox* m_pCbPrimaryZ;
- CheckBox* m_pCbSecondaryX;
- CheckBox* m_pCbSecondaryY;
- CheckBox* m_pCbSecondaryZ;
+ VclPtr<CheckBox> m_pCbPrimaryX;
+ VclPtr<CheckBox> m_pCbPrimaryY;
+ VclPtr<CheckBox> m_pCbPrimaryZ;
+ VclPtr<CheckBox> m_pCbSecondaryX;
+ VclPtr<CheckBox> m_pCbSecondaryY;
+ VclPtr<CheckBox> m_pCbSecondaryZ;
public:
SchAxisDlg(vcl::Window* pParent, const InsertAxisOrGridDialogData& rInput, bool bAxisDlg=true);
+ virtual ~SchAxisDlg();
+ virtual void dispose() SAL_OVERRIDE;
void getResult( InsertAxisOrGridDialogData& rOutput );
};
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
index 64228fe8ea85..0ef93e8d1fea 100644
--- a/chart2/source/controller/inc/dlg_View3D.hxx
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -47,11 +47,11 @@ public:
virtual short Execute() SAL_OVERRIDE;
private:
- TabControl* m_pTabControl;
+ VclPtr<TabControl> m_pTabControl;
- ThreeD_SceneGeometry_TabPage* m_pGeometry;
- ThreeD_SceneAppearance_TabPage* m_pAppearance;
- ThreeD_SceneIllumination_TabPage* m_pIllumination;
+ VclPtr<ThreeD_SceneGeometry_TabPage> m_pGeometry;
+ VclPtr<ThreeD_SceneAppearance_TabPage> m_pAppearance;
+ VclPtr<ThreeD_SceneIllumination_TabPage> m_pIllumination;
ControllerLockHelper m_aControllerLocker;
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 0ad485c39990..85917809db48 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -67,36 +67,36 @@ public:
private:
// category
- RadioButton* m_pRbNone;
- RadioButton* m_pRbConst;
- RadioButton* m_pRbPercent;
- RadioButton* m_pRbFunction;
- RadioButton* m_pRbRange;
- ListBox* m_pLbFunction;
+ VclPtr<RadioButton> m_pRbNone;
+ VclPtr<RadioButton> m_pRbConst;
+ VclPtr<RadioButton> m_pRbPercent;
+ VclPtr<RadioButton> m_pRbFunction;
+ VclPtr<RadioButton> m_pRbRange;
+ VclPtr<ListBox> m_pLbFunction;
// parameters
- VclFrame* m_pFlParameters;
- VclBox* m_pBxPositive;
- MetricField* m_pMfPositive;
- Edit* m_pEdRangePositive;
- PushButton* m_pIbRangePositive;
- VclBox* m_pBxNegative;
- MetricField* m_pMfNegative;
- Edit* m_pEdRangeNegative;
- PushButton* m_pIbRangeNegative;
- CheckBox* m_pCbSyncPosNeg;
+ VclPtr<VclFrame> m_pFlParameters;
+ VclPtr<VclBox> m_pBxPositive;
+ VclPtr<MetricField> m_pMfPositive;
+ VclPtr<Edit> m_pEdRangePositive;
+ VclPtr<PushButton> m_pIbRangePositive;
+ VclPtr<VclBox> m_pBxNegative;
+ VclPtr<MetricField> m_pMfNegative;
+ VclPtr<Edit> m_pEdRangeNegative;
+ VclPtr<PushButton> m_pIbRangeNegative;
+ VclPtr<CheckBox> m_pCbSyncPosNeg;
// indicator
- RadioButton* m_pRbBoth;
- RadioButton* m_pRbPositive;
- RadioButton* m_pRbNegative;
- FixedImage* m_pFiBoth;
- FixedImage* m_pFiPositive;
- FixedImage* m_pFiNegative;
+ VclPtr<RadioButton> m_pRbBoth;
+ VclPtr<RadioButton> m_pRbPositive;
+ VclPtr<RadioButton> m_pRbNegative;
+ VclPtr<FixedImage> m_pFiBoth;
+ VclPtr<FixedImage> m_pFiPositive;
+ VclPtr<FixedImage> m_pFiNegative;
- FixedText* m_pUIStringPos;
- FixedText* m_pUIStringNeg;
- FixedText* m_pUIStringRbRange;
+ VclPtr<FixedText> m_pUIStringPos;
+ VclPtr<FixedText> m_pUIStringNeg;
+ VclPtr<FixedText> m_pUIStringRbRange;
SvxChartKindError m_eErrorKind;
SvxChartIndicate m_eIndicate;
@@ -116,9 +116,9 @@ private:
double m_fPlusValue;
double m_fMinusValue;
- Dialog * m_pParentDialog;
+ VclPtr<Dialog> m_pParentDialog;
boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
- Edit * m_pCurrentRangeChoosingField;
+ VclPtr<Edit> m_pCurrentRangeChoosingField;
bool m_bHasInternalDataProvider;
bool m_bEnableDataTableDialog;
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index c8292db200af..7801895a6308 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -60,12 +60,12 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext> m_xCC;
- CheckBox* m_pCbxShow;
+ VclPtr<CheckBox> m_pCbxShow;
- RadioButton* m_pRbtLeft;
- RadioButton* m_pRbtRight;
- RadioButton* m_pRbtTop;
- RadioButton* m_pRbtBottom;
+ VclPtr<RadioButton> m_pRbtLeft;
+ VclPtr<RadioButton> m_pRbtRight;
+ VclPtr<RadioButton> m_pRbtTop;
+ VclPtr<RadioButton> m_pRbtBottom;
Link m_aChangeLink;
};
diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx
index 1e4e8c67cd91..396c87af598f 100644
--- a/chart2/source/controller/inc/res_Titles.hxx
+++ b/chart2/source/controller/inc/res_Titles.hxx
@@ -40,22 +40,22 @@ public:
void ClearModifyFlag();
private:
- FixedText* m_pFT_Main;
- FixedText* m_pFT_Sub;
- Edit* m_pEd_Main;
- Edit* m_pEd_Sub;
+ VclPtr<FixedText> m_pFT_Main;
+ VclPtr<FixedText> m_pFT_Sub;
+ VclPtr<Edit> m_pEd_Main;
+ VclPtr<Edit> m_pEd_Sub;
- FixedText* m_pFT_XAxis;
- FixedText* m_pFT_YAxis;
- FixedText* m_pFT_ZAxis;
- Edit* m_pEd_XAxis;
- Edit* m_pEd_YAxis;
- Edit* m_pEd_ZAxis;
+ VclPtr<FixedText> m_pFT_XAxis;
+ VclPtr<FixedText> m_pFT_YAxis;
+ VclPtr<FixedText> m_pFT_ZAxis;
+ VclPtr<Edit> m_pEd_XAxis;
+ VclPtr<Edit> m_pEd_YAxis;
+ VclPtr<Edit> m_pEd_ZAxis;
- FixedText* m_pFT_SecondaryXAxis;
- FixedText* m_pFT_SecondaryYAxis;
- Edit* m_pEd_SecondaryXAxis;
- Edit* m_pEd_SecondaryYAxis;
+ VclPtr<FixedText> m_pFT_SecondaryXAxis;
+ VclPtr<FixedText> m_pFT_SecondaryYAxis;
+ VclPtr<Edit> m_pEd_SecondaryXAxis;
+ VclPtr<Edit> m_pEd_SecondaryYAxis;
};
} //namespace chart
diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx
index 81382eadaab1..827e549c8e6b 100644
--- a/chart2/source/controller/main/ChartController.hxx
+++ b/chart2/source/controller/main/ChartController.hxx
@@ -508,7 +508,7 @@ private:
TheModelRef m_aModel;
//view
- ChartWindow* m_pChartWindow;
+ VclPtr<ChartWindow> m_pChartWindow;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xViewWindow;
::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > m_xChartView;
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 4a37ec38e583..d5275e1a0808 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -64,7 +64,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi
{
m_pOpenGLWindow->Show();
uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(pController->getModel(), uno::UNO_QUERY_THROW);
- sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow);
+ sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow.get());
x3DWindowProvider->setWindow(nWindowPtr);
x3DWindowProvider->update();
}
@@ -83,8 +83,7 @@ void ChartWindow::dispose()
x3DWindowProvider->setWindow(0);
x3DWindowProvider->update();
}
- delete m_pOpenGLWindow;
- m_pOpenGLWindow = NULL;
+ m_pOpenGLWindow.clear();
vcl::Window::dispose();
}
diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx
index 73be579f6d6d..cd0afaa07d0a 100644
--- a/chart2/source/controller/main/ChartWindow.hxx
+++ b/chart2/source/controller/main/ChartWindow.hxx
@@ -68,7 +68,7 @@ public:
private:
ChartController* m_pWindowController;
bool m_bInPaint;
- OpenGLWindow* m_pOpenGLWindow;
+ VclPtr<OpenGLWindow> m_pOpenGLWindow;
void adjustHighContrastMode();
};
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 52b5f1f6d4e4..afea41029282 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -252,7 +252,7 @@ void ShapeController::executeDispatch_FormatLine()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
@@ -292,7 +292,7 @@ void ShapeController::executeDispatch_FormatArea()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
@@ -335,7 +335,7 @@ void ShapeController::executeDispatch_TextAttributes()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawViewWrapper )
{
@@ -372,7 +372,7 @@ void ShapeController::executeDispatch_TransformDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawViewWrapper )
{
@@ -541,7 +541,7 @@ void ShapeController::executeDispatch_FontDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawModelWrapper && pDrawViewWrapper )
@@ -564,7 +564,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow );
+ vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pParent && pDrawViewWrapper )
{
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 6b778138309c..3fe29b0d7c0b 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -1487,7 +1487,7 @@ IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl)
void GL3DBarChart::setOpenGLWindow(OpenGLWindow* pWindow)
{
- if (mpWindow != pWindow)
+ if (mpWindow.get() != pWindow)
{
mpWindow = pWindow;
Size aSize = mpWindow->GetSizePixel();
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx
index c68a38510d66..eaff13a4ed93 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -124,7 +124,7 @@ private:
boost::ptr_vector<opengl3D::Renderable3DObject> maShapes;
boost::scoped_ptr<opengl3D::OpenGL3DRenderer> mpRenderer;
- OpenGLWindow* mpWindow;
+ VclPtr<OpenGLWindow> mpWindow;
opengl3D::Camera* mpCamera;
bool mbValidContext;
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index b9a1e37f348e..9ac3ad84d253 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1090,7 +1090,7 @@ public:
private:
ChartView* mpView;
bool mbContextDestroyed;
- OpenGLWindow* mpWindow;
+ VclPtr<OpenGLWindow> mpWindow;
};
GL2DRenderer::GL2DRenderer(ChartView* pView):