[Libreoffice-commits] core.git: chart2/source

Tamás Zolnai tamas.zolnai at collabora.com
Thu Jan 5 01:02:45 UTC 2017


 chart2/source/controller/dialogs/dlg_ChartType.cxx      |    1 
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx |    2 -
 chart2/source/controller/dialogs/tp_ChartType.cxx       |   20 +++-------------
 chart2/source/controller/dialogs/tp_ChartType.hxx       |    3 --
 4 files changed, 6 insertions(+), 20 deletions(-)

New commits:
commit e885c4429ab48d32f74c3a04a6e9e3a3ac492ee1
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Thu Jan 5 02:02:04 2017 +0100

    m_bDoLiveUpdate is always true
    
    Change-Id: I169027a02bd4e0e5c2e0011e6aca4d6063547ca0

diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 4a0470f..fa260e0 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 c3cb304..501272f 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 fc1c9be..fedfd2e 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 e885898..a8eb3a3 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;
 };


More information about the Libreoffice-commits mailing list