tdf#131098 docx export: write fill property of graphic
[LibreOffice.git] / sd / source / filter / ppt / pptinanimations.hxx
blobed79144b96c517c51f5349bbae9eb66d999f4fa0
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 #pragma once
22 #include <com/sun/star/uno/Reference.hxx>
24 #include <vector>
25 #include <animations.hxx>
27 #ifdef DBG_ANIM_LOG
28 #include <stdio.h>
29 #endif
31 namespace com::sun::star::animations { class XAnimationNode; }
32 namespace com::sun::star::drawing { class XDrawPage; }
33 namespace ppt { struct AnimationNode; }
35 class DffRecordHeader;
36 class SvStream;
37 class ImplSdPPTImport;
39 namespace ppt
41 class PropertySet;
42 class Atom;
44 class AnimationImporter
46 public:
47 AnimationImporter( ImplSdPPTImport* pPPTImport, SvStream& rStCtrl );
49 int import( const css::uno::Reference< css::drawing::XDrawPage >& xPage, const DffRecordHeader& rProgTagContentHd );
51 private:
52 int importAnimationContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xParent );
53 int importTimeContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
54 int importAnimationNodeContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
56 void importAnimateSetContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
57 void importAnimateFilterContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
58 void importAnimateContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
59 void importAnimateScaleContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
60 void importAnimateColorContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
61 void importAnimateRotationContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
62 void importAnimateMotionContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
63 void importCommandContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
64 int importAudioContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
66 void importAnimationEvents( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
67 void importAnimationValues( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
68 void importAnimationActions( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
69 void importAnimateAttributeTargetContainer( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
71 void importAnimateKeyPoints( const Atom* pAtom, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
72 void importPropertySetContainer( const Atom* pAtom,PropertySet& rSet );
73 bool importAttributeValue( const Atom* pAtom, css::uno::Any& rAny );
74 void importAttributeNamesContainer( const Atom* pAtom, OUString& rAttributeNames );
75 void importTargetElementContainer( const Atom* pAtom, css::uno::Any& rTarget, sal_Int16& nSubType );
77 static void fillNode( css::uno::Reference< css::animations::XAnimationNode > const & xTiming, const AnimationNode& rNode, const PropertySet& rSet );
78 static css::uno::Reference< css::animations::XAnimationNode > createNode( const Atom* pAtom, const AnimationNode& rNode );
80 bool convertAnimationNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, const css::uno::Reference< css::animations::XAnimationNode >& xParent );
81 css::uno::Any implGetColorAny( sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC );
82 static sal_Int16 implGetColorSpace( sal_Int32 nMode, sal_Int32 nA, sal_Int32 nB, sal_Int32 nC );
84 private:
85 css::uno::Reference< css::animations::XAnimationNode > mxRootNode;
87 ImplSdPPTImport* mpPPTImport;
88 SvStream& mrStCtrl;
90 std::vector< sd::AfterEffectNode > maAfterEffectNodes;
92 #ifdef DBG_ANIM_LOG
93 FILE * mpFile;
94 void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
95 void dump( const OUString& rString );
96 void dump( sal_uInt32 nLen, bool bNewLine = true );
97 #endif
99 static void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend );
100 static void dump_atom( const Atom* pAtom, bool bNewLine = true );
101 static void dump_target( css::uno::Any& rAny );
102 static void dump( css::uno::Any& rAny );
103 static void dump( const PropertySet& rSet );
104 static void dump( const AnimationNode& rNode );
105 static void dump( const char * pText );
106 static void dump( const char * pText, sal_Int32 nInt );
107 void dump( const char * pText, sal_Int64 nInt );
108 static void dump( const char * pText, double fDouble );
109 static void dump( const char * pText, const char * pText2 );
110 static void dump( const char * pText, std::u16string_view rString );
113 } // namespace ppt
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */