Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef _XMLITMAP_HXX
21 : : #define _XMLITMAP_HXX
22 : :
23 : : #include <sal/types.h>
24 : : #include <tools/ref.hxx>
25 : : #include <xmloff/xmltoken.hxx>
26 : :
27 : : namespace rtl { class OUString; }
28 : :
29 : : #define MID_SW_FLAG_MASK 0x0000ffff
30 : :
31 : : // this flags are used in the item mapper for import and export
32 : :
33 : : #define MID_SW_FLAG_SPECIAL_ITEM_IMPORT 0x80000000
34 : : #define MID_SW_FLAG_NO_ITEM_IMPORT 0x40000000
35 : : #define MID_SW_FLAG_SPECIAL_ITEM_EXPORT 0x20000000
36 : : #define MID_SW_FLAG_NO_ITEM_EXPORT 0x10000000
37 : : #define MID_SW_FLAG_SPECIAL_ITEM 0xa0000000 // both import and export
38 : : #define MID_SW_FLAG_NO_ITEM 0x50000000 // both import and export
39 : : #define MID_SW_FLAG_ELEMENT_ITEM_IMPORT 0x08000000
40 : : #define MID_SW_FLAG_ELEMENT_ITEM_EXPORT 0x04000000
41 : : #define MID_SW_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export
42 : :
43 : : // ---
44 : :
45 : : struct SvXMLItemMapEntry
46 : : {
47 : : sal_uInt16 nNameSpace; // declares the Namespace in wich this item
48 : : // exists
49 : : enum ::xmloff::token::XMLTokenEnum eLocalName;
50 : : // the local name for the item inside
51 : : // the Namespace (as an XMLTokenEnum)
52 : : sal_uInt16 nWhichId; // the WichId to identify the item
53 : : // in the pool
54 : : sal_uInt32 nMemberId; // the memberid specifies wich part
55 : : // of the item should be imported or
56 : : // exported with this Namespace
57 : : // and localName
58 : : };
59 : :
60 : : // ---
61 : :
62 : : class SvXMLItemMapEntries_impl;
63 : :
64 : : /** this class manages an array of SvXMLItemMapEntry. It is
65 : : used for optimizing the static array on startup of import
66 : : or export */
67 : : class SvXMLItemMapEntries : public SvRefBase
68 : : {
69 : : protected:
70 : : SvXMLItemMapEntries_impl* mpImpl;
71 : :
72 : : public:
73 : : SvXMLItemMapEntries( SvXMLItemMapEntry* pEntrys );
74 : : virtual ~SvXMLItemMapEntries();
75 : :
76 : : SvXMLItemMapEntry* getByName( sal_uInt16 nNameSpace,
77 : : const ::rtl::OUString& rString,
78 : : SvXMLItemMapEntry* pStartAt = NULL ) const;
79 : : SvXMLItemMapEntry* getByIndex( sal_uInt16 nIndex ) const;
80 : :
81 : : sal_uInt16 getCount() const;
82 : : };
83 : :
84 : 1639 : SV_DECL_REF( SvXMLItemMapEntries )
85 [ + + - ]: 9247 : SV_IMPL_REF( SvXMLItemMapEntries )
[ + + ][ # # ]
[ # # ]
[ # # # # ]
[ + - ][ # # ]
[ + - ][ # # ]
86 : :
87 : :
88 : : #endif // _XMLITMAP_HXX
89 : :
90 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|