LibreOffice Module sc (master) 1
|
#include <chart2uno.hxx>
Classes | |
class | ExternalRefListener |
class | HiddenRangeListener |
struct | Item |
Public Member Functions | |
ScChart2DataSequence (ScDocument *pDoc, ::std::vector< ScTokenRef > &&rTokens, bool bIncludeHiddenCells) | |
virtual | ~ScChart2DataSequence () override |
ScChart2DataSequence (ScDocument *pDoc, const ScChart2DataSequence &) | |
called from Clone() More... | |
ScChart2DataSequence (const ScChart2DataSequence &)=delete | |
ScChart2DataSequence & | operator= (const ScChart2DataSequence &)=delete |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override |
virtual css::uno::Sequence< css::uno::Any > SAL_CALL | getData () override |
virtual OUString SAL_CALL | getSourceRangeRepresentation () override |
virtual css::uno::Sequence< OUString > SAL_CALL | generateLabel (css::chart2::data::LabelOrigin nOrigin) override |
virtual ::sal_Int32 SAL_CALL | getNumberFormatKeyByIndex (::sal_Int32 nIndex) override |
Get the number format key for the n-th data entry If nIndex == -1, then you will get the number format key for the first non-empty entry. More... | |
virtual css::uno::Sequence< double > SAL_CALL | getNumericalData () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getTextualData () override |
virtual sal_Bool SAL_CALL | switchToNext (sal_Bool bWrap) override |
virtual sal_Bool SAL_CALL | setToPointInTime (sal_Int32 nPoint) override |
virtual void SAL_CALL | setRange (sal_Int32 nStart, sal_Int32 nEnd) override |
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL | getPropertySetInfo () override |
virtual void SAL_CALL | setPropertyValue (const OUString &rPropertyName, const css::uno::Any &rValue) override |
virtual css::uno::Any SAL_CALL | getPropertyValue (const OUString &rPropertyName) override |
virtual void SAL_CALL | addPropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override |
virtual void SAL_CALL | removePropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rListener) override |
virtual void SAL_CALL | addVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override |
virtual void SAL_CALL | removeVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override |
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL | createClone () override |
virtual void SAL_CALL | addModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override |
virtual void SAL_CALL | removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &rServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
Public Member Functions inherited from SfxListener | |
SfxListener () | |
SfxListener (const SfxListener &rCopy) | |
virtual | ~SfxListener () COVERITY_NOEXCEPT_FALSE |
void | StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected) |
void | EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false) |
void | EndListeningAll () |
bool | IsListening (SfxBroadcaster &rBroadcaster) const |
sal_uInt16 | GetBroadcasterCount () const |
SfxBroadcaster * | GetBroadcasterJOE (sal_uInt16 nNo) const |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
virtual bool | IsSdrView () const |
Private Member Functions | |
void | setDataChangedHint (bool b) |
void | RefChanged () |
DECL_LINK (ValueListenerHdl, const SfxHint &, void) | |
void | BuildDataCache () |
Build an internal data array to cache the data ranges, and other information such as hidden values. More... | |
void | RebuildDataCache () |
sal_Int32 | FillCacheFromExternalRef (const ScTokenRef &pToken) |
void | UpdateTokensFromRanges (const ScRangeList &rRanges) |
ExternalRefListener * | GetExtRefListener () |
void | StopListeningToAllExternalRefs () |
Private Attributes | |
std::shared_ptr< std::vector< Item > > | m_xDataArray |
This vector contains the cached data which was calculated with BuildDataCache(). More... | |
css::uno::Sequence< css::uno::Any > | m_aMixedDataCache |
Cached data for getData. More... | |
css::uno::Sequence< sal_Int32 > | m_aHiddenValues |
css::chart2::data::DataSequenceRole | m_aRole |
bool | m_bIncludeHiddenCells |
sal_Int64 | m_nObjectId |
ScDocument * | m_pDocument |
std::vector< ScTokenRef > | m_aTokens |
std::optional< std::vector< sal_uInt32 > > | m_oRangeIndices |
std::unique_ptr< ExternalRefListener > | m_pExtRefListener |
SfxItemPropertySet | m_aPropSet |
std::unique_ptr< HiddenRangeListener > | m_pHiddenListener |
std::unique_ptr< ScLinkListener > | m_pValueListener |
XModifyListenerArr_Impl | m_aValueListeners |
bool | m_bGotDataChangedHint |
bool | m_bExtDataRebuildQueued |
bool | mbTimeBased |
SCTAB | mnTimeBasedStart |
SCTAB | mnTimeBasedEnd |
SCTAB | mnCurrentTab |
Definition at line 191 of file chart2uno.hxx.
|
explicit |
Referenced by createClone().
|
overridevirtual |
Definition at line 2498 of file chart2uno.cxx.
References ScChartListenerCollection::EndListeningHiddenRange(), ScDocument::GetChartListenerCollection(), m_pDocument, m_pHiddenListener, m_pValueListener, ScDocument::RemoveUnoObject(), and StopListeningToAllExternalRefs().
ScChart2DataSequence::ScChart2DataSequence | ( | ScDocument * | pDoc, |
const ScChart2DataSequence & | r | ||
) |
called from Clone()
Definition at line 2451 of file chart2uno.cxx.
References ScExternalRefManager::addLinkListener(), ScDocument::AddUnoObject(), ScDocument::GetExternalRefManager(), ScDocument::GetNewUnoId(), m_aTokens, m_nObjectId, m_oRangeIndices, m_pDocument, m_pExtRefListener, and p.
|
delete |
|
overridevirtual |
Definition at line 3264 of file chart2uno.cxx.
References ScDocument::GetChartListenerCollection(), ScRefTokenHelper::getRangeFromToken(), ScRefTokenHelper::getRangeListFromTokens(), LINK, m_aTokens, m_aValueListeners, m_pDocument, m_pHiddenListener, m_pValueListener, ScDocument::StartListeningArea(), and ScChartListenerCollection::StartListeningHiddenRange().
|
overridevirtual |
Definition at line 3414 of file chart2uno.cxx.
|
overridevirtual |
Definition at line 3430 of file chart2uno.cxx.
|
private |
Build an internal data array to cache the data ranges, and other information such as hidden values.
Definition at line 2547 of file chart2uno.cxx.
References ScRange::aEnd, AREA, ScRange::aStart, CELLTYPE_EDIT, CELLTYPE_FORMULA, CELLTYPE_NONE, CELLTYPE_STRING, CELLTYPE_VALUE, ScAddress::Col(), ScDocument::ColHidden(), FillCacheFromExternalRef(), ScDocument::GetDBAtCursor(), ScFormulaCell::GetErrCode(), ScRefCellValue::getFormula(), ScRefTokenHelper::getRangeFromToken(), ScDocument::GetString(), ScRefCellValue::getType(), ScRefCellValue::getValue(), ScFormulaCell::GetValue(), ScDocument::InitColumnBlockPosition(), ScRefTokenHelper::isExternalRef(), ScFormulaCell::IsValue(), m_aHiddenValues, m_aMixedDataCache, m_aTokens, m_bExtDataRebuildQueued, m_bIncludeHiddenCells, m_pDocument, m_xDataArray, ScChart2DataSequence::Item::mAddress, ScChart2DataSequence::Item::maString, ScChart2DataSequence::Item::mbIsValue, ScChart2DataSequence::Item::mfValue, pData, ScAddress::Row(), ScDocument::RowHidden(), StopListeningToAllExternalRefs(), and ScAddress::Tab().
Referenced by getData(), getNumberFormatKeyByIndex(), getNumericalData(), getPropertyValue(), and getTextualData().
|
overridevirtual |
Definition at line 3254 of file chart2uno.cxx.
References m_pDocument, p, and ScChart2DataSequence().
|
private |
|
private |
Definition at line 2676 of file chart2uno.cxx.
References ScChart2DataSequence::ExternalRefListener::addFileId(), ScExternalRefManager::addLinkListener(), ScRange::aStart, ScAddress::Col(), ScExternalRefManager::getCacheTable(), ScMatrix::GetDimensions(), ScMatrix::GetDouble(), ScExternalRefManager::getDoubleRefTokens(), ScDocument::GetExternalRefManager(), GetExtRefListener(), ScDocument::GetFormatTable(), SvNumberFormatter::GetOutputString(), ScRefTokenHelper::getRangeFromToken(), svl::SharedString::getString(), ScMatrix::GetString(), ScMatrix::IsBoolean(), ScMatrix::IsStringOrEmpty(), ScMatrix::IsValue(), m_pDocument, m_xDataArray, ScChart2DataSequence::Item::maString, ScChart2DataSequence::Item::mbIsValue, ScChart2DataSequence::Item::mfValue, p, ScAddress::Row(), and svMatrix.
Referenced by BuildDataCache().
|
overridevirtual |
Definition at line 3173 of file chart2uno.cxx.
References aSeq, m_aTokens, m_pDocument, and nCount.
|
overridevirtual |
Definition at line 2976 of file chart2uno.cxx.
References BuildDataCache(), ScRefCellValue::isEmpty(), m_aMixedDataCache, m_pDocument, m_xDataArray, and nCount.
|
private |
Definition at line 2783 of file chart2uno.cxx.
References m_pDocument, and m_pExtRefListener.
Referenced by FillCacheFromExternalRef().
|
overridevirtual |
|
override |
Get the number format key for the n-th data entry If nIndex == -1, then you will get the number format key for the first non-empty entry.
Definition at line 3221 of file chart2uno.cxx.
References BuildDataCache(), ScRefCellValue::hasNumeric(), ScRefCellValue::isEmpty(), m_pDocument, m_xDataArray, o3tl::make_unsigned(), nIndex, and SAL_WARN.
|
overridevirtual |
Definition at line 3013 of file chart2uno.cxx.
References aSeq, BuildDataCache(), m_pDocument, m_xDataArray, and nCount.
|
overridevirtual |
Definition at line 3343 of file chart2uno.cxx.
References SfxItemPropertySet::getPropertyMap(), and m_aPropSet.
|
overridevirtual |
Definition at line 3378 of file chart2uno.cxx.
References BuildDataCache(), formula::FormulaToken::GetType(), m_aHiddenValues, m_aRole, m_aTokens, m_bIncludeHiddenCells, mbTimeBased, SC_UNONAME_HAS_STRING_LABEL, SC_UNONAME_HIDDENVALUES, SC_UNONAME_INCLUDEHIDDENCELLS, SC_UNONAME_ROLE, SC_UNONAME_TIME_BASED, and formula::svString.
|
overridevirtual |
Definition at line 3066 of file chart2uno.cxx.
References aStr, m_aTokens, and m_pDocument.
|
overridevirtual |
|
overridevirtual |
Definition at line 3035 of file chart2uno.cxx.
References aSeq, BuildDataCache(), m_aTokens, m_pDocument, m_xDataArray, nCount, and svString.
|
overridevirtual |
Reimplemented from SfxListener.
Definition at line 2805 of file chart2uno.cxx.
References ScDocument::AddUnoListenerCall(), ScDocument::AddUnoRefChange(), aEvent, distance, ScUpdateRefHint::GetDx(), ScUpdateRefHint::GetDy(), ScUpdateRefHint::GetDz(), SfxHint::GetId(), ScUpdateRefHint::GetMode(), ScUpdateRefHint::GetRange(), ScRefTokenHelper::getRangeFromToken(), ScDocument::HasUnoRefUndo(), ScRefTokenHelper::isExternalRef(), m_aTokens, m_aValueListeners, m_bGotDataChangedHint, m_nObjectId, m_oRangeIndices, m_pDocument, m_xDataArray, nCount, nId, nPos, ScRangeList::push_back(), SAL_WARN_IF, ScRangeList::size(), ScRangeList::UpdateReference(), and UpdateTokensFromRanges().
|
delete |
|
private |
Definition at line 2665 of file chart2uno.cxx.
References ScDocument::BroadcastUno(), m_bExtDataRebuildQueued, m_bGotDataChangedHint, m_pDocument, and m_xDataArray.
Referenced by setToPointInTime(), and switchToNext().
|
private |
Definition at line 2517 of file chart2uno.cxx.
References ScChartListenerCollection::EndListeningHiddenRange(), ScDocument::GetChartListenerCollection(), ScRefTokenHelper::getRangeFromToken(), m_aTokens, m_aValueListeners, m_pDocument, m_pHiddenListener, m_pValueListener, ScDocument::StartListeningArea(), and ScChartListenerCollection::StartListeningHiddenRange().
Referenced by UpdateTokensFromRanges().
|
overridevirtual |
Definition at line 3302 of file chart2uno.cxx.
References ScChartListenerCollection::EndListeningHiddenRange(), ScDocument::GetChartListenerCollection(), m_aTokens, m_aValueListeners, m_pDocument, m_pHiddenListener, m_pValueListener, n, and nCount.
|
overridevirtual |
Definition at line 3422 of file chart2uno.cxx.
|
overridevirtual |
Definition at line 3438 of file chart2uno.cxx.
|
private |
Definition at line 3446 of file chart2uno.cxx.
References m_bGotDataChangedHint.
|
overridevirtual |
Definition at line 3351 of file chart2uno.cxx.
References m_aRole, m_bIncludeHiddenCells, m_xDataArray, mbTimeBased, SC_UNONAME_INCLUDEHIDDENCELLS, and SC_UNONAME_ROLE.
|
overridevirtual |
Definition at line 3483 of file chart2uno.cxx.
References mnCurrentTab, mnTimeBasedEnd, and mnTimeBasedStart.
|
overridevirtual |
Definition at line 3490 of file chart2uno.cxx.
References m_aTokens, mnCurrentTab, mnTimeBasedEnd, mnTimeBasedStart, RebuildDataCache(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetAbsTab(), and svDoubleRef.
Referenced by switchToNext().
|
private |
Definition at line 2791 of file chart2uno.cxx.
References ScDocument::GetExternalRefManager(), m_pDocument, m_pExtRefListener, and ScExternalRefManager::removeLinkListener().
Referenced by BuildDataCache(), and ~ScChart2DataSequence().
|
overridevirtual |
Definition at line 3451 of file chart2uno.cxx.
References ScSingleRefData::IncTab(), m_aTokens, mbTimeBased, mnCurrentTab, mnTimeBasedEnd, RebuildDataCache(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, setToPointInTime(), and svDoubleRef.
|
private |
Definition at line 2761 of file chart2uno.cxx.
References ScRefTokenHelper::getTokenFromRange(), i, m_aTokens, m_aValueListeners, m_bGotDataChangedHint, m_oRangeIndices, m_pDocument, nCount, RefChanged(), and ScRangeList::size().
Referenced by Notify().
|
private |
Definition at line 364 of file chart2uno.hxx.
Referenced by BuildDataCache(), and getPropertyValue().
|
private |
Cached data for getData.
We may also need to cache data for the numerical and textural data series if they turn out to be bottlenecks under certain scenarios.
Definition at line 362 of file chart2uno.hxx.
Referenced by BuildDataCache(), and getData().
|
private |
Definition at line 378 of file chart2uno.hxx.
Referenced by getPropertySetInfo().
|
private |
Definition at line 367 of file chart2uno.hxx.
Referenced by getPropertyValue(), and setPropertyValue().
|
private |
Definition at line 373 of file chart2uno.hxx.
Referenced by addModifyListener(), BuildDataCache(), generateLabel(), getPropertyValue(), getSourceRangeRepresentation(), getTextualData(), Notify(), RefChanged(), removeModifyListener(), ScChart2DataSequence(), setToPointInTime(), switchToNext(), and UpdateTokensFromRanges().
|
private |
Definition at line 383 of file chart2uno.hxx.
Referenced by addModifyListener(), Notify(), RefChanged(), removeModifyListener(), and UpdateTokensFromRanges().
|
private |
Definition at line 386 of file chart2uno.hxx.
Referenced by BuildDataCache(), and RebuildDataCache().
|
private |
Definition at line 385 of file chart2uno.hxx.
Referenced by Notify(), RebuildDataCache(), setDataChangedHint(), and UpdateTokensFromRanges().
|
private |
Definition at line 368 of file chart2uno.hxx.
Referenced by BuildDataCache(), getPropertyValue(), and setPropertyValue().
|
private |
Definition at line 371 of file chart2uno.hxx.
Referenced by Notify(), and ScChart2DataSequence().
|
private |
Definition at line 375 of file chart2uno.hxx.
Referenced by Notify(), ScChart2DataSequence(), and UpdateTokensFromRanges().
|
private |
Definition at line 372 of file chart2uno.hxx.
Referenced by addModifyListener(), BuildDataCache(), createClone(), FillCacheFromExternalRef(), generateLabel(), getData(), GetExtRefListener(), getNumberFormatKeyByIndex(), getNumericalData(), getSourceRangeRepresentation(), getTextualData(), Notify(), RebuildDataCache(), RefChanged(), removeModifyListener(), ScChart2DataSequence(), StopListeningToAllExternalRefs(), UpdateTokensFromRanges(), and ~ScChart2DataSequence().
|
private |
Definition at line 377 of file chart2uno.hxx.
Referenced by GetExtRefListener(), ScChart2DataSequence(), and StopListeningToAllExternalRefs().
|
private |
Definition at line 380 of file chart2uno.hxx.
Referenced by addModifyListener(), RefChanged(), removeModifyListener(), and ~ScChart2DataSequence().
|
private |
Definition at line 382 of file chart2uno.hxx.
Referenced by addModifyListener(), RefChanged(), removeModifyListener(), and ~ScChart2DataSequence().
|
private |
This vector contains the cached data which was calculated with BuildDataCache().
We use a shared_ptr because chart likes to Clone this class, which is very expensive when we have lots of data.
Definition at line 355 of file chart2uno.hxx.
Referenced by BuildDataCache(), FillCacheFromExternalRef(), getData(), getNumberFormatKeyByIndex(), getNumericalData(), getTextualData(), Notify(), RebuildDataCache(), and setPropertyValue().
|
private |
Definition at line 388 of file chart2uno.hxx.
Referenced by getPropertyValue(), setPropertyValue(), and switchToNext().
|
private |
Definition at line 391 of file chart2uno.hxx.
Referenced by setRange(), setToPointInTime(), and switchToNext().
|
private |
Definition at line 390 of file chart2uno.hxx.
Referenced by setRange(), setToPointInTime(), and switchToNext().
|
private |
Definition at line 389 of file chart2uno.hxx.
Referenced by setRange(), and setToPointInTime().