1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmlitmap.hxx,v $
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 ************************************************************************/
34 #include <sal/types.h>
35 #include <tools/ref.hxx>
36 #include <xmloff/xmltoken.hxx>
38 namespace rtl
{ class OUString
; }
40 #define MID_SW_FLAG_MASK 0x0000ffff
42 // this flags are used in the item mapper for import and export
44 #define MID_SW_FLAG_SPECIAL_ITEM_IMPORT 0x80000000
45 #define MID_SW_FLAG_NO_ITEM_IMPORT 0x40000000
46 #define MID_SW_FLAG_SPECIAL_ITEM_EXPORT 0x20000000
47 #define MID_SW_FLAG_NO_ITEM_EXPORT 0x10000000
48 #define MID_SW_FLAG_SPECIAL_ITEM 0xa0000000 // both import and export
49 #define MID_SW_FLAG_NO_ITEM 0x50000000 // both import and export
50 #define MID_SW_FLAG_ELEMENT_ITEM_IMPORT 0x08000000
51 #define MID_SW_FLAG_ELEMENT_ITEM_EXPORT 0x04000000
52 #define MID_SW_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export
56 struct SvXMLItemMapEntry
58 sal_uInt16 nNameSpace
; // declares the Namespace in wich this item
60 enum ::xmloff::token::XMLTokenEnum eLocalName
;
61 // the local name for the item inside
62 // the Namespace (as an XMLTokenEnum)
63 sal_uInt16 nWhichId
; // the WichId to identify the item
65 sal_uInt32 nMemberId
; // the memberid specifies wich part
66 // of the item should be imported or
67 // exported with this Namespace
73 class SvXMLItemMapEntries_impl
;
75 /** this class manages an array of SvXMLItemMapEntry. It is
76 used for optimizing the static array on startup of import
78 class SvXMLItemMapEntries
: public SvRefBase
81 SvXMLItemMapEntries_impl
* mpImpl
;
84 SvXMLItemMapEntries( SvXMLItemMapEntry
* pEntrys
);
85 virtual ~SvXMLItemMapEntries();
87 SvXMLItemMapEntry
* getByName( sal_uInt16 nNameSpace
,
88 const ::rtl::OUString
& rString
,
89 SvXMLItemMapEntry
* pStartAt
= NULL
) const;
90 SvXMLItemMapEntry
* getByIndex( sal_uInt16 nIndex
) const;
92 sal_uInt16
getCount() const;
95 SV_DECL_REF( SvXMLItemMapEntries
)
96 SV_IMPL_REF( SvXMLItemMapEntries
)
99 #endif // _XMLITMAP_HXX