xref: /aoo4110/main/xmloff/inc/xmloff/xmltkmap.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_XMLTKMAP_HXX
25 #define _XMLOFF_XMLTKMAP_HXX
26 
27 #include "sal/config.h"
28 #include "xmloff/dllapi.h"
29 #include <sal/types.h>
30 #include <xmloff/xmltoken.hxx>
31 
32 namespace rtl { class OUString; }
33 
34 class SvXMLTokenMap_Impl;
35 class SvXMLTokenMapEntry_Impl;
36 
37 #define XML_TOK_UNKNOWN 0xffffU
38 #define XML_TOKEN_MAP_END { 0xffffU, ::xmloff::token::XML_TOKEN_INVALID, 0U }
39 
40 struct SvXMLTokenMapEntry
41 {
42 	sal_uInt16	nPrefixKey;
43 	enum ::xmloff::token::XMLTokenEnum eLocalName;
44 	sal_uInt16	nToken;
45 };
46 
47 class XMLOFF_DLLPUBLIC SvXMLTokenMap
48 {
49 	SvXMLTokenMap_Impl		*pImpl;
50 
51 	SAL_DLLPRIVATE SvXMLTokenMapEntry_Impl *_Find(
52         sal_uInt16 nKind, const ::rtl::OUString& rName ) const;
53 
54 public:
55 
56 	SvXMLTokenMap( const SvXMLTokenMapEntry* pMap );
57 	~SvXMLTokenMap();
58 
59 	sal_uInt16 Get( sal_uInt16 nPrefix, const ::rtl::OUString& rLName ) const;
60 };
61 
62 #endif	//  _XMLOFF_XMLTKMAP_HXX
63 
64