23 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
26 #include <com/sun/star/drawing/Direction3D.hpp>
27 #include <com/sun/star/drawing/Position3D.hpp>
29 #include <osl/diagnose.h>
40 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
41 uno::Reference< drawing::XShapes >
const & rShapes)
43 mbSetTransform(
false )
47 const OUString sValue = aIter.toString();
48 switch(aIter.getToken())
74 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
76 uno::Reference< beans::XPropertySet > xPropSet(
mxShape, uno::UNO_QUERY);
92 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
93 uno::Reference< drawing::XShapes >
const & rShapes)
95 maMinEdge(-2500.0, -2500.0, -2500.0),
96 maMaxEdge(2500.0, 2500.0, 2500.0)
100 switch(aIter.getToken())
132 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
135 AddShape(
"com.sun.star.drawing.Shape3DCubeObject" );
144 uno::Reference< beans::XPropertySet > xPropSet(
mxShape, uno::UNO_QUERY);
149 drawing::Position3D aPosition3D;
150 drawing::Direction3D aDirection3D;
155 aPosition3D.PositionX = maMinEdge.
getX();
156 aPosition3D.PositionY = maMinEdge.getY();
157 aPosition3D.PositionZ = maMinEdge.getZ();
163 xPropSet->setPropertyValue(
"D3DPosition",
uno::Any(aPosition3D));
164 xPropSet->setPropertyValue(
"D3DSize",
uno::Any(aDirection3D));
169 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
170 uno::Reference< drawing::XShapes >
const & rShapes)
172 maCenter(0.0, 0.0, 0.0),
173 maSphereSize(5000.0, 5000.0, 5000.0)
177 switch(aIter.getToken())
209 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
212 AddShape(
"com.sun.star.drawing.Shape3DSphereObject" );
221 uno::Reference< beans::XPropertySet > xPropSet(
mxShape, uno::UNO_QUERY);
226 drawing::Position3D aPosition3D;
227 drawing::Direction3D aDirection3D;
237 xPropSet->setPropertyValue(
"D3DPosition",
uno::Any(aPosition3D));
238 xPropSet->setPropertyValue(
"D3DSize",
uno::Any(aDirection3D));
243 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
244 uno::Reference< drawing::XShapes >
const & rShapes)
249 OUString sValue = aIter.toString();
251 switch(aIter.getToken())
277 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
279 uno::Reference< beans::XPropertySet > xPropSet(
mxShape, uno::UNO_QUERY);
298 drawing::PolyPolygonShape3D aPolyPolygon3D;
304 xPropSet->setPropertyValue(
"D3DPolyPolygon3D",
uno::Any(aPolyPolygon3D));
308 OSL_ENSURE(
false,
"Error on importing svg:d for 3D tools::PolyPolygon (!)");
319 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
320 uno::Reference< drawing::XShapes >
const & rShapes)
331 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
334 AddShape(
"com.sun.star.drawing.Shape3DLatheObject" );
345 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
346 uno::Reference< drawing::XShapes >
const & rShapes)
357 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
359 AddShape(
"com.sun.star.drawing.Shape3DExtrudeObject" );
SdXML3DExtrudeObjectShapeContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
void B3DPolyPolygonToUnoPolyPolygonShape3D(const B3DPolyPolygon &rPolyPolygonSource, css::drawing::PolyPolygonShape3D &rPolyPolygonShape3DRetval)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SvXMLImport & GetImport()
SdXML3DObjectContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
void AddShape(css::uno::Reference< css::drawing::XShape > &xShape)
virtual ~SdXML3DPolygonBasedShapeContext() override
B3DPolyPolygon createB3DPolyPolygonFromB2DPolyPolygon(const B2DPolyPolygon &rCandidate, double fZCoordinate)
#define XMLOFF_WARN_UNKNOWN(area, rIter)
SdXML3DCubeObjectShapeContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
SdXML3DPolygonBasedShapeContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
css::drawing::HomogenMatrix mxHomMat
virtual ~SdXML3DCubeObjectShapeContext() override
SdXML3DLatheObjectShapeContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
::basegfx::B3DVector maMinEdge
::basegfx::B3DVector maMaxEdge
SdXML3DSphereObjectShapeContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > const &rShapes)
static bool convertB3DVector(::basegfx::B3DVector &rVector, std::string_view rValue)
convert string to basegfx::B3DVector
css::uno::Reference< css::drawing::XShape > mxShape
bool importFromSvgD(B2DPolyPolygon &o_rPolyPoly, std::u16string_view rSvgDAttribute, bool bHandleRelativeNextPointCompatible, PointIndexSet *pHelpPointIndexSet)
virtual ~SdXML3DObjectContext() override
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~SdXML3DExtrudeObjectShapeContext() override
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~SdXML3DLatheObjectShapeContext() override
::basegfx::B3DVector maCenter
Handling of tokens in XML:
void SetStyle(bool bSupportsStyle=true)
if bSupportsStyle is false, auto styles will be set but not a style
virtual ~SdXML3DSphereObjectShapeContext() override
#define XML_ELEMENT(prefix, name)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
::basegfx::B3DVector maSphereSize
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
bool m_bDetectedRangeSegmentation false