LibreOffice Module xmloff (master) 1
maptype.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_XMLOFF_MAPTYPE_HXX
21#define INCLUDED_XMLOFF_MAPTYPE_HXX
22
23#include <com/sun/star/uno/Any.hxx>
24#include <utility>
25#include <xmloff/xmltoken.hxx>
26#include <unotools/saveopt.hxx>
27
28
33{
34 const char* msApiName;
35 sal_Int32 nApiNameLength;
37 sal_uInt16 mnNameSpace;
87 sal_uInt32 mnType;
88
89 sal_Int16 mnContextId;
94
102
103 template< std::size_t N >
105 const char (&sApiName)[N],
106 sal_uInt16 nNameSpace,
108 sal_uInt32 nType,
109 sal_Int16 nContextId,
110 SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport,
111 bool bImportOnly)
112 :
113 msApiName(sApiName),
114 nApiNameLength(N-1),
115 meXMLName(eXMLName), mnNameSpace(nNameSpace), mnType(nType),
116 mnContextId(nContextId), mnEarliestODFVersionForExport(nEarliestODFVersionForExport),
117 mbImportOnly(bImportOnly)
118 {}
120 std::nullptr_t ,
121 sal_uInt16 nNameSpace,
123 sal_uInt32 nType,
124 sal_Int16 nContextId,
125 SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport,
126 bool bImportOnly)
127 :
128 msApiName(nullptr),
130 meXMLName(eXMLName), mnNameSpace(nNameSpace), mnType(nType),
131 mnContextId(nContextId), mnEarliestODFVersionForExport(nEarliestODFVersionForExport),
132 mbImportOnly(bImportOnly)
133 {}
134};
135
136
141{
142 sal_Int32 mnIndex;
143 css::uno::Any maValue;
144
145 XMLPropertyState( sal_Int32 nIndex )
146 : mnIndex( nIndex ) {}
147 XMLPropertyState( sal_Int32 nIndex, css::uno::Any aValue )
148 : mnIndex( nIndex ), maValue(std::move( aValue )) {}
149};
150
151#endif // INCLUDED_XMLOFF_MAPTYPE_HXX
152
153/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 nIndex
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:50
#define N
QPRO_FUNC_TYPE nType
Represents a property with its API-name, its XML-name and the type of its value.
Definition: maptype.hxx:33
bool mbImportOnly
Flag to specify whether entry is only used during import.
Definition: maptype.hxx:101
XMLPropertyMapEntry(std::nullptr_t, sal_uInt16 nNameSpace, enum ::xmloff::token::XMLTokenEnum eXMLName, sal_uInt32 nType, sal_Int16 nContextId, SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport, bool bImportOnly)
Definition: maptype.hxx:119
enum::xmloff::token::XMLTokenEnum meXMLName
length of property name
Definition: maptype.hxx:36
sal_uInt32 mnType
declares the Namespace in which this property exists
Definition: maptype.hxx:87
XMLPropertyMapEntry(const char(&sApiName)[N], sal_uInt16 nNameSpace, enum ::xmloff::token::XMLTokenEnum eXMLName, sal_uInt32 nType, sal_Int16 nContextId, SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport, bool bImportOnly)
Definition: maptype.hxx:104
const char * msApiName
Definition: maptype.hxx:34
sal_Int16 mnContextId
Definition: maptype.hxx:89
SvtSaveOptions::ODFSaneDefaultVersion mnEarliestODFVersionForExport
User defined id for context filtering.
Definition: maptype.hxx:93
sal_uInt16 mnNameSpace
XML-Name.
Definition: maptype.hxx:37
sal_Int32 nApiNameLength
Property-Name.
Definition: maptype.hxx:35
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:141
XMLPropertyState(sal_Int32 nIndex)
Definition: maptype.hxx:145
css::uno::Any maValue
Definition: maptype.hxx:143
sal_Int32 mnIndex
Definition: maptype.hxx:142
XMLPropertyState(sal_Int32 nIndex, css::uno::Any aValue)
Definition: maptype.hxx:147