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>
37 using ::std::unique_ptr;
41 : rImport(rTempImport),
53 return rShape->getShapeType() ==
"com.sun.star.drawing.OLE2Shape";
57 const OUString& rName,
58 const OUString& rRangeList)
60 if (rRangeList.isEmpty())
68 if (aRangeStr.isEmpty())
80 unique_ptr< vector<ScTokenRef> > pRefTokens(
new vector<ScTokenRef>);
83 *pRefTokens, aRangeStr, rDoc, cSep, rDoc.
GetGrammar());
84 if (pRefTokens->empty())
103 assert(bSuccess &&
"failed to insert listener"); (
void)bSuccess;
108 const OUString &rRangeList)
111 aShape.
xShape.set(rShape);
121 OUString sPersistName (
"PersistName");
126 for (
auto const& shape :
aShapes)
129 if (!
IsOLE(shape.xShape))
130 OSL_FAIL(
"Only OLEs should be in here now");
132 if (
IsOLE(shape.xShape))
134 uno::Reference < beans::XPropertySet > xShapeProps ( shape.xShape, uno::UNO_QUERY );
135 uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
138 if (pDoc && xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
139 (xShapeProps->getPropertyValue(sPersistName) >>= sName))
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
ScDocument * GetDocument()
bool insert(ScChartListener *pListener)
ScRangeListRef GetRangeList() const
void CreateChartListener(ScDocument &rDoc, const OUString &rName, const OUString &rRangeList)
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
OUString getUniqueName(std::u16string_view rPrefix) const
Create a unique name that's not taken by any existing chart listener objects.
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
ScMyOLEFixer(ScXMLImport &rImport)
void AddOLEObjectToCollection(const OUString &rName)
ScChartListenerCollection * pCollection
void AddOLE(const css::uno::Reference< css::drawing::XShape > &rShape, const OUString &rRangeList)
Use this class to manage solar mutex locking instead of calling LockSolarMutex() and UnlockSolarMutex...
std::vector< ScMyToFixupOLE > aShapes
SvXMLImportFlags getImportFlags() const
void InterpretDirtyCells(const ScRangeList &rRanges)
const css::uno::Reference< css::frame::XModel > & GetModel() const
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
static bool IsOLE(const css::uno::Reference< css::drawing::XShape > &rShape)
static void GetStringFromXMLRangeString(OUString &rString, const OUString &rXMLRange, const ScDocument &rDoc)
XML Range to Calc Range.