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