LibreOffice Module sc (master)  1
chartlis.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <memory>
21 #include <vcl/svapp.hxx>
22 
23 #include <chartlis.hxx>
24 #include <brdcst.hxx>
25 #include <document.hxx>
26 #include <reftokenhelper.hxx>
27 #include <formula/token.hxx>
28 #include <com/sun/star/chart/XChartDataChangeEventListener.hpp>
29 
30 using namespace com::sun::star;
31 using ::std::vector;
32 using ::std::for_each;
33 
34 // Update chart listeners quickly, to get a similar behavior to loaded charts
35 // which register UNO listeners.
36 
38 {
39  uno::Reference< chart::XChartDataChangeEventListener > xListener;
40  uno::Reference< chart::XChartData > xSource;
41 
42 public:
43  ScChartUnoData( const uno::Reference< chart::XChartDataChangeEventListener >& rL,
44  const uno::Reference< chart::XChartData >& rS ) :
45  xListener( rL ), xSource( rS ) {}
46 
47  const uno::Reference< chart::XChartDataChangeEventListener >& GetListener() const { return xListener; }
48  const uno::Reference< chart::XChartData >& GetSource() const { return xSource; }
49 };
50 
51 // ScChartListener
53  mrParent(rParent), mrDoc(rDoc)
54 {
55 }
56 
58 {
59  if (mrDoc.IsInDtorClear())
60  // The document is being destroyed. Do nothing.
61  return;
62 
63  // Make sure to remove all pointers to this object.
65 }
66 
68 {
69  switch (eType)
70  {
72  {
73  if (maFileIds.count(nFileId))
74  // We are listening to this external document. Send an update
75  // request to the chart.
76  mrParent.SetUpdateQueue();
77  }
78  break;
80  removeFileId(nFileId);
81  break;
82  }
83 }
84 
86 {
87  maFileIds.insert(nFileId);
88 }
89 
91 {
92  maFileIds.erase(nFileId);
93 }
94 
95 ScChartListener::ScChartListener( const OUString& rName, ScDocument& rDocP,
96  const ScRangeListRef& rRangeList ) :
97  mpTokens(new vector<ScTokenRef>),
98  maName(rName),
99  mrDoc( rDocP ),
100  bUsed( false ),
101  bDirty( false )
102 {
103  ScRefTokenHelper::getTokensFromRangeList(&rDocP, *mpTokens, *rRangeList);
104 }
105 
106 ScChartListener::ScChartListener( const OUString& rName, ScDocument& rDocP, std::unique_ptr<vector<ScTokenRef>> pTokens ) :
107  mpTokens(std::move(pTokens)),
108  maName(rName),
109  mrDoc( rDocP ),
110  bUsed( false ),
111  bDirty( false )
112 {
113 }
114 
116 {
117  if ( HasBroadcaster() )
118  EndListeningTo();
119  pUnoData.reset();
120 
121  if (mpExtRefListener)
122  {
123  // Stop listening to all external files.
125  const std::unordered_set<sal_uInt16>& rFileIds = mpExtRefListener->getAllFileIds();
126  for (const auto& rFileId : rFileIds)
127  pRefMgr->removeLinkListener(rFileId, mpExtRefListener.get());
128  }
129 }
130 
132  const uno::Reference< chart::XChartDataChangeEventListener >& rListener,
133  const uno::Reference< chart::XChartData >& rSource )
134 {
135  pUnoData.reset( new ScChartUnoData( rListener, rSource ) );
136 }
137 
138 uno::Reference< chart::XChartDataChangeEventListener > ScChartListener::GetUnoListener() const
139 {
140  if ( pUnoData )
141  return pUnoData->GetListener();
142  return uno::Reference< chart::XChartDataChangeEventListener >();
143 }
144 
145 uno::Reference< chart::XChartData > ScChartListener::GetUnoSource() const
146 {
147  if ( pUnoData )
148  return pUnoData->GetSource();
149  return uno::Reference< chart::XChartData >();
150 }
151 
152 void ScChartListener::Notify( const SfxHint& rHint )
153 {
154  const ScHint* p = dynamic_cast<const ScHint*>(&rHint);
155  if (p && (p->GetId() == SfxHintId::ScDataChanged))
156  SetUpdateQueue();
157 }
158 
160 {
161  if ( mrDoc.IsInInterpreter() )
162  { // If interpreting do nothing and restart timer so we don't
163  // interfere with interpreter and don't produce an Err522 or similar.
164  // This may happen if we are rescheduled via Basic function.
166  return ;
167  }
168  if ( pUnoData )
169  {
170  bDirty = false;
171  // recognize some day what has changed inside the Chart
172  chart::ChartDataChangeEvent aEvent( pUnoData->GetSource(),
173  chart::ChartDataChangeType_ALL,
174  0, 0, 0, 0 );
175  pUnoData->GetListener()->chartDataChanged( aEvent );
176  }
177  else if ( mrDoc.GetAutoCalc() )
178  {
179  bDirty = false;
181  }
182 }
183 
185 {
186  ScRangeListRef aRLRef(new ScRangeList);
188  return aRLRef;
189 }
190 
192 {
193  vector<ScTokenRef> aTokens;
195  mpTokens->swap(aTokens);
196 }
197 
198 namespace {
199 
200 class StartEndListening
201 {
202 public:
203  StartEndListening(ScDocument& rDoc, ScChartListener& rParent, bool bStart) :
204  mrDoc(rDoc), mrParent(rParent), mbStart(bStart) {}
205 
206  void operator() (const ScTokenRef& pToken)
207  {
208  if (!ScRefTokenHelper::isRef(pToken))
209  return;
210 
211  bool bExternal = ScRefTokenHelper::isExternalRef(pToken);
212  if (bExternal)
213  {
214  sal_uInt16 nFileId = pToken->GetIndex();
215  ScExternalRefManager* pRefMgr = mrDoc.GetExternalRefManager();
216  ScChartListener::ExternalRefListener* pExtRefListener = mrParent.GetExtRefListener();
217  if (mbStart)
218  {
219  pRefMgr->addLinkListener(nFileId, pExtRefListener);
220  pExtRefListener->addFileId(nFileId);
221  }
222  else
223  {
224  pRefMgr->removeLinkListener(nFileId, pExtRefListener);
225  pExtRefListener->removeFileId(nFileId);
226  }
227  }
228  else
229  {
230  ScRange aRange;
231  ScRefTokenHelper::getRangeFromToken(&mrDoc, aRange, pToken, ScAddress(), bExternal);
232  if (mbStart)
233  startListening(aRange);
234  else
235  endListening(aRange);
236  }
237  }
238 private:
239  void startListening(const ScRange& rRange)
240  {
241  if (rRange.aStart == rRange.aEnd)
242  mrDoc.StartListeningCell(rRange.aStart, &mrParent);
243  else
244  mrDoc.StartListeningArea(rRange, false, &mrParent);
245  }
246 
247  void endListening(const ScRange& rRange)
248  {
249  if (rRange.aStart == rRange.aEnd)
250  mrDoc.EndListeningCell(rRange.aStart, &mrParent);
251  else
252  mrDoc.EndListeningArea(rRange, false, &mrParent);
253  }
254 private:
255  ScDocument& mrDoc;
257  bool mbStart;
258 };
259 
260 }
261 
263 {
264  if (!mpTokens || mpTokens->empty())
265  // no references to listen to.
266  return;
267 
268  for_each(mpTokens->begin(), mpTokens->end(), StartEndListening(mrDoc, *this, true));
269 }
270 
272 {
273  if (!mpTokens || mpTokens->empty())
274  // no references to listen to.
275  return;
276 
277  for_each(mpTokens->begin(), mpTokens->end(), StartEndListening(mrDoc, *this, false));
278 }
279 
281  bool bDirtyP )
282 {
283  EndListeningTo();
284  SetRangeList( rRangeListRef );
286  if ( bDirtyP )
287  SetDirty( true );
288 }
289 
291 {
292  ScTokenRef pToken;
293  ScRefTokenHelper::getTokenFromRange(&mrDoc, pToken, rRange);
294 
296  {
297  // force update (chart has to be loaded), don't use ScChartListener::Update
299  }
300 }
301 
303 {
304  if (!mpExtRefListener)
305  mpExtRefListener.reset(new ExternalRefListener(*this, mrDoc));
306 
307  return mpExtRefListener.get();
308 }
309 
311 {
312  bDirty = true;
314 }
315 
317 {
318  bool b1 = (mpTokens && !mpTokens->empty());
319  bool b2 = (r.mpTokens && !r.mpTokens->empty());
320 
321  if (&mrDoc != &r.mrDoc || bUsed != r.bUsed || bDirty != r.bDirty ||
322  GetName() != r.GetName() || b1 != b2)
323  return false;
324 
325  if (!b1 && !b2)
326  // both token list instances are empty.
327  return true;
328 
329  return *mpTokens == *r.mpTokens;
330 }
331 
333 {
334  return !operator==(r);
335 }
336 
338 {
339 }
340 
342 {
343  // empty d'tor
344 }
345 
347 {
349  aIdle.SetPriority( TaskPriority::REPAINT );
350 }
351 
353  meModifiedDuringUpdate( SC_CLCUPDATE_NONE ),
354  aIdle( "sc::ScChartListenerCollection aIdle" ),
355  rDoc( rDocP )
356 {
357  Init();
358 }
359 
361  const ScChartListenerCollection& rColl ) :
362  meModifiedDuringUpdate( SC_CLCUPDATE_NONE ),
363  aIdle( "sc::ScChartListenerCollection aIdle" ),
364  rDoc( rColl.rDoc )
365 {
366  Init();
367 }
368 
370 {
371  // remove ChartListener objects before aIdle dtor is called, because
372  // ScChartListener::EndListeningTo may cause ScChartListenerCollection::StartTimer
373  // to be called if an empty ScNoteCell is deleted
374 
375  m_Listeners.clear();
376 }
377 
379 {
380  for (auto const& it : m_Listeners)
381  {
382  it.second->StartListeningTo();
383  }
384 }
385 
387 {
390  OUString aName = pListener->GetName();
391  return m_Listeners.insert(std::make_pair(aName, std::unique_ptr<ScChartListener>(pListener))).second;
392 }
393 
394 void ScChartListenerCollection::removeByName(const OUString& rName)
395 {
398  m_Listeners.erase(rName);
399 }
400 
402 {
403  ListenersType::iterator const it = m_Listeners.find(rName);
404  return it == m_Listeners.end() ? nullptr : it->second.get();
405 }
406 
407 const ScChartListener* ScChartListenerCollection::findByName(const OUString& rName) const
408 {
409  ListenersType::const_iterator const it = m_Listeners.find(rName);
410  return it == m_Listeners.end() ? nullptr : it->second.get();
411 }
412 
414 {
415  return !m_Listeners.empty();
416 }
417 
418 OUString ScChartListenerCollection::getUniqueName(std::u16string_view rPrefix) const
419 {
420  for (sal_Int32 nNum = 1; nNum < 10000; ++nNum) // arbitrary limit to prevent infinite loop.
421  {
422  OUString aTestName = rPrefix + OUString::number(nNum);
423  if (m_Listeners.find(aTestName) == m_Listeners.end())
424  return aTestName;
425  }
426  return OUString();
427 }
428 
429 void ScChartListenerCollection::ChangeListening( const OUString& rName,
430  const ScRangeListRef& rRangeListRef )
431 {
432  ScChartListener* pCL = findByName(rName);
433  if (pCL)
434  {
435  pCL->EndListeningTo();
436  pCL->SetRangeList( rRangeListRef );
437  }
438  else
439  {
440  pCL = new ScChartListener(rName, rDoc, rRangeListRef);
441  insert(pCL);
442  }
443  pCL->StartListeningTo();
444 }
445 
447 {
450 
451  ListenersType aUsed;
452 
453  for (auto & pair : m_Listeners)
454  {
455  ScChartListener* p = pair.second.get();
456  if (p->IsUno())
457  {
458  // We don't delete UNO charts; they are to be deleted separately via FreeUno().
459  aUsed.insert(std::make_pair(pair.first, std::move(pair.second)));
460  continue;
461  }
462 
463  if (p->IsUsed())
464  {
465  p->SetUsed(false);
466  aUsed.insert(std::make_pair(pair.first, std::move(pair.second)));
467  }
468  }
469 
470  m_Listeners = std::move(aUsed);
471 }
472 
473 void ScChartListenerCollection::FreeUno( const uno::Reference< chart::XChartDataChangeEventListener >& rListener,
474  const uno::Reference< chart::XChartData >& rSource )
475 {
478 
479  for (auto it = m_Listeners.begin(); it != m_Listeners.end(); )
480  {
481  ScChartListener *const p = it->second.get();
482  if (p->IsUno() && p->GetUnoListener() == rListener && p->GetUnoSource() == rSource)
483  it = m_Listeners.erase(it);
484  else
485  ++it;
486  }
487 }
488 
490 {
491  aIdle.Start();
492 }
493 
495 {
496  if ( Application::AnyInput( VclInputFlags::KEYBOARD ) )
497  {
498  aIdle.Start();
499  return;
500  }
501  UpdateDirtyCharts();
502 }
503 
505 {
506  // During ScChartListener::Update() the most nasty things can happen due to
507  // UNO listeners, e.g. reentrant calls via BASIC to insert() and FreeUno()
508  // and similar that modify m_Listeners and invalidate iterators.
510 
511  for (auto const& it : m_Listeners)
512  {
513  ScChartListener *const p = it.second.get();
514  if (p->IsDirty())
515  p->Update();
516 
518  break; // iterator is invalid
519 
520  if (aIdle.IsActive() && !rDoc.IsImportingXML())
521  break; // one interfered
522  }
524 }
525 
527 {
528  for (auto const& it : m_Listeners)
529  {
530  it.second->SetDirty(true);
531  }
532 
533  StartTimer();
534 }
535 
537  const ScChartListenerCollection& rCmp, bool bSetChartRangeLists )
538 {
539  bool bDirty = false;
540  for (auto const& it : m_Listeners)
541  {
542  ScChartListener *const pCL = it.second.get();
543  assert(pCL);
544  const ScChartListener* pCLCmp = rCmp.findByName(pCL->GetName());
545  if (!pCLCmp || *pCL != *pCLCmp)
546  {
547  if ( bSetChartRangeLists )
548  {
549  if (pCLCmp)
550  {
551  const ScRangeListRef& rList1 = pCL->GetRangeList();
552  const ScRangeListRef& rList2 = pCLCmp->GetRangeList();
553  bool b1 = rList1.is();
554  bool b2 = rList2.is();
555  if ( b1 != b2 || (b1 && b2 && (*rList1 != *rList2)) )
556  rDoc.SetChartRangeList( pCL->GetName(), rList1 );
557  }
558  else
559  rDoc.SetChartRangeList( pCL->GetName(), pCL->GetRangeList() );
560  }
561  bDirty = true;
562  pCL->SetDirty( true );
563  }
564  }
565  if ( bDirty )
566  StartTimer();
567 }
568 
570 {
571  bool bDirty = false;
572  for (auto const& it : m_Listeners)
573  {
574  ScChartListener *const pCL = it.second.get();
575  const ScRangeListRef& rList = pCL->GetRangeList();
576  if ( rList.is() && rList->Intersects( rRange ) )
577  {
578  bDirty = true;
579  pCL->SetDirty( true );
580  }
581  }
582  if ( bDirty )
583  StartTimer();
584 
585  // New hidden range listener implementation
586  for (auto& [pListener, rHiddenRange] : maHiddenListeners)
587  {
588  if (rHiddenRange.Intersects(rRange))
589  {
590  pListener->notify();
591  }
592  }
593 }
594 
596 {
597  ScRange aRange( 0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab );
598  for (auto const& it : m_Listeners)
599  {
600  it.second->UpdateChartIntersecting(aRange);
601  }
602 }
603 
605 {
606  // Do not use ScStrCollection::operator==() here that uses IsEqual and Compare.
607  // Use ScChartListener::operator==() instead.
608  if (&rDoc != &r.rDoc)
609  return false;
610 
611  return std::equal(m_Listeners.begin(), m_Listeners.end(), r.m_Listeners.begin(), r.m_Listeners.end(),
612  [](const ListenersType::value_type& lhs, const ListenersType::value_type& rhs) {
613  return (lhs.first == rhs.first) && (*lhs.second == *rhs.second);
614  });
615 }
616 
618 {
619  maHiddenListeners.insert(std::make_pair<>(pListener, rRange));
620 }
621 
623 {
624  auto range = maHiddenListeners.equal_range(pListener);
625  maHiddenListeners.erase(range.first, range.second);
626 }
627 
628 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool is() const
OUString maName
Definition: chartlis.hxx:67
enum ScChartListenerCollection::UpdateStatus meModifiedDuringUpdate
void UpdateChartIntersecting(const ScRange &rRange)
Definition: chartlis.cxx:290
bool Intersects(const ScRange &) const
Definition: rangelst.cxx:1089
css::uno::Reference< css::chart::XChartData > GetUnoSource() const
Definition: chartlis.cxx:145
ScAddress aStart
Definition: address.hxx:499
bool operator!=(const ScChartListener &r) const
Definition: chartlis.cxx:332
void ChangeListening(const OUString &rName, const ScRangeListRef &rRangeListRef)
Definition: chartlis.cxx:429
bool IsInInterpreter() const
Definition: document.hxx:2323
void EndListeningTo()
Definition: chartlis.cxx:271
ScChartListenerCollection(ScDocument &rDoc)
Definition: chartlis.cxx:352
bool SC_DLLPUBLIC isExternalRef(const ScTokenRef &pToken)
uno::Reference< chart::XChartDataChangeEventListener > xListener
Definition: chartlis.cxx:39
void getTokenFromRange(const ScDocument *pDoc, ScTokenRef &pToken, const ScRange &rRange)
Create a double reference token from a range object.
void UpdateChartsContainingTab(SCTAB nTab)
Definition: chartlis.cxx:595
bool insert(ScChartListener *pListener)
Definition: chartlis.cxx:386
void getRangeListFromTokens(const ScDocument *pDoc, ScRangeList &rRangeList, const ::std::vector< ScTokenRef > &pTokens, const ScAddress &rPos)
void SetUno(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &rListener, const css::uno::Reference< css::chart::XChartData > &rSource)
Definition: chartlis.cxx:131
ScRangeListRef GetRangeList() const
Definition: chartlis.cxx:184
ScDocument & mrDoc
Definition: chartlis.hxx:69
ScAddress aEnd
Definition: address.hxx:500
ListenersType m_Listeners
Definition: chartlis.hxx:128
bool SC_DLLPUBLIC isRef(const ScTokenRef &pToken)
bool IsUno() const
Definition: chartlis.hxx:90
OUString getUniqueName(std::u16string_view rPrefix) const
Create a unique name that's not taken by any existing chart listener objects.
Definition: chartlis.cxx:418
std::unique_ptr< ExternalRefListener > mpExtRefListener
Definition: chartlis.hxx:64
SfxHintId GetId() const
void UpdateChart(const OUString &rName)
Definition: documen5.cxx:335
ExternalRefListener(ScChartListener &rParent, ScDocument &rDoc)
Definition: chartlis.cxx:52
bool IsActive() const
void FreeUno(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &rListener, const css::uno::Reference< css::chart::XChartData > &rSource)
Definition: chartlis.cxx:473
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:872
void StartListeningHiddenRange(const ScRange &rRange, ScChartHiddenRangeListener *pListener)
Start listening on hide/show change within specified cell range.
Definition: chartlis.cxx:617
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:623
std::unordered_multimap< ScChartHiddenRangeListener *, ScRange > maHiddenListeners
Definition: chartlis.hxx:136
void StartListeningTo()
Definition: chartlis.cxx:262
bool IsUsed() const
Definition: chartlis.hxx:100
void removeLinkListener(sal_uInt16 nFileId, LinkListener *pListener)
Remove an existing link listener.
bool operator==(const ScChartListener &) const
Definition: chartlis.cxx:316
std::unique_ptr< ScChartUnoData > pUnoData
Definition: chartlis.hxx:68
virtual ~ScChartListener() override
Definition: chartlis.cxx:115
void addFileId(sal_uInt16 nFileId)
Definition: chartlis.cxx:85
ScChartListener * findByName(const OUString &rName)
Definition: chartlis.cxx:401
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:871
bool IsImportingXML() const
Definition: document.hxx:2150
virtual void Notify(const SfxHint &rHint) override
Definition: chartlis.cxx:152
std::unique_ptr< std::vector< ScTokenRef > > mpTokens
Definition: chartlis.hxx:65
static bool AnyInput(VclInputFlags nType=VCL_INPUT_ANY)
const OUString & GetName() const
Definition: chartlis.hxx:83
virtual ~ScChartHiddenRangeListener()
Definition: chartlis.cxx:341
uno::Reference< chart::XChartData > xSource
Definition: chartlis.cxx:40
void SetUsed(bool bFlg)
Definition: chartlis.hxx:101
ScChartListener(const OUString &rName, ScDocument &rDoc, const ScRangeListRef &rRangeListRef)
Definition: chartlis.cxx:95
IMPL_LINK_NOARG(ScChartListenerCollection, TimerHdl, Timer *, void)
Definition: chartlis.cxx:494
void SetRangeList(const ScRangeListRef &rNew)
Definition: chartlis.cxx:191
void SetRangeDirty(const ScRange &rRange)
Definition: chartlis.cxx:569
void removeByName(const OUString &rName)
Definition: chartlis.cxx:394
void SetUpdateQueue()
Definition: chartlis.cxx:310
bool HasBroadcaster() const
ExternalRefListener * GetExtRefListener()
Definition: chartlis.cxx:302
const uno::Reference< chart::XChartDataChangeEventListener > & GetListener() const
Definition: chartlis.cxx:47
std::map< OUString, std::unique_ptr< ScChartListener > > ListenersType
Definition: chartlis.hxx:125
bool operator==(const ScChartListenerCollection &r) const
Definition: chartlis.cxx:604
virtual ~ExternalRefListener() override
Definition: chartlis.cxx:57
bool IsInDtorClear() const
Definition: document.hxx:2366
bool IsDirty() const
Definition: chartlis.hxx:102
void EndListeningHiddenRange(ScChartHiddenRangeListener *pListener)
Remove all ranges associated with passed listener instance from the list of hidden range listeners...
Definition: chartlis.cxx:622
OUString maName
OUString aName
void ChangeListening(const ScRangeListRef &rRangeListRef, bool bDirty)
Definition: chartlis.cxx:280
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
Definition: types.hxx:29
void * p
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
Definition: document.hxx:2156
void SetDirty(bool bFlg)
Definition: chartlis.hxx:103
void SetInvokeHandler(const Link< Timer *, void > &rLink)
void SetChartRangeList(std::u16string_view rChartName, const ScRangeListRef &rNewRangeListRef)
only assigns the new RangeList, no ChartListener or the like
Definition: documen5.cxx:482
void SetDiffDirty(const ScChartListenerCollection &, bool bSetChartRangeLists)
Definition: chartlis.cxx:536
virtual void Start(bool bStartTimer=true) override
bool SC_DLLPUBLIC intersects(const ScDocument *pDoc, const ::std::vector< ScTokenRef > &rTokens, const ScTokenRef &pToken, const ScAddress &rPos)
bool hasListeners() const
Definition: chartlis.cxx:413
virtual void notify(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType) override
Definition: chartlis.cxx:67
void SetPriority(TaskPriority ePriority)
css::uno::Reference< css::chart::XChartDataChangeEventListener > GetUnoListener() const
Definition: chartlis.cxx:138
bool getRangeFromToken(const ScDocument *pDoc, ScRange &rRange, const ScTokenRef &pToken, const ScAddress &rPos, bool bExternal=false)
ScChartUnoData(const uno::Reference< chart::XChartDataChangeEventListener > &rL, const uno::Reference< chart::XChartData > &rS)
Definition: chartlis.cxx:43
void removeFileId(sal_uInt16 nFileId)
Definition: chartlis.cxx:90
BaseContainerNodeSharedPtr & mrParent
void addLinkListener(sal_uInt16 nFileId, LinkListener *pListener)
Register a new link listener to a specified external document.
void getTokensFromRangeList(const ScDocument *pDoc,::std::vector< ScTokenRef > &pTokens, const ScRangeList &rRanges)
AnyEventRef aEvent
sal_Int16 SCTAB
Definition: types.hxx:22
const uno::Reference< chart::XChartData > & GetSource() const
Definition: chartlis.cxx:48
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1360