20#include <com/sun/star/text/XTextContent.hpp>
21#include <com/sun/star/text/TextContentAnchorType.hpp>
31#include <com/sun/star/beans/XPropertySet.hpp>
32#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
33#include <com/sun/star/drawing/XShapes.hpp>
34#include <com/sun/star/frame/XModel.hpp>
56 Reference < XDrawPageSupplier > xDPS( rImp.GetModel(), UNO_QUERY );
59 Reference < XShapes > xShapes = xDPS->getDrawPage();
71 Reference< XShape >& rShape,
72 const Reference< XFastAttributeList >& xAttrList,
73 Reference< XShapes >& rShapes )
82 TextContentAnchorType eAnchorType = TextContentAnchorType_AT_PARAGRAPH;
91 switch( aIter.getToken() )
95 TextContentAnchorType eNew;
107 nPage =
static_cast<sal_Int16
>(nTmp);
112 m_rImport.GetMM100UnitConverter().convertMeasureToCore( nY, aIter.toView() );
117 Reference < XPropertySet > xPropSet( rShape, UNO_QUERY );
123 switch( eAnchorType )
125 case TextContentAnchorType_AT_PAGE:
136 Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
137 xTxtImport->InsertTextContent( xTxtCntnt );
139 switch( eAnchorType )
141 case TextContentAnchorType_AS_CHARACTER:
const SvXMLImport & m_rImport
constexpr OUStringLiteral gsAnchorType(u"AnchorType")
constexpr OUStringLiteral gsVertOrientPosition(u"VertOrientPosition")
constexpr OUStringLiteral gsAnchorPageNo(u"AnchorPageNo")
static bool convert(std::string_view rStrImpValue, css::text::TextContentAnchorType &rType)
void popGroupAndPostProcess()
virtual void addShape(css::uno::Reference< css::drawing::XShape > &rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > &rShapes)
this function is called whenever the implementation classes like to add this new shape to the given X...
void pushGroupForPostProcessing(css::uno::Reference< css::drawing::XShapes > &rShapes)
virtual void addShape(css::uno::Reference< css::drawing::XShape > &rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::uno::Reference< css::drawing::XShapes > &rShapes) override
this function is called whenever the implementation classes like to add this new shape to the given X...
XMLTextShapeImportHelper(SvXMLImport &rImp)
virtual ~XMLTextShapeImportHelper() override
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)