20 #include <com/sun/star/beans/XPropertySet.hpp>
21 #include <com/sun/star/container/XNamed.hpp>
22 #include <com/sun/star/drawing/XDrawPage.hpp>
41 #include <oox/token/namespaces.hxx>
42 #include <oox/token/properties.hxx>
43 #include <oox/token/tokens.hxx>
56 : FragmentHandler2( rFilter, rFragmentPath )
57 , mpSlidePersistPtr( pPersistPtr )
58 , meShapeLocation( eShapeLocation )
60 OUString aVMLDrawingFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc(
u"vmlDrawing" );
61 if( !aVMLDrawingFragmentPath.isEmpty() )
63 getFilter(), aVMLDrawingFragmentPath, *pPersistPtr->getDrawing() ) );
74 switch( aElementToken )
76 case PPT_TOKEN( sldMaster ):
77 case PPT_TOKEN( handoutMaster ):
78 case PPT_TOKEN( sld ):
81 Reference< css::beans::XPropertySet > xSet(xSlide, UNO_QUERY);
86 if (aShowMasterShapes.
has() && !aShowMasterShapes.
get())
87 xSet->setPropertyValue(
"IsBackgroundObjectsVisible",
Any(
false));
94 case PPT_TOKEN(
notes ):
98 OUString aNotesFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc(
u"notesMaster" );
100 std::vector< SlidePersistPtr >& rMasterPages( rFilter.
getMasterPages() );
101 bool bNotesFragmentPathFound =
false;
102 for (
auto const& masterPage : rMasterPages)
104 if( masterPage->getPath() == aNotesFragmentPath )
108 bNotesFragmentPathFound=
true;
115 std::make_shared<PPTShape>(
Master,
"com.sun.star.drawing.GroupShape" ),
mpSlidePersistPtr->getNotesTextStyle() );
116 pMasterPersistPtr->setPath( aNotesFragmentPath );
117 rFilter.getMasterPages().push_back( pMasterPersistPtr );
119 rFilter.importFragment( xMasterFragmentHandler );
124 case PPT_TOKEN( notesMaster ):
126 case PPT_TOKEN( cSld ):
130 case PPT_TOKEN( spTree ):
134 std::make_shared<PPTShape>(
meShapeLocation,
"com.sun.star.drawing.GroupShape" ) );
138 case PPT_TOKEN( controls ):
150 case PPT_TOKEN( timing ):
154 case PPT_TOKEN( hf ):
158 case PPT_TOKEN( bg ):
160 case PPT_TOKEN( bgPr ):
168 case PPT_TOKEN( bgRef ):
170 const FillProperties *pFillProperties =
nullptr;
175 ? std::make_shared<FillProperties>( *pFillProperties )
176 : std::make_shared<FillProperties>();
183 case A_TOKEN( overrideClrMapping ):
184 case PPT_TOKEN( clrMap ):
188 ? std::make_shared<oox::drawingml::ClrMap>()
195 case PPT_TOKEN( clrMapOvr ):
196 case PPT_TOKEN( sldLayoutIdLst ):
198 case PPT_TOKEN( txStyles ):
200 case PPT_TOKEN( custDataLst ):
201 case PPT_TOKEN( tagLst ):
205 case PPT_TOKEN( cmLst ):
207 case PPT_TOKEN(
cm ):
220 case PPT_TOKEN(
pos ):
226 case PPT_TOKEN( cmAuthor ):
229 _author.
id = rAttribs.
getString(XML_id, OUString());
252 Reference< XNamed > xNamed( xSlide, UNO_QUERY );
257 catch( uno::Exception& )
std::shared_ptr< FillProperties > FillPropertiesPtr
A helper that maps property identifiers to property values.
OptValue< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
std::vector< SlidePersistPtr > & getMasterPages()
exports com.sun.star.form. control
OptValue< OUString > getXString(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute.
OptValue< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 aElementToken, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
bool setProperty(sal_Int32 nPropId, Type &&rValue)
Sets the specified property to the passed value.
OptValue< OUString > getString(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute.
void setProperties(const css::uno::Sequence< OUString > &rPropNames, const css::uno::Sequence< css::uno::Any > &rValues)
Puts the passed properties into the property set.
virtual void finalizeImport() override
SlidePersistPtr mpSlidePersistPtr
virtual ~SlideFragmentHandler() override
Contains information about a form control embedded in a draw page.
#define TOOLS_WARN_EXCEPTION(area, stream)
const ::std::vector< OUString > & getCharVector() const
SlideFragmentHandler(::oox::core::XmlFilterBase &rFilter, const OUString &rFragmentPath, const SlidePersistPtr &pPersistPtr, const ShapeLocation eShapeLocation)
OUString maName
Programmatical name of the form control.
A wrapper for a UNO property set.
OUString maFragmentPath
Path to the fragment describing the form control properties.
Provides access to attribute values of an element.
::std::vector< OUString > maCharVector
PropertyMap maSlideProperties
virtual void onCharacters(const OUString &rChars) override
Will be called before a new child element starts, or if the current element is about to be left...
::rtl::Reference< ContextHandler > ContextHandlerRef
std::shared_ptr< ClrMap > ClrMapPtr
::rtl::Reference< FragmentHandler > FragmentHandlerRef
std::shared_ptr< SlidePersist > SlidePersistPtr
void setShapeId(sal_Int32 nShapeId)
Sets the string representation of the passed numeric shape identifier.
ShapeLocation meShapeLocation