28 #include <oox/token/namespaces.hxx>
29 #include <oox/token/tokens.hxx>
30 #include <oox/token/properties.hxx>
41 :
oox::drawingml::GraphicShapeContext( rParent, pMasterShapePtr, pShapePtr )
42 , mpSlidePersistPtr( rSlidePersistPtr )
48 switch( aElementToken )
53 case PPT_TOKEN(cNvPr):
62 bool bHasIdx = !sIdx.isEmpty();
63 sal_Int32 nIdx = sIdx.toInt32();
67 if ( nSubType || bHasIdx )
75 if ( bHasIdx && eShapeLocation ==
Slide )
79 if ( pMasterPersist && rAttribs.
hasAttribute( XML_idx ) )
82 if ( !pPlaceholder && ( ( eShapeLocation ==
Slide ) || ( eShapeLocation ==
Layout ) ) )
86 sal_Int32 nFirstPlaceholder = 0;
87 sal_Int32 nSecondPlaceholder = 0;
91 nFirstPlaceholder = XML_ctrTitle;
92 nSecondPlaceholder = XML_title;
95 nFirstPlaceholder = XML_subTitle;
96 nSecondPlaceholder = XML_title;
99 nFirstPlaceholder = XML_body;
114 nFirstPlaceholder = nSubType;
119 if ( nFirstPlaceholder )
121 if ( eShapeLocation ==
Layout )
124 else if ( eShapeLocation ==
Slide )
127 if ( pMasterPersist )
129 pPPTShapePtr->
getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
135 bool bUseText =
true;
136 switch( pPlaceholder->getSubType() )
156 pPlaceholder->getShapeProperties().setAnyProperty(
157 PROP_URL,
mpShapePtr->getShapeProperties().getProperty(PROP_URL));
158 mpShapePtr->applyShapeReference( *pPlaceholder, bUseText );
170 case PPT_TOKEN(spPr):
173 case PPT_TOKEN(
style):
176 case PPT_TOKEN(txBody):
184 return GraphicShapeContext::onCreateContext( aElementToken, rAttribs );
void setReferenced(bool bReferenced)
SlidePersistPtr mpSlidePersistPtr
OptValue< OUString > getString(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute.
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)
virtual ::oox::core::ContextHandlerRef onCreateContext(::sal_Int32 Element, const ::oox::AttributeList &rAttribs) override
std::shared_ptr< SlidePersist > SlidePersistPtr
std::shared_ptr< Shape > ShapePtr
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.