31 #include <oox/token/namespaces.hxx>
32 #include <oox/token/properties.hxx>
33 #include <oox/token/tokens.hxx>
44 :
oox::drawingml::ShapeContext( rParent, pMasterShapePtr, pShapePtr )
45 , mpSlidePersistPtr( rSlidePersistPtr )
51 if( getNamespace( aElementToken ) == NMSP_dsp )
52 aElementToken = NMSP_ppt | getBaseToken( aElementToken );
54 switch( aElementToken )
59 case PPT_TOKEN( cNvPr ):
77 sal_Int32 nSubTypeIndex = rAttribs.
getString( XML_idx ).
get().toInt32();
80 if(!oSubType.has_value() && pMasterPersist)
85 nSubType = pTmpPlaceholder->getSubType();
95 if ( ( eShapeLocation ==
Slide ) || ( eShapeLocation ==
Layout ) )
98 sal_Int32 nFirstPlaceholder = 0;
99 sal_Int32 nSecondPlaceholder = 0;
103 nFirstPlaceholder = XML_ctrTitle;
104 nSecondPlaceholder = XML_title;
108 nFirstPlaceholder = XML_subTitle;
109 nSecondPlaceholder = XML_body;
113 nFirstPlaceholder = XML_obj;
114 nSecondPlaceholder = XML_body;
130 nFirstPlaceholder = nSubType;
135 if ( nFirstPlaceholder )
138 if ( eShapeLocation ==
Layout )
143 else if ( eShapeLocation ==
Slide )
145 if ( pMasterPersist )
148 pPPTShapePtr->
getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
154 " will get shape reference " << pPlaceholder->getId() <<
" applied");
155 mpShapePtr->applyShapeReference( *pPlaceholder );
171 case PPT_TOKEN( spPr ):
174 case PPT_TOKEN(
style ):
177 case PPT_TOKEN( txBody ):
180 xTextBody->getTextProperties().maPropertyMap.setProperty( PROP_FontIndependentLineSpacing,
true );
184 case PPT_TOKEN( txXfrm ):
190 return ShapeContext::onCreateContext(aElementToken, rAttribs);
void setReferenced(bool bReferenced)
OptValue< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
OptValue< OUString > getString(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute.
virtual ::oox::core::ContextHandlerRef onCreateContext(::sal_Int32 Element, const ::oox::AttributeList &rAttribs) override
bool hasAttribute(sal_Int32 nAttrToken) const
Returns true, if the specified attribute is present.
ShapeLocation getShapeLocation() const
static oox::drawingml::ShapePtr findPlaceholder(const sal_Int32 nFirstSubType, const sal_Int32 nSecondSubType, const OptValue< sal_Int32 > &oSubTypeIndex, std::vector< oox::drawingml::ShapePtr > &rShapes, bool bMasterOnly=false)
void setPlaceholder(oox::drawingml::ShapePtr pPlaceholder)
const OptValue< sal_Int32 > & getSubTypeIndex() const
std::shared_ptr< TextBody > TextBodyPtr
Provides access to attribute values of an element.
exports com.sun.star. style
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< SlidePersist > SlidePersistPtr
context to import a CT_Transform2D
std::shared_ptr< Shape > ShapePtr
SlidePersistPtr mpSlidePersistPtr
Helper class that provides a context stack.
OptValue< sal_Int32 > getToken(sal_Int32 nAttrToken) const
Returns the token identifier of the value of the specified attribute.