LibreOffice Module sw (master)
1
sw
source
filter
xml
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 <
o3tl/span.hxx
>
27
#include <memory>
28
29
#define MID_SW_FLAG_MASK 0x0000ffff
30
31
// this flags are used in the item mapper for import and export
32
#define MID_SW_FLAG_SPECIAL_ITEM_IMPORT 0x80000000
33
#define MID_SW_FLAG_NO_ITEM_IMPORT 0x40000000
34
#define MID_SW_FLAG_SPECIAL_ITEM_EXPORT 0x20000000
35
#define MID_SW_FLAG_NO_ITEM_EXPORT 0x10000000
36
#define MID_SW_FLAG_ELEMENT_ITEM_IMPORT 0x08000000
37
#define MID_SW_FLAG_ELEMENT_ITEM_EXPORT 0x04000000
38
#define MID_SW_FLAG_ELEMENT_ITEM 0x0c000000
// both import and export
39
40
struct
SvXMLItemMapEntry
41
{
42
sal_uInt16
nNameSpace
;
// declares the Namespace in which this item
43
// exists
44
sal_uInt16
nWhichId
;
// the WhichId to identify the item
45
// in the pool
46
enum ::xmloff::token::XMLTokenEnum
const
eLocalName
;
47
// the local name for the item inside
48
// the Namespace (as an XMLTokenEnum)
49
sal_uInt32
nMemberId
;
// the memberid specifies which part
50
// of the item should be imported or
51
// exported with this Namespace
52
// and localName
53
SvXMLItemMapEntry
(
54
sal_uInt16 nameSpace,
55
enum ::xmloff::token::XMLTokenEnum localName,
56
sal_uInt16 whichId,
57
sal_uInt32 memberId)
58
:
nNameSpace
(nameSpace),
nWhichId
(whichId),
eLocalName
(localName),
nMemberId
(memberId) {}
59
};
60
64
class
SvXMLItemMapEntries
final :
public
SvRefBase
65
{
66
o3tl::span<SvXMLItemMapEntry const>
mpEntries
;
67
68
public
:
69
explicit
SvXMLItemMapEntries
(
o3tl::span<SvXMLItemMapEntry const>
pEntries) :
mpEntries
(pEntries) {}
70
virtual
~SvXMLItemMapEntries
()
override
;
71
72
SvXMLItemMapEntry
const
*
getByName
( sal_Int32 nElement )
const
;
73
SvXMLItemMapEntry
const
&
getByIndex
( sal_uInt16 nIndex )
const
{
return
mpEntries
[
nIndex
]; }
74
75
sal_uInt16
getCount
()
const
{
return
mpEntries
.
size
(); }
76
};
77
78
typedef
tools::SvRef<SvXMLItemMapEntries>
SvXMLItemMapEntriesRef
;
79
80
extern
const
o3tl::span<SvXMLItemMapEntry const>
aXMLTableItemMap
;
81
extern
const
o3tl::span<SvXMLItemMapEntry const>
aXMLTableColItemMap
;
82
extern
const
o3tl::span<SvXMLItemMapEntry const>
aXMLTableRowItemMap
;
83
extern
const
o3tl::span<SvXMLItemMapEntry const>
aXMLTableCellItemMap
;
84
85
#endif
// INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX
86
87
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvRefBase
SvXMLItemMapEntries
this class manages an array of SvXMLItemMapEntry.
Definition:
xmlitmap.hxx:65
SvXMLItemMapEntries::getByIndex
SvXMLItemMapEntry const & getByIndex(sal_uInt16 nIndex) const
Definition:
xmlitmap.hxx:73
SvXMLItemMapEntries::getCount
sal_uInt16 getCount() const
Definition:
xmlitmap.hxx:75
SvXMLItemMapEntries::~SvXMLItemMapEntries
virtual ~SvXMLItemMapEntries() override
Definition:
xmlitmpr.cxx:23
SvXMLItemMapEntries::SvXMLItemMapEntries
SvXMLItemMapEntries(o3tl::span< SvXMLItemMapEntry const > pEntries)
Definition:
xmlitmap.hxx:69
SvXMLItemMapEntries::mpEntries
o3tl::span< SvXMLItemMapEntry const > mpEntries
Definition:
xmlitmap.hxx:66
SvXMLItemMapEntries::getByName
SvXMLItemMapEntry const * getByName(sal_Int32 nElement) const
Definition:
xmlitmpr.cxx:27
o3tl::span
o3tl::span::size
constexpr size_type size() const noexcept
tools::SvRef< SvXMLItemMapEntries >
nIndex
sal_Int32 nIndex
ref.hxx
span.hxx
SvXMLItemMapEntry
Definition:
xmlitmap.hxx:41
SvXMLItemMapEntry::eLocalName
enum::xmloff::token::XMLTokenEnum const eLocalName
Definition:
xmlitmap.hxx:46
SvXMLItemMapEntry::nWhichId
sal_uInt16 nWhichId
Definition:
xmlitmap.hxx:44
SvXMLItemMapEntry::nNameSpace
sal_uInt16 nNameSpace
Definition:
xmlitmap.hxx:42
SvXMLItemMapEntry::SvXMLItemMapEntry
SvXMLItemMapEntry(sal_uInt16 nameSpace, enum ::xmloff::token::XMLTokenEnum localName, sal_uInt16 whichId, sal_uInt32 memberId)
Definition:
xmlitmap.hxx:53
SvXMLItemMapEntry::nMemberId
sal_uInt32 nMemberId
Definition:
xmlitmap.hxx:49
types.h
aXMLTableCellItemMap
const o3tl::span< SvXMLItemMapEntry const > aXMLTableCellItemMap
aXMLTableItemMap
const o3tl::span< SvXMLItemMapEntry const > aXMLTableItemMap
SvXMLItemMapEntriesRef
tools::SvRef< SvXMLItemMapEntries > SvXMLItemMapEntriesRef
Definition:
xmlitmap.hxx:78
aXMLTableRowItemMap
const o3tl::span< SvXMLItemMapEntry const > aXMLTableRowItemMap
aXMLTableColItemMap
const o3tl::span< SvXMLItemMapEntry const > aXMLTableColItemMap
xmltoken.hxx
Generated on Sun Jul 30 2023 04:29:33 for LibreOffice Module sw (master) by
1.9.3