diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-02 14:35:31 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-04 12:30:41 -0500 |
commit | 28bf1a3a1408df042d7e767c3760e47faf2d077e (patch) | |
tree | c4e3534682b14ae33f6e24a3cadd8f9c58fc4644 /chart2/source | |
parent | f281d2d24c2a368c58d32b1b50acf83e0f056d90 (diff) |
Avoid re-constructing chart shapes when it's not in visible range.
The re-construction will be deferred until it becomes visible again.
Change-Id: I364ea8d38d48078dfd803b0e5bb20bfc8a2913ba
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 63ba12abda30..edf6dc983693 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2627,7 +2627,7 @@ void SAL_CALL ChartView::disposing( const lang::EventObject& /* rSource */ ) { } -void ChartView::impl_updateView() +void ChartView::impl_updateView( bool bCheckLockedCtrler ) { if( !m_pDrawModelWrapper ) return; @@ -2638,7 +2638,7 @@ void ChartView::impl_updateView() return; } - if (mrChartModel.hasControllersLocked()) + if (bCheckLockedCtrler && mrChartModel.hasControllersLocked()) return; if( m_bViewDirty && !m_bInViewUpdate ) @@ -2822,7 +2822,7 @@ void SAL_CALL ChartView::removeModeChangeApproveListener( const uno::Reference< // ____ XUpdatable ____ void SAL_CALL ChartView::update() throw (uno::RuntimeException, std::exception) { - impl_updateView(); + impl_updateView(true); //#i100778# migrate all imported or old documents to a plot area sizing exclusive axes (in case the save settings allow for this): //Although in general it is a bad idea to change the model from within the view this is exceptionally the best place to do this special conversion. @@ -2833,6 +2833,16 @@ void SAL_CALL ChartView::update() throw (uno::RuntimeException, std::exception) impl_updateView(); } +void SAL_CALL ChartView::updateSoft() throw (uno::RuntimeException, std::exception) +{ + update(); +} + +void SAL_CALL ChartView::updateHard() throw (uno::RuntimeException, std::exception) +{ + impl_updateView(false); +} + // ____ XPropertySet ____ Reference< beans::XPropertySetInfo > SAL_CALL ChartView::getPropertySetInfo() throw (uno::RuntimeException, std::exception) |