LibreOffice Module sw (master)  1
xmlitmap.hxx
Go to the documentation of this file.
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 INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX
22 
23 #include <sal/types.h>
24 #include <tools/ref.hxx>
25 #include <xmloff/xmltoken.hxx>
26 #include <memory>
27 
28 #define MID_SW_FLAG_MASK 0x0000ffff
29 
30 // this flags are used in the item mapper for import and export
31 #define MID_SW_FLAG_SPECIAL_ITEM_IMPORT 0x80000000
32 #define MID_SW_FLAG_NO_ITEM_IMPORT 0x40000000
33 #define MID_SW_FLAG_SPECIAL_ITEM_EXPORT 0x20000000
34 #define MID_SW_FLAG_NO_ITEM_EXPORT 0x10000000
35 #define MID_SW_FLAG_ELEMENT_ITEM_IMPORT 0x08000000
36 #define MID_SW_FLAG_ELEMENT_ITEM_EXPORT 0x04000000
37 #define MID_SW_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export
38 
40 {
41  sal_uInt16 const nNameSpace; // declares the Namespace in which this item
42  // exists
43  sal_uInt16 nWhichId; // the WhichId to identify the item
44  // in the pool
45  enum ::xmloff::token::XMLTokenEnum const eLocalName;
46  // the local name for the item inside
47  // the Namespace (as an XMLTokenEnum)
48  sal_uInt32 const nMemberId; // the memberid specifies which part
49  // of the item should be imported or
50  // exported with this Namespace
51  // and localName
53  sal_uInt16 nameSpace,
54  enum ::xmloff::token::XMLTokenEnum localName,
55  sal_uInt16 whichId,
56  sal_uInt32 memberId)
57  : nNameSpace(nameSpace), nWhichId(whichId), eLocalName(localName), nMemberId(memberId) {}
58 };
59 
61 
65 class SvXMLItemMapEntries final : public SvRefBase
66 {
67  std::unique_ptr<SvXMLItemMapEntries_impl> mpImpl;
68 
69 public:
70  explicit SvXMLItemMapEntries(SvXMLItemMapEntry const * pEntrys);
71  virtual ~SvXMLItemMapEntries() override;
72 
73  SvXMLItemMapEntry const * getByName( sal_uInt16 nNameSpace,
74  const OUString& rString ) const;
75  SvXMLItemMapEntry const & getByIndex( sal_uInt16 nIndex ) const;
76 
77  sal_uInt16 getCount() const;
78 };
79 
81 
82 extern SvXMLItemMapEntry const aXMLTableItemMap[];
86 
87 #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX
88 
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvXMLItemMapEntry const aXMLTableItemMap[]
Definition: xmlitemm.cxx:44
sal_uInt16 nWhichId
Definition: xmlitmap.hxx:43
sal_uInt16 getCount() const
Definition: xmlitmpr.cxx:71
SvXMLItemMapEntry const * getByName(sal_uInt16 nNameSpace, const OUString &rString) const
Definition: xmlitmpr.cxx:51
SvXMLItemMapEntry const & getByIndex(sal_uInt16 nIndex) const
Definition: xmlitmpr.cxx:66
SvXMLItemMapEntry const aXMLTableColItemMap[]
Definition: xmlitemm.cxx:124
this class manages an array of SvXMLItemMapEntry.
Definition: xmlitmap.hxx:65
enum::xmloff::token::XMLTokenEnum const eLocalName
Definition: xmlitmap.hxx:45
virtual ~SvXMLItemMapEntries() override
Definition: xmlitmpr.cxx:47
std::unique_ptr< SvXMLItemMapEntries_impl > mpImpl
Definition: xmlitmap.hxx:67
SvXMLItemMapEntry(sal_uInt16 nameSpace, enum::xmloff::token::XMLTokenEnum localName, sal_uInt16 whichId, sal_uInt32 memberId)
Definition: xmlitmap.hxx:52
SvXMLItemMapEntry const aXMLTableRowItemMap[]
Definition: xmlitemm.cxx:131
SvXMLItemMapEntry const aXMLTableCellItemMap[]
Definition: xmlitemm.cxx:203
SvXMLItemMapEntries(SvXMLItemMapEntry const *pEntrys)
Definition: xmlitmpr.cxx:34
sal_uInt32 const nMemberId
Definition: xmlitmap.hxx:48
tools::SvRef< SvXMLItemMapEntries > SvXMLItemMapEntriesRef
Definition: xmlitmap.hxx:80
sal_uInt16 const nNameSpace
Definition: xmlitmap.hxx:41