/src/libreoffice/include/oox/ppt/slidetransition.hxx
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | |
21 | | #ifndef INCLUDED_OOX_PPT_SLIDETRANSITION_HXX |
22 | | #define INCLUDED_OOX_PPT_SLIDETRANSITION_HXX |
23 | | |
24 | | #include <com/sun/star/uno/Reference.hxx> |
25 | | #include <com/sun/star/presentation/AnimationSpeed.hpp> |
26 | | #include <sal/types.h> |
27 | | |
28 | | namespace com::sun::star { |
29 | | namespace animations { class XTransitionFilter; } |
30 | | } |
31 | | |
32 | | namespace oox { class PropertyMap; } |
33 | | |
34 | | namespace oox::ppt { |
35 | | |
36 | | class SlideTransition |
37 | | { |
38 | | public: |
39 | | SlideTransition(); |
40 | | explicit SlideTransition(std::u16string_view ); |
41 | | |
42 | | void setSlideProperties( PropertyMap& props ); |
43 | | void setTransitionFilterProperties( const css::uno::Reference< css::animations::XTransitionFilter > & xFilter ); |
44 | | |
45 | | /// Set one of standard values for slide transition duration |
46 | | void setOoxTransitionSpeed( sal_Int32 nToken ); |
47 | | /// Set slide transition time directly |
48 | | void setOoxTransitionSpeed( double fDuration ); |
49 | | void setMode( bool bMode ) |
50 | 65 | { mbMode = bMode; } |
51 | | void setOoxAdvanceTime( sal_Int32 nAdvanceTime ) |
52 | 0 | { mnAdvanceTime = nAdvanceTime; } |
53 | | |
54 | | static sal_Int16 ooxToOdpDirection( ::sal_Int32 nOoxType ); |
55 | | static sal_Int16 ooxToOdpEightDirections( ::sal_Int32 nOoxType ); |
56 | | static sal_Int16 ooxToOdpCornerDirections( ::sal_Int32 nOoxType ); |
57 | | static sal_Int16 ooxToOdpBorderDirections( ::sal_Int32 nOoxType ); |
58 | | static sal_Int16 ooxToOdpSideDirections( ::sal_Int32 nOoxType ); |
59 | | static bool ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType ); |
60 | | |
61 | | void setOoxTransitionType( ::sal_Int32 OoxType, |
62 | | ::sal_Int32 param1, ::sal_Int32 param2 ); |
63 | | |
64 | | void setPresetTransition(std::u16string_view sPresetTransition); |
65 | | |
66 | | private: |
67 | | ::sal_Int16 mnTransitionType; |
68 | | ::sal_Int16 mnTransitionSubType; |
69 | | bool mbTransitionDirectionNormal; |
70 | | css::presentation::AnimationSpeed mnAnimationSpeed; |
71 | | double mfTransitionDurationInSeconds; |
72 | | bool mbMode; /**< https://api.libreoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */ |
73 | | ::sal_Int32 mnAdvanceTime; |
74 | | ::sal_Int32 mnTransitionFadeColor; |
75 | | }; |
76 | | |
77 | | } |
78 | | |
79 | | #endif |
80 | | |
81 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |