1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: metadata.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef RPTUI_METADATA_HXX_
31 #define RPTUI_METADATA_HXX_
33 #include "ModuleHelper.hxx"
35 /** === begin UNO includes === **/
36 #include <com/sun/star/beans/Property.hpp>
37 #include <com/sun/star/inspection/XPropertyHandler.hpp>
38 /** === end UNO includes === **/
40 //............................................................................
43 //............................................................................
45 struct OPropertyInfoImpl
;
47 //========================================================================
48 //= OPropertyInfoService
49 //========================================================================
50 class OPropertyInfoService
53 OPropertyInfoService(const OPropertyInfoService
&);
54 void operator =(const OPropertyInfoService
&);
56 static sal_uInt16 s_nCount
;
57 static OPropertyInfoImpl
* s_pPropertyInfos
;
58 // TODO: a real structure which allows quick access by name as well as by id
61 OPropertyInfoService(){}
62 virtual ~OPropertyInfoService(){}
63 // IPropertyInfoService
64 sal_Int32
getPropertyId(const String
& _rName
) const;
65 String
getPropertyTranslation(sal_Int32 _nId
) const;
66 sal_Int32
getPropertyHelpId(sal_Int32 _nId
) const;
67 sal_uInt32
getPropertyUIFlags(sal_Int32 _nId
) const;
68 static void getExcludeProperties(::std::vector
< com::sun::star::beans::Property
>& _rExcludeProperties
,const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XPropertyHandler
>& _xFormComponentHandler
);
71 const ::rtl::OUString
& _rPropertyName
,
72 const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XPropertyHandler
>& _xFormComponentHandler
76 static const OPropertyInfoImpl
* getPropertyInfo();
78 static const OPropertyInfoImpl
* getPropertyInfo(const String
& _rName
);
79 static const OPropertyInfoImpl
* getPropertyInfo(sal_Int32 _nId
);
82 //========================================================================
84 //========================================================================
85 /// small helper to translate help ids into help urls
89 static ::rtl::OUString
getHelpURL( sal_uInt32 _nHelpId
);
92 //========================================================================
93 //= UI flags (for all browseable properties)
94 //========================================================================
96 #define PROP_FLAG_NONE 0x00000001 // no special flag
97 #define PROP_FLAG_ENUM 0x00000002 // the property is some kind of enum property, i.e. its
98 // value is chosen from a fixed list of possible values
99 #define PROP_FLAG_ENUM_ONE 0x00000004 // the property is an enum property starting with 1
100 // (note that this includes PROP_FLAG_ENUM)
101 #define PROP_FLAG_COMPOSEABLE 0x00000008 // the property is "composeable", i.e. an intersection of property
102 // sets should expose it, if all elements do
103 #define PROP_FLAG_EXPERIMENTAL 0x00000010 // the property is experimental, i.e. should not appear in the
104 // UI, unless experimental properties are enabled by a configuraiton
106 #define PROP_FLAG_DATA_PROPERTY 0x00000020 // the property is to appear on the "Data" page
108 //========================================================================
109 //= property ids (for all browseable properties)
110 //= The ID is used for the view order in the property browser.
111 //========================================================================
113 #define PROPERTY_ID_FORCENEWPAGE 1
114 #define PROPERTY_ID_NEWROWORCOL 2
115 #define PROPERTY_ID_KEEPTOGETHER 3
116 #define PROPERTY_ID_CANGROW 4
117 #define PROPERTY_ID_CANSHRINK 5
118 #define PROPERTY_ID_REPEATSECTION 6
119 #define PROPERTY_ID_PRESERVEIRI 7
120 #define PROPERTY_ID_VISIBLE 8
121 #define PROPERTY_ID_GROUPKEEPTOGETHER 9
122 #define PROPERTY_ID_PAGEHEADEROPTION 10
123 #define PROPERTY_ID_PAGEFOOTEROPTION 11
124 #define PROPERTY_ID_POSITIONX 12
125 #define PROPERTY_ID_POSITIONY 13
126 #define PROPERTY_ID_WIDTH 14
127 #define PROPERTY_ID_HEIGHT 15
128 #define PROPERTY_ID_FORMULA 16
129 #define PROPERTY_ID_PRINTREPEATEDVALUES 17
130 #define PROPERTY_ID_CONDITIONALPRINTEXPRESSION 18
131 #define PROPERTY_ID_INITIALFORMULA 19
132 #define PROPERTY_ID_STARTNEWCOLUMN 20
133 #define PROPERTY_ID_TYPE 21
134 #define PROPERTY_ID_DATAFIELD 22
135 #define PROPERTY_ID_CHARFONTNAME 23
136 #define PROPERTY_ID_PRINTWHENGROUPCHANGE 24
137 #define PROPERTY_ID_DEEPTRAVERSING 25
138 #define PROPERTY_ID_PREEVALUATED 26
140 #define PROPERTY_ID_BACKCOLOR 29
141 #define PROPERTY_ID_CONTROLBACKGROUND 30
142 #define PROPERTY_ID_BACKTRANSPARENT 27
143 #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 28
145 #define PROPERTY_ID_FORMULALIST 31
146 #define PROPERTY_ID_SCOPE 32
147 #define PROPERTY_ID_RESETPAGENUMBER 33
148 #define PROPERTY_ID_CHARTTYPE 34
149 #define PROPERTY_ID_MASTERFIELDS 35
150 #define PROPERTY_ID_DETAILFIELDS 36
151 #define PROPERTY_ID_PREVIEW_COUNT 37
152 #define PROPERTY_ID_AREA 38
153 #define PROPERTY_ID_MIMETYPE 39
155 //............................................................................
157 //............................................................................
159 #endif // RPTUI_METADATA_HXX_