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 <xmloff/xmltoken.hxx>
24 
25 #include <vector>
26 
27 namespace xmloff
28 {
29 
30  //= PropertyDescription
32  {
33  sal_uInt16 namespacePrefix; // usually XML_NAMESPACE_FORM
35 
37  :namespacePrefix( 0 )
38  ,attributeToken( ::xmloff::token::XML_TOKEN_INVALID )
39  {
40  }
41 
43  const sal_uInt16 i_namespacePrefix,
45  )
46  :namespacePrefix( i_namespacePrefix )
47  ,attributeToken( i_attributeToken )
48  {
49  }
50  };
51 
52  inline bool operator==( const AttributeDescription& i_lhs, const AttributeDescription& i_rhs )
53  {
54  return ( i_lhs.namespacePrefix == i_rhs.namespacePrefix )
55  && ( i_lhs.attributeToken == i_rhs.attributeToken );
56  }
57 
58  //= PropertyDescription
60  {
62  const OUString propertyName;
71 
73  :propertyName()
74  ,factory( nullptr )
75  ,propertyId( PID_INVALID )
76  ,attribute()
77  {
78  }
79 
81  const OUString& i_propertyName,
82  const sal_uInt16 i_namespacePrefix,
83  const ::xmloff::token::XMLTokenEnum i_attributeToken,
84  const PropertyHandlerFactory i_factory,
85  const PropertyId i_propertyId
86  )
87  :propertyName( i_propertyName )
88  ,factory( i_factory )
89  ,propertyId( i_propertyId )
90  ,attribute( i_namespacePrefix, i_attributeToken )
91  {
92  }
93  };
94 
95  //= PropertyDescriptionList
96  typedef ::std::vector< const PropertyDescription* > PropertyDescriptionList;
97 
98  //= PropertyGroups
99  typedef ::std::vector< PropertyDescriptionList > PropertyGroups;
100 
101 } // namespace xmloff
102 
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::vector< PropertyDescriptionList > PropertyGroups
::std::vector< const PropertyDescription * > PropertyDescriptionList
const PropertyId propertyId
the unique ID of the property. The property meta data table must not contain two entries with the sam...
AttributeDescription(const sal_uInt16 i_namespacePrefix, const ::xmloff::token::XMLTokenEnum i_attributeToken)
PropertyDescription(const OUString &i_propertyName, const sal_uInt16 i_namespacePrefix, const ::xmloff::token::XMLTokenEnum i_attributeToken, const PropertyHandlerFactory i_factory, const PropertyId i_propertyId)
::xmloff::token::XMLTokenEnum attributeToken
const AttributeDescription attribute
PPropertyHandler(* PropertyHandlerFactory)(const PropertyId i_propertyId)
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:49
const OUString propertyName
is the name of the property
const PropertyHandlerFactory factory
denotes the attribute which represents the property.
bool operator==(const AttributeDescription &i_lhs, const AttributeDescription &i_rhs)