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 rtl::OUStringConstExpr msApiName;
36 sal_uInt16 mnNameSpace;
86 sal_uInt32 mnType;
87
88 sal_Int16 mnContextId;
93
101
102 static constexpr OUStringLiteral EMPTY{u""};
103
104 template<std::size_t N>
106 const OUStringLiteral<N>& sApiName,
107 sal_uInt16 nNameSpace,
109 sal_uInt32 nType,
110 sal_Int16 nContextId,
111 SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport,
112 bool bImportOnly)
113 :
114 msApiName(sApiName),
115 meXMLName(eXMLName), mnNameSpace(nNameSpace), mnType(nType),
116 mnContextId(nContextId), mnEarliestODFVersionForExport(nEarliestODFVersionForExport),
117 mbImportOnly(bImportOnly)
118 {}
119
121 XMLPropertyMapEntry(std::nullptr_t)
122 :
126 mbImportOnly(false)
127 {}
128
129 const OUString & getApiName() const { return static_cast<const OUString &>(msApiName); }
130
131 // use token because an empty API name is a valid entry
133};
134
135
140{
141 sal_Int32 mnIndex;
142 css::uno::Any maValue;
143
144 XMLPropertyState( sal_Int32 nIndex )
145 : mnIndex( nIndex ) {}
146 XMLPropertyState( sal_Int32 nIndex, css::uno::Any aValue )
147 : mnIndex( nIndex ), maValue(std::move( aValue )) {}
148};
149
150#endif // INCLUDED_XMLOFF_MAPTYPE_HXX
151
152/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
float u
sal_Int32 nIndex
ODFSVER_010
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:50
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:100
static constexpr OUStringLiteral EMPTY
Definition: maptype.hxx:102
enum::xmloff::token::XMLTokenEnum meXMLName
Property-Name.
Definition: maptype.hxx:35
XMLPropertyMapEntry(std::nullptr_t)
used to mark the end of the array
Definition: maptype.hxx:121
sal_uInt32 mnType
declares the Namespace in which this property exists
Definition: maptype.hxx:86
sal_Int16 mnContextId
Definition: maptype.hxx:88
SvtSaveOptions::ODFSaneDefaultVersion mnEarliestODFVersionForExport
User defined id for context filtering.
Definition: maptype.hxx:92
bool IsEnd() const
Definition: maptype.hxx:132
const OUString & getApiName() const
Definition: maptype.hxx:129
sal_uInt16 mnNameSpace
XML-Name.
Definition: maptype.hxx:36
rtl::OUStringConstExpr msApiName
Definition: maptype.hxx:34
XMLPropertyMapEntry(const OUStringLiteral< N > &sApiName, sal_uInt16 nNameSpace, enum ::xmloff::token::XMLTokenEnum eXMLName, sal_uInt32 nType, sal_Int16 nContextId, SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport, bool bImportOnly)
Definition: maptype.hxx:105
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:140
XMLPropertyState(sal_Int32 nIndex)
Definition: maptype.hxx:144
css::uno::Any maValue
Definition: maptype.hxx:142
sal_Int32 mnIndex
Definition: maptype.hxx:141
XMLPropertyState(sal_Int32 nIndex, css::uno::Any aValue)
Definition: maptype.hxx:146