15#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
16#include <com/sun/star/chart2/XChartDocument.hpp>
17#include <com/sun/star/embed/XEmbeddedObject.hpp>
28uno::Reference<chart2::data::XPivotTableDataProvider>
29getPivotTableDataProvider(
const SdrOle2Obj* pOleObject)
31 uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider;
33 const uno::Reference<embed::XEmbeddedObject>& xObject = pOleObject->
GetObjRef();
36 uno::Reference<chart2::XChartDocument> xChartDoc(xObject->getComponent(), uno::UNO_QUERY);
39 xPivotTableDataProvider.set(uno::Reference<chart2::data::XPivotTableDataProvider>(
40 xChartDoc->getDataProvider(), uno::UNO_QUERY));
43 return xPivotTableDataProvider;
46OUString getAssociatedPivotTableName(
const SdrOle2Obj* pOleObject)
48 OUString aPivotTableName;
49 uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider;
50 xPivotTableDataProvider.set(getPivotTableDataProvider(pOleObject));
51 if (xPivotTableDataProvider.is())
52 aPivotTableName = xPivotTableDataProvider->getPivotTableName();
53 return aPivotTableName;
59 : m_eChartSourceType(eChartSourceType)
70 m_oIterator.emplace(pPage, SdrIterMode::DeepNoGroups);
85 uno::Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider;
86 xPivotTableDataProvider.set(getPivotTableDataProvider(pOleObject));
108 uno::Reference<embed::XEmbeddedObject> xObject =
pObject->GetObjRef();
112 if (aObjectName == rName)
144 std::vector<SdrOle2Obj*> aObjects;
152 for (sal_uInt16 nPageNo = 0; nPageNo < nPageCount; nPageNo++)
162 if (sPivotTableName == getAssociatedPivotTableName(
pObject))
const ScDocument & GetDocument() const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
static bool IsChart(const SdrObject *pObject)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
comphelper::EmbeddedObjectContainer & GetEmbeddedObjectContainer() const
OUString GetEmbeddedObjectName(const css::uno::Reference< css::embed::XEmbeddedObject > &) const
EmbeddedObjectRef * pObject