11#include <com/sun/star/embed/Aspects.hpp>
12#include <com/sun/star/embed/XEmbeddedObject.hpp>
13#include <com/sun/star/awt/Size.hpp>
14#include <com/sun/star/chart/ChartDataRowSource.hpp>
15#include <com/sun/star/chart2/data/XDataReceiver.hpp>
16#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
48 : m_pDocShell(pDocShell)
51 m_pDocShell->GetDocument().AddUnoObject(*
this);
64 if (rHint.
GetId() == SfxHintId::Dying)
70 const awt::Rectangle& aRect,
71 OUString
const & rDataPilotName)
87 OUString
aName = rName;
92 throw uno::RuntimeException();
95 uno::Reference<embed::XEmbeddedObject> xObject;
103 Point aRectPos(aRect.X, aRect.Y);
105 if ((aRectPos.
X() < 0 && !bLayoutRTL) || (aRectPos.
X() > 0 && bLayoutRTL))
108 if (aRectPos.
Y() < 0)
111 Size aRectSize(aRect.Width, aRect.Height);
112 if (aRectSize.
Width() <= 0)
115 if (aRectSize.
Height() <= 0)
120 sal_Int64 nAspect(embed::Aspects::MSOLE_CONTENT);
125 aAwtSize.Width = aSize.
Width();
126 aAwtSize.Height = aSize.
Height();
129 pPivotTableDataProvider->setPivotTableName(rDataPilotName);
131 uno::Reference<chart2::data::XDataProvider> xDataProvider(pPivotTableDataProvider);
133 uno::Reference<chart2::data::XDataReceiver> xReceiver;
136 xReceiver.set(xObject->getComponent(), uno::UNO_QUERY);
140 xReceiver->attachDataProvider(xDataProvider);
142 uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(cppu::getXWeak(
m_pDocShell->
GetModel()), uno::UNO_QUERY);
143 xReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier);
146 {
"CellRangeRepresentation",
uno::Any(rDataPilotName) },
147 {
"HasCategories",
uno::Any(
true) },
148 {
"DataRowSource",
uno::Any(chart::ChartDataRowSource_COLUMNS) }
150 xReceiver->setArguments(aArgs);
160 xObject->setVisualAreaSize(nAspect, aAwtSize);
196 pOleObject = aIterator.
next();
207 throw lang::IndexOutOfBoundsException();
210 uno::Reference<embed::XEmbeddedObject> xObject =
pObject->GetObjRef();
215 throw lang::IndexOutOfBoundsException();
219 throw lang::IndexOutOfBoundsException();
240 throw container::NoSuchElementException();
244 throw container::NoSuchElementException();
253 std::vector<OUString> aElements;
259 uno::Reference<embed::XEmbeddedObject> xObject = pOleObject->
GetObjRef();
263 aElements.push_back(
aName);
265 pOleObject = aIterator.
next();
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
const ScDocument & GetDocument() const
ScDrawLayer * MakeDrawLayer()
ScModelObj * GetModel() const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
void RemoveUnoObject(SfxListener &rObject)
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
SdrObject * GetNamedObject(std::u16string_view rName, SdrObjKind nId, SCTAB &rFoundTab) const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
comphelper::EmbeddedObjectContainer & GetEmbeddedObjectContainer() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
OUString GetEmbeddedObjectName(const css::uno::Reference< css::embed::XEmbeddedObject > &) const
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject(const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
css::uno::Type const & get()
virtual sal_Bool SAL_CALL hasByName(OUString const &aName) override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL addNewByName(OUString const &aName, const css::awt::Rectangle &aRect, OUString const &aDataPilotName) override
virtual ~TablePivotCharts() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual void SAL_CALL removeByName(OUString const &aName) override
virtual css::uno::Any SAL_CALL getByName(OUString const &aName) override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
EmbeddedObjectRef * pObject
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
CAUTION! The following defines must be in the same namespace as the respective type.