20#include <com/sun/star/xml/sax/FastToken.hpp>
21#include <com/sun/star/drawing/LineStyle.hpp>
22#include <com/sun/star/beans/XMultiPropertySet.hpp>
32#include <oox/token/namespaces.hxx>
33#include <oox/token/tokens.hxx>
51, mpMasterShapePtr(
std::move( pMasterShapePtr ))
52, mpShapePtr(
std::move( pShapePtr ))
54 if( mpMasterShapePtr && mpShapePtr )
55 mpMasterShapePtr->addChild( mpShapePtr );
58ShapeContext::~ShapeContext()
64 switch( getBaseToken( aElementToken ) )
74 mpShapePtr->setDecorative(rAttribs.
getBool(XML_val,
false));
79 mpShapePtr->setHidden( rAttribs.
getBool( XML_hidden,
false ) );
85 case XML_hlinkMouseOver:
87 return new HyperLinkContext( *
this, rAttribs, getShape()->getShapeProperties() );
89 mpShapePtr->setSubType( rAttribs.
getToken( XML_type, XML_obj ) );
91 mpShapePtr->setSubTypeIndex( rAttribs.
getInteger( XML_idx, 0 ) );
96 return new ShapePropertiesContext( *
this, *mpShapePtr );
99 return new ShapeStyleContext( *
this, *mpShapePtr );
102 case XML_txbxContent:
104 if (!mpShapePtr->getTextBody())
105 mpShapePtr->setTextBody( std::make_shared<TextBody>() );
106 return new TextBodyContext( *
this, mpShapePtr );
110 const TextBodyPtr& rShapePtr = mpShapePtr->getTextBody();
120 if (!mpShapePtr->getTextBody())
121 mpShapePtr->setTextBody( std::make_shared<TextBody>() );
122 return new TextBodyPropertiesContext( *
this, rAttribs, mpShapePtr );
135 SAL_INFO(
"oox",
"ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
Provides access to attribute values of an element.
OUString getStringDefaulted(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute, returns an empty string if attribute not present...
bool hasAttribute(sal_Int32 nAttrToken) const
Returns true, if the specified attribute is present.
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
std::optional< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
Returns the token identifier of the value of the specified attribute.
ShapeContext(::oox::core::ContextHandler2Helper const &rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr)
context to import a CT_Transform2D
#define SAL_INFO(area, stream)
std::shared_ptr< Shape > ShapePtr
std::shared_ptr< TextBody > TextBodyPtr