Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / oox / source / ppt / pptfilterhelpers.cxx
blob6496e9153e6096c6aa80bef1c7270e651a7de3aa
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 #include <com/sun/star/animations/TransitionType.hpp>
21 #include <com/sun/star/animations/TransitionSubType.hpp>
22 #include <oox/ppt/pptfilterhelpers.hxx>
23 #include <rtl/ustrbuf.hxx>
25 namespace oox { namespace ppt {
27 const ImplAttributeNameConversion *getAttributeConversionList()
29 static const ImplAttributeNameConversion aList[] =
31 { MS_PPT_X, "ppt_x", "X" },
32 { MS_PPT_Y, "ppt_y", "Y" },
33 { MS_PPT_W, "ppt_w", "Width" },
34 { MS_PPT_H, "ppt_h", "Height" },
35 { MS_PPT_C, "ppt_c", "DimColor" },
36 { MS_R, "r", "Rotate" },
37 { MS_XSHEAR, "xshear", "SkewX" },
38 { MS_FILLCOLOR, "fillColor", "FillColor" },
39 { MS_FILLCOLOR, "fillcolor", "FillColor" },
40 { MS_FILLTYPE, "fill.type", "FillStyle" },
41 { MS_STROKECOLOR, "stroke.color", "LineColor" },
42 { MS_STROKEON, "stroke.on", "LineStyle" },
43 { MS_STYLECOLOR, "style.color", "CharColor" },
44 { MS_STYLEROTATION, "style.rotation", "Rotate" },
45 { MS_FONTWEIGHT, "style.fontWeight", "CharWeight" },
46 { MS_STYLEUNDERLINE, "style.textDecorationUnderline","CharUnderline" },
47 { MS_STYLEFONTFAMILY, "style.fontFamily", "CharFontName" },
48 { MS_STYLEFONTSIZE, "style.fontSize", "CharHeight" },
49 { MS_STYLEFONTSTYLE, "style.fontStyle", "CharPosture" },
50 { MS_STYLEVISIBILITY, "style.visibility", "Visibility" },
51 { MS_STYLEOPACITY, "style.opacity", "Opacity" },
52 { MS_UNKNOWN, nullptr, nullptr }
55 return aList;
58 const transition* transition::getList()
60 static const transition aList[] =
62 { "wipe(up)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, true },
63 { "wipe(right)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, false },
64 { "wipe(left)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, true },
65 { "wipe(down)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, false },
66 { "wheel(1)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::ONEBLADE, true },
67 { "wheel(2)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::TWOBLADEVERTICAL, true },
68 { "wheel(3)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::THREEBLADE, true },
69 { "wheel(4)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::FOURBLADE, true },
70 { "wheel(8)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::EIGHTBLADE, true },
71 { "strips(downLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, true },
72 { "strips(upLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, false },
73 { "strips(downRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, true },
74 { "strips(upRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, false },
75 { "barn(inVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, false },
76 { "barn(outVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, true },
77 { "barn(inHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, false },
78 { "barn(outHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
79 { "randombar(vertical)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::VERTICAL, true},
80 { "randombar(horizontal)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
81 { "checkerboard(down)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::DOWN, true},
82 { "checkerboard(across)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::ACROSS, true },
83 { "plus(out)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, false },
84 { "plus(in)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, true },
85 { "diamond(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, true },
86 { "diamond(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, false },
87 { "circle(out)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
88 { "circle(in)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, false },
89 { "box(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, true },
90 { "box(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, false },
91 { "wedge", css::animations::TransitionType::FANWIPE, css::animations::TransitionSubType::CENTERTOP, true },
92 { "blinds(vertical)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::VERTICAL, true },
93 { "blinds(horizontal)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::HORIZONTAL, true },
94 { "fade", css::animations::TransitionType::FADE, css::animations::TransitionSubType::CROSSFADE, true },
95 { "slide(fromTop)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMTOP, true },
96 { "slide(fromRight)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMRIGHT, true },
97 { "slide(fromLeft)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMLEFT, true },
98 { "slide(fromBottom)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMBOTTOM, true },
99 { "dissolve", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true },
100 { "image", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, // TODO
101 { nullptr, 0, 0, false }
104 return aList;
107 const transition* transition::find( const OUString& rName )
109 const transition* p = transition::getList();
111 while( p->mpName )
113 if( rName.equalsAscii( p->mpName ) )
114 return p;
116 p++;
119 return nullptr;
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */