diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-20 20:29:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 09:54:18 +0200 |
commit | a37e559ed123789f6bc8f7972242d6461ce692ab (patch) | |
tree | 7c6304b4541335b2bb706efda58b882132fe3819 /chart2 | |
parent | b3f249c1351642be6f2774230ff80a6d20bd1401 (diff) |
disinherit OWizardPage and SfxTabPage from vcl TabPage
Now that there's no need to support weld/unwelded mixes of
pages in dialog any more.
inherit from a BuilderPage which contains a Builder and
Toplevel container
BuilderPage Activate and Deactivate replace TabPage ActivatePage and
DeactivatePage, allowing disambiguation wrt SfxTabPage ActivatePage and
DeactivatePage.
Change-Id: I5706e50fd92f712a25328ee9791e054bb9ad9812
Reviewed-on: https://gerrit.libreoffice.org/79317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
37 files changed, 114 insertions, 189 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index 8848bc2787c4..cde483390e73 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -34,18 +34,17 @@ ChartTypeDialog::ChartTypeDialog(weld::Window* pParent, , m_xContentArea(m_xDialog->weld_content_area()) { TabPageParent aParent(m_xContentArea.get(), this); - m_xChartTypeTabPage = VclPtr<ChartTypeTabPage>::Create( + m_xChartTypeTabPage = std::make_unique<ChartTypeTabPage>( aParent, uno::Reference<XChartDocument>::query(m_xChartModel), false/*don't show title description*/); m_xChartTypeTabPage->initializePage(); - m_xChartTypeTabPage->Show(); - } +} ChartTypeDialog::~ChartTypeDialog() { - m_xChartTypeTabPage.disposeAndClear(); + m_xChartTypeTabPage.reset(); } } //namespace chart diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index adf1a52cdb70..228bcdbadba6 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -84,9 +84,9 @@ CreationWizard::CreationWizard(weld::Window* pParent, const uno::Reference<frame CreationWizard::~CreationWizard() = default; -VclPtr<TabPage> CreationWizard::createPage(WizardState nState) +std::unique_ptr<BuilderPage> CreationWizard::createPage(WizardState nState) { - VclPtr<vcl::OWizardPage> pRet; + std::unique_ptr<vcl::OWizardPage> xRet; OString sIdent(OString::number(nState)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); @@ -95,42 +95,41 @@ VclPtr<TabPage> CreationWizard::createPage(WizardState nState) switch( nState ) { - case STATE_CHARTTYPE: + case STATE_CHARTTYPE: { - m_aTimerTriggeredControllerLock.startTimer(); - VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(aParent, m_xChartModel); - pRet = pChartTypeTabPage; - m_pTemplateProvider = pChartTypeTabPage; - if (m_pDialogModel) - m_pDialogModel->setTemplate( m_pTemplateProvider->getCurrentTemplate()); + m_aTimerTriggeredControllerLock.startTimer(); + xRet = std::make_unique<ChartTypeTabPage>(aParent, m_xChartModel); + m_pTemplateProvider = static_cast<ChartTypeTabPage*>(xRet.get()); + if (m_pDialogModel) + m_pDialogModel->setTemplate( m_pTemplateProvider->getCurrentTemplate()); + break; } - break; - case STATE_SIMPLE_RANGE: + case STATE_SIMPLE_RANGE: { - m_aTimerTriggeredControllerLock.startTimer(); - pRet = VclPtr<RangeChooserTabPage>::Create(aParent, *m_pDialogModel, m_pTemplateProvider, this); + m_aTimerTriggeredControllerLock.startTimer(); + xRet = std::make_unique<RangeChooserTabPage>(aParent, *m_pDialogModel, m_pTemplateProvider, this); + break; } - break; - case STATE_DATA_SERIES: + case STATE_DATA_SERIES: { - m_aTimerTriggeredControllerLock.startTimer(); - pRet = VclPtr<DataSourceTabPage>::Create(aParent, *m_pDialogModel, m_pTemplateProvider, this); + m_aTimerTriggeredControllerLock.startTimer(); + xRet = std::make_unique<DataSourceTabPage>(aParent, *m_pDialogModel, m_pTemplateProvider, this); + break; } - break; - case STATE_OBJECTS: + case STATE_OBJECTS: { - pRet = VclPtr<TitlesAndObjectsTabPage>::Create(aParent, m_xChartModel, m_xComponentContext); - m_aTimerTriggeredControllerLock.startTimer(); + xRet = std::make_unique<TitlesAndObjectsTabPage>(aParent, m_xChartModel, m_xComponentContext); + m_aTimerTriggeredControllerLock.startTimer(); + break; } - break; - default: - break; + default: + break; } - if (pRet) - pRet->SetText(OUString()); //remove title of pages to not get them in the wizard title + if (xRet) + xRet->SetPageTitle(OUString()); //remove title of pages to not get them in the wizard title - return pRet; + return xRet; } bool CreationWizard::leaveState( WizardState /*_nState*/ ) @@ -159,12 +158,12 @@ void CreationWizard::enterState(WizardState nState) vcl::RoadmapWizardMachine::enterState(nState); } -void CreationWizard::setInvalidPage( TabPage * /* pTabPage */ ) +void CreationWizard::setInvalidPage( BuilderPage * /* pTabPage */ ) { m_bCanTravel = false; } -void CreationWizard::setValidPage( TabPage * /* pTabPage */ ) +void CreationWizard::setValidPage( BuilderPage * /* pTabPage */ ) { m_bCanTravel = true; } diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index 4bd826466bff..bb377bdbaa11 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -82,8 +82,6 @@ DataSourceDialog::DataSourceDialog(weld::Window * pParent, "DataRangeDialog") , m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument)) , m_apDialogModel(new DialogModel(xChartDocument, xContext)) - , m_pRangeChooserTabPage(nullptr) - , m_pDataSourceTabPage(nullptr) , m_bRangeChooserTabIsValid(true) , m_bDataSourceTabIsValid(true) , m_bTogglingEnabled(true) @@ -91,10 +89,10 @@ DataSourceDialog::DataSourceDialog(weld::Window * pParent, , m_xBtnOK(m_xBuilder->weld_button("ok")) { TabPageParent aRangeParent(m_xTabControl->get_page("range"), this); - m_pRangeChooserTabPage = VclPtr<RangeChooserTabPage>::Create(aRangeParent, *(m_apDialogModel.get()), + m_xRangeChooserTabPage = std::make_unique<RangeChooserTabPage>(aRangeParent, *(m_apDialogModel.get()), m_apDocTemplateProvider.get(), true /* bHideDescription */ ); TabPageParent aSeriesParent(m_xTabControl->get_page("series"), this); - m_pDataSourceTabPage = VclPtr<DataSourceTabPage>::Create(aSeriesParent, *(m_apDialogModel.get()), + m_xDataSourceTabPage = std::make_unique<DataSourceTabPage>(aSeriesParent, *(m_apDialogModel.get()), m_apDocTemplateProvider.get(), true /* bHideDescription */ ); m_xTabControl->connect_enter_page(LINK(this, DataSourceDialog, ActivatePageHdl)); m_xTabControl->connect_leave_page(LINK(this, DataSourceDialog, DeactivatePageHdl)); @@ -108,8 +106,8 @@ DataSourceDialog::DataSourceDialog(weld::Window * pParent, DataSourceDialog::~DataSourceDialog() { - m_pRangeChooserTabPage.disposeAndClear(); - m_pDataSourceTabPage.disposeAndClear(); + m_xRangeChooserTabPage.reset(); + m_xDataSourceTabPage.reset(); m_nLastPageId = m_xTabControl->get_current_page(); } @@ -118,10 +116,10 @@ short DataSourceDialog::run() short nResult = GenericDialogController::run(); if( nResult == RET_OK ) { - if( m_pRangeChooserTabPage ) - m_pRangeChooserTabPage->commitPage(); - if( m_pDataSourceTabPage ) - m_pDataSourceTabPage->commitPage(); + if( m_xRangeChooserTabPage ) + m_xRangeChooserTabPage->commitPage(); + if( m_xDataSourceTabPage ) + m_xDataSourceTabPage->commitPage(); } return nResult; } @@ -129,9 +127,9 @@ short DataSourceDialog::run() IMPL_LINK(DataSourceDialog, ActivatePageHdl, const OString&, rPage, void) { if (rPage == "range") - m_pRangeChooserTabPage->ActivatePage(); + m_xRangeChooserTabPage->Activate(); else if (rPage == "series") - m_pDataSourceTabPage->ActivatePage(); + m_xDataSourceTabPage->Activate(); } // allow/disallow user to leave page @@ -150,11 +148,11 @@ void DataSourceDialog::EnableTabToggling() m_bTogglingEnabled = true; } -void DataSourceDialog::setInvalidPage( TabPage * pTabPage ) +void DataSourceDialog::setInvalidPage(BuilderPage* pTabPage) { - if (pTabPage == m_pRangeChooserTabPage) + if (pTabPage == m_xRangeChooserTabPage.get()) m_bRangeChooserTabIsValid = false; - else if (pTabPage == m_pDataSourceTabPage) + else if (pTabPage == m_xDataSourceTabPage.get()) m_bDataSourceTabIsValid = false; if (!(m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid)) @@ -171,11 +169,11 @@ void DataSourceDialog::setInvalidPage( TabPage * pTabPage ) } } -void DataSourceDialog::setValidPage( TabPage * pTabPage ) +void DataSourceDialog::setValidPage(BuilderPage* pTabPage) { - if( pTabPage == m_pRangeChooserTabPage ) + if( pTabPage == m_xRangeChooserTabPage.get() ) m_bRangeChooserTabIsValid = true; - else if( pTabPage == m_pDataSourceTabPage ) + else if( pTabPage == m_xDataSourceTabPage.get() ) m_bDataSourceTabIsValid = true; if (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid) diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx index 49bdc304610a..9be881594068 100644 --- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx +++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx @@ -37,9 +37,9 @@ NumberFormatDialog::NumberFormatDialog(weld::Window* pParent, SfxItemSet& rSet) if (fnCreatePage) { TabPageParent pPageParent(get_content_area(), this); - VclPtr<SfxTabPage> xTabPage = (*fnCreatePage)(pPageParent, &rSet); + std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(pPageParent, &rSet); xTabPage->PageCreated(rSet); - SetTabPage(xTabPage); + SetTabPage(std::move(xTabPage)); } } diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 36062526cdd4..2edb5a56e447 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -69,19 +69,13 @@ SchAxisLabelTabPage::SchAxisLabelTabPage(TabPageParent pParent, const SfxItemSet SchAxisLabelTabPage::~SchAxisLabelTabPage() { - disposeOnce(); -} - -void SchAxisLabelTabPage::dispose() -{ m_xCtrlDial.reset(); m_xLbTextDirection.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> SchAxisLabelTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrs) +std::unique_ptr<SfxTabPage> SchAxisLabelTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrs) { - return VclPtr<SchAxisLabelTabPage>::Create(pParent, *rAttrs); + return std::make_unique<SchAxisLabelTabPage>(pParent, *rAttrs); } bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index 47d52c449843..1cfc7db169c6 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -71,9 +71,8 @@ private: public: SchAxisLabelTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~SchAxisLabelTabPage() override; - virtual void dispose() override; - static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); + static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 1a6248b83565..7dd6bebcb108 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -63,12 +63,11 @@ AxisPositionsTabPage::AxisPositionsTabPage(TabPageParent pWindow,const SfxItemSe AxisPositionsTabPage::~AxisPositionsTabPage() { - disposeOnce(); } -VclPtr<SfxTabPage> AxisPositionsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> AxisPositionsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<AxisPositionsTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<AxisPositionsTabPage>(pParent, *rOutAttrs); } bool AxisPositionsTabPage::FillItemSet(SfxItemSet* rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx index 1b4f2e0b816d..3e20edcb6e67 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx @@ -30,10 +30,9 @@ public: AxisPositionsTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~AxisPositionsTabPage() override; - static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); + static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; - using TabPage::DeactivatePage; virtual DeactivateRC DeactivatePage( SfxItemSet* pItemSet ) override; void SetNumFormatter( SvNumberFormatter* pFormatter ); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 0d2e833c7cc9..2decb778dac5 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -631,7 +631,7 @@ ChartTypeTabPage::ChartTypeTabPage(TabPageParent pParent , const uno::Reference< m_xFT_ChooseType->hide(); } - SetText( SchResId(STR_PAGE_CHARTTYPE) ); + SetPageTitle(SchResId(STR_PAGE_CHARTTYPE)); m_xMainTypeList->connect_changed(LINK(this, ChartTypeTabPage, SelectMainTypeHdl)); m_xSubTypeList->SetSelectHdl( LINK( this, ChartTypeTabPage, SelectSubTypeHdl ) ); @@ -691,11 +691,6 @@ ChartTypeTabPage::ChartTypeTabPage(TabPageParent pParent , const uno::Reference< ChartTypeTabPage::~ChartTypeTabPage() { - disposeOnce(); -} - -void ChartTypeTabPage::dispose() -{ //delete all dialog controller m_aChartTypeDialogControllerList.clear(); @@ -707,7 +702,6 @@ void ChartTypeTabPage::dispose() m_pSortByXValuesResourceGroup.reset(); m_xSubTypeListWin.reset(); m_xSubTypeList.reset(); - vcl::OWizardPage::dispose(); } ChartTypeParameter ChartTypeTabPage::getCurrentParamter() const diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 9d299fd009ab..8035cf7a0b54 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -49,7 +49,6 @@ public: , const css::uno::Reference< css::chart2::XChartDocument >& xChartModel , bool bShowDescription = true ); virtual ~ChartTypeTabPage() override; - virtual void dispose() override; virtual void initializePage() override; virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override; diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx index e64e5d4ed385..6a611a8af5cf 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.cxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx @@ -28,9 +28,9 @@ DataLabelsTabPage::DataLabelsTabPage(TabPageParent pWindow, const SfxItemSet& rI { } -VclPtr<SfxTabPage> DataLabelsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> DataLabelsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<DataLabelsTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<DataLabelsTabPage>(pParent, *rOutAttrs); } bool DataLabelsTabPage::FillItemSet(SfxItemSet* rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_DataLabel.hxx b/chart2/source/controller/dialogs/tp_DataLabel.hxx index 48a7fbcaeeec..d5be8a13641f 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.hxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.hxx @@ -32,7 +32,7 @@ class DataLabelsTabPage : public SfxTabPage public: DataLabelsTabPage(TabPageParent pWindow, const SfxItemSet& rInAttrs); - static VclPtr<SfxTabPage> Create(TabPageParent pWindow, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pWindow, const SfxItemSet* rInAttrs); void SetNumberFormatter( SvNumberFormatter* pFormatter ); diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index e1ce453af530..fdb8147f438a 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -192,7 +192,7 @@ DataSourceTabPage::DataSourceTabPage(TabPageParent pParent, DialogModel & rDialo m_xFT_CAPTION->set_visible(!bHideDescription); m_aFixedTextRange = m_xFT_RANGE->get_label(); - SetText( SchResId( STR_OBJECT_DATASERIES_PLURAL ) ); + SetPageTitle(SchResId(STR_OBJECT_DATASERIES_PLURAL)); // set handlers m_xLB_SERIES->connect_changed(LINK(this, DataSourceTabPage, SeriesSelectionChangedHdl)); @@ -237,9 +237,9 @@ DataSourceTabPage::~DataSourceTabPage() { } -void DataSourceTabPage::ActivatePage() +void DataSourceTabPage::Activate() { - OWizardPage::ActivatePage(); + OWizardPage::Activate(); updateControlsFromDialogModel(); m_xLB_SERIES->grab_focus(); } @@ -248,10 +248,10 @@ void DataSourceTabPage::initializePage() { } -void DataSourceTabPage::DeactivatePage() +void DataSourceTabPage::Deactivate() { commitPage(); - vcl::OWizardPage::DeactivatePage(); + vcl::OWizardPage::Deactivate(); } void DataSourceTabPage::commitPage() @@ -699,8 +699,6 @@ void DataSourceTabPage::listeningFinished( m_rDialogModel.getRangeSelectionHelper()->stopRangeListening(); // change edit field - ToTop(); - GrabFocus(); if( m_pCurrentRangeChoosingField ) { m_pCurrentRangeChoosingField->set_text(aRange); diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index 5386ae1b4fba..d899f76eab80 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -57,7 +57,7 @@ public: bool bHideDescription = false); virtual ~DataSourceTabPage() override; - virtual void ActivatePage() override; + virtual void Activate() override; void commitPage(); @@ -66,7 +66,7 @@ private: virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override; //TabPage - virtual void DeactivatePage() override; + virtual void Deactivate() override; virtual void initializePage() override; diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx index e99452c790a0..1b7800b09fea 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx +++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx @@ -32,9 +32,9 @@ ErrorBarsTabPage::ErrorBarsTabPage(TabPageParent pParent, const SfxItemSet& rInA { } -VclPtr<SfxTabPage> ErrorBarsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> ErrorBarsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<ErrorBarsTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<ErrorBarsTabPage>(pParent, *rOutAttrs); } bool ErrorBarsTabPage::FillItemSet( SfxItemSet* rOutAttrs ) @@ -48,14 +48,6 @@ void ErrorBarsTabPage::Reset( const SfxItemSet* rInAttrs ) m_aErrorBarResources.Reset( *rInAttrs ); } -void ErrorBarsTabPage::DataChanged( const DataChangedEvent& rDCEvt ) -{ - SfxTabPage::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) - m_aErrorBarResources.FillValueSets(); -} - void ErrorBarsTabPage::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth ) { m_aErrorBarResources.SetAxisMinorStepWidthForErrorBarDecimals( fMinorStepWidth ); diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.hxx b/chart2/source/controller/dialogs/tp_ErrorBars.hxx index 337b58f4691d..e74aac0a2d5b 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.hxx +++ b/chart2/source/controller/dialogs/tp_ErrorBars.hxx @@ -36,12 +36,10 @@ public: void SetChartDocumentForRangeChoosing( const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument ); - static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); + static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - private: ErrorBarResources m_aErrorBarResources; }; diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index efd8a29c790e..e7a855c1258f 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -35,19 +35,12 @@ SchLegendPosTabPage::SchLegendPosTabPage(TabPageParent pWindow, const SfxItemSet SchLegendPosTabPage::~SchLegendPosTabPage() { - disposeOnce(); -} - -void SchLegendPosTabPage::dispose() -{ m_xLbTextDirection.reset(); - SfxTabPage::dispose(); } - -VclPtr<SfxTabPage> SchLegendPosTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> SchLegendPosTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<SchLegendPosTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<SchLegendPosTabPage>(pParent, *rOutAttrs); } bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx index 3e48cd9d5530..4414be65bed4 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx @@ -38,9 +38,8 @@ private: public: SchLegendPosTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~SchLegendPosTabPage() override; - virtual void dispose() override; - static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) override; virtual void Reset(const SfxItemSet* rInAttrs) override; }; diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 2cbfe653e576..6e667b9c89b8 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -36,18 +36,12 @@ SchLayoutTabPage::SchLayoutTabPage(TabPageParent pParent, const SfxItemSet& rInA SchLayoutTabPage::~SchLayoutTabPage() { - disposeOnce(); -} - -void SchLayoutTabPage::dispose() -{ m_pGeometryResources.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> SchLayoutTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> SchLayoutTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<SchLayoutTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<SchLayoutTabPage>(pParent, *rOutAttrs); } bool SchLayoutTabPage::FillItemSet(SfxItemSet* rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.hxx b/chart2/source/controller/dialogs/tp_PointGeometry.hxx index 4690a1fd1c31..680f330b6a9b 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.hxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.hxx @@ -30,9 +30,8 @@ class SchLayoutTabPage : public SfxTabPage public: SchLayoutTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~SchLayoutTabPage() override; - virtual void dispose() override; - static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) override; virtual void Reset(const SfxItemSet* rInAttrs) override; diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index 0cd66b00a26c..f98fc072e54a 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -40,18 +40,12 @@ PolarOptionsTabPage::PolarOptionsTabPage(TabPageParent pWindow, const SfxItemSet PolarOptionsTabPage::~PolarOptionsTabPage() { - disposeOnce(); -} - -void PolarOptionsTabPage::dispose() -{ m_xAngleDial.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> PolarOptionsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> PolarOptionsTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<PolarOptionsTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<PolarOptionsTabPage>(pParent, *rOutAttrs); } bool PolarOptionsTabPage::FillItemSet( SfxItemSet* rOutAttrs ) diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx index a789c4ffc9c5..f962f94694f2 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx @@ -38,9 +38,8 @@ class PolarOptionsTabPage : public SfxTabPage public: PolarOptionsTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~PolarOptionsTabPage() override; - virtual void dispose() override; - static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) override; virtual void Reset(const SfxItemSet* rInAttrs) override; diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index e0f03383492b..ecbc658cdf28 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -87,7 +87,7 @@ RangeChooserTabPage::RangeChooserTabPage(TabPageParent pParent, DialogModel & rD { m_xFT_Caption->set_visible(!bHideDescription); - SetText(m_xFTTitle->get_label());// OH:remove later with dialog + SetPageTitle(m_xFTTitle->get_label());// OH:remove later with dialog // set defaults as long as DetectArguments does not work m_xRB_Columns->set_active(true); @@ -126,9 +126,9 @@ RangeChooserTabPage::~RangeChooserTabPage() { } -void RangeChooserTabPage::ActivatePage() +void RangeChooserTabPage::Activate() { - OWizardPage::ActivatePage(); + OWizardPage::Activate(); initControlsFromModel(); m_xED_Range->grab_focus(); } @@ -163,10 +163,10 @@ void RangeChooserTabPage::initControlsFromModel() m_nChangingControlCalls--; } -void RangeChooserTabPage::DeactivatePage() +void RangeChooserTabPage::Deactivate() { commitPage(); - vcl::OWizardPage::DeactivatePage(); + vcl::OWizardPage::Deactivate(); } void RangeChooserTabPage::commitPage() @@ -357,8 +357,6 @@ void RangeChooserTabPage::listeningFinished( const OUString & rNewRange ) m_rDialogModel.getRangeSelectionHelper()->stopRangeListening(); //update dialog state - ToTop(); - GrabFocus(); m_xED_Range->set_text(aRange); m_xED_Range->grab_focus(); @@ -368,6 +366,7 @@ void RangeChooserTabPage::listeningFinished( const OUString & rNewRange ) lcl_enableRangeChoosing( false, m_pParentController ); } + void RangeChooserTabPage::disposingRangeSelection() { m_rDialogModel.getRangeSelectionHelper()->stopRangeListening( false ); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx index d630fc59f109..41ae6f19e460 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx @@ -46,7 +46,7 @@ public: virtual void listeningFinished( const OUString & rNewRange ) override; virtual void disposingRangeSelection() override; - virtual void ActivatePage() override; + virtual void Activate() override; void commitPage(); @@ -56,7 +56,7 @@ private: virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override; //TabPage - virtual void DeactivatePage() override; + virtual void Deactivate() override; void initControlsFromModel(); void changeDialogModelAccordingToControls(); diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 100b11548a95..e7f5837fb9d5 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -111,7 +111,6 @@ ScaleTabPage::ScaleTabPage(TabPageParent pWindow,const SfxItemSet& rInAttrs) ScaleTabPage::~ScaleTabPage() { - disposeOnce(); } void ScaleTabPage::EnableControls() @@ -214,9 +213,9 @@ IMPL_LINK_NOARG(ScaleTabPage, SelectAxisTypeHdl, weld::ComboBox&, void) SetNumFormat(); } -VclPtr<SfxTabPage> ScaleTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> ScaleTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<ScaleTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<ScaleTabPage>(pParent, *rOutAttrs); } bool ScaleTabPage::FillItemSet(SfxItemSet* rOutAttrs) @@ -559,7 +558,7 @@ bool ScaleTabPage::ShowWarning(const char* pResIdMessage, weld::Widget* pControl if (pResIdMessage == nullptr) return false; - std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(), + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetDialogFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, SchResId(pResIdMessage))); xWarn->run(); diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx index a44c12c91232..09c47af57d57 100644 --- a/chart2/source/controller/dialogs/tp_Scale.hxx +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -30,10 +30,9 @@ public: ScaleTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~ScaleTabPage() override; - static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); + static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; - using TabPage::DeactivatePage; virtual DeactivateRC DeactivatePage( SfxItemSet* pItemSet ) override; void SetNumFormatter( SvNumberFormatter* pFormatter ); diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index b84ee44db192..db5a0cf5241f 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -58,7 +58,6 @@ SchOptionTabPage::SchOptionTabPage(TabPageParent pWindow,const SfxItemSet& rInAt SchOptionTabPage::~SchOptionTabPage() { - disposeOnce(); } IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl, weld::ToggleButton&, void) @@ -69,10 +68,10 @@ IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl, weld::ToggleButton&, void) m_xCBAxisSideBySide->set_sensitive( m_xRbtAxis1->get_active()); } -VclPtr<SfxTabPage> SchOptionTabPage::Create(TabPageParent pParent, +std::unique_ptr<SfxTabPage> SchOptionTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<SchOptionTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<SchOptionTabPage>(pParent, *rOutAttrs); } bool SchOptionTabPage::FillItemSet(SfxItemSet* rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx index 7ffbed77ca9d..2538a6b8071d 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx @@ -38,7 +38,7 @@ public: SchOptionTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); virtual ~SchOptionTabPage() override; - static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) override; virtual void Reset(const SfxItemSet* rInAttrs) override; diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index b9d73f337cc0..f8748a087b2c 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -69,26 +69,20 @@ IMPL_LINK_NOARG(SchAlignmentTabPage, StackedToggleHdl, weld::ToggleButton&, void SchAlignmentTabPage::~SchAlignmentTabPage() { - disposeOnce(); -} - -void SchAlignmentTabPage::dispose() -{ m_xCtrlDial.reset(); m_xLbTextDirection.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> SchAlignmentTabPage::Create(TabPageParent pParent, +std::unique_ptr<SfxTabPage> SchAlignmentTabPage::Create(TabPageParent pParent, const SfxItemSet* rInAttrs) { - return VclPtr<SchAlignmentTabPage>::Create(pParent, *rInAttrs); + return std::make_unique<SchAlignmentTabPage>(pParent, *rInAttrs); } -VclPtr<SfxTabPage> SchAlignmentTabPage::CreateWithoutRotation(TabPageParent pParent, +std::unique_ptr<SfxTabPage> SchAlignmentTabPage::CreateWithoutRotation(TabPageParent pParent, const SfxItemSet* rInAttrs) { - return VclPtr<SchAlignmentTabPage>::Create(pParent, *rInAttrs, false); + return std::make_unique<SchAlignmentTabPage>(pParent, *rInAttrs, false); } bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs) diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx index 9368a41e4c24..ae1e398fd5e4 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -51,10 +51,9 @@ private: public: SchAlignmentTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs, bool bWithRotation = true); virtual ~SchAlignmentTabPage() override; - virtual void dispose() override; - static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); - static VclPtr<SfxTabPage> CreateWithoutRotation(TabPageParent pParent, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rInAttrs); + static std::unique_ptr<SfxTabPage> CreateWithoutRotation(TabPageParent pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) override; virtual void Reset(const SfxItemSet* rInAttrs) override; }; diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx index fcbecd9ba749..f21ca365b810 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.cxx +++ b/chart2/source/controller/dialogs/tp_Trendline.cxx @@ -30,9 +30,9 @@ TrendlineTabPage::TrendlineTabPage(TabPageParent pParent, const SfxItemSet& rInA { } -VclPtr<SfxTabPage> TrendlineTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) +std::unique_ptr<SfxTabPage> TrendlineTabPage::Create(TabPageParent pParent, const SfxItemSet* rOutAttrs) { - return VclPtr<TrendlineTabPage>::Create(pParent, *rOutAttrs); + return std::make_unique<TrendlineTabPage>(pParent, *rOutAttrs); } bool TrendlineTabPage::FillItemSet( SfxItemSet* rOutAttrs ) @@ -46,14 +46,6 @@ void TrendlineTabPage::Reset( const SfxItemSet* rInAttrs ) m_aTrendlineResources.Reset( *rInAttrs ); } -void TrendlineTabPage::DataChanged( const DataChangedEvent& rDCEvt ) -{ - SfxTabPage::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) - m_aTrendlineResources.FillValueSets(); -} - void TrendlineTabPage::SetNumFormatter( SvNumberFormatter* pNumFormatter ) { m_aTrendlineResources.SetNumFormatter( pNumFormatter ); diff --git a/chart2/source/controller/dialogs/tp_Trendline.hxx b/chart2/source/controller/dialogs/tp_Trendline.hxx index 03dd251cb91e..2d825be32f51 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.hxx +++ b/chart2/source/controller/dialogs/tp_Trendline.hxx @@ -31,11 +31,10 @@ class TrendlineTabPage : public SfxTabPage public: TrendlineTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs); - static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); + static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override; virtual void Reset( const SfxItemSet* rInAttrs ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; void SetNumFormatter( SvNumberFormatter* pFormatter ); void SetNbPoints( sal_Int32 nNbPoints ); diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx index 24b6d50026fb..c8a2ee1ff3db 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx @@ -54,7 +54,6 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage(TabPageParent pParent, TitlesAndObjectsTabPage::~TitlesAndObjectsTabPage() { - disposeOnce(); } void TitlesAndObjectsTabPage::initializePage() diff --git a/chart2/source/controller/inc/TabPageNotifiable.hxx b/chart2/source/controller/inc/TabPageNotifiable.hxx index 01e7b490d5a3..d9ba555887fd 100644 --- a/chart2/source/controller/inc/TabPageNotifiable.hxx +++ b/chart2/source/controller/inc/TabPageNotifiable.hxx @@ -24,7 +24,7 @@ // color to use as background for an invalid range #define RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR Color(0xff6563) -class TabPage; +class BuilderPage; namespace chart { @@ -32,8 +32,8 @@ namespace chart class TabPageNotifiable { public: - virtual void setInvalidPage( TabPage * pTabPage ) = 0; - virtual void setValidPage( TabPage * pTabPage ) = 0; + virtual void setInvalidPage( BuilderPage * pTabPage ) = 0; + virtual void setValidPage( BuilderPage * pTabPage ) = 0; protected: ~TabPageNotifiable() {} diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx index 7483dcd84118..3b01f54b76af 100644 --- a/chart2/source/controller/inc/dlg_ChartType.hxx +++ b/chart2/source/controller/inc/dlg_ChartType.hxx @@ -37,7 +37,7 @@ public: private: css::uno::Reference<css::frame::XModel> m_xChartModel; std::unique_ptr<weld::Container> m_xContentArea; - VclPtr<ChartTypeTabPage> m_xChartTypeTabPage; + std::unique_ptr<ChartTypeTabPage> m_xChartTypeTabPage; }; } //namespace chart diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx index ae5067503bef..e6051054d257 100644 --- a/chart2/source/controller/inc/dlg_CreationWizard.hxx +++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx @@ -50,8 +50,8 @@ public: virtual ~CreationWizard() override; // TabPageNotifiable - virtual void setInvalidPage(TabPage * pTabPage) override; - virtual void setValidPage(TabPage * pTabPage) override; + virtual void setInvalidPage(BuilderPage * pTabPage) override; + virtual void setValidPage(BuilderPage * pTabPage) override; protected: virtual bool leaveState( WizardState _nState ) override; @@ -61,7 +61,7 @@ protected: virtual OUString getStateDisplayName(WizardState nState) const override; private: - virtual VclPtr<TabPage> createPage(WizardState nState) override; + virtual std::unique_ptr<BuilderPage> createPage(WizardState nState) override; css::uno::Reference<css::chart2::XChartDocument> m_xChartModel; css::uno::Reference<css::uno::XComponentContext> m_xComponentContext; diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx index b708a2c97a8d..680256d1db53 100644 --- a/chart2/source/controller/inc/dlg_DataSource.hxx +++ b/chart2/source/controller/inc/dlg_DataSource.hxx @@ -29,7 +29,7 @@ namespace com { namespace sun { namespace star { namespace uno { class XComponen #include <memory> -class TabPage; +class BuilderPage; namespace chart { @@ -54,8 +54,8 @@ public: virtual short run() override; // TabPageNotifiable - virtual void setInvalidPage( TabPage * pTabPage ) override; - virtual void setValidPage( TabPage * pTabPage ) override; + virtual void setInvalidPage( BuilderPage * pTabPage ) override; + virtual void setValidPage( BuilderPage * pTabPage ) override; private: void DisableTabToggling(); @@ -67,8 +67,8 @@ private: std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider; std::unique_ptr< DialogModel > m_apDialogModel; - VclPtr<RangeChooserTabPage> m_pRangeChooserTabPage; - VclPtr<DataSourceTabPage> m_pDataSourceTabPage; + std::unique_ptr<RangeChooserTabPage> m_xRangeChooserTabPage; + std::unique_ptr<DataSourceTabPage> m_xDataSourceTabPage; bool m_bRangeChooserTabIsValid; bool m_bDataSourceTabIsValid; bool m_bTogglingEnabled; |