Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
30 : : #define _XMLOFF_PROPMAPPINGTYPES_HXX
31 : :
32 : : #include <tools/solar.h>
33 : : #include <com/sun/star/uno/Any.hxx>
34 : : #include <xmloff/xmltoken.hxx>
35 : : #include <unotools/saveopt.hxx>
36 : :
37 : : ///////////////////////////////////////////////////////////////////////////
38 : : //
39 : : /** Represents a property with its API-name, its XML-name and the type of
40 : : its value.
41 : : */
42 : : struct XMLPropertyMapEntry
43 : : {
44 : : const sal_Char* msApiName; /// Property-Name
45 : : sal_Int32 nApiNameLength; /// length of property name
46 : : sal_uInt16 mnNameSpace; /** declares the Namespace in wich this
47 : : property exists */
48 : : enum ::xmloff::token::XMLTokenEnum meXMLName; /// XML-Name
49 : : sal_uInt32 mnType; /** Bit 0..23 : XML-Type of its value
50 : : Bit 24..31: The flags specifies
51 : : additional rules how
52 : : to im/export the porperty */
53 : : sal_Int16 mnContextId; /// User defined id for context filtering
54 : : SvtSaveOptions::ODFDefaultVersion mnEarliestODFVersionForExport;// no export when the used ODF version is lower than this
55 : : };
56 : :
57 : : ///////////////////////////////////////////////////////////////////////////
58 : : //
59 : : /** Smart struct to transport an Any with an index to the appropriate
60 : : property-name
61 : : */
62 : 4244 : struct XMLPropertyState
63 : : {
64 : : sal_Int32 mnIndex;
65 : : ::com::sun::star::uno::Any maValue;
66 : :
67 : 0 : XMLPropertyState( sal_Int32 nIndex )
68 : 0 : : mnIndex( nIndex ) {}
69 : 1533 : XMLPropertyState( sal_Int32 nIndex, const ::com::sun::star::uno::Any& rValue )
70 : 1533 : : mnIndex( nIndex ), maValue( rValue ) {}
71 : 4200 : XMLPropertyState( const XMLPropertyState& rPropState )
72 : 4200 : : mnIndex( rPropState.mnIndex ), maValue( rPropState.maValue ) {}
73 : : };
74 : :
75 : : #endif // _XMLOFF_PROPMAPPINGTYPES_HXX
76 : :
77 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|