xref: /aoo4110/main/xmloff/inc/xmloff/maptype.hxx (revision b1cdbd2c)
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 #ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
25 #define _XMLOFF_PROPMAPPINGTYPES_HXX
26 
27 #include <tools/solar.h>
28 #include <com/sun/star/uno/Any.hxx>
29 #include <xmloff/xmltoken.hxx>
30 #include <unotools/saveopt.hxx>
31 
32 ///////////////////////////////////////////////////////////////////////////
33 //
34 /** Represents a property with its API-name, its XML-name and the type of
35     its value.
36 */
37 struct XMLPropertyMapEntry
38 {
39 	const sal_Char*	msApiName;		/// Property-Name
40     sal_Int32       nApiNameLength; /// length of property name
41 	sal_uInt16		mnNameSpace;	/** declares the Namespace in wich this
42 										property exists */
43 	enum ::xmloff::token::XMLTokenEnum meXMLName;		/// XML-Name
44 	sal_Int32		mnType;			/** Bit 0..23 : XML-Type of its value
45 									    Bit 24..31: The flags specifies
46 			                                        additional rules how
47 													to im/export the porperty */
48 	sal_Int16		mnContextId;	/// User defined id for context filtering
49     SvtSaveOptions::ODFDefaultVersion   mnEarliestODFVersionForExport;// no export when the used ODF version is lower than this
50 };
51 
52 ///////////////////////////////////////////////////////////////////////////
53 //
54 /** Smart struct to transport an Any with an index to the appropriate
55     property-name
56 */
57 struct XMLPropertyState
58 {
59 	sal_Int32                  mnIndex;
60 	::com::sun::star::uno::Any maValue;
61 
XMLPropertyStateXMLPropertyState62 	XMLPropertyState( sal_Int32 nIndex )
63 		: mnIndex( nIndex ) {}
XMLPropertyStateXMLPropertyState64 	XMLPropertyState( sal_Int32 nIndex, const ::com::sun::star::uno::Any& rValue )
65 		: mnIndex( nIndex ), maValue( rValue ) {}
XMLPropertyStateXMLPropertyState66 	XMLPropertyState( const XMLPropertyState& rPropState )
67 		: mnIndex( rPropState.mnIndex ), maValue( rPropState.maValue ) {}
68 };
69 
70 #endif // _XMLOFF_PROPMAPPINGTYPES_HXX
71