31#include <oox/token/namespaces.hxx>
32#include <oox/token/properties.hxx>
33#include <oox/token/tokens.hxx>
45:
oox::drawingml::ShapeContext( rParent, pMasterShapePtr, pShapePtr )
46, mpSlidePersistPtr(
std::move( pSlidePersistPtr ))
52 if( getNamespace( aElementToken ) == NMSP_dsp )
53 aElementToken = NMSP_ppt | getBaseToken( aElementToken );
55 switch( aElementToken )
60 case PPT_TOKEN( cNvPr ):
78 sal_Int32 nSubTypeIndex = rAttribs.
getInteger( XML_idx, 0 );
81 if(!oSubType.has_value() && pMasterPersist)
86 nSubType = pTmpPlaceholder->getSubType();
96 if ( ( eShapeLocation ==
Slide ) || ( eShapeLocation ==
Layout ) )
99 sal_Int32 nFirstPlaceholder = 0;
100 sal_Int32 nSecondPlaceholder = 0;
104 nFirstPlaceholder = XML_ctrTitle;
105 nSecondPlaceholder = XML_title;
109 nFirstPlaceholder = XML_subTitle;
110 nSecondPlaceholder = XML_body;
114 nFirstPlaceholder = XML_obj;
115 nSecondPlaceholder = XML_body;
131 nFirstPlaceholder = nSubType;
136 if ( nFirstPlaceholder )
139 if ( eShapeLocation ==
Layout )
144 else if ( eShapeLocation ==
Slide )
146 if ( pMasterPersist )
149 pPPTShapePtr->
getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
155 " will get shape reference " << pPlaceholder->getId() <<
" applied");
156 mpShapePtr->applyShapeReference( *pPlaceholder );
172 case PPT_TOKEN( spPr ):
175 case PPT_TOKEN( style ):
178 case PPT_TOKEN( txBody ):
185 case PPT_TOKEN( txXfrm ):
191 return ShapeContext::onCreateContext(aElementToken, rAttribs);
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.
const std::optional< sal_Int32 > & getSubTypeIndex() const
context to import a CT_Transform2D
PPTShapeContext(::oox::core::ContextHandler2Helper const &rParent, SlidePersistPtr xSlidePersistPtr, const oox::drawingml::ShapePtr &pMasterShapePtr, const oox::drawingml::ShapePtr &pShapePtr)
SlidePersistPtr mpSlidePersistPtr
virtual ::oox::core::ContextHandlerRef onCreateContext(::sal_Int32 Element, const ::oox::AttributeList &rAttribs) override
static oox::drawingml::ShapePtr findPlaceholder(const sal_Int32 nFirstSubType, const sal_Int32 nSecondSubType, const std::optional< sal_Int32 > &oSubTypeIndex, std::vector< oox::drawingml::ShapePtr > &rShapes, bool bMasterOnly=false)
ShapeLocation getShapeLocation() const
void setReferenced(bool bReferenced)
void setPlaceholder(oox::drawingml::ShapePtr pPlaceholder)
static oox::drawingml::ShapePtr findPlaceholderByIndex(const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr > &rShapes, bool bMasterOnly=false)
#define SAL_INFO(area, stream)
std::shared_ptr< Shape > ShapePtr
std::shared_ptr< TextBody > TextBodyPtr
std::shared_ptr< SlidePersist > SlidePersistPtr
constexpr OUStringLiteral PROP_FontIndependentLineSpacing