32#include <com/sun/star/drawing/XShape.hpp>
33#include <com/sun/star/drawing/XShapes.hpp>
42 pAnnotationContext(nullptr),
53 if (
sType ==
u"com.sun.star.drawing.ControlShape" )
57 uno::Reference< beans::XPropertySet > xShapeProp( rShape, uno::UNO_QUERY );
65static uno::Reference< drawing::XShape >
lcl_getTopLevelParent(
const uno::Reference< drawing::XShape >& rShape )
67 uno::Reference< container::XChild > xChild( rShape, uno::UNO_QUERY );
68 uno::Reference< drawing::XShape > xParent( xChild->getParent(), uno::UNO_QUERY );
75 uno::Reference< drawing::XShape >& rShape,
76 const uno::Reference< xml::sax::XFastAttributeList >& xAttrList,
77 uno::Reference< drawing::XShapes >& rShapes )
89 awt::Point aStartPoint(rShape->getPosition());
95 std::optional<OUString> xRangeList;
99 switch(aIter.getToken())
103 sal_Int32 nOffset(0);
114 GetMM100UnitConverter().convertMeasureToCore(
115 nEndX, aIter.toView());
122 GetMM100UnitConverter().convertMeasureToCore(
123 nEndY, aIter.toView());
132 xRangeList = aIter.toString();
137 SetLayer(rShape, nLayerID, rShape->getShapeType());
154 rTables.
AddOLE(rShape, *xRangeList);
164 const OUString sValue = aIter.toString();
165 switch (aIter.getToken())
183 uno::Reference< drawing::XShapes > xGroup( rShape, uno::UNO_QUERY );
190 Point aStartPoint( rShape->getPosition().X,rShape->getPosition().Y );
191 uno::Reference< drawing::XShape > xChild( rShapes, uno::UNO_QUERY );
198 if ( pAnchor->maStartOffset.getX() == 0 && pAnchor->maStartOffset.getY() == 0 )
199 pAnchor->maStartOffset = aStartPoint;
200 if ( aStartPoint.
getX() < pAnchor->maStartOffset.getX() )
201 pAnchor->maStartOffset.
setX( aStartPoint.
getX() );
202 if ( aStartPoint.
getY() < pAnchor->maStartOffset.getY() )
203 pAnchor->maStartOffset.setY( aStartPoint.
getY() );
218 SetLayer(rShape, nLayerID, rShape->getShapeType());
constexpr OUStringLiteral SC_LAYERID
static uno::Reference< drawing::XShape > lcl_getTopLevelParent(const uno::Reference< drawing::XShape > &rShape)
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long getX() const
constexpr tools::Long getY() const
static ScDrawObjData * GetObjData(SdrObject *pObj, bool bCreate=false)
static void SetPageAnchored(SdrObject &)
static void SetCellAnchored(SdrObject &, const ScDrawObjData &rAnchor)
SCTAB GetCurrentSheet() const
static bool IsOLE(const css::uno::Reference< css::drawing::XShape > &rShape)
css::uno::Reference< css::drawing::XShapes > const & GetCurrentXShapes()
void AddOLE(const css::uno::Reference< css::drawing::XShape > &rShape, const OUString &rRangeList)
static bool GetAddressFromString(ScAddress &rAddress, std::u16string_view rAddressStr, const ScDocument &rDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Int32 &nOffset, sal_Unicode cSeparator=' ', sal_Unicode cQuote='\'')
String to Range core.
void BlockSheet(SCTAB nTab)
void SetShape(const css::uno::Reference< css::drawing::XShape > &rxShape, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const OUString &rStyleName, const OUString &rTextStyle)
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual void finishShape(css::uno::Reference< css::drawing::XShape > &rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > &rShapes)
virtual ~XMLTableShapeImportHelper() override
static void SetLayer(const css::uno::Reference< css::drawing::XShape > &rShape, SdrLayerID nLayerID, std::u16string_view sType)
XMLTableShapeImportHelper(ScXMLImport &rImp)
ScXMLAnnotationContext * pAnnotationContext
virtual void finishShape(css::uno::Reference< css::drawing::XShape > &rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > &rShapes) override
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr SdrLayerID SC_LAYER_CONTROLS(3)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
XML_NOTIFY_ON_UPDATE_OF_RANGES
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
UNDERLYING_TYPE get() const
constexpr SdrLayerID SDRLAYER_NOTFOUND(-1)
#define XML_ELEMENT(prefix, name)