bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / filter / ppt / pptinanimations.hxx
blob7964304c1abb35d7306ec1fb0d70c2508874139e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_FILTER_PPT_PPTINANIMATIONS_HXX
21 #define INCLUDED_SD_SOURCE_FILTER_PPT_PPTINANIMATIONS_HXX
23 #include <com/sun/star/uno/Reference.hxx>
25 #include <vector>
26 #include <animations.hxx>
28 #ifdef DBG_ANIM_LOG
29 #include <stdio.h>
30 #endif
32 namespace com { namespace sun { namespace star { namespace animations { class XAnimationNode; } } } }
33 namespace com { namespace sun { namespace star { namespace drawing { class XDrawPage; } } } }
34 namespace ppt { struct AnimationNode; }
36 class DffRecordHeader;
37 class SvStream;
38 class ImplSdPPTImport;
40 namespace ppt
42 class PropertySet;
43 class Atom;
45 class AnimationImporter
47 public:
48 AnimationImporter( ImplSdPPTImport* pPPTImport, SvStream& rStCtrl );
50 int import( const css::uno::Reference< css::drawing::XDrawPage >& xPage, const DffRecordHeader& rProgTagContentHd );
52 private:
53 int importAnimationContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xParent );
54 int importTimeContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
55 int importAnimationNodeContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
57 void importAnimateSetContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
58 void importAnimateFilterContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
59 void importAnimateContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
60 void importAnimateScaleContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
61 void importAnimateColorContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
62 void importAnimateRotationContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
63 void importAnimateMotionContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
64 void importCommandContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
65 int importAudioContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
67 void importAnimationEvents( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
68 void importAnimationValues( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
69 void importAnimationActions( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
70 void importAnimateAttributeTargetContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
72 void importAnimateKeyPoints( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
73 void importPropertySetContainer( const Atom* pAtom,PropertySet& rSet );
74 bool importAttributeValue( const Atom* pAtom, css::uno::Any& rAny );
75 void importAttributeNamesContainer( const Atom* pAtom, OUString& rAttributeNames );
76 void importTargetElementContainer( const Atom* pAtom, css::uno::Any& rTarget, sal_Int16& nSubType );
78 static void fillNode( css::uno::Reference< css::animations::XAnimationNode > const & xTiming, const AnimationNode& rNode, const PropertySet& rSet );
79 static css::uno::Reference< css::animations::XAnimationNode > createNode( const Atom* pAtom, const AnimationNode& rNode );
81 bool convertAnimationNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, const css::uno::Reference< css::animations::XAnimationNode >& xParent );
82 css::uno::Any implGetColorAny( sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC );
83 static sal_Int16 implGetColorSpace( sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC );
85 private:
86 css::uno::Reference< css::animations::XAnimationNode > mxRootNode;
88 ImplSdPPTImport* mpPPTImport;
89 SvStream& mrStCtrl;
91 std::vector< sd::AfterEffectNode > maAfterEffectNodes;
93 #ifdef DBG_ANIM_LOG
94 FILE * mpFile;
95 void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
96 void dump( const OUString& rString );
97 void dump( sal_uInt32 nLen, bool bNewLine = true );
98 #endif
100 static void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend );
101 static void dump_atom( const Atom* pAtom, bool bNewLine = true );
102 static void dump_target( css::uno::Any& rAny );
103 static void dump( css::uno::Any& rAny );
104 static void dump( const PropertySet& rSet );
105 static void dump( const AnimationNode& rNode );
106 static void dump( const char * pText );
107 static void dump( const char * pText, sal_Int32 nInt );
108 void dump( const char * pText, sal_Int64 nInt );
109 static void dump( const char * pText, double fDouble );
110 static void dump( const char * pText, const char * pText2 );
111 static void dump( const char * pText, const OUString& rString );
114 } // namespace ppt
116 #endif
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */