merge the formfield patch from ooo-build
[ooovba.git] / sd / source / filter / ppt / pptinanimations.hxx
blobef319c41b3b7178df08532ec66f4f9dba811f738
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pptinanimations.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SD_PPT_INANIMATIONS_HXX
32 #define _SD_PPT_INANIMATIONS_HXX
34 #include <com/sun/star/animations/XTimeContainer.hpp>
35 #include <com/sun/star/drawing/XDrawPage.hpp>
37 #ifndef _SD_PPTANIMATIONS_HXX
38 #include "pptanimations.hxx"
39 #endif
40 #include <animations.hxx>
42 #ifdef DBG_ANIM_LOG
43 #include <stdio.h>
44 #endif
45 #include <svx/svdfppt.hxx>
47 #include <list>
49 class DffRecordHeader;
50 class SdPage;
51 class SvStream;
52 class ImplSdPPTImport;
54 namespace ppt
56 class PropertySet;
57 class Atom;
59 class AnimationImporter
61 public:
62 AnimationImporter( ImplSdPPTImport* pPPTImport, SvStream& rStCtrl );
64 void import( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage, const DffRecordHeader& rProgTagContentHd );
66 private:
67 void importAnimationContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParent );
68 void importTimeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
69 void importAnimationNodeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
70 void importAnimationSubContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
72 void importAnimateSetContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
73 void importAnimateFilterContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
74 void importAnimateContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
75 void importAnimateScaleContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
76 void importAnimateColorContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
77 void importAnimateRotationContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
78 void importAnimateMotionContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
79 void importCommandContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
80 void importAudioContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
82 void importAnimationEvents( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
83 void importAnimationValues( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
84 void importAnimationActions( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
85 void importAnimateAttributeTargetContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
87 void importAnimateKeyPoints( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
88 void importPropertySetContainer( const Atom* pAtom,PropertySet& rSet );
89 bool importAttributeValue( const Atom* pAtom, com::sun::star::uno::Any& rAny );
90 bool importAttributeNamesContainer( const Atom* pAtom, rtl::OUString& rAttributeNames );
91 sal_Int32 importTargetElementContainer( const Atom* pAtom, ::com::sun::star::uno::Any& rTarget, sal_Int16& nSubType );
93 void fillNode( ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xTiming, const AnimationNode& rNode, const PropertySet& rSet );
94 ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > createNode( const Atom* pAtom, const AnimationNode& rNode );
96 bool convertAnimationNode( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParent );
97 bool convertAnimationValue( MS_AttributeNames eAttribute, com::sun::star::uno::Any& rValue );
99 void fixMainSequenceTiming( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
100 void fixInteractiveSequenceTiming( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
102 void processAfterEffectNodes();
104 ::com::sun::star::uno::Any implGetColorAny( sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC );
105 sal_Int16 implGetColorSpace( sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC );
107 private:
108 ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > mxRootNode;
110 ImplSdPPTImport* mpPPTImport;
111 SvStream& mrStCtrl;
113 sd::AfterEffectNodeList maAfterEffectNodes;
115 #ifdef DBG_ANIM_LOG
116 FILE * mpFile;
117 #endif
119 void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend );
120 void dump_atom( const Atom* pAtom, bool bNewLine = true );
121 void dump( sal_uInt32 nLen, bool bNewLine = true );
122 void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
123 void dump_target( ::com::sun::star::uno::Any& rAny );
124 void dump( ::com::sun::star::uno::Any& rAny );
125 void dump( const PropertySet& rSet );
126 void dump( const AnimationNode& rNode );
127 void dump( const char * pText );
128 void dump( const rtl::OUString& rString );
129 void dump( const char * pText, sal_Int32 nInt );
130 void dump( const char * pText, double fDouble );
131 void dump( const char * pText, const char * pText2 );
132 void dump( const char * pText, const rtl::OUString& rString );
135 } // namespace ppt
137 #endif