diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-01-27 15:57:09 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-01-27 15:57:09 -0500 |
commit | 677a60d4a1a7c4a7ed7954a95d365de94d281f0c (patch) | |
tree | 4a5bd3741eaea796ca7a0fca5be8045308fc8c7b | |
parent | d034f035daa8d597a27f00cfba8297cc93e7e0c8 (diff) |
kohei03: #i104769# Fixed the chart update problem for real.
My previous fix was not sufficient. I forgot to:
1) set the "used" flag to the listener when inserting it, which caused
the listener to get removed right after it was inserted.
2) Set all chart objects "dirty" upon import. Because of that, the
timer didn't start when the document initially loaded.
-rw-r--r-- | sc/inc/chartlis.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xichart.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index fcf419805eb4..e01d71f74d5b 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -186,7 +186,7 @@ public: const com::sun::star::uno::Reference< com::sun::star::chart::XChartData >& rSource ); void StartTimer(); void UpdateDirtyCharts(); - void SetDirty(); + void SC_DLLPUBLIC SetDirty(); void SetDiffDirty( const ScChartListenerCollection&, BOOL bSetChartRangeLists = FALSE ); diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 5f722234cd3c..7030bb56833d 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3575,7 +3575,7 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB { ::std::auto_ptr<ScChartListener> pListener( new ScChartListener(rObjName, pDoc, pRefTokens.release())); - pListener->SetDirty(true); + pListener->SetUsed(true); pListener->StartListeningTo(); pChartCollection->Insert(pListener.release()); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 5443575ac50f..db4873d70e6f 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -105,6 +105,7 @@ #include "convuno.hxx" #include "postit.hxx" #include "globstr.hrc" +#include "chartlis.hxx" #include "fprogressbar.hxx" #include "xltracer.hxx" @@ -3755,6 +3756,9 @@ void XclImpObjectManager::ConvertObjects() rDffManager.ProcessDrawing( maDffStrm, *aPIt ); } } + ScChartListenerCollection* pChartListeners = GetDoc().GetChartListenerCollection(); + if (pChartListeners && pChartListeners->GetCount()) + pChartListeners->SetDirty(); } String XclImpObjectManager::GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const |