m_bDoLiveUpdate is always true

Change-Id: I169027a02bd4e0e5c2e0011e6aca4d6063547ca0
This commit is contained in:
Tamás Zolnai
2017-01-05 02:02:04 +01:00
parent 1f9fcc1413
commit e885c4429a
4 changed files with 6 additions and 20 deletions

View File

@@ -43,7 +43,6 @@ ChartTypeDialog::ChartTypeDialog( vcl::Window* pParent
m_pChartTypeTabPage = VclPtr<ChartTypeTabPage>::Create( m_pChartTypeTabPage = VclPtr<ChartTypeTabPage>::Create(
get_content_area(), get_content_area(),
uno::Reference<XChartDocument>::query(m_xChartModel), uno::Reference<XChartDocument>::query(m_xChartModel),
true/*live update*/,
false/*don't show title description*/); false/*don't show title description*/);
m_pChartTypeTabPage->initializePage(); m_pChartTypeTabPage->initializePage();

View File

@@ -96,7 +96,7 @@ VclPtr<TabPage> CreationWizard::createPage(WizardState nState)
case STATE_CHARTTYPE: case STATE_CHARTTYPE:
{ {
m_aTimerTriggeredControllerLock.startTimer(); m_aTimerTriggeredControllerLock.startTimer();
VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,true/*bDoLiveUpdate*/); VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel);
pRet = pChartTypeTabPage; pRet = pChartTypeTabPage;
m_pTemplateProvider = pChartTypeTabPage; m_pTemplateProvider = pChartTypeTabPage;
if (m_pDialogModel) if (m_pDialogModel)

View File

@@ -665,7 +665,7 @@ IMPL_LINK_NOARG(GeometryResourceGroup, GeometryChangeHdl, ListBox&, void)
ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent
, const uno::Reference< XChartDocument >& xChartModel , const uno::Reference< XChartDocument >& xChartModel
, bool bDoLiveUpdate, bool bShowDescription) , bool bShowDescription)
: OWizardPage(pParent, "tp_ChartType", : OWizardPage(pParent, "tp_ChartType",
"modules/schart/ui/tp_ChartType.ui") "modules/schart/ui/tp_ChartType.ui")
, m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(this) ) , m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(this) )
@@ -678,7 +678,6 @@ ChartTypeTabPage::ChartTypeTabPage(vcl::Window* pParent
, m_aChartTypeDialogControllerList(0) , m_aChartTypeDialogControllerList(0)
, m_pCurrentMainType(nullptr) , m_pCurrentMainType(nullptr)
, m_nChangingCalls(0) , m_nChangingCalls(0)
, m_bDoLiveUpdate(bDoLiveUpdate)
, m_aTimerTriggeredControllerLock( uno::Reference< frame::XModel >( m_xChartModel, uno::UNO_QUERY ) ) , m_aTimerTriggeredControllerLock( uno::Reference< frame::XModel >( m_xChartModel, uno::UNO_QUERY ) )
{ {
get(m_pFT_ChooseType, "FT_CAPTION_FOR_WIZARD"); get(m_pFT_ChooseType, "FT_CAPTION_FOR_WIZARD");
@@ -827,7 +826,6 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ )
m_pCurrentMainType->adjustParameterToSubType( aParameter ); m_pCurrentMainType->adjustParameterToSubType( aParameter );
m_pCurrentMainType->adjustSubTypeAndEnableControls( aParameter ); m_pCurrentMainType->adjustSubTypeAndEnableControls( aParameter );
} }
if( m_bDoLiveUpdate )
commitToModel( aParameter ); commitToModel( aParameter );
//detect the new ThreeDLookScheme //detect the new ThreeDLookScheme
@@ -863,7 +861,6 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl, ValueSet*, void)
ChartTypeParameter aParameter( this->getCurrentParamter() ); ChartTypeParameter aParameter( this->getCurrentParamter() );
m_pCurrentMainType->adjustParameterToSubType( aParameter ); m_pCurrentMainType->adjustParameterToSubType( aParameter );
this->fillAllControls( aParameter, false ); this->fillAllControls( aParameter, false );
if( m_bDoLiveUpdate )
commitToModel( aParameter ); commitToModel( aParameter );
} }
} }
@@ -889,7 +886,6 @@ void ChartTypeTabPage::selectMainType()
this->showAllControls(*m_pCurrentMainType); this->showAllControls(*m_pCurrentMainType);
m_pCurrentMainType->adjustParameterToMainType( aParameter ); m_pCurrentMainType->adjustParameterToMainType( aParameter );
if( m_bDoLiveUpdate )
commitToModel( aParameter ); commitToModel( aParameter );
//detect the new ThreeDLookScheme //detect the new ThreeDLookScheme
aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme( ChartModelHelper::findDiagram( m_xChartModel ) ); aParameter.eThreeDLookScheme = ThreeDHelper::detectScheme( ChartModelHelper::findDiagram( m_xChartModel ) );
@@ -1013,14 +1009,6 @@ void ChartTypeTabPage::initializePage()
bool ChartTypeTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ ) 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 return true; // return false if this page should not be left
} }

View File

@@ -50,7 +50,7 @@ class ChartTypeTabPage : public ResourceChangeListener, public svt::OWizardPage,
public: public:
ChartTypeTabPage( vcl::Window* pParent ChartTypeTabPage( vcl::Window* pParent
, const css::uno::Reference< css::chart2::XChartDocument >& xChartModel , const css::uno::Reference< css::chart2::XChartDocument >& xChartModel
, bool bDoLiveUpdate, bool bShowDescription = true ); , bool bShowDescription = true );
virtual ~ChartTypeTabPage() override; virtual ~ChartTypeTabPage() override;
virtual void dispose() override; virtual void dispose() override;
@@ -91,7 +91,6 @@ protected:
ChartTypeDialogController* m_pCurrentMainType; ChartTypeDialogController* m_pCurrentMainType;
sal_Int32 m_nChangingCalls; sal_Int32 m_nChangingCalls;
bool m_bDoLiveUpdate;
TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
}; };