1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 #ifndef OOX_PPT_PPTFILTERHELPERS
26 #define OOX_PPT_PPTFILTERHELPERS
27 
28 #include <rtl/ustring.hxx>
29 
30 namespace oox { namespace ppt {
31 
32 
33 //BEGIN CUT&PASTE from sd pptanimations.hxx
34 	// conversion of MS to OOo attributes.
35 	enum MS_AttributeNames
36 	{
37 		MS_PPT_X, MS_PPT_Y, MS_PPT_W, MS_PPT_H, MS_PPT_C, MS_R, MS_XSHEAR, MS_FILLCOLOR, MS_FILLTYPE,
38 		MS_STROKECOLOR, MS_STROKEON, MS_STYLECOLOR, MS_STYLEROTATION, MS_FONTWEIGHT,
39 		MS_STYLEUNDERLINE, MS_STYLEFONTFAMILY, MS_STYLEFONTSIZE, MS_STYLEFONTSTYLE,
40 		MS_STYLEVISIBILITY, MS_STYLEOPACITY, MS_UNKNOWN
41 	};
42 
43 	struct ImplAttributeNameConversion
44 	{
45 		MS_AttributeNames	meAttribute;
46 		const char* mpMSName;
47 		const char* mpAPIName;
48 	};
49 
50 	static const ImplAttributeNameConversion gImplConversionList[] =
51 	{
52 		{ MS_PPT_X,				"ppt_x",						"X" },
53 		{ MS_PPT_Y,				"ppt_y",						"Y" },
54 		{ MS_PPT_W,				"ppt_w",						"Width" },
55 		{ MS_PPT_H,				"ppt_h",						"Height" },
56 		{ MS_PPT_C,				"ppt_c",						"DimColor" },
57 		{ MS_R,					"r",							"Rotate" },
58 		{ MS_XSHEAR,			"xshear",						"SkewX" },
59 		{ MS_FILLCOLOR,			"fillColor",					"FillColor" },
60 		{ MS_FILLCOLOR,			"fillcolor",					"FillColor" },
61 		{ MS_FILLTYPE,			"fill.type",					"FillStyle" },
62 		{ MS_STROKECOLOR,		"stroke.color",					"LineColor" },
63 		{ MS_STROKEON,			"stroke.on",					"LineStyle" },
64 		{ MS_STYLECOLOR,		"style.color",					"CharColor" },
65 		{ MS_STYLEROTATION,		"style.rotation",				"Rotate" },
66 		{ MS_FONTWEIGHT,		"style.fontWeight",				"CharWeight" },
67 		{ MS_STYLEUNDERLINE,	"style.textDecorationUnderline","CharUnderline" },
68 		{ MS_STYLEFONTFAMILY,	"style.fontFamily",				"CharFontName" },
69 		{ MS_STYLEFONTSIZE,		"style.fontSize",				"CharHeight" },
70 		{ MS_STYLEFONTSTYLE,	"style.fontStyle",				"CharPosture" },
71 		{ MS_STYLEVISIBILITY,	"style.visibility",				"Visibility" },
72 		{ MS_STYLEOPACITY,		"style.opacity",				"Opacity" },
73 		{ MS_UNKNOWN, NULL, NULL }
74 	};
75 	//END CUT&PASTE
76 
77 
78 	// BEGIN CUT&PASTE from sd pptanimations.hxx
79 	struct transition
80 	{
81 		const sal_Char* mpName;
82 		sal_Int16 mnType;
83 		sal_Int16 mnSubType;
84 		sal_Bool mbDirection; // true: default geometric direction
85 
86 		static const transition* find( const rtl::OUString& rName );
87 		static const sal_Char* find( const sal_Int16 mnType, const sal_Int16 mnSubType, const sal_Bool bDirection );
88 	};
89 	// END CUT&PASTE
90 
91 
92 	// BEGIN CUT&PASTE from sd pptinanimation.cxx
93 	bool convertMeasure( ::rtl::OUString& rString );
94 	// END CUT&PASTE from sd pptinanimation.cxx
95 
96 
97 } }
98 
99 
100 #endif
101