LibreOffice Module xmloff (master) 1
property_description.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#pragma once
21
23#include <utility>
24#include <xmloff/xmltoken.hxx>
25
26#include <vector>
27
28namespace xmloff
29{
30
31 //= PropertyDescription
33 {
34 sal_uInt16 namespacePrefix; // usually XML_NAMESPACE_FORM
36
38 :namespacePrefix( 0 )
40 {
41 }
42
44 const sal_uInt16 i_namespacePrefix,
46 )
47 :namespacePrefix( i_namespacePrefix )
48 ,attributeToken( i_attributeToken )
49 {
50 }
51 };
52
53 inline bool operator==( const AttributeDescription& i_lhs, const AttributeDescription& i_rhs )
54 {
55 return ( i_lhs.namespacePrefix == i_rhs.namespacePrefix )
56 && ( i_lhs.attributeToken == i_rhs.attributeToken );
57 }
58
59 //= PropertyDescription
61 {
63 const OUString propertyName;
72
75 ,factory( nullptr )
77 ,attribute()
78 {
79 }
80
82 OUString i_propertyName,
83 const sal_uInt16 i_namespacePrefix,
85 const PropertyHandlerFactory i_factory,
86 const PropertyId i_propertyId
87 )
88 :propertyName(std::move( i_propertyName ))
89 ,factory( i_factory )
90 ,propertyId( i_propertyId )
91 ,attribute( i_namespacePrefix, i_attributeToken )
92 {
93 }
94 };
95
96 //= PropertyDescriptionList
97 typedef ::std::vector< const PropertyDescription* > PropertyDescriptionList;
98
99 //= PropertyGroups
100 typedef ::std::vector< PropertyDescriptionList > PropertyGroups;
101
102} // namespace xmloff
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:50
::std::vector< PropertyDescriptionList > PropertyGroups
bool operator==(const AttributeDescription &i_lhs, const AttributeDescription &i_rhs)
::std::vector< const PropertyDescription * > PropertyDescriptionList
PPropertyHandler(* PropertyHandlerFactory)(const PropertyId i_propertyId)
::xmloff::token::XMLTokenEnum attributeToken
AttributeDescription(const sal_uInt16 i_namespacePrefix, const ::xmloff::token::XMLTokenEnum i_attributeToken)
PropertyDescription(OUString i_propertyName, const sal_uInt16 i_namespacePrefix, const ::xmloff::token::XMLTokenEnum i_attributeToken, const PropertyHandlerFactory i_factory, const PropertyId i_propertyId)
const PropertyId propertyId
the unique ID of the property. The property meta data table must not contain two entries with the sam...
const OUString propertyName
is the name of the property
const AttributeDescription attribute
const PropertyHandlerFactory factory
denotes the attribute which represents the property.