1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
20 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
22 #include <com/sun/star/beans/Property.hpp>
23 #include <com/sun/star/inspection/XPropertyHandler.hpp>
24 #include <o3tl/typed_flags_set.hxx>
27 //= UI flags (for all browseable properties)
28 enum class PropUIFlags
{
29 NONE
= 0x0001, // no special flag
30 Composeable
= 0x0002, // the property is "composeable", i.e. an intersection of property
31 // sets should expose it, if all elements do
32 DataProperty
= 0x0004 // the property is to appear on the "Data" page
35 template<> struct typed_flags
<PropUIFlags
> : is_typed_flags
<PropUIFlags
, 0x0007> {};
43 struct OPropertyInfoImpl
;
46 //= OPropertyInfoService
48 class OPropertyInfoService final
51 // IPropertyInfoService
52 static sal_Int32
getPropertyId(const OUString
& _rName
);
53 static OUString
getPropertyTranslation(sal_Int32 _nId
);
54 static OString
getPropertyHelpId(sal_Int32 _nId
);
55 static PropUIFlags
getPropertyUIFlags(sal_Int32 _nId
);
56 static void getExcludeProperties(::std::vector
< css::beans::Property
>& _rExcludeProperties
,const css::uno::Reference
< css::inspection::XPropertyHandler
>& _xFormComponentHandler
);
58 static bool isComposable(
59 const OUString
& _rPropertyName
,
60 const css::uno::Reference
< css::inspection::XPropertyHandler
>& _xFormComponentHandler
64 static const OPropertyInfoImpl
* getPropertyInfo();
66 static const OPropertyInfoImpl
* getPropertyInfo(const OUString
& _rName
);
67 static const OPropertyInfoImpl
* getPropertyInfo(sal_Int32 _nId
);
69 OPropertyInfoService(const OPropertyInfoService
&) = delete;
70 void operator =(const OPropertyInfoService
&) = delete;
71 OPropertyInfoService() = delete;
73 static sal_uInt16 s_nCount
;
74 static OPropertyInfoImpl
* s_pPropertyInfos
;
75 // TODO: a real structure which allows quick access by name as well as by id
81 /// small helper to translate help ids into help urls
85 static OUString
getHelpURL( const OString
& _sHelpId
);
89 //= property ids (for all browseable properties)
90 //= The ID is used for the view order in the property browser.
93 #define PROPERTY_ID_FORCENEWPAGE 1
94 #define PROPERTY_ID_NEWROWORCOL 2
95 #define PROPERTY_ID_KEEPTOGETHER 3
96 #define PROPERTY_ID_CANGROW 4
97 #define PROPERTY_ID_CANSHRINK 5
98 #define PROPERTY_ID_REPEATSECTION 6
99 #define PROPERTY_ID_PRESERVEIRI 7
100 #define PROPERTY_ID_VISIBLE 8
101 #define PROPERTY_ID_GROUPKEEPTOGETHER 9
102 #define PROPERTY_ID_PAGEHEADEROPTION 10
103 #define PROPERTY_ID_PAGEFOOTEROPTION 11
104 #define PROPERTY_ID_POSITIONX 12
105 #define PROPERTY_ID_POSITIONY 13
106 #define PROPERTY_ID_WIDTH 14
107 #define PROPERTY_ID_HEIGHT 15
108 #define PROPERTY_ID_FORMULA 16
109 #define PROPERTY_ID_CONDITIONALPRINTEXPRESSION 17
110 #define PROPERTY_ID_PRINTREPEATEDVALUES 18
111 #define PROPERTY_ID_PRINTWHENGROUPCHANGE 19
112 #define PROPERTY_ID_INITIALFORMULA 20
113 #define PROPERTY_ID_STARTNEWCOLUMN 21
114 #define PROPERTY_ID_TYPE 22
115 #define PROPERTY_ID_DATAFIELD 23
116 #define PROPERTY_ID_CHARFONTNAME 24
117 #define PROPERTY_ID_DEEPTRAVERSING 25
118 #define PROPERTY_ID_PREEVALUATED 26
120 #define PROPERTY_ID_BACKTRANSPARENT 27
121 #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 28
122 #define PROPERTY_ID_BACKCOLOR 29
123 #define PROPERTY_ID_CONTROLBACKGROUND 30
125 #define PROPERTY_ID_FORMULALIST 31
126 #define PROPERTY_ID_SCOPE 32
127 #define PROPERTY_ID_RESETPAGENUMBER 33
128 #define PROPERTY_ID_CHARTTYPE 34
129 #define PROPERTY_ID_MASTERFIELDS 35
130 #define PROPERTY_ID_DETAILFIELDS 36
131 #define PROPERTY_ID_PREVIEW_COUNT 37
132 #define PROPERTY_ID_AREA 38
133 #define PROPERTY_ID_MIMETYPE 39
135 #define PROPERTY_ID_FONT 40
136 #define PROPERTY_ID_PARAADJUST 41
137 #define PROPERTY_ID_VERTICALALIGN 42
143 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_METADATA_HXX
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */