summaryrefslogtreecommitdiff
path: root/oox/inc/oox/ppt
diff options
context:
space:
mode:
Diffstat (limited to 'oox/inc/oox/ppt')
-rw-r--r--oox/inc/oox/ppt/animationspersist.hxx132
-rw-r--r--oox/inc/oox/ppt/backgroundproperties.hxx50
-rw-r--r--oox/inc/oox/ppt/headerfooter.hxx51
-rw-r--r--oox/inc/oox/ppt/layoutfragmenthandler.hxx49
-rw-r--r--oox/inc/oox/ppt/pptimport.hxx89
-rw-r--r--oox/inc/oox/ppt/pptshape.hxx72
-rw-r--r--oox/inc/oox/ppt/pptshapecontext.hxx46
-rw-r--r--oox/inc/oox/ppt/pptshapegroupcontext.hxx58
-rw-r--r--oox/inc/oox/ppt/pptshapepropertiescontext.hxx46
-rw-r--r--oox/inc/oox/ppt/presentationfragmenthandler.hxx72
-rw-r--r--oox/inc/oox/ppt/slidefragmenthandler.hxx62
-rw-r--r--oox/inc/oox/ppt/slidemastertextstylescontext.hxx51
-rw-r--r--oox/inc/oox/ppt/slidepersist.hxx153
-rw-r--r--oox/inc/oox/ppt/slidetimingcontext.hxx57
-rw-r--r--oox/inc/oox/ppt/slidetransition.hxx75
-rw-r--r--oox/inc/oox/ppt/slidetransitioncontext.hxx60
-rw-r--r--oox/inc/oox/ppt/soundactioncontext.hxx61
-rw-r--r--oox/inc/oox/ppt/timenode.hxx134
-rw-r--r--oox/inc/oox/ppt/timenodelistcontext.hxx74
19 files changed, 1392 insertions, 0 deletions
diff --git a/oox/inc/oox/ppt/animationspersist.hxx b/oox/inc/oox/ppt/animationspersist.hxx
new file mode 100644
index 000000000000..0ff930bfa080
--- /dev/null
+++ b/oox/inc/oox/ppt/animationspersist.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef OOX_PPT_ANIMATIONPERSIST
+#define OOX_PPT_ANIMATIONPERSIST
+
+#include <list>
+#include <boost/shared_ptr.hpp>
+#include <boost/array.hpp>
+
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/drawing/XShape.hpp>
+
+#include "oox/drawingml/drawingmltypes.hxx"
+#include "oox/ppt/slidepersist.hxx"
+
+namespace oox { namespace ppt {
+
+ enum {
+ NP_TO = 0,
+ NP_FROM, NP_BY, NP_USERDATA, NP_ATTRIBUTENAME,
+ NP_ACCELERATION, NP_AUTOREVERSE, NP_DECELERATE, NP_DURATION, NP_FILL,
+ NP_REPEATCOUNT, NP_REPEATDURATION, NP_RESTART,
+ NP_DIRECTION, NP_COLORINTERPOLATION, NP_CALCMODE, NP_TRANSFORMTYPE,
+ NP_PATH,
+ NP_ENDSYNC, NP_ITERATETYPE, NP_ITERATEINTERVAL,
+ NP_SUBITEM, NP_TARGET, NP_COMMAND, NP_PARAMETER,
+ NP_VALUES, NP_FORMULA, NP_KEYTIMES, NP_DISPLAY,
+ _NP_SIZE
+ };
+
+ typedef boost::array< ::com::sun::star::uno::Any, _NP_SIZE > NodePropertyMap;
+
+
+ /** data for CT_TLShapeTargetElement */
+ struct ShapeTargetElement
+ {
+ ShapeTargetElement()
+ : mnType( 0 )
+ {}
+ void convert( ::com::sun::star::uno::Any & aAny, sal_Int16 & rSubType ) const;
+
+ sal_Int32 mnType;
+ sal_Int32 mnRangeType;
+ drawingml::IndexRange maRange;
+ ::rtl::OUString msSubShapeId;
+ };
+
+
+ /** data for CT_TLTimeTargetElement */
+ struct AnimTargetElement
+ {
+ AnimTargetElement()
+ : mnType( 0 )
+ {}
+ /** convert to a set of properties */
+ ::com::sun::star::uno::Any convert(const SlidePersistPtr & pSlide, sal_Int16 & nSubType) const;
+
+ sal_Int32 mnType;
+ ::rtl::OUString msValue;
+
+ ShapeTargetElement maShapeTarget;
+ };
+
+ typedef boost::shared_ptr< AnimTargetElement > AnimTargetElementPtr;
+
+ struct AnimationCondition;
+
+ typedef ::std::list< AnimationCondition > AnimationConditionList;
+
+ /** data for CT_TLTimeCondition */
+ struct AnimationCondition
+ {
+ AnimationCondition()
+ : mnType( 0 )
+ {}
+
+ ::com::sun::star::uno::Any convert(const SlidePersistPtr & pSlide) const;
+ static ::com::sun::star::uno::Any convertList(const SlidePersistPtr & pSlide, const AnimationConditionList & l);
+
+ AnimTargetElementPtr & getTarget()
+ { if(!mpTarget) mpTarget.reset( new AnimTargetElement ); return mpTarget; }
+ ::com::sun::star::uno::Any maValue;
+ sal_Int32 mnType;
+ private:
+ AnimTargetElementPtr mpTarget;
+ };
+
+
+ struct TimeAnimationValue
+ {
+ ::rtl::OUString msFormula;
+ ::rtl::OUString msTime;
+ ::com::sun::star::uno::Any maValue;
+ };
+
+ typedef ::std::list< TimeAnimationValue > TimeAnimationValueList;
+
+} }
+
+
+
+
+
+#endif
diff --git a/oox/inc/oox/ppt/backgroundproperties.hxx b/oox/inc/oox/ppt/backgroundproperties.hxx
new file mode 100644
index 000000000000..7972d20844e1
--- /dev/null
+++ b/oox/inc/oox/ppt/backgroundproperties.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_POWERPOINT_BACKGROUNDPROPERTIES_HXX
+#define OOX_POWERPOINT_BACKGROUNDPROPERTIES_HXX
+
+#include "oox/core/contexthandler.hxx"
+#include "oox/drawingml/fillproperties.hxx"
+
+namespace oox { namespace ppt {
+
+// ---------------------------------------------------------------------
+
+class BackgroundPropertiesContext : public ::oox::core::ContextHandler
+{
+public:
+ BackgroundPropertiesContext( ::oox::core::ContextHandler& rParent, ::oox::drawingml::FillProperties& rFillProperties ) throw();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ ::oox::drawingml::FillProperties& mrFillProperties;
+};
+
+} }
+
+#endif // OOX_POWERPOINT_BACKGROUNDPROPERTIES_HXX
diff --git a/oox/inc/oox/ppt/headerfooter.hxx b/oox/inc/oox/ppt/headerfooter.hxx
new file mode 100644
index 000000000000..f29124240cb7
--- /dev/null
+++ b/oox/inc/oox/ppt/headerfooter.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_HEADERFOOTER
+#define OOX_PPT_HEADERFOOTER
+
+#include <sal/types.h>
+
+namespace oox { namespace ppt {
+
+ struct HeaderFooter
+ {
+ sal_Bool mbSlideNumber;
+ sal_Bool mbHeader;
+ sal_Bool mbFooter;
+ sal_Bool mbDateTime;
+
+ HeaderFooter()
+ : mbSlideNumber( sal_True )
+ , mbHeader( sal_True )
+ , mbFooter( sal_True )
+ , mbDateTime( sal_True ) {};
+ };
+
+} }
+
+#endif
diff --git a/oox/inc/oox/ppt/layoutfragmenthandler.hxx b/oox/inc/oox/ppt/layoutfragmenthandler.hxx
new file mode 100644
index 000000000000..bde8a46b0a94
--- /dev/null
+++ b/oox/inc/oox/ppt/layoutfragmenthandler.hxx
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_LAYOUTFRAGMENTHANDLER
+#define OOX_PPT_LAYOUTFRAGMENTHANDLER
+
+#include "oox/ppt/slidefragmenthandler.hxx"
+
+#include <vector>
+
+namespace oox { namespace ppt {
+
+class LayoutFragmentHandler : public SlideFragmentHandler
+{
+public:
+ LayoutFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath, SlidePersistPtr pMasterPersistPtr ) throw();
+ virtual ~LayoutFragmentHandler() throw();
+
+ virtual void SAL_CALL endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+};
+
+} }
+
+#endif // OOX_PPT_LAYOUTFRAGMENTHANDLER
diff --git a/oox/inc/oox/ppt/pptimport.hxx b/oox/inc/oox/ppt/pptimport.hxx
new file mode 100644
index 000000000000..c4ee29447c64
--- /dev/null
+++ b/oox/inc/oox/ppt/pptimport.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_POWERPOINT_POWERPOINTIMPORT_HXX
+#define OOX_POWERPOINT_POWERPOINTIMPORT_HXX
+
+#include "oox/core/xmlfilterbase.hxx"
+
+#include <com/sun/star/animations/XAnimationNode.hpp>
+#include <oox/drawingml/theme.hxx>
+#include "oox/ppt/presentationfragmenthandler.hxx"
+#include "oox/ppt/slidepersist.hxx"
+#include "tokens.hxx"
+#include <vector>
+#include <map>
+
+namespace oox { namespace ppt {
+
+// ---------------------------------------------------------------------
+
+class PowerPointImport : public oox::core::XmlFilterBase
+{
+public:
+
+ PowerPointImport( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr );
+ virtual ~PowerPointImport();
+
+ // from FilterBase
+ virtual bool importDocument() throw();
+ virtual bool exportDocument() throw();
+
+ virtual const ::oox::drawingml::Theme* getCurrentTheme() const;
+ virtual ::oox::vml::Drawing* getVmlDrawing();
+ virtual const oox::drawingml::table::TableStyleListPtr getTableStyles();
+ virtual ::oox::drawingml::chart::ChartConverter& getChartConverter();
+
+ void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
+ std::map< rtl::OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
+ std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; };
+ std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; };
+ std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; };
+
+ sal_Int32 getSchemeColor( sal_Int32 nToken ) const;
+
+private:
+ virtual GraphicHelper* implCreateGraphicHelper() const;
+ virtual ::rtl::OUString implGetImplementationName() const;
+
+private:
+ rtl::OUString maTableStyleListPath;
+ oox::drawingml::table::TableStyleListPtr mpTableStyleList;
+
+ SlidePersistPtr mpActualSlidePersist;
+ std::map< rtl::OUString, oox::drawingml::ThemePtr > maThemes;
+
+ std::vector< SlidePersistPtr > maDrawPages;
+ std::vector< SlidePersistPtr > maMasterPages;
+ std::vector< SlidePersistPtr > maNotesPages;
+
+ ::boost::shared_ptr< ::oox::drawingml::chart::ChartConverter > mxChartConv;
+};
+
+} }
+
+#endif // OOX_POWERPOINT_POWERPOINTIMPORT_HXX
diff --git a/oox/inc/oox/ppt/pptshape.hxx b/oox/inc/oox/ppt/pptshape.hxx
new file mode 100644
index 000000000000..3376e5bb1ace
--- /dev/null
+++ b/oox/inc/oox/ppt/pptshape.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_PRESENTATION_PPTSHAPE_HXX
+#define OOX_PPT_PRESENTATION_PPTSHAPE_HXX
+
+#include "oox/drawingml/shape.hxx"
+#include "oox/ppt/slidepersist.hxx"
+
+namespace oox { namespace ppt {
+
+class PPTShape : public oox::drawingml::Shape
+{
+ ShapeLocation meShapeLocation; // placeholdershapes (mnSubType != 0) on Master are never displayed
+ sal_Bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
+ // placeholdershapes on Slide are displayed always
+
+public:
+
+ PPTShape( const oox::ppt::ShapeLocation eShapeLocation,
+ const sal_Char* pServiceType = NULL );
+ virtual ~PPTShape();
+
+ using oox::drawingml::Shape::addShape;
+ // addShape is creating and inserting the corresponding XShape.
+ void addShape(
+ const oox::core::XmlFilterBase& rFilterBase,
+ const SlidePersist& rPersist,
+ const oox::drawingml::Theme* pTheme,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
+ const com::sun::star::awt::Rectangle* pShapeRect = 0,
+ ::oox::drawingml::ShapeIdMap* pShapeMap = 0 );
+
+ virtual void applyShapeReference( const oox::drawingml::Shape& rReferencedShape );
+
+ void setShapeLocation( const oox::ppt::ShapeLocation eShapeLocation ) { meShapeLocation = eShapeLocation; };
+ ShapeLocation getShapeLocation() const { return meShapeLocation; };
+ sal_Bool isReferenced() const { return mbReferenced; };
+ void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; };
+
+ static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes );
+ static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes );
+ static oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes );
+};
+
+} }
+
+#endif // OOX_PPT_PRESENTATION_PPTSHAPE_HXX
diff --git a/oox/inc/oox/ppt/pptshapecontext.hxx b/oox/inc/oox/ppt/pptshapecontext.hxx
new file mode 100644
index 000000000000..aff410db7fb7
--- /dev/null
+++ b/oox/inc/oox/ppt/pptshapecontext.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_PPTSHAPECONTEXT_HXX
+#define OOX_PPT_PPTSHAPECONTEXT_HXX
+
+#include "oox/drawingml/shapecontext.hxx"
+
+namespace oox { namespace ppt {
+
+class PPTShapeContext : public ::oox::drawingml::ShapeContext
+{
+ SlidePersistPtr mpSlidePersistPtr;
+
+public:
+ PPTShapeContext( ::oox::core::ContextHandler& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+};
+
+} }
+
+#endif // OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX
diff --git a/oox/inc/oox/ppt/pptshapegroupcontext.hxx b/oox/inc/oox/ppt/pptshapegroupcontext.hxx
new file mode 100644
index 000000000000..c69a6de78155
--- /dev/null
+++ b/oox/inc/oox/ppt/pptshapegroupcontext.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX
+#define OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX
+
+#include "oox/drawingml/shapegroupcontext.hxx"
+#include "oox/ppt/slidepersist.hxx"
+
+namespace oox { namespace ppt {
+
+class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext
+{
+ SlidePersistPtr mpSlidePersistPtr;
+ ShapeLocation meShapeLocation;
+
+public:
+ PPTShapeGroupContext(
+ ::oox::core::ContextHandler& rParent,
+ const oox::ppt::SlidePersistPtr pSlidePersistPtr,
+ const oox::ppt::ShapeLocation eShapeLocation,
+ oox::drawingml::ShapePtr pMasterShapePtr,
+ oox::drawingml::ShapePtr pGroupShapePtr );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+
+};
+
+} }
+
+#endif // OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX
diff --git a/oox/inc/oox/ppt/pptshapepropertiescontext.hxx b/oox/inc/oox/ppt/pptshapepropertiescontext.hxx
new file mode 100644
index 000000000000..9cbab5755b51
--- /dev/null
+++ b/oox/inc/oox/ppt/pptshapepropertiescontext.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_PPTSHAPEPROPERTIESCONTEXT_HXX
+#define OOX_PPT_PPTSHAPEPROPERTIESCONTEXT_HXX
+
+#include "oox/drawingml/shapepropertiescontext.hxx"
+
+namespace oox { namespace ppt {
+
+class PPTShapePropertiesContext : public ::oox::drawingml::ShapePropertiesContext
+{
+public:
+ PPTShapePropertiesContext( ::oox::core::ContextHandler& rParent, ::oox::drawingml::Shape& rShape );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+};
+
+} }
+
+#endif // OOX_PPT_PPTSHAPEGROUPCONTEXT_HXX
diff --git a/oox/inc/oox/ppt/presentationfragmenthandler.hxx b/oox/inc/oox/ppt/presentationfragmenthandler.hxx
new file mode 100644
index 000000000000..281b3d333d56
--- /dev/null
+++ b/oox/inc/oox/ppt/presentationfragmenthandler.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_PRESENTATION_FRAGMENTHANDLER
+#define OOX_PPT_PRESENTATION_FRAGMENTHANDLER
+
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include "oox/drawingml/textliststyle.hxx"
+#include "oox/ppt/slidepersist.hxx"
+#include "oox/core/fragmenthandler.hxx"
+#include "oox/core/relations.hxx"
+#include "customshowlistcontext.hxx"
+
+#include <stack>
+#include <vector>
+
+namespace oox { namespace ppt {
+
+class PresentationFragmentHandler : public ::oox::core::FragmentHandler
+{
+public:
+ PresentationFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath ) throw();
+ virtual ~PresentationFragmentHandler() throw();
+
+ virtual void SAL_CALL startDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ bool importSlide( const ::oox::core::FragmentHandlerRef& rxSlideFragmentHandler,
+ const oox::ppt::SlidePersistPtr pPersist );
+
+private:
+ std::vector< rtl::OUString > maSlideMasterVector;
+ std::vector< rtl::OUString > maSlidesVector;
+ std::vector< rtl::OUString > maNotesMasterVector;
+ ::oox::drawingml::TextListStylePtr mpTextListStyle;
+
+ ::com::sun::star::awt::Size maSlideSize;
+ ::com::sun::star::awt::Size maNotesSize;
+
+ std::vector< CustomShow > maCustomShowList;
+};
+
+} }
+
+#endif // OOX_PPT_PRESENTATION_FRAGMENTHANDLER
diff --git a/oox/inc/oox/ppt/slidefragmenthandler.hxx b/oox/inc/oox/ppt/slidefragmenthandler.hxx
new file mode 100644
index 000000000000..4fe0e3f6a30f
--- /dev/null
+++ b/oox/inc/oox/ppt/slidefragmenthandler.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_SLIDEFRAGMENTHANDLER
+#define OOX_PPT_SLIDEFRAGMENTHANDLER
+
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include "oox/helper/propertymap.hxx"
+#include "oox/core/fragmenthandler.hxx"
+#include "oox/ppt/slidepersist.hxx"
+
+#include <stack>
+#include <vector>
+#include <map>
+
+namespace oox { namespace ppt {
+
+class SlideFragmentHandler : public ::oox::core::FragmentHandler
+{
+public:
+ SlideFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath, SlidePersistPtr pPersistPtr, const ShapeLocation eShapeLocation ) throw();
+ virtual ~SlideFragmentHandler() throw();
+
+ virtual void SAL_CALL endDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ SlidePersistPtr mpSlidePersistPtr;
+ ShapeLocation meShapeLocation;
+
+private:
+ ::rtl::OUString maSlideName;
+ PropertyMap maSlideProperties;
+};
+
+} }
+
+#endif // OOX_PPT_SLIDEFRAGMENTHANDLER
diff --git a/oox/inc/oox/ppt/slidemastertextstylescontext.hxx b/oox/inc/oox/ppt/slidemastertextstylescontext.hxx
new file mode 100644
index 000000000000..03b7a51faa2e
--- /dev/null
+++ b/oox/inc/oox/ppt/slidemastertextstylescontext.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_DRAWINGML_SLIDEMASTERTEXTSTYLESCONTEXT_HXX
+#define OOX_DRAWINGML_SLIDEMASTERTEXTSTYLESCONTEXT_HXX
+
+#include "oox/drawingml/theme.hxx"
+#include "oox/core/contexthandler.hxx"
+#include "oox/core/fragmenthandler.hxx"
+#include "oox/ppt/slidepersist.hxx"
+
+namespace oox { namespace ppt {
+
+class SlideMasterTextStylesContext : public oox::core::ContextHandler
+{
+public:
+ SlideMasterTextStylesContext( ::oox::core::ContextHandler& rParent, SlidePersistPtr pSlidePersistPtr );
+ ~SlideMasterTextStylesContext();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ SlidePersistPtr mpSlidePersistPtr;
+};
+
+} }
+
+#endif // OOX_DRAWINGML_SLIDEMASTERTEXTSTYLESCONTEXT_HXX
diff --git a/oox/inc/oox/ppt/slidepersist.hxx b/oox/inc/oox/ppt/slidepersist.hxx
new file mode 100644
index 000000000000..31156a56ee84
--- /dev/null
+++ b/oox/inc/oox/ppt/slidepersist.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_POWERPOINT_SLIDEPERSIST_HXX
+#define OOX_POWERPOINT_SLIDEPERSIST_HXX
+
+#include "tokens.hxx"
+#include <boost/shared_ptr.hpp>
+#include "oox/drawingml/shape.hxx"
+#include "oox/drawingml/theme.hxx"
+#include "oox/drawingml/clrscheme.hxx"
+#include "oox/drawingml/textliststyle.hxx"
+#include "oox/drawingml/textparagraphproperties.hxx"
+#include <oox/ppt/headerfooter.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/animations/XAnimationNode.hpp>
+#include "oox/core/fragmenthandler.hxx"
+
+#include <list>
+
+namespace oox { namespace vml { class Drawing; } }
+
+namespace oox { namespace ppt {
+
+enum ShapeLocation
+{
+ Master,
+ Layout,
+ Slide
+};
+
+// ---------------------------------------------------------------------
+class TimeNode;
+class SlidePersist;
+
+typedef boost::shared_ptr< SlidePersist > SlidePersistPtr;
+
+class SlidePersist : public boost::enable_shared_from_this< SlidePersist >
+{
+
+public:
+ SlidePersist( oox::core::XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool bNotes,
+ const com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage >&,
+ oox::drawingml::ShapePtr pShapesPtr, const ::oox::drawingml::TextListStylePtr & );
+ ~SlidePersist();
+
+ com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > getPage() const { return mxPage; };
+
+ void setMasterPersist( SlidePersistPtr pMasterPersistPtr ){ mpMasterPagePtr = pMasterPersistPtr; }
+ SlidePersistPtr getMasterPersist() const { return mpMasterPagePtr; }
+
+ void setPath( const rtl::OUString& rPath ) { maPath = rPath; }
+ const rtl::OUString getPath() const { return maPath; }
+
+ void setLayoutPath( const rtl::OUString& rLayoutPath ) { maLayoutPath = rLayoutPath; }
+ const rtl::OUString getLayoutPath() const { return maLayoutPath; }
+
+ void setTheme( const oox::drawingml::ThemePtr pThemePtr ){ mpThemePtr = pThemePtr; }
+ oox::drawingml::ThemePtr getTheme() const { return mpThemePtr; }
+
+ void setClrScheme( const oox::drawingml::ClrSchemePtr pClrSchemePtr ){ mpClrSchemePtr = pClrSchemePtr; }
+ oox::drawingml::ClrSchemePtr getClrScheme() const { return mpClrSchemePtr; }
+
+ void setClrMap( const oox::drawingml::ClrMapPtr pClrMapPtr ){ mpClrMapPtr = pClrMapPtr; }
+ oox::drawingml::ClrMapPtr getClrMap() const { return mpClrMapPtr; }
+
+ void setBackgroundProperties( const oox::drawingml::FillPropertiesPtr pFillPropertiesPtr ){ mpBackgroundPropertiesPtr = pFillPropertiesPtr; }
+ oox::drawingml::FillPropertiesPtr getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
+
+ sal_Bool isMasterPage() const { return mbMaster; }
+ sal_Bool isNotesPage() const { return mbNotes; }
+
+ void setLayoutValueToken( sal_Int32 nLayoutValueToken ) { mnLayoutValueToken = nLayoutValueToken; }
+ short getLayoutFromValueToken();
+
+
+ oox::drawingml::TextListStylePtr getDefaultTextStyle() const { return maDefaultTextStylePtr; }
+ oox::drawingml::TextListStylePtr getTitleTextStyle() const { return maTitleTextStylePtr; }
+ oox::drawingml::TextListStylePtr getBodyTextStyle() const { return maBodyTextStylePtr; }
+ oox::drawingml::TextListStylePtr getNotesTextStyle() const { return maNotesTextStylePtr; }
+ oox::drawingml::TextListStylePtr getOtherTextStyle() const { return maOtherTextStylePtr; }
+
+ oox::drawingml::ShapePtr getShapes() { return maShapesPtr; }
+ ::std::list< boost::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
+ oox::ppt::HeaderFooter& getHeaderFooter(){ return maHeaderFooter; };
+
+ oox::vml::Drawing* getDrawing() { return mpDrawingPtr.get(); }
+
+ void createXShapes( const oox::core::XmlFilterBase& rFilterBase );
+ void createBackground( const oox::core::XmlFilterBase& rFilterBase );
+ void applyTextStyles( const oox::core::XmlFilterBase& rFilterBase );
+
+ std::map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > >& getAnimNodesMap() { return maAnimNodesMap; };
+ ::oox::drawingml::ShapePtr getShape( const ::rtl::OUString & id ) { return maShapeMap[ id ]; }
+ ::oox::drawingml::ShapeIdMap& getShapeMap() { return maShapeMap; }
+
+private:
+ rtl::OUString maPath;
+ rtl::OUString maLayoutPath;
+ ::boost::shared_ptr< oox::vml::Drawing > mpDrawingPtr;
+ com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > mxPage;
+ oox::drawingml::ThemePtr mpThemePtr; // the theme that is used
+ oox::drawingml::ClrSchemePtr mpClrSchemePtr; // the local color scheme (if any)
+ oox::drawingml::ClrMapPtr mpClrMapPtr; // color mapping (if any)
+ SlidePersistPtr mpMasterPagePtr;
+
+ oox::drawingml::ShapePtr maShapesPtr;
+ oox::drawingml::FillPropertiesPtr mpBackgroundPropertiesPtr;
+ ::std::list< boost::shared_ptr< TimeNode > > maTimeNodeList;
+
+ oox::ppt::HeaderFooter maHeaderFooter;
+ sal_Int32 mnLayoutValueToken;
+ sal_Bool mbMaster;
+ sal_Bool mbNotes;
+
+ oox::drawingml::TextListStylePtr maDefaultTextStylePtr;
+ oox::drawingml::TextListStylePtr maTitleTextStylePtr;
+ oox::drawingml::TextListStylePtr maBodyTextStylePtr;
+ oox::drawingml::TextListStylePtr maNotesTextStylePtr;
+ oox::drawingml::TextListStylePtr maOtherTextStylePtr;
+
+ std::map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > > maAnimNodesMap;
+ std::map< ::rtl::OUString, ::oox::drawingml::ShapePtr > maShapeMap;
+};
+
+} }
+
+#endif // OOX_POWERPOINT_SLIDEPERSIST_HXX
diff --git a/oox/inc/oox/ppt/slidetimingcontext.hxx b/oox/inc/oox/ppt/slidetimingcontext.hxx
new file mode 100644
index 000000000000..911b6cbcdfb4
--- /dev/null
+++ b/oox/inc/oox/ppt/slidetimingcontext.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_SLIDETIMINGCONTEXT
+#define OOX_PPT_SLIDETIMINGCONTEXT
+
+#include <com/sun/star/animations/XTimeContainer.hpp>
+#include "oox/ppt/timenode.hxx"
+#include "oox/core/contexthandler.hxx"
+
+#include <stack>
+#include <vector>
+
+namespace oox { namespace ppt {
+
+class SlideTimingContext : public ::oox::core::ContextHandler
+{
+public:
+ SlideTimingContext( ::oox::core::ContextHandler& rParent, TimeNodePtrList & aTimeNodeList ) throw();
+ virtual ~SlideTimingContext() throw();
+
+ virtual void SAL_CALL endDocument( ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endFastElement( sal_Int32 aElement ) throw ( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+private:
+ TimeNodePtrList & maTimeNodeList;
+};
+
+} }
+
+#endif // OOX_PPT_SLIDETIMINGCONTEXT
diff --git a/oox/inc/oox/ppt/slidetransition.hxx b/oox/inc/oox/ppt/slidetransition.hxx
new file mode 100644
index 000000000000..df2eed4d6083
--- /dev/null
+++ b/oox/inc/oox/ppt/slidetransition.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef OOX_PPT_SLIDETRANSITION
+#define OOX_PPT_SLIDETRANSITION
+
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/animations/XTransitionFilter.hpp>
+
+namespace oox { class PropertyMap; }
+
+namespace oox { namespace ppt {
+
+ class SlideTransition
+ {
+ public:
+ SlideTransition();
+ explicit SlideTransition(const ::rtl::OUString & );
+
+ void setSlideProperties( PropertyMap& props );
+ void setTransitionFilterProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XTransitionFilter > & xFilter );
+
+ void setOoxTransitionSpeed( sal_Int32 nToken );
+ void setFadeColor( sal_Int32 nColor )
+ { mnFadeColor = nColor; }
+ void setMode( sal_Bool bMode )
+ { mbMode = bMode; }
+
+ static sal_Int16 ooxToOdpDirection( ::sal_Int32 nOoxType );
+ static sal_Int16 ooxToOdpEightDirections( ::sal_Int32 nOoxType );
+ static sal_Int16 ooxToOdpCornerDirections( ::sal_Int32 nOoxType );
+ static sal_Int16 ooxToOdpBorderDirections( ::sal_Int32 nOoxType );
+ static sal_Int16 ooxToOdpSideDirections( ::sal_Int32 nOoxType );
+ static sal_Bool ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType );
+
+ void setOoxTransitionType( ::sal_Int32 OoxType,
+ ::sal_Int32 param1, ::sal_Int32 param2 );
+ private:
+ ::sal_Int16 mnTransitionType;
+ ::sal_Int16 mnTransitionSubType;
+ ::sal_Bool mbTransitionDirectionNormal;
+ ::sal_Int16 mnAnimationSpeed;
+ ::sal_Int32 mnFadeColor;
+ ::sal_Bool mbMode; /**< http://api.openoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */
+ };
+
+} }
+
+#endif
diff --git a/oox/inc/oox/ppt/slidetransitioncontext.hxx b/oox/inc/oox/ppt/slidetransitioncontext.hxx
new file mode 100644
index 000000000000..047c417936e7
--- /dev/null
+++ b/oox/inc/oox/ppt/slidetransitioncontext.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_SLIDETRANSITIONCONTEXT
+#define OOX_PPT_SLIDETRANSITIONCONTEXT
+
+#include "oox/core/contexthandler.hxx"
+#include "oox/ppt/slidetransition.hxx"
+
+namespace oox { class PropertyMap; }
+
+namespace oox { namespace ppt {
+
+ class SlideTransitionContext : public ::oox::core::ContextHandler
+ {
+ public:
+ SlideTransitionContext( ::oox::core::ContextHandler& rParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes,
+ PropertyMap & aProperties ) throw();
+ virtual ~SlideTransitionContext() throw();
+
+ virtual void SAL_CALL endFastElement( sal_Int32 aElement ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext( ::sal_Int32 Element,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+ private:
+ PropertyMap& maSlideProperties;
+ ::sal_Bool mbHasTransition;
+ SlideTransition maTransition;
+ };
+
+} }
+
+#endif // OOX_PPT_SLIDEFRAGMENTHANDLER
diff --git a/oox/inc/oox/ppt/soundactioncontext.hxx b/oox/inc/oox/ppt/soundactioncontext.hxx
new file mode 100644
index 000000000000..48cfb072be78
--- /dev/null
+++ b/oox/inc/oox/ppt/soundactioncontext.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef OOX_PPT_SOUNDACTIONCONTEXT
+#define OOX_PPT_SOUNDACTIONCONTEXT
+
+#include "oox/core/contexthandler.hxx"
+
+namespace oox { class PropertyMap; }
+
+namespace oox { namespace ppt {
+
+class SoundActionContext : public ::oox::core::ContextHandler
+{
+public:
+ SoundActionContext( ::oox::core::ContextHandler& rParent, PropertyMap & aProperties ) throw();
+ virtual ~SoundActionContext() throw();
+
+ virtual void SAL_CALL endFastElement( sal_Int32 aElement ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+private:
+ PropertyMap& maSlideProperties;
+ bool mbHasStartSound;
+ bool mbLoopSound;
+ bool mbStopSound;
+ ::rtl::OUString msEmbedded;
+ ::rtl::OUString msLink;
+ ::rtl::OUString msSndName;
+};
+
+} }
+
+
+
+#endif
diff --git a/oox/inc/oox/ppt/timenode.hxx b/oox/inc/oox/ppt/timenode.hxx
new file mode 100644
index 000000000000..117d9ee7161c
--- /dev/null
+++ b/oox/inc/oox/ppt/timenode.hxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef OOX_DRAWINGML_TIMENODE_HXX
+#define OOX_DRAWINGML_TIMENODE_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <vector>
+#include <list>
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/animations/XAnimationNode.hpp>
+#include "oox/helper/propertymap.hxx"
+#include "oox/ppt/slidetransition.hxx"
+#include "oox/ppt/slidepersist.hxx"
+#include "oox/ppt/animationspersist.hxx"
+#include "oox/ppt/timenode.hxx"
+
+namespace oox { namespace ppt {
+
+ class TimeNode;
+ class SlideTransition;
+
+ typedef boost::shared_ptr< TimeNode > TimeNodePtr;
+ typedef ::std::list< TimeNodePtr > TimeNodePtrList;
+
+ class TimeNode
+ {
+ public:
+ typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any > UserDataMap;
+
+ TimeNode( sal_Int16 nNodeType );
+ virtual ~TimeNode();
+
+ NodePropertyMap & getNodeProperties() { return maNodeProperties; }
+ UserDataMap & getUserData() { return maUserData; }
+ void addChild( const TimeNodePtr & pChildPtr )
+ { maChildren.push_back( pChildPtr ); }
+
+ TimeNodePtrList & getChildren()
+ { return maChildren; }
+
+ void setId( sal_Int32 nId );
+ const ::rtl::OUString & getId() const { return msId; }
+
+ void addNode(
+ const ::oox::core::XmlFilterBase& rFilter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rxNode,
+ const SlidePersistPtr & slide);
+ // data setters
+ void setTo( const ::com::sun::star::uno::Any & aTo );
+ void setFrom( const ::com::sun::star::uno::Any & aFrom );
+ void setBy( const ::com::sun::star::uno::Any & aBy );
+ void setTransitionFilter( const SlideTransition & aTransition)
+ { maTransitionFilter = aTransition; }
+
+ void setNode(
+ const ::oox::core::XmlFilterBase& rFilter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode,
+ const SlidePersistPtr & pSlide );
+
+ AnimTargetElementPtr getTarget()
+ {
+ if( !mpTarget )
+ mpTarget.reset( new AnimTargetElement );
+ return mpTarget;
+ }
+
+ AnimationConditionList &getStartCondition()
+ { return maStCondList; }
+ AnimationConditionList &getEndCondition()
+ { return maEndCondList; }
+ AnimationConditionList &getNextCondition()
+ { return maNextCondList; }
+ AnimationConditionList &getPrevCondition()
+ { return maPrevCondList; }
+ AnimationCondition & getEndSyncValue()
+ { mbHasEndSyncValue = true; return maEndSyncValue; }
+ protected:
+
+ static rtl::OUString getServiceName( sal_Int16 nNodeType );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >
+ createAndInsert(
+ const ::oox::core::XmlFilterBase& rFilter,
+ const rtl::OUString& rServiceName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rxNode );
+
+ private:
+ const sal_Int16 mnNodeType;
+
+ TimeNodePtrList maChildren;
+
+ rtl::OUString msId;
+ NodePropertyMap maNodeProperties;
+ UserDataMap maUserData; // a sequence to be stored as "UserData" property
+ SlideTransition maTransitionFilter;
+ AnimTargetElementPtr mpTarget;
+ bool mbHasEndSyncValue; // set to true if we try to get the endSync.
+ AnimationCondition maEndSyncValue;
+ AnimationConditionList maStCondList, maEndCondList;
+ AnimationConditionList maPrevCondList, maNextCondList;
+ };
+
+} }
+
+
+#endif
diff --git a/oox/inc/oox/ppt/timenodelistcontext.hxx b/oox/inc/oox/ppt/timenodelistcontext.hxx
new file mode 100644
index 000000000000..8dbe54425125
--- /dev/null
+++ b/oox/inc/oox/ppt/timenodelistcontext.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_PPT_TIMENODELISTCONTEXT
+#define OOX_PPT_TIMENODELISTCONTEXT
+
+#include "oox/core/contexthandler.hxx"
+#include "oox/ppt/timenode.hxx"
+
+#include <com/sun/star/animations/XTimeContainer.hpp>
+
+namespace oox { namespace ppt {
+
+
+ class TimeNodeContext : public ::oox::core::ContextHandler
+ {
+ public:
+ virtual ~TimeNodeContext() throw();
+
+ static TimeNodeContext * SAL_CALL makeContext( ::oox::core::ContextHandler& rParent, sal_Int32 aElement, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs, const TimeNodePtr & pNode );
+
+ protected:
+ TimeNodeContext( ::oox::core::ContextHandler& rParent, sal_Int32 aElement, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs, const TimeNodePtr & pNode ) throw();
+
+ sal_Int32 mnElement;
+ TimeNodePtr mpNode;
+ };
+
+
+
+/** FastParser context for XML_tnLst, XML_subTnLst and XML_childTnLst */
+class TimeNodeListContext : public ::oox::core::ContextHandler
+{
+public:
+ TimeNodeListContext( ::oox::core::ContextHandler& rParent, TimeNodePtrList & aList ) throw();
+
+ virtual ~TimeNodeListContext() throw();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext( ::sal_Int32 Element,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+private:
+ TimeNodePtrList & maList;
+};
+
+} }
+
+#endif // OOX_PPT_SLIDEFRAGMENTHANDLER