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