1*9ee13d13SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9ee13d13SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9ee13d13SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9ee13d13SAndrew Rist * distributed with this work for additional information 6*9ee13d13SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9ee13d13SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9ee13d13SAndrew Rist * "License"); you may not use this file except in compliance 9*9ee13d13SAndrew Rist * with the License. You may obtain a copy of the License at 10*9ee13d13SAndrew Rist * 11*9ee13d13SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*9ee13d13SAndrew Rist * 13*9ee13d13SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9ee13d13SAndrew Rist * software distributed under the License is distributed on an 15*9ee13d13SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9ee13d13SAndrew Rist * KIND, either express or implied. See the License for the 17*9ee13d13SAndrew Rist * specific language governing permissions and limitations 18*9ee13d13SAndrew Rist * under the License. 19*9ee13d13SAndrew Rist * 20*9ee13d13SAndrew Rist *************************************************************/ 21*9ee13d13SAndrew Rist 22*9ee13d13SAndrew Rist 23cdf0e10cSrcweir #ifndef RPTUI_METADATA_HXX_ 24cdf0e10cSrcweir #define RPTUI_METADATA_HXX_ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "ModuleHelper.hxx" 27cdf0e10cSrcweir 28cdf0e10cSrcweir /** === begin UNO includes === **/ 29cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp> 30cdf0e10cSrcweir #include <com/sun/star/inspection/XPropertyHandler.hpp> 31cdf0e10cSrcweir /** === end UNO includes === **/ 32cdf0e10cSrcweir 33cdf0e10cSrcweir //............................................................................ 34cdf0e10cSrcweir namespace rptui 35cdf0e10cSrcweir { 36cdf0e10cSrcweir //............................................................................ 37cdf0e10cSrcweir 38cdf0e10cSrcweir struct OPropertyInfoImpl; 39cdf0e10cSrcweir 40cdf0e10cSrcweir //======================================================================== 41cdf0e10cSrcweir //= OPropertyInfoService 42cdf0e10cSrcweir //======================================================================== 43cdf0e10cSrcweir class OPropertyInfoService 44cdf0e10cSrcweir :public OModuleClient 45cdf0e10cSrcweir { 46cdf0e10cSrcweir OPropertyInfoService(const OPropertyInfoService&); 47cdf0e10cSrcweir void operator =(const OPropertyInfoService&); 48cdf0e10cSrcweir protected: 49cdf0e10cSrcweir static sal_uInt16 s_nCount; 50cdf0e10cSrcweir static OPropertyInfoImpl* s_pPropertyInfos; 51cdf0e10cSrcweir // TODO: a real structure which allows quick access by name as well as by id 52cdf0e10cSrcweir 53cdf0e10cSrcweir public: OPropertyInfoService()54cdf0e10cSrcweir OPropertyInfoService(){} ~OPropertyInfoService()55cdf0e10cSrcweir virtual ~OPropertyInfoService(){} 56cdf0e10cSrcweir // IPropertyInfoService 57cdf0e10cSrcweir sal_Int32 getPropertyId(const String& _rName) const; 58cdf0e10cSrcweir String getPropertyTranslation(sal_Int32 _nId) const; 59cdf0e10cSrcweir rtl::OString getPropertyHelpId(sal_Int32 _nId) const; 60cdf0e10cSrcweir sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const; 61cdf0e10cSrcweir static void getExcludeProperties(::std::vector< com::sun::star::beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler); 62cdf0e10cSrcweir 63cdf0e10cSrcweir bool isComposable( 64cdf0e10cSrcweir const ::rtl::OUString& _rPropertyName, 65cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler 66cdf0e10cSrcweir ); 67cdf0e10cSrcweir 68cdf0e10cSrcweir protected: 69cdf0e10cSrcweir static const OPropertyInfoImpl* getPropertyInfo(); 70cdf0e10cSrcweir 71cdf0e10cSrcweir static const OPropertyInfoImpl* getPropertyInfo(const String& _rName); 72cdf0e10cSrcweir static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId); 73cdf0e10cSrcweir }; 74cdf0e10cSrcweir 75cdf0e10cSrcweir //======================================================================== 76cdf0e10cSrcweir //= HelpIdUrl 77cdf0e10cSrcweir //======================================================================== 78cdf0e10cSrcweir /// small helper to translate help ids into help urls 79cdf0e10cSrcweir class HelpIdUrl 80cdf0e10cSrcweir { 81cdf0e10cSrcweir public: 82cdf0e10cSrcweir static ::rtl::OUString getHelpURL( const rtl::OString& _sHelpId ); 83cdf0e10cSrcweir }; 84cdf0e10cSrcweir 85cdf0e10cSrcweir //======================================================================== 86cdf0e10cSrcweir //= UI flags (for all browseable properties) 87cdf0e10cSrcweir //======================================================================== 88cdf0e10cSrcweir 89cdf0e10cSrcweir #define PROP_FLAG_NONE 0x00000001 // no special flag 90cdf0e10cSrcweir #define PROP_FLAG_ENUM 0x00000002 // the property is some kind of enum property, i.e. its 91cdf0e10cSrcweir // value is chosen from a fixed list of possible values 92cdf0e10cSrcweir #define PROP_FLAG_ENUM_ONE 0x00000004 // the property is an enum property starting with 1 93cdf0e10cSrcweir // (note that this includes PROP_FLAG_ENUM) 94cdf0e10cSrcweir #define PROP_FLAG_COMPOSEABLE 0x00000008 // the property is "composeable", i.e. an intersection of property 95cdf0e10cSrcweir // sets should expose it, if all elements do 96cdf0e10cSrcweir #define PROP_FLAG_EXPERIMENTAL 0x00000010 // the property is experimental, i.e. should not appear in the 97cdf0e10cSrcweir // UI, unless experimental properties are enabled by a configuraiton 98cdf0e10cSrcweir // option 99cdf0e10cSrcweir #define PROP_FLAG_DATA_PROPERTY 0x00000020 // the property is to appear on the "Data" page 100cdf0e10cSrcweir 101cdf0e10cSrcweir //======================================================================== 102cdf0e10cSrcweir //= property ids (for all browseable properties) 103cdf0e10cSrcweir //= The ID is used for the view order in the property browser. 104cdf0e10cSrcweir //======================================================================== 105cdf0e10cSrcweir 106cdf0e10cSrcweir #define PROPERTY_ID_FORCENEWPAGE 1 107cdf0e10cSrcweir #define PROPERTY_ID_NEWROWORCOL 2 108cdf0e10cSrcweir #define PROPERTY_ID_KEEPTOGETHER 3 109cdf0e10cSrcweir #define PROPERTY_ID_CANGROW 4 110cdf0e10cSrcweir #define PROPERTY_ID_CANSHRINK 5 111cdf0e10cSrcweir #define PROPERTY_ID_REPEATSECTION 6 112cdf0e10cSrcweir #define PROPERTY_ID_PRESERVEIRI 7 113cdf0e10cSrcweir #define PROPERTY_ID_VISIBLE 8 114cdf0e10cSrcweir #define PROPERTY_ID_GROUPKEEPTOGETHER 9 115cdf0e10cSrcweir #define PROPERTY_ID_PAGEHEADEROPTION 10 116cdf0e10cSrcweir #define PROPERTY_ID_PAGEFOOTEROPTION 11 117cdf0e10cSrcweir #define PROPERTY_ID_POSITIONX 12 118cdf0e10cSrcweir #define PROPERTY_ID_POSITIONY 13 119cdf0e10cSrcweir #define PROPERTY_ID_WIDTH 14 120cdf0e10cSrcweir #define PROPERTY_ID_HEIGHT 15 121cdf0e10cSrcweir #define PROPERTY_ID_FORMULA 16 122cdf0e10cSrcweir #define PROPERTY_ID_PRINTREPEATEDVALUES 17 123cdf0e10cSrcweir #define PROPERTY_ID_CONDITIONALPRINTEXPRESSION 18 124cdf0e10cSrcweir #define PROPERTY_ID_INITIALFORMULA 19 125cdf0e10cSrcweir #define PROPERTY_ID_STARTNEWCOLUMN 20 126cdf0e10cSrcweir #define PROPERTY_ID_TYPE 21 127cdf0e10cSrcweir #define PROPERTY_ID_DATAFIELD 22 128cdf0e10cSrcweir #define PROPERTY_ID_CHARFONTNAME 23 129cdf0e10cSrcweir #define PROPERTY_ID_PRINTWHENGROUPCHANGE 24 130cdf0e10cSrcweir #define PROPERTY_ID_DEEPTRAVERSING 25 131cdf0e10cSrcweir #define PROPERTY_ID_PREEVALUATED 26 132cdf0e10cSrcweir 133cdf0e10cSrcweir #define PROPERTY_ID_BACKTRANSPARENT 27 134cdf0e10cSrcweir #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 28 135cdf0e10cSrcweir #define PROPERTY_ID_BACKCOLOR 29 136cdf0e10cSrcweir #define PROPERTY_ID_CONTROLBACKGROUND 30 137cdf0e10cSrcweir 138cdf0e10cSrcweir #define PROPERTY_ID_FORMULALIST 31 139cdf0e10cSrcweir #define PROPERTY_ID_SCOPE 32 140cdf0e10cSrcweir #define PROPERTY_ID_RESETPAGENUMBER 33 141cdf0e10cSrcweir #define PROPERTY_ID_CHARTTYPE 34 142cdf0e10cSrcweir #define PROPERTY_ID_MASTERFIELDS 35 143cdf0e10cSrcweir #define PROPERTY_ID_DETAILFIELDS 36 144cdf0e10cSrcweir #define PROPERTY_ID_PREVIEW_COUNT 37 145cdf0e10cSrcweir #define PROPERTY_ID_AREA 38 146cdf0e10cSrcweir #define PROPERTY_ID_MIMETYPE 39 147cdf0e10cSrcweir 148cdf0e10cSrcweir #define PROPERTY_ID_FONT 40 149cdf0e10cSrcweir #define PROPERTY_ID_PARAADJUST 41 150cdf0e10cSrcweir #define PROPERTY_ID_VERTICALALIGN 42 151cdf0e10cSrcweir 152cdf0e10cSrcweir 153cdf0e10cSrcweir //............................................................................ 154cdf0e10cSrcweir } // namespace rptui 155cdf0e10cSrcweir //............................................................................ 156cdf0e10cSrcweir 157cdf0e10cSrcweir #endif // RPTUI_METADATA_HXX_ 158cdf0e10cSrcweir 159