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(
get_content_area(),
uno::Reference<XChartDocument>::query(m_xChartModel),
true/*live update*/,
false/*don't show title description*/);
m_pChartTypeTabPage->initializePage();

View File

@ -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)

View File

@ -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
}

View File

@ -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;
};