diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-01-05 02:02:04 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-01-05 02:02:04 +0100 |
commit | e885c4429ab48d32f74c3a04a6e9e3a3ac492ee1 (patch) | |
tree | dd53357f752f99c52b34b2e4f70b8031a6119da3 | |
parent | 1f9fcc141370ddbd4809ce44ee0c256672bc64a3 (diff) |
m_bDoLiveUpdate is always true
Change-Id: I169027a02bd4e0e5c2e0011e6aca4d6063547ca0
4 files changed, 6 insertions, 20 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index 4a0470fa86ba..fa260e003022 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -43,7 +43,6 @@ ChartTypeDialog::ChartTypeDialog( vcl::Window* pParent m_pChartTypeTabPage = VclPtr<ChartTypeTabPage>::Create( get_content_area(), uno::Reference<XChartDocument>::query(m_xChartModel), - true/*live update*/, false/*don't show title description*/); m_pChartTypeTabPage->initializePage(); diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index c3cb30419c19..501272f5c486 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -96,7 +96,7 @@ VclPtr<TabPage> CreationWizard::createPage(WizardState nState) case STATE_CHARTTYPE: { m_aTimerTriggeredControllerLock.startTimer(); - VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,true/*bDoLiveUpdate*/); + VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel); pRet = pChartTypeTabPage; m_pTemplateProvider = pChartTypeTabPage; if (m_pDialogModel) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index fc1c9be99a7e..fedfd2ed8732 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -665,7 +665,7 @@ IMPL_LINK_NOARG(GeometryResourceGroup, GeometryChangeHdl, ListBox&, void) ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent , const uno::Reference< XChartDocument >& xChartModel - , bool bDoLiveUpdate, bool bShowDescription) + , bool bShowDescription) : OWizardPage(pParent, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui") , m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(this) ) @@ -678,7 +678,6 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent , m_aChartTypeDialogControllerList(0) , m_pCurrentMainType(nullptr) , m_nChangingCalls(0) - , m_bDoLiveUpdate(bDoLiveUpdate) , m_aTimerTriggeredControllerLock( uno::Reference< frame::XModel >( m_xChartModel, uno::UNO_QUERY ) ) { get(m_pFT_ChooseType, "FT_CAPTION_FOR_WIZARD"); @@ -827,8 +826,7 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ ) m_pCurrentMainType->adjustParameterToSubType( aParameter ); m_pCurrentMainType->adjustSubTypeAndEnableControls( aParameter ); } - if( m_bDoLiveUpdate ) - commitToModel( aParameter ); + commitToModel( aParameter ); //detect the new ThreeDLookScheme uno::Reference<XDiagram> xDiagram = ChartModelHelper::findDiagram(m_xChartModel); @@ -863,8 +861,7 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl, ValueSet*, void) ChartTypeParameter aParameter( this->getCurrentParamter() ); m_pCurrentMainType->adjustParameterToSubType( aParameter ); this->fillAllControls( aParameter, false ); - if( m_bDoLiveUpdate ) - commitToModel( aParameter ); + commitToModel( aParameter ); } } @@ -889,8 +886,7 @@ void ChartTypeTabPage::selectMainType() this->showAllControls(*m_pCurrentMainType); m_pCurrentMainType->adjustParameterToMainType( aParameter ); - if( m_bDoLiveUpdate ) - commitToModel( aParameter ); + commitToModel( aParameter ); //detect the new ThreeDLookScheme aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme( ChartModelHelper::findDiagram( m_xChartModel ) ); if(!aParameter.b3DLook && aParameter.eThreeDLookScheme!=ThreeDLookScheme_Realistic ) @@ -1013,14 +1009,6 @@ void ChartTypeTabPage::initializePage() bool ChartTypeTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ ) { - //commit changes to model - if( !m_bDoLiveUpdate && m_pCurrentMainType ) - { - ChartTypeParameter aParameter( this->getCurrentParamter() ); - m_pCurrentMainType->adjustParameterToSubType( aParameter ); - commitToModel( aParameter ); - } - return true; // return false if this page should not be left } diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index e885898fbdc9..a8eb3a31b53f 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -50,7 +50,7 @@ class ChartTypeTabPage : public ResourceChangeListener, public svt::OWizardPage, public: ChartTypeTabPage( vcl::Window* pParent , const css::uno::Reference< css::chart2::XChartDocument >& xChartModel - , bool bDoLiveUpdate, bool bShowDescription = true ); + , bool bShowDescription = true ); virtual ~ChartTypeTabPage() override; virtual void dispose() override; @@ -91,7 +91,6 @@ protected: ChartTypeDialogController* m_pCurrentMainType; sal_Int32 m_nChangingCalls; - bool m_bDoLiveUpdate; TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; }; |