LibreOffice Module reportdesign (master) 1
metadata.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#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
21
22#include <com/sun/star/beans/Property.hpp>
23#include <com/sun/star/inspection/XPropertyHandler.hpp>
25
26#include <string_view>
27#include <vector>
28
29 //= UI flags (for all browsable properties)
30enum class PropUIFlags {
31 NONE = 0x0001, // no special flag
32 Composeable = 0x0002, // the property is "composeable", i.e. an intersection of property
33 // sets should expose it, if all elements do
34 DataProperty = 0x0004 // the property is to appear on the "Data" page
35};
36namespace o3tl {
37 template<> struct typed_flags<PropUIFlags> : is_typed_flags<PropUIFlags, 0x0007> {};
38}
39
40
41namespace rptui
42{
43
44
45 struct OPropertyInfoImpl;
46
47
48 //= OPropertyInfoService
49
51 {
52 public:
53 // IPropertyInfoService
54 static sal_Int32 getPropertyId(const OUString& _rName);
55 static OUString getPropertyTranslation(sal_Int32 _nId);
56 static OString getPropertyHelpId(sal_Int32 _nId);
57 static PropUIFlags getPropertyUIFlags(sal_Int32 _nId);
58 static void getExcludeProperties(::std::vector< css::beans::Property >& _rExcludeProperties,const css::uno::Reference< css::inspection::XPropertyHandler >& _xFormComponentHandler);
59
60 static bool isComposable(
61 const OUString& _rPropertyName,
62 const css::uno::Reference< css::inspection::XPropertyHandler >& _xFormComponentHandler
63 );
64
65 private:
66 static const OPropertyInfoImpl* getPropertyInfo();
67
68 static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName);
69 static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId);
70
72 void operator =(const OPropertyInfoService&) = delete;
74
75 static sal_uInt16 s_nCount;
77 // TODO: a real structure which allows quick access by name as well as by id
78 };
79
80
81 //= HelpIdUrl
82
85 {
86 public:
87 static OUString getHelpURL( std::string_view _sHelpId );
88 };
89
90
91 //= property ids (for all browsable properties)
92 //= The ID is used for the view order in the property browser.
93
94
95 #define PROPERTY_ID_FORCENEWPAGE 1
96 #define PROPERTY_ID_NEWROWORCOL 2
97 #define PROPERTY_ID_KEEPTOGETHER 3
98 #define PROPERTY_ID_CANGROW 4
99 #define PROPERTY_ID_CANSHRINK 5
100 #define PROPERTY_ID_REPEATSECTION 6
101 #define PROPERTY_ID_PRESERVEIRI 7
102 #define PROPERTY_ID_VISIBLE 8
103 #define PROPERTY_ID_GROUPKEEPTOGETHER 9
104 #define PROPERTY_ID_PAGEHEADEROPTION 10
105 #define PROPERTY_ID_PAGEFOOTEROPTION 11
106 #define PROPERTY_ID_POSITIONX 12
107 #define PROPERTY_ID_POSITIONY 13
108 #define PROPERTY_ID_WIDTH 14
109 #define PROPERTY_ID_HEIGHT 15
110 #define PROPERTY_ID_AUTOGROW 16
111 #define PROPERTY_ID_FORMULA 17
112 #define PROPERTY_ID_CONDITIONALPRINTEXPRESSION 18
113 #define PROPERTY_ID_PRINTREPEATEDVALUES 19
114 #define PROPERTY_ID_PRINTWHENGROUPCHANGE 20
115 #define PROPERTY_ID_INITIALFORMULA 21
116 #define PROPERTY_ID_STARTNEWCOLUMN 22
117 #define PROPERTY_ID_TYPE 23
118 #define PROPERTY_ID_DATAFIELD 24
119 #define PROPERTY_ID_CHARFONTNAME 25
120 #define PROPERTY_ID_DEEPTRAVERSING 26
121 #define PROPERTY_ID_PREEVALUATED 27
122
123 #define PROPERTY_ID_BACKTRANSPARENT 28
124 #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 29
125 #define PROPERTY_ID_BACKCOLOR 30
126 #define PROPERTY_ID_CONTROLBACKGROUND 31
127
128 #define PROPERTY_ID_FORMULALIST 32
129 #define PROPERTY_ID_SCOPE 33
130 #define PROPERTY_ID_RESETPAGENUMBER 34
131 #define PROPERTY_ID_CHARTTYPE 35
132 #define PROPERTY_ID_MASTERFIELDS 36
133 #define PROPERTY_ID_DETAILFIELDS 37
134 #define PROPERTY_ID_PREVIEW_COUNT 38
135 #define PROPERTY_ID_AREA 39
136 #define PROPERTY_ID_MIMETYPE 40
137
138 #define PROPERTY_ID_FONT 41
139 #define PROPERTY_ID_PARAADJUST 42
140 #define PROPERTY_ID_VERTICALALIGN 43
141
142
143} // namespace rptui
144
145
146#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
147
148/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
small helper to translate help ids into help urls
Definition: metadata.hxx:85
static OUString getHelpURL(std::string_view _sHelpId)
static sal_Int32 getPropertyId(const OUString &_rName)
Definition: metadata.cxx:146
OPropertyInfoService(const OPropertyInfoService &)=delete
static OString getPropertyHelpId(sal_Int32 _nId)
Definition: metadata.cxx:160
static OUString getPropertyTranslation(sal_Int32 _nId)
Definition: metadata.cxx:153
static void getExcludeProperties(::std::vector< css::beans::Property > &_rExcludeProperties, const css::uno::Reference< css::inspection::XPropertyHandler > &_xFormComponentHandler)
Definition: metadata.cxx:219
static bool isComposable(const OUString &_rPropertyName, const css::uno::Reference< css::inspection::XPropertyHandler > &_xFormComponentHandler)
Definition: metadata.cxx:206
static PropUIFlags getPropertyUIFlags(sal_Int32 _nId)
Definition: metadata.cxx:167
static sal_uInt16 s_nCount
Definition: metadata.hxx:75
static OPropertyInfoImpl * s_pPropertyInfos
Definition: metadata.hxx:76
static const OPropertyInfoImpl * getPropertyInfo()
Definition: metadata.cxx:85
void operator=(const OPropertyInfoService &)=delete
PropUIFlags
Definition: metadata.hxx:30
NONE