merge the formfield patch from ooo-build
[ooovba.git] / oox / source / ppt / pptfilterhelpers.hxx
blob294fd67213859c5c39cbef7a7b4a7d0ef3f7a4c2
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: pptfilterhelpers.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
32 #ifndef OOX_PPT_PPTFILTERHELPERS
33 #define OOX_PPT_PPTFILTERHELPERS
35 #include <rtl/ustring.hxx>
37 namespace oox { namespace ppt {
40 //BEGIN CUT&PASTE from sd pptanimations.hxx
41 // conversion of MS to OOo attributes.
42 enum MS_AttributeNames
44 MS_PPT_X, MS_PPT_Y, MS_PPT_W, MS_PPT_H, MS_PPT_C, MS_R, MS_XSHEAR, MS_FILLCOLOR, MS_FILLTYPE,
45 MS_STROKECOLOR, MS_STROKEON, MS_STYLECOLOR, MS_STYLEROTATION, MS_FONTWEIGHT,
46 MS_STYLEUNDERLINE, MS_STYLEFONTFAMILY, MS_STYLEFONTSIZE, MS_STYLEFONTSTYLE,
47 MS_STYLEVISIBILITY, MS_STYLEOPACITY, MS_UNKNOWN
50 struct ImplAttributeNameConversion
52 MS_AttributeNames meAttribute;
53 const char* mpMSName;
54 const char* mpAPIName;
57 static const ImplAttributeNameConversion gImplConversionList[] =
59 { MS_PPT_X, "ppt_x", "X" },
60 { MS_PPT_Y, "ppt_y", "Y" },
61 { MS_PPT_W, "ppt_w", "Width" },
62 { MS_PPT_H, "ppt_h", "Height" },
63 { MS_PPT_C, "ppt_c", "DimColor" },
64 { MS_R, "r", "Rotate" },
65 { MS_XSHEAR, "xshear", "SkewX" },
66 { MS_FILLCOLOR, "fillColor", "FillColor" },
67 { MS_FILLCOLOR, "fillcolor", "FillColor" },
68 { MS_FILLTYPE, "fill.type", "FillStyle" },
69 { MS_STROKECOLOR, "stroke.color", "LineColor" },
70 { MS_STROKEON, "stroke.on", "LineStyle" },
71 { MS_STYLECOLOR, "style.color", "CharColor" },
72 { MS_STYLEROTATION, "style.rotation", "Rotate" },
73 { MS_FONTWEIGHT, "style.fontWeight", "CharWeight" },
74 { MS_STYLEUNDERLINE, "style.textDecorationUnderline","CharUnderline" },
75 { MS_STYLEFONTFAMILY, "style.fontFamily", "CharFontName" },
76 { MS_STYLEFONTSIZE, "style.fontSize", "CharHeight" },
77 { MS_STYLEFONTSTYLE, "style.fontStyle", "CharPosture" },
78 { MS_STYLEVISIBILITY, "style.visibility", "Visibility" },
79 { MS_STYLEOPACITY, "style.opacity", "Opacity" },
80 { MS_UNKNOWN, NULL, NULL }
82 //END CUT&PASTE
85 // BEGIN CUT&PASTE from sd pptanimations.hxx
86 struct transition
88 const sal_Char* mpName;
89 sal_Int16 mnType;
90 sal_Int16 mnSubType;
91 sal_Bool mbDirection; // true: default geometric direction
93 static const transition* find( const rtl::OUString& rName );
94 static const sal_Char* find( const sal_Int16 mnType, const sal_Int16 mnSubType, const sal_Bool bDirection );
96 // END CUT&PASTE
99 // BEGIN CUT&PASTE from sd pptinanimation.cxx
100 bool convertMeasure( ::rtl::OUString& rString );
101 // END CUT&PASTE from sd pptinanimation.cxx
107 #endif