21#include <document.hxx>
25#include <compiler.hxx>
28#include <osl/diagnose.h>
30#include <com/sun/star/beans/XPropertySet.hpp>
31#include <com/sun/star/drawing/XShape.hpp>
40 : rImport(rTempImport),
51 return rShape->getShapeType() ==
"com.sun.star.drawing.OLE2Shape";
55 const OUString& rName,
56 std::u16string_view rRangeList)
58 if (rRangeList.empty())
66 if (aRangeStr.isEmpty())
78 vector<ScTokenRef> aRefTokens;
81 aRefTokens, aRangeStr, rDoc, cSep, rDoc.
GetGrammar());
82 if (aRefTokens.empty())
91 if( (
rImport.getImportFlags() & SvXMLImportFlags::ALL) == SvXMLImportFlags::ALL )
101 assert(bSuccess &&
"failed to insert listener"); (void)bSuccess;
106 const OUString &rRangeList)
109 aShape.
xShape.set(rShape);
119 OUString sPersistName (
"PersistName");
124 for (
auto const& shape :
aShapes)
127 if (!
IsOLE(shape.xShape))
128 OSL_FAIL(
"Only OLEs should be in here now");
130 if (
IsOLE(shape.xShape))
132 uno::Reference < beans::XPropertySet > xShapeProps ( shape.xShape, uno::UNO_QUERY );
133 uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
136 if (pDoc && xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
137 (xShapeProps->getPropertyValue(sPersistName) >>=
sName))
bool insert(ScChartListener *pListener)
OUString getUniqueName(std::u16string_view rPrefix) const
Create a unique name that's not taken by any existing chart listener objects.
ScRangeListRef GetRangeList() const
void AddOLEObjectToCollection(const OUString &rName)
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
void InterpretDirtyCells(const ScRangeList &rRanges)
void AddOLE(const css::uno::Reference< css::drawing::XShape > &rShape, const OUString &rRangeList)
void CreateChartListener(ScDocument &rDoc, const OUString &rName, std::u16string_view rRangeList)
ScMyOLEFixer(ScXMLImport &rImport)
ScChartListenerCollection * pCollection
static bool IsOLE(const css::uno::Reference< css::drawing::XShape > &rShape)
std::vector< ScMyToFixupOLE > aShapes
static void GetStringFromXMLRangeString(OUString &rString, std::u16string_view rXMLRange, const ScDocument &rDoc)
XML Range to Calc Range.
Use this class to manage solar mutex locking instead of calling LockSolarMutex() and UnlockSolarMutex...
ScDocument * GetDocument()
void compileRangeRepresentation(::std::vector< ScTokenRef > &rRefTokens, const OUString &rRangeStr, ScDocument &rDoc, const sal_Unicode cSep, ::formula::FormulaGrammar::Grammar eGrammar, bool bOnly3DRef=false)
Compile an array of reference tokens from a data source range string.
css::uno::Reference< css::drawing::XShape > xShape