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);
122 Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
123 xTxtImport->InsertTextContent( xTxtCntnt );
127 switch( eAnchorType )
129 case TextContentAnchorType_AT_PAGE:
136 case TextContentAnchorType_AS_CHARACTER:
constexpr OUStringLiteral gsAnchorType(u"AnchorType")
virtual ~XMLTextShapeImportHelper() override
bool convertMeasureToCore(sal_Int32 &rValue, std::u16string_view rString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32) const
convert string to measure with meCoreMeasureUnit, using optional min and max values ...
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
void pushGroupForPostProcessing(css::uno::Reference< css::drawing::XShapes > &rShapes)
XMLTextShapeImportHelper(SvXMLImport &rImp)
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) override
this function is called whenever the implementation classes like to add this new shape to the given X...
static bool convert(std::string_view rStrImpValue, css::text::TextContentAnchorType &rType)
constexpr OUStringLiteral gsAnchorPageNo(u"AnchorPageNo")
Handling of tokens in XML:
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...
#define XML_ELEMENT(prefix, name)
const SvXMLUnitConverter & GetMM100UnitConverter() const
const css::uno::Reference< css::frame::XModel > & GetModel() const
constexpr OUStringLiteral gsVertOrientPosition(u"VertOrientPosition")
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)